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

fix: explicit HTTPRequest.resourceType type defs #6882

Merged
merged 1 commit into from Feb 17, 2021

Commits on Feb 16, 2021

  1. fix: explicit HTTPRequest.resourceType type defs

    We can use the new `Lowercase` util in TS4 to avoid duplicating the type
    and instead lowercase it.
    
    Note we still need to do the work so callbacks are typed correctly:
    
    ```ts
    page.on('request', request => {
    
    })
    ```
    
    Right now `request` is `any`, whereas it should be a
    `puppeteer.HTTPRequest`. You can manually set the type for now, and I
    will work on adding types for events so that this is done automatically
    by the compiler in a future release.
    
    Fixes #6854.
    jackfranklin committed Feb 16, 2021
    Copy the full SHA
    895a3aa View commit details
    Browse the repository at this point in the history