mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
866d34ee11
This PR fixes the fact that currently if you have: ```ts page.on('request', request => { }) ``` Then `request` will be typed as `any`. We can fix this by defining an interface of event name => callback argument type, and looking that up when you call `page.on`. Also includes a drive-by fix to ensure we convert response headers to strings, and updates the types accordingly. |
||
---|---|---|
.. | ||
bad.ts | ||
good.ts | ||
package.json | ||
tsconfig.json |