You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The TypeScript compiler fails to run in the latest stable version of Jint (an ES5 environment) as of version 3.1 and above. The apparent issue is the use of Set, which does not exist prior to ES2015. Additional context tweet.
The repro app executes the same trivial compilation code against TypeScript 3.0.3, which works, and then 3.2.2, which fails. The failure occurs while executing the typescriptServices JS file itself, not while running the ts.transpileModule code.
Output from repro app:
--Works--
Result: var x = 'string';
--Fails--
Exception: ReferenceError: Set is not defined
Expected behavior:
Compiler executes successfully in Jint.
Actual behavior:
Jint throws an exception (see above for exception message).
The text was updated successfully, but these errors were encountered:
The TypeScript compiler fails to run in the latest stable version of Jint (an ES5 environment) as of version 3.1 and above. The apparent issue is the use of
Set
, which does not exist prior to ES2015. Additional context tweet.TypeScript Version: 3.2.2
Code
Executing the compiler in Jint issue reproduction
The repro app executes the same trivial compilation code against TypeScript 3.0.3, which works, and then 3.2.2, which fails. The failure occurs while executing the
typescriptServices
JS file itself, not while running thets.transpileModule
code.Output from repro app:
Expected behavior:
Compiler executes successfully in Jint.
Actual behavior:
Jint throws an exception (see above for exception message).
The text was updated successfully, but these errors were encountered: