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
Copy file name to clipboardExpand all lines: README.md
+60Lines changed: 60 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -74,6 +74,7 @@ Grunt-ts provides explicit support for most `tsc` switches. Any arbitrary switc
74
74
|--inlineSources|[inlineSources](#inlinesources)|Emit the TypeScript source alongside the sourcemaps within a single file; requires `--inlineSourceMap` to be set.|
75
75
|--isolatedModules|[isolatedModules](#isolatedmodules)|Ensures that the output is safe to only emit single files by making cases that break single-file transpilation an error|
76
76
|--jsx|[jsx](#jsx)|Specifies the JSX code generation style: 'preserve' or 'react'|
77
+
|--lib|[lib](#lib)|List of library files to be included in the compilation.|
77
78
|--locale|[locale](#locale)|Specify locale for error messages.|
78
79
|--mapRoot LOCATION|[mapRoot](#maproot)|Specifies the location where debugger should locate map files instead of generated locations.|
79
80
|--module KIND|[module](#module)|Specify module style for code generation|
@@ -86,6 +87,7 @@ Grunt-ts provides explicit support for most `tsc` switches. Any arbitrary switc
86
87
|--noImplicitAny|[noImplicitAny](#noimplicitany)|Warn on expressions and declarations with an implied `any` type.|
87
88
|--noImplicitUseStrict|[noImplicitUseStrict](#noimplicitusestrict)|Warn on expressions and declarations with an implied `any` type.|
88
89
|--noImplicitReturns|[noImplicitReturns](#noimplicitreturns)|Report error when not all code paths in function return a value.|
90
+
|--noImplicitThis|[noImplicitThis](#noImplicitThis)|Raise error on `this` expressions with an implied `any` type.|
89
91
|--noLib|[noLib](#nolib)|Do not automatically include lib.d.ts is compilation context.|
90
92
|--noResolve|[noResolve](#noresolve)|Do not add triple-slash references or module import targets to the compilation context.|
91
93
|--out FILE|[out](#out)|Concatenate and emit output to a single file.|
@@ -96,6 +98,7 @@ Grunt-ts provides explicit support for most `tsc` switches. Any arbitrary switc
96
98
|--removeComments|[removeComments](#removecomments)|Configures if comments should be included in the output|
97
99
|--rootDir|[rootDir](#rootdir)|Allows override of common root folder calculated by `--outDir`.|
98
100
|--skipDefaultLibCheck|[skipDefaultLibCheck](#skipdefaultlibcheck)|Don't check a user-defined default lib file's validity.|
|--sourceRoot LOCATION|[sourceRoot](#sourceroot)|Specifies the location where debugger should locate TypeScript files instead of source locations.|
101
104
|--stripInternal|[stripInternal](#stripinternal)|does not emit members marked as @internal.|
@@ -137,6 +140,7 @@ For file ordering, look at [JavaScript Generation](#javascript-generation).
137
140
|[inlineSources](#inlinesources)|option|`true`, `false` (default) Emit the TypeScript source alongside the sourcemaps within a single file; If enabled, will automatically enable `inlineSourceMap` and `sourceMap`.|
138
141
|[isolatedModules](#isolatedmodules)|option|`true`, `false` (default) Ensures that the output is safe to only emit single files by making cases that break single-file transpilation an error.|
139
142
|[jsx](#jsx)|option|`'preserve'`, `'react'`, (TypeScript default is `'react'`). If `'preserve'`, TypeScript will emit `.jsx`; if `'react'`, TypeScript will transpile and emit `.js` files.|
143
+
|[lib](#lib)|option|`string[]`. List of library files to be included in the compilation. If `--lib` is not specified a default library is injected.|
140
144
|[locale](#locale)|option|`string` - specify locale for error messages|
141
145
|[mapRoot](#maproot)|option|`string` - root for referencing `.js.map` files in JS|
142
146
|[module](#module)|option|default is none (`''`), but can be set to `'amd'`, `'commonjs'`, `'system'`, or other values.|
@@ -148,6 +152,7 @@ For file ordering, look at [JavaScript Generation](#javascript-generation).
148
152
|[noFallthroughCasesInSwitch](#nofallthroughcasesinswitch)|option|`true`, `false` (default) - Report errors for fallthrough cases in switch statement.|
149
153
|[noImplicitAny](#noimplicitany)|option|`true`, `false` (default) - enable for stricter type checking|
150
154
|[noImplicitReturns](#noimplicitreturns)|option|`true`, `false` (default) - Report error when not all code paths in function return a value.|
155
+
|[noImplicitThis](#noImplicitThis)|option|`true`, `false` (default) - Raise error on this expressions with an implied `any` type.|
151
156
|[noLib](#nolib)|option|`true`, `false` (default) - do not automatically include lib.d.ts in compilation context|
152
157
|[noResolve](#noresolve)|option|`true`, `false` (default) - for deprecated version of TypeScript|
153
158
|[options](#grunt-ts-target-options)|target||
@@ -162,6 +167,7 @@ For file ordering, look at [JavaScript Generation](#javascript-generation).
|[stripInternal](#stripinternal)|option|`true`, `false` (default) - does not emit members marked as @internal.|
166
172
|[suppressExcessPropertyErrors](#suppressexcesspropertyerrors)|option|`false` (default), `true` - indicates if TypeScript should disable strict object literal assignment checking (experimental)|
167
173
|[suppressImplicitAnyIndexErrors](#suppressimplicitanyindexerrors)|option|`false` (default), `true` - indicates if TypeScript should allow access to properties of an object by string indexer when `--noImplicitAny` is active, even if TypeScript doesn't know about them.|
@@ -941,6 +947,20 @@ grunt.initConfig({
941
947
});
942
948
````
943
949
950
+
#### lib
951
+
952
+
List of library files to be included in the compilation. If `--lib` is not specified a default library is injected.
953
+
954
+
````javascript
955
+
grunt.initConfig({
956
+
ts: {
957
+
options: {
958
+
lib: ['es2015']
959
+
}
960
+
}
961
+
});
962
+
````
963
+
944
964
#### locale
945
965
946
966
Specify culture string for error messages - will pass the `--locale` switch. Requires appropriate TypeScript error messages file to be present (see TypeScript documentation for more details).
@@ -1158,6 +1178,26 @@ grunt.initConfig({
1158
1178
});
1159
1179
````
1160
1180
1181
+
#### noImplicitThis
1182
+
1183
+
````javascript
1184
+
true|false (default)
1185
+
````
1186
+
1187
+
Set to true to pass `--noImplicitThis` to the compiler. Requires more strict type checking. Raise error on `this` expressions with an implied `any` type.
1188
+
1189
+
````javascript
1190
+
grunt.initConfig({
1191
+
ts: {
1192
+
default: {
1193
+
options: {
1194
+
noImplicitThis:true
1195
+
}
1196
+
}
1197
+
}
1198
+
});
1199
+
````
1200
+
1161
1201
#### noLib
1162
1202
1163
1203
````javascript
@@ -1310,6 +1350,26 @@ grunt.initConfig({
1310
1350
});
1311
1351
````
1312
1352
1353
+
#### strictNullChecks
1354
+
1355
+
````javascript
1356
+
true|false (default)
1357
+
````
1358
+
1359
+
In strict null checking mode, the `null` and `undefined` values are not in the domain of every type and are only assignable to themselves and `any` (the one exception being that `undefined` is also assignable to `void`).
0 commit comments