3 ms·
Perhaps it's TypeScript making the difference?
by dvirsky 10y ago
Perhaps it's TypeScript making the difference?
- mcbits 10y agoTypeScript generates some code that's unlike what a person would write directly in JavaScript, which probably does impact performance to some degree. Enums can become integers where a human might decide strings are good enough and more readable than magic numbers. And if you're only using TypeScript, you can avoid writing some run-time sanity checks. But it also emits a lot of boilerplate for modules and classes and such. Not sure if the net effect would be a gain or loss.
- Skinney 10y agoWhen targeting an ES6/ES2015 compatible runtime like node or electron (which VS Code runs on), typescript essentially just strips away the type information. It only generates boilerplate when the underlying runtime doesn't support the parts of the Javascript you use.