-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
Add type checking to isMatching pattern argument #188
Labels
enhancement
New feature or request
Comments
I don't understand why in the original implementation
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would like to be able to type check the pattern that I am passing to isMatching. This would help me avoid mistakes when defining the pattern I want to check.
See the following example:
I would expect a type error here as
hello: string
is not part of thefoo
definition.The following implementation would accomplish this but would lose the type guard:
The text was updated successfully, but these errors were encountered: