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
fix generic constraint type #3221
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This change is not compatible with find-my-way@4.0.0, I encounter this error when running
Upgrading find-my-way to 4.3.3 fixed this for me. Shouldn‘t the minimum version of |
I think you're right. We should upgrade to |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Since
find-my-way
version 4.1 it is possible to specify a generic type for the value of a constraint. The default type of this generic parameter isstring
. This makes it impossible to register constraints that have a value type other than string. The following example produces the errorType 'ConstraintStrategy<HTTPVersion.V1, number>' is not assignable to type 'ConstraintStrategy<HTTPVersion.V1, string>'. Type 'number' is not assignable to type 'string'.
.Setting the generic type to
unknown
solves this issue.Checklist
npm run test
andnpm run benchmark
and the Code of conduct