Skip to content

Commit b6a6caa

Browse files
committed
feat(tsconfig) support the latest module system keys
closes #643 closes #692 refs microsoft/TypeScript#5110
1 parent 06dcec2 commit b6a6caa

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

dist/main/tsconfig/tsconfig.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var compilerOptionsValidation = {
1919
locals: { type: types.string },
2020
listFiles: { type: types.boolean },
2121
mapRoot: { type: types.string },
22-
module: { type: types.string, validValues: ['commonjs', 'amd', 'system', 'umd'] },
22+
module: { type: types.string, validValues: ['commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'] },
2323
moduleResolution: { type: types.string, validValues: ['classic', 'node'] },
2424
newLine: { type: types.string },
2525
noEmit: { type: types.boolean },
@@ -99,8 +99,10 @@ var typescriptEnumMap = {
9999
'none': ts.ModuleKind.None,
100100
'commonjs': ts.ModuleKind.CommonJS,
101101
'amd': ts.ModuleKind.AMD,
102-
'system': ts.ModuleKind.System,
103102
'umd': ts.ModuleKind.UMD,
103+
'system': ts.ModuleKind.System,
104+
'es6': ts.ModuleKind.ES6,
105+
'es2015': ts.ModuleKind.ES2015,
104106
},
105107
moduleResolution: {
106108
'node': ts.ModuleResolutionKind.NodeJs,

lib/main/tsconfig/tsconfig.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ var compilerOptionsValidation: simpleValidator.ValidationInfo = {
7878
locals: { type: types.string },
7979
listFiles: { type: types.boolean },
8080
mapRoot: { type: types.string },
81-
module: { type: types.string, validValues: ['commonjs', 'amd', 'system', 'umd'] },
81+
module: { type: types.string, validValues: ['commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'] },
8282
moduleResolution: { type: types.string, validValues: ['classic', 'node'] },
8383
newLine: { type: types.string },
8484
noEmit: { type: types.boolean },
@@ -245,8 +245,10 @@ var typescriptEnumMap = {
245245
'none': ts.ModuleKind.None,
246246
'commonjs': ts.ModuleKind.CommonJS,
247247
'amd': ts.ModuleKind.AMD,
248-
'system': ts.ModuleKind.System,
249248
'umd': ts.ModuleKind.UMD,
249+
'system': ts.ModuleKind.System,
250+
'es6': ts.ModuleKind.ES6,
251+
'es2015': ts.ModuleKind.ES2015,
250252
},
251253
moduleResolution: {
252254
'node': ts.ModuleResolutionKind.NodeJs,

0 commit comments

Comments
 (0)