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

chore: Migrate TaskQueue to TypeScript #5658

Merged
merged 1 commit into from Apr 17, 2020
Merged

chore: Migrate TaskQueue to TypeScript #5658

merged 1 commit into from Apr 17, 2020

Commits on Apr 16, 2020

  1. chore: Migrate TaskQueue to TypeScript

    This is a simple module but took a bit of work because:
    
    * It wraps a Promise that can return basically anything. In a pure TS
    codebase we'd solve these with generics, so you could do `new
    TaskQueue<T>` where `T` will be what's returned from the queue, but
    because we're calling that from JS we can't yet. I've left a TODO and
    once we migrate the call sites to TS we can do a much better job than
    the `void | any` type I've gone with for now.
    
    * It was used in typedefs via `Puppeteer.TaskQueue`. I've removed that
    entry from `externs.d.ts` in favour of importing it and using the type
    directly. This does mean that we have imports that ESLint doesn't
    realiase are actually used but I think this is better than maintaining
    `externs.d.ts`.
    jackfranklin committed Apr 16, 2020
    Copy the full SHA
    4a86d35 View commit details
    Browse the repository at this point in the history