Skip to content

Conversation

@jeffposnick
Copy link
Contributor

Prior to this, the getManifest(), generateSW(), and injectManifest() methods of workbox-build were marked as taking in a configuration object with type unknown. The idea was that prior to validating the configuration (which happens immediately), we should treat the object as potentially anything.

Unfortunately, this leads to a bad experience in our TSDocs, and likely for users who rely on TypeScript code completion.

Additionally, if you actually attempt to pass in anything other than the support options, the validation step should immediately throw, so passing in just anything didn't actually "work." Because of this, I consider adding in explicit types for the config to be a bug fix rather than a breaking change, as we never should have had unknown to begin with.

Copy link
Contributor

@tropicadri tropicadri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay, I like this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants