Menu

#2324 type declaration files for 'workbox-build'

closed
nobody
2020-06-01
2020-01-13
Anonymous
No

Originally created by: Mister-Hope

Is there a type declaration files for 'workbox-build'?
I can only find these

1 Attachments

Discussion

  • Anonymous

    Anonymous - 2020-01-13

    Originally posted by: jeffposnick

    There isn't, no.

    In Workbox v5, we migrated the runtime codebase to TypeScript, so there are native types for all of those interfaces.

    The v5 build tools were not migrated to TypeScript, though. (This might happen in a future release.)

    Something that might help is that https://github.com/GoogleChrome/workbox/pull/2320 adds proper JSDoc info for all of the options supported by the build tools in v5. Once that's merged, I think it's a fairly straightforward process to either consume the JSDoc from an IDE, or generate standalone TypeScript typings from the JSDoc.

     
  • Anonymous

    Anonymous - 2020-01-29

    Originally posted by: Mister-Hope

    There isn't, no.

    In Workbox v5, we migrated the runtime codebase to TypeScript, so there are native types for all of those interfaces.

    The v5 build tools were not migrated to TypeScript, though. (This might happen in a future release.)

    Something that might help is that [#2320] adds proper JSDoc info for all of the options supported by the build tools in v5. Once that's merged, I think it's a fairly straightforward process to either consume the JSDoc from an IDE, or generate standalone TypeScript typings from the JSDoc.

    Glad you merged that PR and release V5, hope you can make the type declaration files for it soon.

     

    Related

    Tickets: #2320

  • Anonymous

    Anonymous - 2020-02-06

    Originally posted by: IlCallo

    Are workbox-webpack-plugin options the same of workbox-build? Are their types still missing too? Quasar framework uses workbox under the hood to power it's PWA mode and we hoped v5 would bring types for workbox-webpack-plugin configuration object too

     
  • Anonymous

    Anonymous - 2020-02-06

    Originally posted by: jeffposnick

    There are some differences in the options between workbox-webpack-plugin and workbox-build.

    What's new in v5 is that there is proper JSDoc for both of those interfaces.

    Hopefully the JSDoc can help with autocompletion in IDEs, and I believe there are some tools for generating unofficial typing info from JSDoc as well.

    Rewriting the build tools in TypeScript may happen at some point, but for v5, we focused on rewriting the runtime libraries.

     
  • Anonymous

    Anonymous - 2020-06-01

    Ticket changed by: jeffposnick

    • status: open --> closed
     
  • Anonymous

    Anonymous - 2020-06-01

    Originally posted by: jeffposnick

    workbox-build TypeScript migration is tracked in [#2477]. I'm closing this in favor of that.

     

    Related

    Tickets: #2477


Log in to post a comment.