by vips7L · 4mo ago · 0 comments
hmm ok nope
There are TS constructs that require compilation into equivalent JS, such as enums and namespaces.
Namespaces are heavily discouraged. Some teams still use enigma but most people in the know us unions of strings.
I know the TS team regrets enums and I have not seen any plans for adding additional keywords that break type stripping.
I can't write Typescript into a browser without cross-compilation and "stripping out types" involves parsing and manipulating code. That's a different language.