New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: migrate src/Page.js to TypeScript #5809
Conversation
The final one! This is a huge file and needs to be split up and tidied, but for now I've left all the definitions in place and converted types accordingly. There's some additional tidying we can do now every `src` file is TS, but I'll leave that for another PR to avoid this one getting any bigger.
* we can remove this and instead use the type defined in LifeCycleWatcher | ||
*/ | ||
export type PuppeteerLifeCycleEvent = 'load' | 'domcontentloaded' | 'networkidle0' | 'networkidle2'; | ||
|
||
export interface ConnectionTransport { | ||
send(string); | ||
close(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in a follow up PR I will remove this file and find a new home for the interfaces we need where they are not exposed globally
_viewport?: Puppeteer.Viewport; | ||
_screenshotTaskQueue: TaskQueue; | ||
_workers = new Map<string, PuppeteerWorker>(); | ||
// TODO: improve this typedef - it's a function that takes a file chooser or something? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do in a follow up PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Co-authored-by: Mathias Bynens <mathias@qiwi.be>
The final one! This is a huge file and needs to be split up and tidied,
but for now I've left all the definitions in place and converted types
accordingly.
There's some additional tidying we can do now every
src
file is TS,but I'll leave that for another PR to avoid this one getting any bigger.