Skip to content

fix: type of Rule constructor and Rule's name#397

Merged
chris-pardy merged 2 commits intoCacheControl:v8from
emilefokkemanavara:fix/rule-types
Nov 20, 2024
Merged

fix: type of Rule constructor and Rule's name#397
chris-pardy merged 2 commits intoCacheControl:v8from
emilefokkemanavara:fix/rule-types

Conversation

@emilefokkemanavara
Copy link
Copy Markdown
Contributor

Currently the types suggest that Rule needs an argument for its construction, but it doesn't. And when it is constructed without an argument, its name will be undefined. This PR adds a test to document this behavior and changes the types accordingly. It is targeted to v8 because the change to the type of Rule.name is technically breaking.

Loading
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