Reputation: 21520
I want to compile typescript code to any target (ES5, ES6 or newer), but with this mixed target features applied simultaneously:
const
and let
keywords should be compiled into ES5 (var
and clousure function).Is it possible and how I should update my tsconfig
?
Upvotes: 1
Views: 32
Reputation: 276363
Is it possible and how I should update my tsconfig?
This is not possible via configuration. With a specific target es6
you get all these features as is, and with target es5
they all get transpiled into something ES5 can run.
I cannot think of any JS runtime that would support template strings as is but not support const
and let
.
Upvotes: 2