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

feat(types): add types for $eval #6135

Merged
merged 1 commit into from Jul 2, 2020
Merged

feat(types): add types for $eval #6135

merged 1 commit into from Jul 2, 2020

Conversation

jackfranklin
Copy link
Collaborator

@jackfranklin jackfranklin commented Jul 1, 2020

This pulls in the types (based on the DefinitelyTyped repo) for page.$eval (and the $eval method on other classes). The $eval method is quite hard to type due to the way we wrap and unwrap ElementHandles that are passed to / returned from the pageFunction that users provide.

Longer term we can improve the types by providing type overloads as DefinitelyTyped does but I've deferred that for now (see the TODO in the code for more details).

Note that I've split up the commits for easier reviewing, so you can avoid all the docs changes.

Part of #6124

@jackfranklin jackfranklin changed the title Update the documentation. feat(types): feat(types): add types for $eval Jul 1, 2020
@jackfranklin jackfranklin changed the title feat(types): feat(types): add types for $eval feat(types): add types for $eval Jul 1, 2020
This pulls in the types (based on the DefinitelyTyped repo) for
`page.$eval` (and the `$eval` method on other classes). The `$eval`
method is quite hard to type due to the way we wrap and unwrap
ElementHandles that are passed to / returned from the `pageFunction`
that users provide.

Longer term we can improve the types by providing type overloads as
DefinitelyTyped does but I've deferred that for now (see the `TODO` in
the code for more details).
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

2 participants