-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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 support throw
keyword
#40768
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Search Terms
Error Type, throws, throw, throw keyword
Suggestion
Explanation
add a
throw
keyword that when it reached in a type it reports a message/error.it's useful when used with "Template literal types".
usage:
for now, we can only return types like this to inform the user why the input is incorrect:
which doesn't show error lines and place of the error message is really indirect and the user may not found it/
Checklist
My suggestion meets these guidelines:
The text was updated successfully, but these errors were encountered: