Ability to raise type checking error using something like a typeerror
type.
#26055
Closed
4 tasks done
Labels
Duplicate
An existing issue was already created
Search Terms
typeerror type, user-defined type checking
Suggestion
Conditional type brings a useful method for composing types, but there are many scenarios that conditional type works while losing type safety. It would be nice to have a special type like
typeerror
to notify the compiler of incorrect types:Examples
Checklist
My suggestion meets these guidelines:
The text was updated successfully, but these errors were encountered: