Skip to content

Conversation

@matt-gadd
Copy link
Contributor

Type: feature

The following has been addressed in the PR:

Description:
No longer throw when performing has() checks on unregistered features by default. Throwing by default is quite annoying, especially as we now leverage a lot of has() checks as part of the build tool where they are mostly progressive, so when using without the build tool (ie in a codesandbox) we'd have to write different code.

An additional strict param to enable the old functionality has been added.

* @param trueClass The class to use if feature test returns `true`
* @param falseClass The class to use if the feature test returns `false` or is not defined
*/
export function hasClass(feature: string, trueClass: Function, falseClass: Function): ClassDecorator {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

i have absolutely no idea why this module exists and we should remove it in 6.

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