Re:TypeScript please give us types
by lolinder on Friday July 07, 2023 @05:05PM
(#36638280)
It would violate #9 no matter what implementation you use, and #9 is absolutely essential to tools like ESBuild, Deno, and Bun, which all rely on the assumption that they can nearly instantly strip out the type annotations and execute the code as JS.
[ Parent
| on HN ]
You'd still be able to execute the code as JS. Your library that uses type reflection wouldn't work anymore but that's true of all these solutions.
No, it's not. I can take a library that uses zod, strip the annotations, and it will execute perfectly anywhere I want to run it.