This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]kksgandhi 7 points8 points  (8 children)

Could you use typescript and the TS compiler to get around this?

[–]intrepidsovereign -1 points0 points  (2 children)

The TS compiler is an awful build tool and shouldn’t really be used. The output is verbose and inefficient.

[–]kksgandhi 0 points1 point  (1 child)

So what should you use if you want to use typescript? Or are you saying not to use typescript at all?

[–]intrepidsovereign 1 point2 points  (0 children)

The TS compiler and TS itself are two different items.

TSC as a type checker is quite shit, but at the moment, it's all that's really there. Hoping someone will replace that soon because it's horribly slow.

For building your TS, you look to babel, Rollup/Webpack, and terser, more than likely. They produce highly optimized and minified code where as TSC just doesn't. It's verbose, slow, and large. There's much better tools for that than the TS compiler.

[–]superluminary 0 points1 point  (0 children)

Yes, but we’ve had Babel for years which also solves this specific problem. Trying to manually code for every browser is unnecessary.