8000 Merge pull request #1133 from lhecker/master · code-tree/atom-typescript@3cc3d7f · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3cc3d7f

Browse files
authored
Merge pull request TypeStrong#1133 from lhecker/master
Added new tsconfig options
2 parents e3ee4f6 + 3f40b96 commit 3cc3d7f

File tree

2 files changed

+42
-29
lines changed

2 files changed

+42
-29
lines changed

dist/main/tsconfig/tsconfig.js

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,54 +8,57 @@ var compilerOptionsValidation = {
88
allowSyntheticDefaultImports: { type: types.boolean },
99
allowUnreachableCode: { type: types.boolean },
1010
allowUnusedLabels: { type: types.boolean },
11+
alwaysStrict: { type: types.boolean },
12+
baseUrl: { type: types.string },
1113
charset: { type: types.string },
1214
codepage: { type: types.number },
1315
declaration: { type: types.boolean },
1416
declarationDir: { type: types.string },
1517
diagnostics: { type: types.boolean },
1618
emitBOM: { type: types.boolean },
19+
emitDecoratorMetadata: { type: types.boolean },
1720
experimentalAsyncFunctions: { type: types.boolean },
1821
experimentalDecorators: { type: types.boolean },
19-
emitDecoratorMetadata: { type: types.boolean },
2022
forceConsistentCasingInFileNames: { type: types.boolean },
2123
help: { type: types.boolean },
2224
importHelpers: { type: types.boolean },
2325
inlineSourceMap: { type: types.boolean },
2426
inlineSources: { type: types.boolean },
2527
isolatedModules: { type: types.boolean },
2628
jsx: { type: types.string, validValues: ['preserve', 'react'] },
27-
locals: { type: types.string },
29+
jsxFactory: { type: types.string },
30+
lib: { type: types.array },
2831
listFiles: { type: types.boolean },
32+
locals: { type: types.string },
2933
mapRoot: { type: types.string },
3034
module: { type: types.string, validValues: ['commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'] },
3135
moduleResolution: { type: types.string, validValues: ['classic', 'node'] },
32-
baseUrl: { type: types.string },
33-
paths: { type: types.object },
34-
rootDirs: { type: types.object },
3536
newLine: { type: types.string },
3637
noEmit: { type: types.boolean },
3738
noEmitHelpers: { type: types.boolean },
3839
noEmitOnError: { type: types.boolean },
3940
noErrorTruncation: { type: types.boolean },
4041
noFallthroughCasesInSwitch: { type: types.boolean },
4142
noImplicitAny: { type: types.boolean },
43+
noImplicitReturns: { type: types.boolean },
4244
noImplicitThis: { type: types.boolean },
4345
noImplicitUseStrict: { type: types.boolean },
44-
noImplicitReturns: { type: types.boolean },
4546
noLib: { type: types.boolean },
4647
noLibCheck: { type: types.boolean },
4748
noResolve: { type: types.boolean },
4849
noUnusedLocals: { type: types.boolean },
4950
noUnusedParameters: { type: types.boolean },
5051
out: { type: types.string },
51-
outFile: { type: types.string },
5252
outDir: { type: types.string },
53+
outFile: { type: types.string },
54+
paths: { type: types.object },
5355
preserveConstEnums: { type: types.boolean },
5456
pretty: { type: types.boolean },
5557
project: { type: types.string },
5658
reactNamespace: { type: types.string },
5759
removeComments: { type: types.boolean },
5860
rootDir: { type: types.string },
61+
rootDirs: { type: types.object },
5962
skipDefaultLibCheck: { type: types.boolean },
6063
skipLibCheck: { type: types.boolean },
6164
sourceMap: { type: types.boolean },
@@ -64,12 +67,11 @@ var compilerOptionsValidation = {
6467
stripInternal: { type: types.boolean },
6568
suppressExcessPropertyErrors: { type: types.boolean },
6669
suppressImplicitAnyIndexErrors: { type: types.boolean },
67-
target: { type: types.string, validValues: ['es3', 'es5', 'es6', 'es2015'] },
70+
target: { type: types.string, validValues: ['es3', 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'esnext'] },
6871
typeRoots: { type: types.array },
6972
types: { type: types.array },
7073
version: { type: types.boolean },
7174
watch: { type: types.boolean },
72-
lib: { type: types.array }
7375
};
7476
var validator = new simpleValidator.SimpleValidator(compilerOptionsValidation);
7577
exports.errors = {
@@ -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: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,31 @@ interface CompilerOptions {
2121
allowSyntheticDefaultImports?: boolean;
2222
allowUnreachableCode?: boolean;
2323
allowUnusedLabels?: boolean;
24+
alwaysStrict?: boolean;
25+
baseUrl?: string;
2426
8000 charset?: string;
2527
codepage?: number;
2628
declaration?: boolean;
2729
declarationDir?: string;
2830
diagnostics?: boolean;
2931
emitBOM?: boolean;
32+
emitDecoratorMetadata?: boolean; // Experimental. Emits addition type information for this reflection API https://github.com/rbuckton/ReflectDecorators
3033
experimentalAsyncFunctions?: boolean;
3134
experimentalDecorators?: boolean; // Experimental. Needed for the next option `emitDecoratorMetadata` see : https://github.com/Microsoft/TypeScript/pull/3330
32-
emitDecoratorMetadata?: boolean; // Experimental. Emits addition type information for this reflection API https://github.com/rbuckton/ReflectDecorators
3335
forceConsistentCasingInFileNames?: boolean;
3436
help?: boolean;
3537
importHelpers?: boolean;
36-
isolatedModules?: boolean;
3738
inlineSourceMap?: boolean;
3839
inlineSources?: boolean;
40+
isolatedModules?: boolean;
3941
jsx?: string;
40-
locale?: string;
42+
jsxFactory?: string;
43+
lib?: string[];
4144
listFiles?: boolean;
45+
locale?: string;
4246
mapRoot?: string; // Optionally Specifies the location where debugger should locate map files after deployment
4347
module?: string;
4448
moduleResolution?: string;
45-
baseUrl?: string;
46-
paths?: { [pattern: string]: string[] };
47-
rootDirs?: string[];
4849
newLine?: string;
4950
noEmit?: boolean;
5051
noEmitHelpers?: boolean;
@@ -61,27 +62,29 @@ interface CompilerOptions {
6162
noUnusedLocals?: boolean;
6263
noUnusedParameters?: boolean;
6364
out?: string; // Deprecated. Use outFile instead
64-
outFile?: string; // new name for out
6565
outDir?: string; // Redirect output structure to this directory
66+
outFile?: string; // new name for out
67+
paths?: { [pattern: string]: string[] };
6668
preserveConstEnums?: boolean;
6769
pretty?: boolean; // Experimental
6870
project?: string;
6971
reactNamespace?: string;
7072
removeComments?: boolean; // Do not emit comments in output
7173
rootDir?: string;
74+
rootDirs?: string[];
7275
skipDefaultLibCheck?: boolean;
7376
skipLibCheck?: boolean;
7477
sourceMap?: boolean; // Generates SourceMaps (.map files)
7578
sourceRoot?: string; // Optionally specifies the location where debugger should locate TypeScript source files after deployment
79+
strictNullChecks?: boolean;
7680
stripInternal?: boolean;
7781
suppressExcessPropertyErrors?: boolean; // Optionally disable strict object literal assignment checking
7882
suppressImplicitAnyIndexErrors?: boolean;
79-
target?: string; // 'es3'|'es5' (default)|'es6'|'es2015'
83+
target?: string; // 'es3'|'es5'|'es6'|'es2015'|'es2016'|'es2017'|'esnext', defaults to es5
8084
typeRoots?: string[];
8185
types?: string[];
8286
version?: boolean;
8387
watch?: boolean;
84-
lib?: string[];
8588
}
8689

8790
var compilerOptionsValidation: simpleValidator.ValidationInfo = {
@@ -90,54 +93,57 @@ var compilerOptionsValidation: simpleValidator.ValidationInfo = {
9093
allowSyntheticDefaultImports: { type: types.boolean },
9194
allowUnreachableCode: { type: types.boolean },
9295
allowUnusedLabels: { type: types.boolean },
96+
alwaysStrict: { type: types.boolean },
97+
baseUrl: { type: types.string },
9398
charset: { type: types.string },
9499
codepage: { type: types.number },
95100
declaration: { type: types.boolean },
96101
declarationDir: { type: types.string },
97102
diagnostics: { type: types.boolean },
98103
emitBOM: { type: types.boolean },
104+
emitDecoratorMetadata: { type: types.boolean },
99105
experimentalAsyncFunctions: { type: types.boolean },
100106
experimentalDecorators: { type: types.boolean },
101-
emitDecoratorMetadata: { type: types.boolean },
102107
forceConsistentCasingInFileNames: { type: types.boolean },
103108
help: { type: types.boolean },
104109
importHelpers: { type: types.boolean },
105110
inlineSourceMap: { type: types.boolean },
106111
inlineSources: { type: types.boolean },
107112
isolatedModules: { type: types.boolean },
108113
jsx: { type: types.string, validValues: ['preserve', 'react'] },
109-
locals: { type: types.string },
114+
jsxFactory: { type: types.string },
115+
lib: { type: types< 10000 /span>.array },
110116
listFiles: { type: types.boolean },
117+
locals: { type: types.string },
111118
mapRoot: { type: types.string },
112119
module: { type: types.string, validValues: ['commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'] },
113120
moduleResolution: { type: types.string, validValues: ['classic', 'node'] },
114-
baseUrl: { type: types.string },
115-
paths: { type: types.object },
116-
rootDirs: { type: types.object },
117121
newLine: { type: types.string },
118122
noEmit: { type: types.boolean },
119123
noEmitHelpers: { type: types.boolean },
120124
noEmitOnError: { type: types.boolean },
121125
noErrorTruncation: { type: types.boolean },
122126
noFallthroughCasesInSwitch: { type: types.boolean },
123127
noImplicitAny: { type: types.boolean },
128+
noImplicitReturns: { type: types.boolean },
124129
noImplicitThis: { type: types.boolean },
125130
noImplicitUseStrict: { type: types.boolean },
126-
noImplicitReturns: { type: types.boolean },
127131
noLib: { type: types.boolean },
128132
noLibCheck: { type: types.boolean },
129133
noResolve: { type: types.boolean },
130134
noUnusedLocals: { type: types.boolean },
131135
noUnusedParameters: { type: types.boolean },
132136
out: { type: types.string },
133-
outFile: { type: types.string },
134137
outDir: { type: types.string },
138+
outFile: { type: types.string },
139+
paths: { type: types.object },
135140
preserveConstEnums: { type: types.boolean },
136141
pretty: { type: types.boolean },
137142
project: { type: types.string },
138143
reactNamespace: { type: types.string },
139144
removeComments: { type: types.boolean },
140145
rootDir: { type: types.string },
146+
rootDirs: { type: types.object },
141147
skipDefaultLibCheck: { type: types.boolean },
142148
skipLibCheck: { type: types.boolean },
143149
sourceMap: { type: types.boolean },
@@ -146,12 +152,11 @@ var compilerOptionsValidation: simpleValidator.ValidationInfo = {
146152
stripInternal: { type: types.boolean },
147153
suppressExcessPropertyErrors: { type: types.boolean },
148154
suppressImplicitAnyIndexErrors: { type: types.boolean },
149-
target: { type: types.string, validValues: ['es3', 'es5', 'es6', 'es2015'] },
155+
target: { type: types.string, validValues: ['es3', 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'esnext'] },
150156
typeRoots: { type: types.array },
151157
types: { type: types.array },
152158
version: { type: types.boolean },
153159
watch: { type: types.boolean },
154-
lib: { type: types.array }
155160
}
156161
var validator = new simpleValidator.SimpleValidator(compilerOptionsValidation);
157162

@@ -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