You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Concerned about how most of Puppeteer's Page's methods are async so some dev's may try to await or resolve promises inside sync functions but page.url() is sync, and other BotActions would run faster if ran synchronously such as map() in a Pipe, etc
Concept/Idea
Same method parameters (page: Page, ...injects: any[]), but instead of returning a Promise, it either doesn't return (void) or returns a PipeValue. Therefore, all assembly lines need to check the returned value for something scalar like undefined or a PipeValue, and test it for being a Promise. If a promise, then await it before proceeding further.
Concerned about how most of Puppeteer's Page's methods are
async
so some dev's may try to await or resolve promises inside sync functions butpage.url()
is sync, and other BotActions would run faster if ran synchronously such asmap()
in a Pipe, etcConcept/Idea
Same method parameters
(page: Page, ...injects: any[])
, but instead of returning a Promise, it either doesn't return (void) or returns a PipeValue. Therefore, all assembly lines need to check the returned value for something scalar likeundefined
or a PipeValue, and test it for being a Promise. If a promise, thenawait
it before proceeding further.As per interfaces, idea is:
The text was updated successfully, but these errors were encountered: