-
Notifications
You must be signed in to change notification settings - Fork 141
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
ContraintStrategy in typescript declaration contains a validate function #323
Comments
Thanks for reporting! Would you like to send a Pull Request to address this issue? |
Yes, sure. If it really is a relict like I’m thinking :) |
@mcollina Well i had a look at the source code and the validate function seems to be in use, although i cannot make you much sense, because it just asserts, without and try/catch handling and also it's nowhere found in the documentation... actually i think the function as it is now is also dangerous, because there is no way to gracefully do an error handling... if the validation is not successfull... If i would remove it from the typings i should remove it from the js-source code, and that would be a breaking change... so... |
@nickwinger Hi, I don't think we should remove this function. This function validates the constraint value you pass when you create a new route. If you want to add it to the doc, PR is always welcome. |
Ah ok , i guess i understand now, it‘s not the runtime value, but at configuration time. But the typing then should contain ? as it is optional :) |
Hello,
in the interface ConstraintStrategy in the typescript declaration there is a
```
validate(value: unknown): void
The text was updated successfully, but these errors were encountered: