Closed
Description
Steps to reproduce
Tell us about your environment:
- Puppeteer version: 1.12
- Platform / OS version: Irrelevant
- URLs (if applicable):
- Node.js version: Irrelevant
What steps will reproduce the problem?
Please include code that reproduces the issue.
Update puppeteer
2.
Check typings.
3.
They are worse.
What is the expected result?
Typings should be at least at DT quality.
What happens instead?
- Various types have become
Function
- Callbacks in
waitFor/evaluate
-ish functions.
- Callbacks in
- Various types have come
Object
- Often incorrect such as
jsonValue
orjson
(should be 'unknown' instead) - Used instead of more precise dictonary object when used for
headers
andwaitFor
options.
- Often incorrect such as
- Various specific overloads are missing that make requires less type assertions.
Both types should not be used as they are extremely broad.
FYI I consider this a breaking change as I cannot easily revert to DT typings without explicitly downgrading puppeteer, it also broke our builds.
Activity
fix(types): disable shipping our own d.ts file (#3882)
aslushnikov commentedon Feb 1, 2019
@SimonSchick thank you for letting us know and sorry for breaking you. We'll push a 1.12.1 without d.ts file shortly
SimonSchick commentedon Feb 1, 2019
Obviously: I really appreciate you adding those, it's great they we don't need to maintain them separately anymore, but they need some fine tuning :)
Also worth noting is that typings for
would also be nice :)
SimonSchick commentedon Feb 1, 2019
You might want to include https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/puppeteer/puppeteer-tests.ts as some sort of test baseline.
JoelEinbinder commentedon Feb 1, 2019
They are included and all passed at at https://github.com/GoogleChrome/puppeteer/blob/master/utils/doclint/generate_types/test/test.ts
Seems like there is some untested functionality though. If you could sending a PR adding failing code to that file (just leave it commented out) it would be super helpful!
SimonSchick commentedon Feb 1, 2019
Ah yea, I didn't see it there, and yea the tests are far from complete, I will see if I get around to it.
chore: mark version v1.12.1 (#3885)
aslushnikov commentedon Feb 1, 2019
1.12.1 is out now with removed
index.d.ts
file. I'll keep this issue open to track progress on making our generatedindex.d.ts
better and maybe eventually ship them again.waitForSelector
should only resolvenull
when called with `hidden: true #3877SimonSchick commentedon Feb 1, 2019
See DefinitelyTyped/DefinitelyTyped#32723, I added a few extra tests, should help you a bit.
Also, it seems your generated generated some interfaces multiple times, see
PageMetricsPayload
Revert deletion of @types/puppeteer in 302d5f6
8 remaining items