Last active
February 1, 2025 12:16
-
-
Save rauschma/7f23068c0dd00bba3f59df955101e421 to your computer and use it in GitHub Desktop.
assert-type: API for asserting types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This code is now an npm package: https://github.com/rauschma/asserttt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@hcschuetz: Helpful, thanks!
A agree! But it looks like the TypeScript team does not: microsoft/TypeScript#27024
I was thinking of a switch over operating systems and someone passing in a value (=operating system) that is not supported. In a way, these three words all seem applicable: unsupported, illegal, unexpected.
“Unexpected” does seem like the best choice, because the term “illegal” has its own issues.