3 ms·
Types come with a performance overhead and will be disabled in production? Sorry, I don't understand that. Typescript transpiles to plain JS, so there are no t
by Matthias247 11y ago
Types come with a performance overhead and will be disabled in production?
Sorry, I don't understand that. Typescript transpiles to plain JS, so there are no types at runtime no matter whetzer you are developing or in production. And therefore there is also no performance overhead. The only overhead I can think of is if you are transpiling code at runtime instead of build time using some JSPM plugin - but then the overhead is not related to types but to transpiling (it would also be there for typeless coffeescript transpiling).
And I also thought that typescript decorators are explicitily following the most recent ES7 decorator proposals and are even marked as experimental in TS to be able to react to changes if the ES7 syntax changes.