8000 Added new tsconfig options · code-tree/atom-typescript@3f40b96 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3f40b96

Browse files
committed
Added new tsconfig options
This adds - the es2016, es2017 and esnext targets - alwaysStrict option - jsxFactory option
1 parent c6b7d00 commit 3f40b96

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

dist/main/tsconfig/tsconfig.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ var compilerOptionsValidation = {
88
allowSyntheticDefaultImports: { type: types.boolean },
99
allowUnreachableCode: { type: types.boolean },
1010
allowUnusedLabels: { type: types.boolean },
11+
alwaysStrict: { type: types.boolean },
1112
baseUrl: { type: types.string },
1213
charset: { type: types.string },
1314
codepage: { type: types.number },
@@ -25,6 +26,7 @@ var compilerOptionsValidation = {
2526
inlineSources: { type: types.boolean },
2627
isolatedModules: { type: types.boolean },
2728
jsx: { type: types.string, validValues: ['preserve', 'react'] },
29+
jsxFactory: { type: types.string },
2830
lib: { type: types.array },
2931
listFiles: { type: types.boolean },
3032
locals: { type: types.string },
@@ -65,7 +67,7 @@ var compilerOptionsValidation = {
6567
stripInternal: { type: types.boolean },
6668
suppressExcessPropertyErrors: { type: types.boolean },
6769
suppressImplicitAnyIndexErrors: { type: types.boolean },
68-
target: { type: types.string, validValues: ['es3', 'es5', 'es6', 'es2015'] },
70+
target: { type: types.string, validValues: ['es3', 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'esnext'] },
6971
typeRoots: { type: types.array },
7072
types: { type: types.array },
7173
version: { type: types.boolean },
@@ -121,7 +123,10 @@ var typescriptEnumMap = {
121123
'es3': ts.ScriptTarget.ES3,
122124
'es5': ts.ScriptTarget.ES5,
123125
'es6': ts.ScriptTarget.ES2015,
124-
'latest': ts.ScriptTarget.Latest
126+
'es2015': ts.ScriptTarget.ES2015,
127+
'es2016': ts.ScriptTarget.ES2016,
128+
'es2017': ts.ScriptTarget.ES2017,
129+
'esnext': ts.ScriptTarget.Latest,
125130
},
126131
module: {
127132
'none': ts.ModuleKind.None,

lib/main/tsconfig/tsconfig.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ interface CompilerOptions {
2121
allowSyntheticDefaultImports?: boolean;
2222
allowUnreachableCode?: boolean;
2323
allowUnusedLabels?: boolean;
24+
alwaysStrict?: boolean;
2425
baseUrl?: string;
2526
charset?: string;
2627
codepage?: number;
@@ -38,6 +39,7 @@ interface CompilerOptions {
3839
inlineSources?: boolean;
3940
isolatedModules?: boolean;
4041
jsx?: string;
42+
jsxFactory?: string;
4143
lib?: string[];
4244
listFiles?: boolean;
4345
locale?: string;
@@ -74,10 +76,11 @@ interface CompilerOptions {
7476
skipLibCheck?: boolean;
7577
sourceMap?: boolean; // Generates SourceMaps (.map files)
7678
sourceRoot?: string; // Optionally specifies the location where debugger should locate TypeScript source files after deployment
79+
strictNullChecks?: boolean;
7780
stripInternal?: boolean;
7881
suppressExcessPropertyErrors?: boolean; // Optionally disable strict object literal assignment checking
7982
suppressImplicitAnyIndexErrors?: boolean;
80-
target?: string; // 'es3'|'es5' (default)|'es6'|'es2015'
83+
target?: string; // 'es3'|'es5'|'es6'|'es2015'|'es2016'|'es2017'|'esnext', defaults to es5
8184
typeRoots?: string[];
8285
types?: string[];
8386
version?: boolean;
@@ -90,6 +93,7 @@ var compilerOptionsValidation: simpleValidator.ValidationInfo = {
9093
allowSyntheticDefaultImports: { type: types.boolean },
9194
allowUnreachableCode: { type: types.boolean },
9295
allowUnusedLabels: { type: types.boolean },
96+
alwaysStrict: { type: types.boolean },
9397
baseUrl: { type: types.string },
9498
charset: { type: types.string },
9599
codepage: { type: types.number },
@@ -107,6 +111,7 @@ var compilerOptionsValidation: simpleValidator.ValidationInfo = {
107111
inlineSources: { type: types.boolean },
108112
isolatedModules: { type: types.boolean },
109113
jsx: { type: types.string, validValues: ['preserve', 'react'] },
114+
jsxFactory: { type: types.string },
110115
lib: { type: types.array },
111116
listFiles: { type: types.boolean },
112117
locals: { type: types.string },
@@ -147,7 +152,7 @@ var compilerOptionsValidation: simpleValidator.ValidationInfo = {
147152
stripInternal: { type: types.boolean },
148153
suppressExcessPropertyErrors: { type: types.boolean },
149154
suppressImplicitAnyIndexErrors: { type: types.boolean },
150-
target: { type: types.string, validValues: ['es3', 'es5', 'es6', 'es2015'] },
155+
target: { type: types.string, validValues: ['es3', 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'esnext'] },
151156
typeRoots: { type: types.array },
152157
types: { type: types.array },
153158
version: { type: types.boolean },
@@ -292,7 +297,10 @@ var typescriptEnumMap = {
292297
'es3': ts.ScriptTarget.ES3,
293298
'es5': ts.ScriptTarget.ES5,
294299
'es6': ts.ScriptTarget.ES2015,
295-
'latest': ts.ScriptTarget.Latest
300+
'es2015': ts.ScriptTarget.ES2015,
301+
'es2016': ts.ScriptTarget.ES2016,
302+
'es2017': ts.ScriptTarget.ES2017,
303+
'esnext': ts.ScriptTarget.Latest,
296304
},
297305
module: {
298306
'none': ts.ModuleKind.None,

0 commit comments

Comments
 (0)
0