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

Tracking doc: shipping built-in type definitions #6124

Closed
2 of 5 tasks
jackfranklin opened this issue Jun 30, 2020 · 0 comments
Closed
2 of 5 tasks

Tracking doc: shipping built-in type definitions #6124

jackfranklin opened this issue Jun 30, 2020 · 0 comments
Assignees

Comments

@jackfranklin
Copy link
Collaborator

jackfranklin commented Jun 30, 2020

Now the codebase is in TypeScript we can ship type definitions built-in to the library and deprecate the 3rd party DefinitelyTyped version. To be clear, we are very grateful to those who have worked hard on providing types, but if we can ship them built-in that's a better experience for all.

This proposal is also related to #6118 as shipping new docs will make it easier to use our TS defs as the docs will document them all.

The steps to doing this are roughly like so:

  • Port over the most valuable type defs from DefinitelyTyped. The main functions that we have inferior types for now are $eval, $$eval and similar.
  • Use API Extractor to rollup all our types into one large puppeteer.d.ts file that we can ship as the typings. This will enable people to import types directly from puppeteer rather than import {TypeX} from 'puppeteer/lib/...' which we do not want to support (we do not consider internal file structure changes as breaking and would like to keep it that way).
  • Update our package.json to point the types property to our puppeteer.d.ts file (as documented in the TS handbook).
  • Ship a major version release with the types in.
  • Gather feedback (I expect there will be bugs in our type-defs, or issues to resolve) and iterate in some minor releases with type improvements.

If you're reading and would like to get involved, that's great and very welcome, but please ping me first to ensure we're not wasting effort by doing the same work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants