Skip to content
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

Merged
merged 4 commits into from May 5, 2020

Conversation

jackfranklin
Copy link
Collaborator

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.

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();
Copy link
Collaborator Author

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?
Copy link
Collaborator Author

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

Copy link
Member

@mathiasbynens mathiasbynens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

jackfranklin and others added 2 commits May 5, 2020 12:27
@jackfranklin jackfranklin merged commit de4f08d into master May 5, 2020
@jackfranklin jackfranklin deleted the migrate-src/Page-typescript branch May 5, 2020 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants