My short TypeScript wish list: - Only allowing `Error` instances to be thrown - Enforcing that interpolated values in template literals are strings
-
-
100% agree they should be built-in to the lang, but sometimes these helphttps://eslint.org/docs/rules/no-throw-literal …
-
Doesn't help when there's indirection which is always the culprit in my case
- 1 more reply
New conversation -
-
-
At best, they'd be lint rules and not type errors, because both of these things would go against the semantics of JS, which TS doesn't do. Throwing things other than Errors and using things that can be coerced to strings, like numbers, in template literals are allowed in JS.
-
Yep. Separation of concerns. Usage restrictions are different from type systems. And the lint rules would be valuable even to people not using TypeScript.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 