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
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!
The text was updated successfully, but these errors were encountered:
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:
$eval
,$$eval
and similar.puppeteer.d.ts
file that we can ship as the typings. This will enable people to import types directly frompuppeteer
rather thanimport {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).package.json
to point thetypes
property to ourpuppeteer.d.ts
file (as documented in the TS handbook).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!
The text was updated successfully, but these errors were encountered: