@visulima/package 1.8.1 → 1.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/LICENSE.md +17 -0
- package/dist/error.cjs +1 -14
- package/dist/error.d.mts +9 -0
- package/dist/error.mjs +1 -0
- package/dist/index.cjs +1 -156
- package/dist/index.d.cts +2 -3
- package/dist/index.d.mts +18 -0
- package/dist/index.d.ts +2 -3
- package/dist/index.mjs +1 -0
- package/dist/monorepo.cjs +1 -14
- package/dist/monorepo.d.mts +8 -0
- package/dist/monorepo.mjs +1 -0
- package/dist/package-json.cjs +1 -28
- package/dist/package-json.d.cts +3 -5
- package/dist/package-json.d.mts +22 -0
- package/dist/package-json.d.ts +3 -5
- package/dist/package-json.mjs +1 -0
- package/dist/package-manager.cjs +1 -33
- package/dist/package-manager.d.mts +16 -0
- package/dist/package-manager.mjs +1 -0
- package/dist/package.cjs +1 -18
- package/dist/package.d.mts +4 -0
- package/dist/package.mjs +1 -0
- package/dist/shared/package.DipMHw9r.cjs +1 -0
- package/dist/shared/package.DvbNGF15.mjs +1 -0
- package/dist/shared/package.SZmjOQBM.d.cts +2076 -0
- package/dist/shared/package.SZmjOQBM.d.mts +2076 -0
- package/dist/shared/package.SZmjOQBM.d.ts +2076 -0
- package/dist/shared/package.Xn4v2Y_g.cjs +1 -0
- package/dist/shared/package.zhGeUcxO.mjs +1 -0
- package/dist/tsconfig/index.cjs +1 -0
- package/dist/tsconfig/index.d.cts +34 -0
- package/dist/tsconfig/index.d.mts +34 -0
- package/dist/tsconfig/index.d.ts +34 -0
- package/dist/tsconfig/index.mjs +1 -0
- package/package.json +32 -40
- package/dist/chunk-5VO6NTKJ.js +0 -361
- package/dist/chunk-5VO6NTKJ.js.map +0 -1
- package/dist/chunk-7IOK6YPW.cjs +0 -52
- package/dist/chunk-7IOK6YPW.cjs.map +0 -1
- package/dist/chunk-CVVFWSMT.cjs +0 -65
- package/dist/chunk-CVVFWSMT.cjs.map +0 -1
- package/dist/chunk-E2PKJX3Q.js +0 -54
- package/dist/chunk-E2PKJX3Q.js.map +0 -1
- package/dist/chunk-EYMR7Z2I.js +0 -62
- package/dist/chunk-EYMR7Z2I.js.map +0 -1
- package/dist/chunk-G3SI24AJ.cjs +0 -88
- package/dist/chunk-G3SI24AJ.cjs.map +0 -1
- package/dist/chunk-IIYQBLPC.js +0 -119
- package/dist/chunk-IIYQBLPC.js.map +0 -1
- package/dist/chunk-IK5YSYLX.cjs +0 -126
- package/dist/chunk-IK5YSYLX.cjs.map +0 -1
- package/dist/chunk-UZ2FN6C5.js +0 -78
- package/dist/chunk-UZ2FN6C5.js.map +0 -1
- package/dist/chunk-WXFZK4G3.cjs +0 -374
- package/dist/chunk-WXFZK4G3.cjs.map +0 -1
- package/dist/chunk-YLCN7EVV.js +0 -50
- package/dist/chunk-YLCN7EVV.js.map +0 -1
- package/dist/chunk-YOQXHFU3.cjs +0 -56
- package/dist/chunk-YOQXHFU3.cjs.map +0 -1
- package/dist/error.cjs.map +0 -1
- package/dist/error.js +0 -5
- package/dist/error.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js +0 -66
- package/dist/index.js.map +0 -1
- package/dist/monorepo.cjs.map +0 -1
- package/dist/monorepo.js +0 -5
- package/dist/monorepo.js.map +0 -1
- package/dist/package-json.cjs.map +0 -1
- package/dist/package-json.js +0 -3
- package/dist/package-json.js.map +0 -1
- package/dist/package-manager.cjs.map +0 -1
- package/dist/package-manager.js +0 -4
- package/dist/package-manager.js.map +0 -1
- package/dist/package.cjs.map +0 -1
- package/dist/package.js +0 -5
- package/dist/package.js.map +0 -1
- package/dist/tsconfig-G-HInwrt.d.ts +0 -30
- package/dist/tsconfig-d4zwQgCH.d.cts +0 -30
- package/dist/tsconfig.cjs +0 -36
- package/dist/tsconfig.cjs.map +0 -1
- package/dist/tsconfig.d.cts +0 -5
- package/dist/tsconfig.d.ts +0 -5
- package/dist/tsconfig.js +0 -3
- package/dist/tsconfig.js.map +0 -1
- package/dist/types-hoigZ9HA.d.cts +0 -9
- package/dist/types-hoigZ9HA.d.ts +0 -9
|
@@ -0,0 +1,2076 @@
|
|
|
1
|
+
import { Package } from 'normalize-package-data';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
|
|
5
|
+
|
|
6
|
+
@category Type
|
|
7
|
+
*/
|
|
8
|
+
type Primitive =
|
|
9
|
+
| null
|
|
10
|
+
| undefined
|
|
11
|
+
| string
|
|
12
|
+
| number
|
|
13
|
+
| boolean
|
|
14
|
+
| symbol
|
|
15
|
+
| bigint;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
Matches a JSON object.
|
|
19
|
+
|
|
20
|
+
This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. Don't use this as a direct return type as the user would have to double-cast it: `jsonObject as unknown as CustomResponse`. Instead, you could extend your CustomResponse type from it to ensure your type only uses JSON-compatible types: `interface CustomResponse extends JsonObject { … }`.
|
|
21
|
+
|
|
22
|
+
@category JSON
|
|
23
|
+
*/
|
|
24
|
+
type JsonObject = {[Key in string]: JsonValue} & {[Key in string]?: JsonValue | undefined};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
Matches a JSON array.
|
|
28
|
+
|
|
29
|
+
@category JSON
|
|
30
|
+
*/
|
|
31
|
+
type JsonArray = JsonValue[] | readonly JsonValue[];
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
Matches any valid JSON primitive value.
|
|
35
|
+
|
|
36
|
+
@category JSON
|
|
37
|
+
*/
|
|
38
|
+
type JsonPrimitive = string | number | boolean | null;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
Matches any valid JSON value.
|
|
42
|
+
|
|
43
|
+
@see `Jsonify` if you need to transform a type to one that is assignable to `JsonValue`.
|
|
44
|
+
|
|
45
|
+
@category JSON
|
|
46
|
+
*/
|
|
47
|
+
type JsonValue = JsonPrimitive | JsonObject | JsonArray;
|
|
48
|
+
|
|
49
|
+
declare global {
|
|
50
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
51
|
+
interface SymbolConstructor {
|
|
52
|
+
readonly observable: symbol;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
Returns a boolean for whether the two given types are equal.
|
|
58
|
+
|
|
59
|
+
@link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
|
|
60
|
+
@link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
|
|
61
|
+
|
|
62
|
+
Use-cases:
|
|
63
|
+
- If you want to make a conditional branch based on the result of a comparison of two types.
|
|
64
|
+
|
|
65
|
+
@example
|
|
66
|
+
```
|
|
67
|
+
import type {IsEqual} from 'type-fest';
|
|
68
|
+
|
|
69
|
+
// This type returns a boolean for whether the given array includes the given item.
|
|
70
|
+
// `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
|
|
71
|
+
type Includes<Value extends readonly any[], Item> =
|
|
72
|
+
Value extends readonly [Value[0], ...infer rest]
|
|
73
|
+
? IsEqual<Value[0], Item> extends true
|
|
74
|
+
? true
|
|
75
|
+
: Includes<rest, Item>
|
|
76
|
+
: false;
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
@category Type Guard
|
|
80
|
+
@category Utilities
|
|
81
|
+
*/
|
|
82
|
+
type IsEqual<A, B> =
|
|
83
|
+
(<G>() => G extends A ? 1 : 2) extends
|
|
84
|
+
(<G>() => G extends B ? 1 : 2)
|
|
85
|
+
? true
|
|
86
|
+
: false;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
Filter out keys from an object.
|
|
90
|
+
|
|
91
|
+
Returns `never` if `Exclude` is strictly equal to `Key`.
|
|
92
|
+
Returns `never` if `Key` extends `Exclude`.
|
|
93
|
+
Returns `Key` otherwise.
|
|
94
|
+
|
|
95
|
+
@example
|
|
96
|
+
```
|
|
97
|
+
type Filtered = Filter<'foo', 'foo'>;
|
|
98
|
+
//=> never
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
@example
|
|
102
|
+
```
|
|
103
|
+
type Filtered = Filter<'bar', string>;
|
|
104
|
+
//=> never
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
@example
|
|
108
|
+
```
|
|
109
|
+
type Filtered = Filter<'bar', 'foo'>;
|
|
110
|
+
//=> 'bar'
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
@see {Except}
|
|
114
|
+
*/
|
|
115
|
+
type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
116
|
+
|
|
117
|
+
type ExceptOptions = {
|
|
118
|
+
/**
|
|
119
|
+
Disallow assigning non-specified properties.
|
|
120
|
+
|
|
121
|
+
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
|
|
122
|
+
|
|
123
|
+
@default false
|
|
124
|
+
*/
|
|
125
|
+
requireExactProps?: boolean;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
Create a type from an object type without certain keys.
|
|
130
|
+
|
|
131
|
+
We recommend setting the `requireExactProps` option to `true`.
|
|
132
|
+
|
|
133
|
+
This type is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type). The `Omit` type does not restrict the omitted keys to be keys present on the given type, while `Except` does. The benefits of a stricter type are avoiding typos and allowing the compiler to pick up on rename refactors automatically.
|
|
134
|
+
|
|
135
|
+
This type was proposed to the TypeScript team, which declined it, saying they prefer that libraries implement stricter versions of the built-in types ([microsoft/TypeScript#30825](https://github.com/microsoft/TypeScript/issues/30825#issuecomment-523668235)).
|
|
136
|
+
|
|
137
|
+
@example
|
|
138
|
+
```
|
|
139
|
+
import type {Except} from 'type-fest';
|
|
140
|
+
|
|
141
|
+
type Foo = {
|
|
142
|
+
a: number;
|
|
143
|
+
b: string;
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
type FooWithoutA = Except<Foo, 'a'>;
|
|
147
|
+
//=> {b: string}
|
|
148
|
+
|
|
149
|
+
const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
|
|
150
|
+
//=> errors: 'a' does not exist in type '{ b: string; }'
|
|
151
|
+
|
|
152
|
+
type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
153
|
+
//=> {a: number} & Partial<Record<"b", never>>
|
|
154
|
+
|
|
155
|
+
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
156
|
+
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
@category Object
|
|
160
|
+
*/
|
|
161
|
+
type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {requireExactProps: false}> = {
|
|
162
|
+
[KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType];
|
|
163
|
+
} & (Options['requireExactProps'] extends true
|
|
164
|
+
? Partial<Record<KeysType, never>>
|
|
165
|
+
: {});
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
Allows creating a union type by combining primitive types and literal types without sacrificing auto-completion in IDEs for the literal type part of the union.
|
|
169
|
+
|
|
170
|
+
Currently, when a union type of a primitive type is combined with literal types, TypeScript loses all information about the combined literals. Thus, when such type is used in an IDE with autocompletion, no suggestions are made for the declared literals.
|
|
171
|
+
|
|
172
|
+
This type is a workaround for [Microsoft/TypeScript#29729](https://github.com/Microsoft/TypeScript/issues/29729). It will be removed as soon as it's not needed anymore.
|
|
173
|
+
|
|
174
|
+
@example
|
|
175
|
+
```
|
|
176
|
+
import type {LiteralUnion} from 'type-fest';
|
|
177
|
+
|
|
178
|
+
// Before
|
|
179
|
+
|
|
180
|
+
type Pet = 'dog' | 'cat' | string;
|
|
181
|
+
|
|
182
|
+
const pet: Pet = '';
|
|
183
|
+
// Start typing in your TypeScript-enabled IDE.
|
|
184
|
+
// You **will not** get auto-completion for `dog` and `cat` literals.
|
|
185
|
+
|
|
186
|
+
// After
|
|
187
|
+
|
|
188
|
+
type Pet2 = LiteralUnion<'dog' | 'cat', string>;
|
|
189
|
+
|
|
190
|
+
const pet: Pet2 = '';
|
|
191
|
+
// You **will** get auto-completion for `dog` and `cat` literals.
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
@category Type
|
|
195
|
+
*/
|
|
196
|
+
type LiteralUnion<
|
|
197
|
+
LiteralType,
|
|
198
|
+
BaseType extends Primitive,
|
|
199
|
+
> = LiteralType | (BaseType & Record<never, never>);
|
|
200
|
+
|
|
201
|
+
declare namespace PackageJson$1 {
|
|
202
|
+
/**
|
|
203
|
+
A person who has been involved in creating or maintaining the package.
|
|
204
|
+
*/
|
|
205
|
+
export type Person =
|
|
206
|
+
| string
|
|
207
|
+
| {
|
|
208
|
+
name: string;
|
|
209
|
+
url?: string;
|
|
210
|
+
email?: string;
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
export type BugsLocation =
|
|
214
|
+
| string
|
|
215
|
+
| {
|
|
216
|
+
/**
|
|
217
|
+
The URL to the package's issue tracker.
|
|
218
|
+
*/
|
|
219
|
+
url?: string;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
The email address to which issues should be reported.
|
|
223
|
+
*/
|
|
224
|
+
email?: string;
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
export type DirectoryLocations = {
|
|
228
|
+
[directoryType: string]: JsonValue | undefined;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
Location for executable scripts. Sugar to generate entries in the `bin` property by walking the folder.
|
|
232
|
+
*/
|
|
233
|
+
bin?: string;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
Location for Markdown files.
|
|
237
|
+
*/
|
|
238
|
+
doc?: string;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
Location for example scripts.
|
|
242
|
+
*/
|
|
243
|
+
example?: string;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
Location for the bulk of the library.
|
|
247
|
+
*/
|
|
248
|
+
lib?: string;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
Location for man pages. Sugar to generate a `man` array by walking the folder.
|
|
252
|
+
*/
|
|
253
|
+
man?: string;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
Location for test files.
|
|
257
|
+
*/
|
|
258
|
+
test?: string;
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
export type Scripts = {
|
|
262
|
+
/**
|
|
263
|
+
Run **before** the package is published (Also run on local `npm install` without any arguments).
|
|
264
|
+
*/
|
|
265
|
+
prepublish?: string;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
Run both **before** the package is packed and published, and on local `npm install` without any arguments. This is run **after** `prepublish`, but **before** `prepublishOnly`.
|
|
269
|
+
*/
|
|
270
|
+
prepare?: string;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
Run **before** the package is prepared and packed, **only** on `npm publish`.
|
|
274
|
+
*/
|
|
275
|
+
prepublishOnly?: string;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
Run **before** a tarball is packed (on `npm pack`, `npm publish`, and when installing git dependencies).
|
|
279
|
+
*/
|
|
280
|
+
prepack?: string;
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
Run **after** the tarball has been generated and moved to its final destination.
|
|
284
|
+
*/
|
|
285
|
+
postpack?: string;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
Run **after** the package is published.
|
|
289
|
+
*/
|
|
290
|
+
publish?: string;
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
Run **after** the package is published.
|
|
294
|
+
*/
|
|
295
|
+
postpublish?: string;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
Run **before** the package is installed.
|
|
299
|
+
*/
|
|
300
|
+
preinstall?: string;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
Run **after** the package is installed.
|
|
304
|
+
*/
|
|
305
|
+
install?: string;
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
Run **after** the package is installed and after `install`.
|
|
309
|
+
*/
|
|
310
|
+
postinstall?: string;
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
Run **before** the package is uninstalled and before `uninstall`.
|
|
314
|
+
*/
|
|
315
|
+
preuninstall?: string;
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
Run **before** the package is uninstalled.
|
|
319
|
+
*/
|
|
320
|
+
uninstall?: string;
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
Run **after** the package is uninstalled.
|
|
324
|
+
*/
|
|
325
|
+
postuninstall?: string;
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
Run **before** bump the package version and before `version`.
|
|
329
|
+
*/
|
|
330
|
+
preversion?: string;
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
Run **before** bump the package version.
|
|
334
|
+
*/
|
|
335
|
+
version?: string;
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
Run **after** bump the package version.
|
|
339
|
+
*/
|
|
340
|
+
postversion?: string;
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
Run with the `npm test` command, before `test`.
|
|
344
|
+
*/
|
|
345
|
+
pretest?: string;
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
Run with the `npm test` command.
|
|
349
|
+
*/
|
|
350
|
+
test?: string;
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
Run with the `npm test` command, after `test`.
|
|
354
|
+
*/
|
|
355
|
+
posttest?: string;
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
Run with the `npm stop` command, before `stop`.
|
|
359
|
+
*/
|
|
360
|
+
prestop?: string;
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
Run with the `npm stop` command.
|
|
364
|
+
*/
|
|
365
|
+
stop?: string;
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
Run with the `npm stop` command, after `stop`.
|
|
369
|
+
*/
|
|
370
|
+
poststop?: string;
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
Run with the `npm start` command, before `start`.
|
|
374
|
+
*/
|
|
375
|
+
prestart?: string;
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
Run with the `npm start` command.
|
|
379
|
+
*/
|
|
380
|
+
start?: string;
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
Run with the `npm start` command, after `start`.
|
|
384
|
+
*/
|
|
385
|
+
poststart?: string;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
Run with the `npm restart` command, before `restart`. Note: `npm restart` will run the `stop` and `start` scripts if no `restart` script is provided.
|
|
389
|
+
*/
|
|
390
|
+
prerestart?: string;
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
Run with the `npm restart` command. Note: `npm restart` will run the `stop` and `start` scripts if no `restart` script is provided.
|
|
394
|
+
*/
|
|
395
|
+
restart?: string;
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
Run with the `npm restart` command, after `restart`. Note: `npm restart` will run the `stop` and `start` scripts if no `restart` script is provided.
|
|
399
|
+
*/
|
|
400
|
+
postrestart?: string;
|
|
401
|
+
} & Partial<Record<string, string>>;
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
Dependencies of the package. The version range is a string which has one or more space-separated descriptors. Dependencies can also be identified with a tarball or Git URL.
|
|
405
|
+
*/
|
|
406
|
+
export type Dependency = Partial<Record<string, string>>;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
A mapping of conditions and the paths to which they resolve.
|
|
410
|
+
*/
|
|
411
|
+
type ExportConditions = { // eslint-disable-line @typescript-eslint/consistent-indexed-object-style
|
|
412
|
+
[condition: string]: Exports;
|
|
413
|
+
};
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
Entry points of a module, optionally with conditions and subpath exports.
|
|
417
|
+
*/
|
|
418
|
+
export type Exports =
|
|
419
|
+
| null
|
|
420
|
+
| string
|
|
421
|
+
| Array<string | ExportConditions>
|
|
422
|
+
| ExportConditions;
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
Import map entries of a module, optionally with conditions and subpath imports.
|
|
426
|
+
*/
|
|
427
|
+
export type Imports = { // eslint-disable-line @typescript-eslint/consistent-indexed-object-style
|
|
428
|
+
[key: `#${string}`]: Exports;
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
|
432
|
+
export interface NonStandardEntryPoints {
|
|
433
|
+
/**
|
|
434
|
+
An ECMAScript module ID that is the primary entry point to the program.
|
|
435
|
+
*/
|
|
436
|
+
module?: string;
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
A module ID with untranspiled code that is the primary entry point to the program.
|
|
440
|
+
*/
|
|
441
|
+
esnext?:
|
|
442
|
+
| string
|
|
443
|
+
| {
|
|
444
|
+
[moduleName: string]: string | undefined;
|
|
445
|
+
main?: string;
|
|
446
|
+
browser?: string;
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
A hint to JavaScript bundlers or component tools when packaging modules for client side use.
|
|
451
|
+
*/
|
|
452
|
+
browser?:
|
|
453
|
+
| string
|
|
454
|
+
| Partial<Record<string, string | false>>;
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
Denote which files in your project are "pure" and therefore safe for Webpack to prune if unused.
|
|
458
|
+
|
|
459
|
+
[Read more.](https://webpack.js.org/guides/tree-shaking/)
|
|
460
|
+
*/
|
|
461
|
+
sideEffects?: boolean | string[];
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
export type TypeScriptConfiguration = {
|
|
465
|
+
/**
|
|
466
|
+
Location of the bundled TypeScript declaration file.
|
|
467
|
+
*/
|
|
468
|
+
types?: string;
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
Version selection map of TypeScript.
|
|
472
|
+
*/
|
|
473
|
+
typesVersions?: Partial<Record<string, Partial<Record<string, string[]>>>>;
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
Location of the bundled TypeScript declaration file. Alias of `types`.
|
|
477
|
+
*/
|
|
478
|
+
typings?: string;
|
|
479
|
+
};
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
An alternative configuration for workspaces.
|
|
483
|
+
*/
|
|
484
|
+
export type WorkspaceConfig = {
|
|
485
|
+
/**
|
|
486
|
+
An array of workspace pattern strings which contain the workspace packages.
|
|
487
|
+
*/
|
|
488
|
+
packages?: WorkspacePattern[];
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
Designed to solve the problem of packages which break when their `node_modules` are moved to the root workspace directory - a process known as hoisting. For these packages, both within your workspace, and also some that have been installed via `node_modules`, it is important to have a mechanism for preventing the default Yarn workspace behavior. By adding workspace pattern strings here, Yarn will resume non-workspace behavior for any package which matches the defined patterns.
|
|
492
|
+
|
|
493
|
+
[Supported](https://classic.yarnpkg.com/blog/2018/02/15/nohoist/) by Yarn.
|
|
494
|
+
[Not supported](https://github.com/npm/rfcs/issues/287) by npm.
|
|
495
|
+
*/
|
|
496
|
+
nohoist?: WorkspacePattern[];
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
A workspace pattern points to a directory or group of directories which contain packages that should be included in the workspace installation process.
|
|
501
|
+
|
|
502
|
+
The patterns are handled with [minimatch](https://github.com/isaacs/minimatch).
|
|
503
|
+
|
|
504
|
+
@example
|
|
505
|
+
`docs` → Include the docs directory and install its dependencies.
|
|
506
|
+
`packages/*` → Include all nested directories within the packages directory, like `packages/cli` and `packages/core`.
|
|
507
|
+
*/
|
|
508
|
+
type WorkspacePattern = string;
|
|
509
|
+
|
|
510
|
+
export type YarnConfiguration = {
|
|
511
|
+
/**
|
|
512
|
+
If your package only allows one version of a given dependency, and you’d like to enforce the same behavior as `yarn install --flat` on the command-line, set this to `true`.
|
|
513
|
+
|
|
514
|
+
Note that if your `package.json` contains `"flat": true` and other packages depend on yours (e.g. you are building a library rather than an app), those other packages will also need `"flat": true` in their `package.json` or be installed with `yarn install --flat` on the command-line.
|
|
515
|
+
*/
|
|
516
|
+
flat?: boolean;
|
|
517
|
+
|
|
518
|
+
/**
|
|
519
|
+
Selective version resolutions. Allows the definition of custom package versions inside dependencies without manual edits in the `yarn.lock` file.
|
|
520
|
+
*/
|
|
521
|
+
resolutions?: Dependency;
|
|
522
|
+
};
|
|
523
|
+
|
|
524
|
+
export type JSPMConfiguration = {
|
|
525
|
+
/**
|
|
526
|
+
JSPM configuration.
|
|
527
|
+
*/
|
|
528
|
+
jspm?: PackageJson$1;
|
|
529
|
+
};
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
Type for [npm's `package.json` file](https://docs.npmjs.com/creating-a-package-json-file). Containing standard npm properties.
|
|
533
|
+
*/
|
|
534
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
|
535
|
+
export interface PackageJsonStandard {
|
|
536
|
+
/**
|
|
537
|
+
The name of the package.
|
|
538
|
+
*/
|
|
539
|
+
name?: string;
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
Package version, parseable by [`node-semver`](https://github.com/npm/node-semver).
|
|
543
|
+
*/
|
|
544
|
+
version?: string;
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
Package description, listed in `npm search`.
|
|
548
|
+
*/
|
|
549
|
+
description?: string;
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
Keywords associated with package, listed in `npm search`.
|
|
553
|
+
*/
|
|
554
|
+
keywords?: string[];
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
The URL to the package's homepage.
|
|
558
|
+
*/
|
|
559
|
+
homepage?: LiteralUnion<'.', string>;
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
The URL to the package's issue tracker and/or the email address to which issues should be reported.
|
|
563
|
+
*/
|
|
564
|
+
bugs?: BugsLocation;
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
The license for the package.
|
|
568
|
+
*/
|
|
569
|
+
license?: string;
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
The licenses for the package.
|
|
573
|
+
*/
|
|
574
|
+
licenses?: Array<{
|
|
575
|
+
type?: string;
|
|
576
|
+
url?: string;
|
|
577
|
+
}>;
|
|
578
|
+
|
|
579
|
+
author?: Person;
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
A list of people who contributed to the package.
|
|
583
|
+
*/
|
|
584
|
+
contributors?: Person[];
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
A list of people who maintain the package.
|
|
588
|
+
*/
|
|
589
|
+
maintainers?: Person[];
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
The files included in the package.
|
|
593
|
+
*/
|
|
594
|
+
files?: string[];
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
Resolution algorithm for importing ".js" files from the package's scope.
|
|
598
|
+
|
|
599
|
+
[Read more.](https://nodejs.org/api/esm.html#esm_package_json_type_field)
|
|
600
|
+
*/
|
|
601
|
+
type?: 'module' | 'commonjs';
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
The module ID that is the primary entry point to the program.
|
|
605
|
+
*/
|
|
606
|
+
main?: string;
|
|
607
|
+
|
|
608
|
+
/**
|
|
609
|
+
Subpath exports to define entry points of the package.
|
|
610
|
+
|
|
611
|
+
[Read more.](https://nodejs.org/api/packages.html#subpath-exports)
|
|
612
|
+
*/
|
|
613
|
+
exports?: Exports;
|
|
614
|
+
|
|
615
|
+
/**
|
|
616
|
+
Subpath imports to define internal package import maps that only apply to import specifiers from within the package itself.
|
|
617
|
+
|
|
618
|
+
[Read more.](https://nodejs.org/api/packages.html#subpath-imports)
|
|
619
|
+
*/
|
|
620
|
+
imports?: Imports;
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
The executable files that should be installed into the `PATH`.
|
|
624
|
+
*/
|
|
625
|
+
bin?:
|
|
626
|
+
| string
|
|
627
|
+
| Partial<Record<string, string>>;
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
Filenames to put in place for the `man` program to find.
|
|
631
|
+
*/
|
|
632
|
+
man?: string | string[];
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
Indicates the structure of the package.
|
|
636
|
+
*/
|
|
637
|
+
directories?: DirectoryLocations;
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
Location for the code repository.
|
|
641
|
+
*/
|
|
642
|
+
repository?:
|
|
643
|
+
| string
|
|
644
|
+
| {
|
|
645
|
+
type: string;
|
|
646
|
+
url: string;
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
Relative path to package.json if it is placed in non-root directory (for example if it is part of a monorepo).
|
|
650
|
+
|
|
651
|
+
[Read more.](https://github.com/npm/rfcs/blob/latest/implemented/0010-monorepo-subdirectory-declaration.md)
|
|
652
|
+
*/
|
|
653
|
+
directory?: string;
|
|
654
|
+
};
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
Script commands that are run at various times in the lifecycle of the package. The key is the lifecycle event, and the value is the command to run at that point.
|
|
658
|
+
*/
|
|
659
|
+
scripts?: Scripts;
|
|
660
|
+
|
|
661
|
+
/**
|
|
662
|
+
Is used to set configuration parameters used in package scripts that persist across upgrades.
|
|
663
|
+
*/
|
|
664
|
+
config?: JsonObject;
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
The dependencies of the package.
|
|
668
|
+
*/
|
|
669
|
+
dependencies?: Dependency;
|
|
670
|
+
|
|
671
|
+
/**
|
|
672
|
+
Additional tooling dependencies that are not required for the package to work. Usually test, build, or documentation tooling.
|
|
673
|
+
*/
|
|
674
|
+
devDependencies?: Dependency;
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
Dependencies that are skipped if they fail to install.
|
|
678
|
+
*/
|
|
679
|
+
optionalDependencies?: Dependency;
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
Dependencies that will usually be required by the package user directly or via another dependency.
|
|
683
|
+
*/
|
|
684
|
+
peerDependencies?: Dependency;
|
|
685
|
+
|
|
686
|
+
/**
|
|
687
|
+
Indicate peer dependencies that are optional.
|
|
688
|
+
*/
|
|
689
|
+
peerDependenciesMeta?: Partial<Record<string, {optional: true}>>;
|
|
690
|
+
|
|
691
|
+
/**
|
|
692
|
+
Package names that are bundled when the package is published.
|
|
693
|
+
*/
|
|
694
|
+
bundledDependencies?: string[];
|
|
695
|
+
|
|
696
|
+
/**
|
|
697
|
+
Alias of `bundledDependencies`.
|
|
698
|
+
*/
|
|
699
|
+
bundleDependencies?: string[];
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
Engines that this package runs on.
|
|
703
|
+
*/
|
|
704
|
+
engines?: {
|
|
705
|
+
[EngineName in 'npm' | 'node' | string]?: string;
|
|
706
|
+
};
|
|
707
|
+
|
|
708
|
+
/**
|
|
709
|
+
@deprecated
|
|
710
|
+
*/
|
|
711
|
+
engineStrict?: boolean;
|
|
712
|
+
|
|
713
|
+
/**
|
|
714
|
+
Operating systems the module runs on.
|
|
715
|
+
*/
|
|
716
|
+
os?: Array<LiteralUnion<
|
|
717
|
+
| 'aix'
|
|
718
|
+
| 'darwin'
|
|
719
|
+
| 'freebsd'
|
|
720
|
+
| 'linux'
|
|
721
|
+
| 'openbsd'
|
|
722
|
+
| 'sunos'
|
|
723
|
+
| 'win32'
|
|
724
|
+
| '!aix'
|
|
725
|
+
| '!darwin'
|
|
726
|
+
| '!freebsd'
|
|
727
|
+
| '!linux'
|
|
728
|
+
| '!openbsd'
|
|
729
|
+
| '!sunos'
|
|
730
|
+
| '!win32',
|
|
731
|
+
string
|
|
732
|
+
>>;
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
CPU architectures the module runs on.
|
|
736
|
+
*/
|
|
737
|
+
cpu?: Array<LiteralUnion<
|
|
738
|
+
| 'arm'
|
|
739
|
+
| 'arm64'
|
|
740
|
+
| 'ia32'
|
|
741
|
+
| 'mips'
|
|
742
|
+
| 'mipsel'
|
|
743
|
+
| 'ppc'
|
|
744
|
+
| 'ppc64'
|
|
745
|
+
| 's390'
|
|
746
|
+
| 's390x'
|
|
747
|
+
| 'x32'
|
|
748
|
+
| 'x64'
|
|
749
|
+
| '!arm'
|
|
750
|
+
| '!arm64'
|
|
751
|
+
| '!ia32'
|
|
752
|
+
| '!mips'
|
|
753
|
+
| '!mipsel'
|
|
754
|
+
| '!ppc'
|
|
755
|
+
| '!ppc64'
|
|
756
|
+
| '!s390'
|
|
757
|
+
| '!s390x'
|
|
758
|
+
| '!x32'
|
|
759
|
+
| '!x64',
|
|
760
|
+
string
|
|
761
|
+
>>;
|
|
762
|
+
|
|
763
|
+
/**
|
|
764
|
+
If set to `true`, a warning will be shown if package is installed locally. Useful if the package is primarily a command-line application that should be installed globally.
|
|
765
|
+
|
|
766
|
+
@deprecated
|
|
767
|
+
*/
|
|
768
|
+
preferGlobal?: boolean;
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
If set to `true`, then npm will refuse to publish it.
|
|
772
|
+
*/
|
|
773
|
+
private?: boolean;
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
A set of config values that will be used at publish-time. It's especially handy to set the tag, registry or access, to ensure that a given package is not tagged with 'latest', published to the global public registry or that a scoped module is private by default.
|
|
777
|
+
*/
|
|
778
|
+
publishConfig?: PublishConfig;
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
Describes and notifies consumers of a package's monetary support information.
|
|
782
|
+
|
|
783
|
+
[Read more.](https://github.com/npm/rfcs/blob/latest/accepted/0017-add-funding-support.md)
|
|
784
|
+
*/
|
|
785
|
+
funding?: string | {
|
|
786
|
+
/**
|
|
787
|
+
The type of funding.
|
|
788
|
+
*/
|
|
789
|
+
type?: LiteralUnion<
|
|
790
|
+
| 'github'
|
|
791
|
+
| 'opencollective'
|
|
792
|
+
| 'patreon'
|
|
793
|
+
| 'individual'
|
|
794
|
+
| 'foundation'
|
|
795
|
+
| 'corporation',
|
|
796
|
+
string
|
|
797
|
+
>;
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
The URL to the funding page.
|
|
801
|
+
*/
|
|
802
|
+
url: string;
|
|
803
|
+
};
|
|
804
|
+
|
|
805
|
+
/**
|
|
806
|
+
Used to configure [npm workspaces](https://docs.npmjs.com/cli/using-npm/workspaces) / [Yarn workspaces](https://classic.yarnpkg.com/docs/workspaces/).
|
|
807
|
+
|
|
808
|
+
Workspaces allow you to manage multiple packages within the same repository in such a way that you only need to run your install command once in order to install all of them in a single pass.
|
|
809
|
+
|
|
810
|
+
Please note that the top-level `private` property of `package.json` **must** be set to `true` in order to use workspaces.
|
|
811
|
+
*/
|
|
812
|
+
workspaces?: WorkspacePattern[] | WorkspaceConfig;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
/**
|
|
816
|
+
Type for [`package.json` file used by the Node.js runtime](https://nodejs.org/api/packages.html#nodejs-packagejson-field-definitions).
|
|
817
|
+
*/
|
|
818
|
+
export type NodeJsStandard = {
|
|
819
|
+
/**
|
|
820
|
+
Defines which package manager is expected to be used when working on the current project. It can set to any of the [supported package managers](https://nodejs.org/api/corepack.html#supported-package-managers), and will ensure that your teams use the exact same package manager versions without having to install anything else than Node.js.
|
|
821
|
+
|
|
822
|
+
__This field is currently experimental and needs to be opted-in; check the [Corepack](https://nodejs.org/api/corepack.html) page for details about the procedure.__
|
|
823
|
+
|
|
824
|
+
@example
|
|
825
|
+
```json
|
|
826
|
+
{
|
|
827
|
+
"packageManager": "<package manager name>@<version>"
|
|
828
|
+
}
|
|
829
|
+
```
|
|
830
|
+
*/
|
|
831
|
+
packageManager?: string;
|
|
832
|
+
};
|
|
833
|
+
|
|
834
|
+
export type PublishConfig = {
|
|
835
|
+
/**
|
|
836
|
+
Additional, less common properties from the [npm docs on `publishConfig`](https://docs.npmjs.com/cli/v7/configuring-npm/package-json#publishconfig).
|
|
837
|
+
*/
|
|
838
|
+
[additionalProperties: string]: JsonValue | undefined;
|
|
839
|
+
|
|
840
|
+
/**
|
|
841
|
+
When publishing scoped packages, the access level defaults to restricted. If you want your scoped package to be publicly viewable (and installable) set `--access=public`. The only valid values for access are public and restricted. Unscoped packages always have an access level of public.
|
|
842
|
+
*/
|
|
843
|
+
access?: 'public' | 'restricted';
|
|
844
|
+
|
|
845
|
+
/**
|
|
846
|
+
The base URL of the npm registry.
|
|
847
|
+
|
|
848
|
+
Default: `'https://registry.npmjs.org/'`
|
|
849
|
+
*/
|
|
850
|
+
registry?: string;
|
|
851
|
+
|
|
852
|
+
/**
|
|
853
|
+
The tag to publish the package under.
|
|
854
|
+
|
|
855
|
+
Default: `'latest'`
|
|
856
|
+
*/
|
|
857
|
+
tag?: string;
|
|
858
|
+
};
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
/**
|
|
862
|
+
Type for [npm's `package.json` file](https://docs.npmjs.com/creating-a-package-json-file). Also includes types for fields used by other popular projects, like TypeScript and Yarn.
|
|
863
|
+
|
|
864
|
+
@category File
|
|
865
|
+
*/
|
|
866
|
+
type PackageJson$1 =
|
|
867
|
+
JsonObject &
|
|
868
|
+
PackageJson$1.NodeJsStandard &
|
|
869
|
+
PackageJson$1.PackageJsonStandard &
|
|
870
|
+
PackageJson$1.NonStandardEntryPoints &
|
|
871
|
+
PackageJson$1.TypeScriptConfiguration &
|
|
872
|
+
PackageJson$1.YarnConfiguration &
|
|
873
|
+
PackageJson$1.JSPMConfiguration;
|
|
874
|
+
|
|
875
|
+
declare namespace TsConfigJson {
|
|
876
|
+
namespace CompilerOptions {
|
|
877
|
+
export type JSX =
|
|
878
|
+
| 'preserve'
|
|
879
|
+
| 'react'
|
|
880
|
+
| 'react-jsx'
|
|
881
|
+
| 'react-jsxdev'
|
|
882
|
+
| 'react-native';
|
|
883
|
+
|
|
884
|
+
export type Module =
|
|
885
|
+
| 'CommonJS'
|
|
886
|
+
| 'AMD'
|
|
887
|
+
| 'System'
|
|
888
|
+
| 'UMD'
|
|
889
|
+
| 'ES6'
|
|
890
|
+
| 'ES2015'
|
|
891
|
+
| 'ES2020'
|
|
892
|
+
| 'ES2022'
|
|
893
|
+
| 'ESNext'
|
|
894
|
+
| 'Node16'
|
|
895
|
+
| 'NodeNext'
|
|
896
|
+
| 'Preserve'
|
|
897
|
+
| 'None'
|
|
898
|
+
// Lowercase alternatives
|
|
899
|
+
| 'commonjs'
|
|
900
|
+
| 'amd'
|
|
901
|
+
| 'system'
|
|
902
|
+
| 'umd'
|
|
903
|
+
| 'es6'
|
|
904
|
+
| 'es2015'
|
|
905
|
+
| 'es2020'
|
|
906
|
+
| 'es2022'
|
|
907
|
+
| 'esnext'
|
|
908
|
+
| 'node16'
|
|
909
|
+
| 'nodenext'
|
|
910
|
+
| 'preserve'
|
|
911
|
+
| 'none';
|
|
912
|
+
|
|
913
|
+
export type NewLine =
|
|
914
|
+
| 'CRLF'
|
|
915
|
+
| 'LF'
|
|
916
|
+
// Lowercase alternatives
|
|
917
|
+
| 'crlf'
|
|
918
|
+
| 'lf';
|
|
919
|
+
|
|
920
|
+
export type Target =
|
|
921
|
+
| 'ES3'
|
|
922
|
+
| 'ES5'
|
|
923
|
+
| 'ES6'
|
|
924
|
+
| 'ES2015'
|
|
925
|
+
| 'ES2016'
|
|
926
|
+
| 'ES2017'
|
|
927
|
+
| 'ES2018'
|
|
928
|
+
| 'ES2019'
|
|
929
|
+
| 'ES2020'
|
|
930
|
+
| 'ES2021'
|
|
931
|
+
| 'ES2022'
|
|
932
|
+
| 'ESNext'
|
|
933
|
+
// Lowercase alternatives
|
|
934
|
+
| 'es3'
|
|
935
|
+
| 'es5'
|
|
936
|
+
| 'es6'
|
|
937
|
+
| 'es2015'
|
|
938
|
+
| 'es2016'
|
|
939
|
+
| 'es2017'
|
|
940
|
+
| 'es2018'
|
|
941
|
+
| 'es2019'
|
|
942
|
+
| 'es2020'
|
|
943
|
+
| 'es2021'
|
|
944
|
+
| 'es2022'
|
|
945
|
+
| 'esnext';
|
|
946
|
+
|
|
947
|
+
// eslint-disable-next-line unicorn/prevent-abbreviations
|
|
948
|
+
export type Lib =
|
|
949
|
+
| 'ES5'
|
|
950
|
+
| 'ES6'
|
|
951
|
+
| 'ES7'
|
|
952
|
+
| 'ES2015'
|
|
953
|
+
| 'ES2015.Collection'
|
|
954
|
+
| 'ES2015.Core'
|
|
955
|
+
| 'ES2015.Generator'
|
|
956
|
+
| 'ES2015.Iterable'
|
|
957
|
+
| 'ES2015.Promise'
|
|
958
|
+
| 'ES2015.Proxy'
|
|
959
|
+
| 'ES2015.Reflect'
|
|
960
|
+
| 'ES2015.Symbol.WellKnown'
|
|
961
|
+
| 'ES2015.Symbol'
|
|
962
|
+
| 'ES2016'
|
|
963
|
+
| 'ES2016.Array.Include'
|
|
964
|
+
| 'ES2017'
|
|
965
|
+
| 'ES2017.Intl'
|
|
966
|
+
| 'ES2017.Object'
|
|
967
|
+
| 'ES2017.SharedMemory'
|
|
968
|
+
| 'ES2017.String'
|
|
969
|
+
| 'ES2017.TypedArrays'
|
|
970
|
+
| 'ES2018'
|
|
971
|
+
| 'ES2018.AsyncGenerator'
|
|
972
|
+
| 'ES2018.AsyncIterable'
|
|
973
|
+
| 'ES2018.Intl'
|
|
974
|
+
| 'ES2018.Promise'
|
|
975
|
+
| 'ES2018.Regexp'
|
|
976
|
+
| 'ES2019'
|
|
977
|
+
| 'ES2019.Array'
|
|
978
|
+
| 'ES2019.Object'
|
|
979
|
+
| 'ES2019.String'
|
|
980
|
+
| 'ES2019.Symbol'
|
|
981
|
+
| 'ES2020'
|
|
982
|
+
| 'ES2020.BigInt'
|
|
983
|
+
| 'ES2020.Promise'
|
|
984
|
+
| 'ES2020.String'
|
|
985
|
+
| 'ES2020.Symbol.WellKnown'
|
|
986
|
+
| 'ES2020.SharedMemory'
|
|
987
|
+
| 'ES2020.Intl'
|
|
988
|
+
| 'ES2021'
|
|
989
|
+
| 'ES2021.Promise'
|
|
990
|
+
| 'ES2021.String'
|
|
991
|
+
| 'ES2021.WeakRef'
|
|
992
|
+
| 'ES2022'
|
|
993
|
+
| 'ES2022.Array'
|
|
994
|
+
| 'ES2022.Error'
|
|
995
|
+
| 'ES2022.Intl'
|
|
996
|
+
| 'ES2022.Object'
|
|
997
|
+
| 'ES2022.SharedMemory'
|
|
998
|
+
| 'ES2022.String'
|
|
999
|
+
| 'ES2022.RegExp'
|
|
1000
|
+
| 'ESNext'
|
|
1001
|
+
| 'ESNext.Array'
|
|
1002
|
+
| 'ESNext.AsyncIterable'
|
|
1003
|
+
| 'ESNext.BigInt'
|
|
1004
|
+
| 'ESNext.Intl'
|
|
1005
|
+
| 'ESNext.Promise'
|
|
1006
|
+
| 'ESNext.String'
|
|
1007
|
+
| 'ESNext.Symbol'
|
|
1008
|
+
| 'ESNext.WeakRef'
|
|
1009
|
+
| 'DOM'
|
|
1010
|
+
| 'DOM.Iterable'
|
|
1011
|
+
| 'ScriptHost'
|
|
1012
|
+
| 'WebWorker'
|
|
1013
|
+
| 'WebWorker.ImportScripts'
|
|
1014
|
+
| 'WebWorker.Iterable'
|
|
1015
|
+
// Lowercase alternatives
|
|
1016
|
+
| 'es5'
|
|
1017
|
+
| 'es6'
|
|
1018
|
+
| 'es7'
|
|
1019
|
+
| 'es2015'
|
|
1020
|
+
| 'es2015.collection'
|
|
1021
|
+
| 'es2015.core'
|
|
1022
|
+
| 'es2015.generator'
|
|
1023
|
+
| 'es2015.iterable'
|
|
1024
|
+
| 'es2015.promise'
|
|
1025
|
+
| 'es2015.proxy'
|
|
1026
|
+
| 'es2015.reflect'
|
|
1027
|
+
| 'es2015.symbol.wellknown'
|
|
1028
|
+
| 'es2015.symbol'
|
|
1029
|
+
| 'es2016'
|
|
1030
|
+
| 'es2016.array.include'
|
|
1031
|
+
| 'es2017'
|
|
1032
|
+
| 'es2017.intl'
|
|
1033
|
+
| 'es2017.object'
|
|
1034
|
+
| 'es2017.sharedmemory'
|
|
1035
|
+
| 'es2017.string'
|
|
1036
|
+
| 'es2017.typedarrays'
|
|
1037
|
+
| 'es2018'
|
|
1038
|
+
| 'es2018.asyncgenerator'
|
|
1039
|
+
| 'es2018.asynciterable'
|
|
1040
|
+
| 'es2018.intl'
|
|
1041
|
+
| 'es2018.promise'
|
|
1042
|
+
| 'es2018.regexp'
|
|
1043
|
+
| 'es2019'
|
|
1044
|
+
| 'es2019.array'
|
|
1045
|
+
| 'es2019.object'
|
|
1046
|
+
| 'es2019.string'
|
|
1047
|
+
| 'es2019.symbol'
|
|
1048
|
+
| 'es2020'
|
|
1049
|
+
| 'es2020.bigint'
|
|
1050
|
+
| 'es2020.promise'
|
|
1051
|
+
| 'es2020.string'
|
|
1052
|
+
| 'es2020.symbol.wellknown'
|
|
1053
|
+
| 'es2020.sharedmemory'
|
|
1054
|
+
| 'es2020.intl'
|
|
1055
|
+
| 'es2021'
|
|
1056
|
+
| 'es2021.promise'
|
|
1057
|
+
| 'es2021.string'
|
|
1058
|
+
| 'es2021.weakref'
|
|
1059
|
+
| 'es2022'
|
|
1060
|
+
| 'es2022.array'
|
|
1061
|
+
| 'es2022.error'
|
|
1062
|
+
| 'es2022.intl'
|
|
1063
|
+
| 'es2022.object'
|
|
1064
|
+
| 'es2022.sharedmemory'
|
|
1065
|
+
| 'es2022.string'
|
|
1066
|
+
| 'es2022.regexp'
|
|
1067
|
+
| 'esnext'
|
|
1068
|
+
| 'esnext.array'
|
|
1069
|
+
| 'esnext.asynciterable'
|
|
1070
|
+
| 'esnext.bigint'
|
|
1071
|
+
| 'esnext.intl'
|
|
1072
|
+
| 'esnext.promise'
|
|
1073
|
+
| 'esnext.string'
|
|
1074
|
+
| 'esnext.symbol'
|
|
1075
|
+
| 'esnext.weakref'
|
|
1076
|
+
| 'dom'
|
|
1077
|
+
| 'dom.iterable'
|
|
1078
|
+
| 'scripthost'
|
|
1079
|
+
| 'webworker'
|
|
1080
|
+
| 'webworker.importscripts'
|
|
1081
|
+
| 'webworker.iterable';
|
|
1082
|
+
|
|
1083
|
+
export type Plugin = {
|
|
1084
|
+
/**
|
|
1085
|
+
Plugin name.
|
|
1086
|
+
*/
|
|
1087
|
+
name: string;
|
|
1088
|
+
};
|
|
1089
|
+
|
|
1090
|
+
export type ImportsNotUsedAsValues =
|
|
1091
|
+
| 'remove'
|
|
1092
|
+
| 'preserve'
|
|
1093
|
+
| 'error';
|
|
1094
|
+
|
|
1095
|
+
export type FallbackPolling =
|
|
1096
|
+
| 'fixedPollingInterval'
|
|
1097
|
+
| 'priorityPollingInterval'
|
|
1098
|
+
| 'dynamicPriorityPolling'
|
|
1099
|
+
| 'fixedInterval'
|
|
1100
|
+
| 'priorityInterval'
|
|
1101
|
+
| 'dynamicPriority'
|
|
1102
|
+
| 'fixedChunkSize';
|
|
1103
|
+
|
|
1104
|
+
export type WatchDirectory =
|
|
1105
|
+
| 'useFsEvents'
|
|
1106
|
+
| 'fixedPollingInterval'
|
|
1107
|
+
| 'dynamicPriorityPolling'
|
|
1108
|
+
| 'fixedChunkSizePolling';
|
|
1109
|
+
|
|
1110
|
+
export type WatchFile =
|
|
1111
|
+
| 'fixedPollingInterval'
|
|
1112
|
+
| 'priorityPollingInterval'
|
|
1113
|
+
| 'dynamicPriorityPolling'
|
|
1114
|
+
| 'useFsEvents'
|
|
1115
|
+
| 'useFsEventsOnParentDirectory'
|
|
1116
|
+
| 'fixedChunkSizePolling';
|
|
1117
|
+
|
|
1118
|
+
export type ModuleResolution =
|
|
1119
|
+
| 'classic'
|
|
1120
|
+
| 'node'
|
|
1121
|
+
| 'node10'
|
|
1122
|
+
| 'node16'
|
|
1123
|
+
| 'nodenext'
|
|
1124
|
+
| 'bundler'
|
|
1125
|
+
// Pascal-cased alternatives
|
|
1126
|
+
| 'Classic'
|
|
1127
|
+
| 'Node'
|
|
1128
|
+
| 'Node10'
|
|
1129
|
+
| 'Node16'
|
|
1130
|
+
| 'NodeNext'
|
|
1131
|
+
| 'Bundler';
|
|
1132
|
+
|
|
1133
|
+
export type ModuleDetection =
|
|
1134
|
+
| 'auto'
|
|
1135
|
+
| 'legacy'
|
|
1136
|
+
| 'force';
|
|
1137
|
+
|
|
1138
|
+
export type IgnoreDeprecations = '5.0';
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
export type CompilerOptions = {
|
|
1142
|
+
/**
|
|
1143
|
+
The character set of the input files.
|
|
1144
|
+
|
|
1145
|
+
@default 'utf8'
|
|
1146
|
+
@deprecated This option will be removed in TypeScript 5.5.
|
|
1147
|
+
*/
|
|
1148
|
+
charset?: string;
|
|
1149
|
+
|
|
1150
|
+
/**
|
|
1151
|
+
Enables building for project references.
|
|
1152
|
+
|
|
1153
|
+
@default true
|
|
1154
|
+
*/
|
|
1155
|
+
composite?: boolean;
|
|
1156
|
+
|
|
1157
|
+
/**
|
|
1158
|
+
Generates corresponding d.ts files.
|
|
1159
|
+
|
|
1160
|
+
@default false
|
|
1161
|
+
*/
|
|
1162
|
+
declaration?: boolean;
|
|
1163
|
+
|
|
1164
|
+
/**
|
|
1165
|
+
Specify output directory for generated declaration files.
|
|
1166
|
+
*/
|
|
1167
|
+
declarationDir?: string;
|
|
1168
|
+
|
|
1169
|
+
/**
|
|
1170
|
+
Show diagnostic information.
|
|
1171
|
+
|
|
1172
|
+
@default false
|
|
1173
|
+
*/
|
|
1174
|
+
diagnostics?: boolean;
|
|
1175
|
+
|
|
1176
|
+
/**
|
|
1177
|
+
Reduce the number of projects loaded automatically by TypeScript.
|
|
1178
|
+
|
|
1179
|
+
@default false
|
|
1180
|
+
*/
|
|
1181
|
+
disableReferencedProjectLoad?: boolean;
|
|
1182
|
+
|
|
1183
|
+
/**
|
|
1184
|
+
Enforces using indexed accessors for keys declared using an indexed type.
|
|
1185
|
+
|
|
1186
|
+
@default false
|
|
1187
|
+
*/
|
|
1188
|
+
noPropertyAccessFromIndexSignature?: boolean;
|
|
1189
|
+
|
|
1190
|
+
/**
|
|
1191
|
+
Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.
|
|
1192
|
+
|
|
1193
|
+
@default false
|
|
1194
|
+
*/
|
|
1195
|
+
emitBOM?: boolean;
|
|
1196
|
+
|
|
1197
|
+
/**
|
|
1198
|
+
Only emit `.d.ts` declaration files.
|
|
1199
|
+
|
|
1200
|
+
@default false
|
|
1201
|
+
*/
|
|
1202
|
+
emitDeclarationOnly?: boolean;
|
|
1203
|
+
|
|
1204
|
+
/**
|
|
1205
|
+
Differentiate between undefined and not present when type checking.
|
|
1206
|
+
|
|
1207
|
+
@default false
|
|
1208
|
+
*/
|
|
1209
|
+
exactOptionalPropertyTypes?: boolean;
|
|
1210
|
+
|
|
1211
|
+
/**
|
|
1212
|
+
Enable incremental compilation.
|
|
1213
|
+
|
|
1214
|
+
@default `composite`
|
|
1215
|
+
*/
|
|
1216
|
+
incremental?: boolean;
|
|
1217
|
+
|
|
1218
|
+
/**
|
|
1219
|
+
Specify file to store incremental compilation information.
|
|
1220
|
+
|
|
1221
|
+
@default '.tsbuildinfo'
|
|
1222
|
+
*/
|
|
1223
|
+
tsBuildInfoFile?: string;
|
|
1224
|
+
|
|
1225
|
+
/**
|
|
1226
|
+
Emit a single file with source maps instead of having a separate file.
|
|
1227
|
+
|
|
1228
|
+
@default false
|
|
1229
|
+
*/
|
|
1230
|
+
inlineSourceMap?: boolean;
|
|
1231
|
+
|
|
1232
|
+
/**
|
|
1233
|
+
Emit the source alongside the sourcemaps within a single file.
|
|
1234
|
+
|
|
1235
|
+
Requires `--inlineSourceMap` to be set.
|
|
1236
|
+
|
|
1237
|
+
@default false
|
|
1238
|
+
*/
|
|
1239
|
+
inlineSources?: boolean;
|
|
1240
|
+
|
|
1241
|
+
/**
|
|
1242
|
+
Specify what JSX code is generated.
|
|
1243
|
+
|
|
1244
|
+
@default 'preserve'
|
|
1245
|
+
*/
|
|
1246
|
+
jsx?: CompilerOptions.JSX;
|
|
1247
|
+
|
|
1248
|
+
/**
|
|
1249
|
+
Specifies the object invoked for `createElement` and `__spread` when targeting `'react'` JSX emit.
|
|
1250
|
+
|
|
1251
|
+
@default 'React'
|
|
1252
|
+
*/
|
|
1253
|
+
reactNamespace?: string;
|
|
1254
|
+
|
|
1255
|
+
/**
|
|
1256
|
+
Specify the JSX factory function to use when targeting React JSX emit, e.g. `React.createElement` or `h`.
|
|
1257
|
+
|
|
1258
|
+
@default 'React.createElement'
|
|
1259
|
+
*/
|
|
1260
|
+
jsxFactory?: string;
|
|
1261
|
+
|
|
1262
|
+
/**
|
|
1263
|
+
Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'.
|
|
1264
|
+
|
|
1265
|
+
@default 'React.Fragment'
|
|
1266
|
+
*/
|
|
1267
|
+
jsxFragmentFactory?: string;
|
|
1268
|
+
|
|
1269
|
+
/**
|
|
1270
|
+
Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.
|
|
1271
|
+
|
|
1272
|
+
@default 'react'
|
|
1273
|
+
*/
|
|
1274
|
+
jsxImportSource?: string;
|
|
1275
|
+
|
|
1276
|
+
/**
|
|
1277
|
+
Print names of files part of the compilation.
|
|
1278
|
+
|
|
1279
|
+
@default false
|
|
1280
|
+
*/
|
|
1281
|
+
listFiles?: boolean;
|
|
1282
|
+
|
|
1283
|
+
/**
|
|
1284
|
+
Specifies the location where debugger should locate map files instead of generated locations.
|
|
1285
|
+
*/
|
|
1286
|
+
mapRoot?: string;
|
|
1287
|
+
|
|
1288
|
+
/**
|
|
1289
|
+
Specify module code generation: 'None', 'CommonJS', 'AMD', 'System', 'UMD', 'ES6', 'ES2015' or 'ESNext'. Only 'AMD' and 'System' can be used in conjunction with `--outFile`. 'ES6' and 'ES2015' values may be used when targeting 'ES5' or lower.
|
|
1290
|
+
|
|
1291
|
+
@default ['ES3', 'ES5'].includes(target) ? 'CommonJS' : 'ES6'
|
|
1292
|
+
*/
|
|
1293
|
+
module?: CompilerOptions.Module;
|
|
1294
|
+
|
|
1295
|
+
/**
|
|
1296
|
+
Specifies module resolution strategy: 'node' (Node) or 'classic' (TypeScript pre 1.6).
|
|
1297
|
+
|
|
1298
|
+
@default ['AMD', 'System', 'ES6'].includes(module) ? 'classic' : 'node'
|
|
1299
|
+
*/
|
|
1300
|
+
moduleResolution?: CompilerOptions.ModuleResolution;
|
|
1301
|
+
|
|
1302
|
+
/**
|
|
1303
|
+
Specifies the end of line sequence to be used when emitting files: 'crlf' (Windows) or 'lf' (Unix).
|
|
1304
|
+
|
|
1305
|
+
@default 'LF'
|
|
1306
|
+
*/
|
|
1307
|
+
newLine?: CompilerOptions.NewLine;
|
|
1308
|
+
|
|
1309
|
+
/**
|
|
1310
|
+
Do not emit output.
|
|
1311
|
+
|
|
1312
|
+
@default false
|
|
1313
|
+
*/
|
|
1314
|
+
noEmit?: boolean;
|
|
1315
|
+
|
|
1316
|
+
/**
|
|
1317
|
+
Do not generate custom helper functions like `__extends` in compiled output.
|
|
1318
|
+
|
|
1319
|
+
@default false
|
|
1320
|
+
*/
|
|
1321
|
+
noEmitHelpers?: boolean;
|
|
1322
|
+
|
|
1323
|
+
/**
|
|
1324
|
+
Do not emit outputs if any type checking errors were reported.
|
|
1325
|
+
|
|
1326
|
+
@default false
|
|
1327
|
+
*/
|
|
1328
|
+
noEmitOnError?: boolean;
|
|
1329
|
+
|
|
1330
|
+
/**
|
|
1331
|
+
Warn on expressions and declarations with an implied 'any' type.
|
|
1332
|
+
|
|
1333
|
+
@default false
|
|
1334
|
+
*/
|
|
1335
|
+
noImplicitAny?: boolean;
|
|
1336
|
+
|
|
1337
|
+
/**
|
|
1338
|
+
Raise error on 'this' expressions with an implied any type.
|
|
1339
|
+
|
|
1340
|
+
@default false
|
|
1341
|
+
*/
|
|
1342
|
+
noImplicitThis?: boolean;
|
|
1343
|
+
|
|
1344
|
+
/**
|
|
1345
|
+
Report errors on unused locals.
|
|
1346
|
+
|
|
1347
|
+
@default false
|
|
1348
|
+
*/
|
|
1349
|
+
noUnusedLocals?: boolean;
|
|
1350
|
+
|
|
1351
|
+
/**
|
|
1352
|
+
Report errors on unused parameters.
|
|
1353
|
+
|
|
1354
|
+
@default false
|
|
1355
|
+
*/
|
|
1356
|
+
noUnusedParameters?: boolean;
|
|
1357
|
+
|
|
1358
|
+
/**
|
|
1359
|
+
Do not include the default library file (lib.d.ts).
|
|
1360
|
+
|
|
1361
|
+
@default false
|
|
1362
|
+
*/
|
|
1363
|
+
noLib?: boolean;
|
|
1364
|
+
|
|
1365
|
+
/**
|
|
1366
|
+
Do not add triple-slash references or module import targets to the list of compiled files.
|
|
1367
|
+
|
|
1368
|
+
@default false
|
|
1369
|
+
*/
|
|
1370
|
+
noResolve?: boolean;
|
|
1371
|
+
|
|
1372
|
+
/**
|
|
1373
|
+
Disable strict checking of generic signatures in function types.
|
|
1374
|
+
|
|
1375
|
+
@default false
|
|
1376
|
+
@deprecated This option will be removed in TypeScript 5.5.
|
|
1377
|
+
*/
|
|
1378
|
+
noStrictGenericChecks?: boolean;
|
|
1379
|
+
|
|
1380
|
+
/**
|
|
1381
|
+
@deprecated use `skipLibCheck` instead.
|
|
1382
|
+
*/
|
|
1383
|
+
skipDefaultLibCheck?: boolean;
|
|
1384
|
+
|
|
1385
|
+
/**
|
|
1386
|
+
Skip type checking of declaration files.
|
|
1387
|
+
|
|
1388
|
+
@default false
|
|
1389
|
+
*/
|
|
1390
|
+
skipLibCheck?: boolean;
|
|
1391
|
+
|
|
1392
|
+
/**
|
|
1393
|
+
Concatenate and emit output to single file.
|
|
1394
|
+
*/
|
|
1395
|
+
outFile?: string;
|
|
1396
|
+
|
|
1397
|
+
/**
|
|
1398
|
+
Redirect output structure to the directory.
|
|
1399
|
+
*/
|
|
1400
|
+
outDir?: string;
|
|
1401
|
+
|
|
1402
|
+
/**
|
|
1403
|
+
Do not erase const enum declarations in generated code.
|
|
1404
|
+
|
|
1405
|
+
@default false
|
|
1406
|
+
*/
|
|
1407
|
+
preserveConstEnums?: boolean;
|
|
1408
|
+
|
|
1409
|
+
/**
|
|
1410
|
+
Do not resolve symlinks to their real path; treat a symlinked file like a real one.
|
|
1411
|
+
|
|
1412
|
+
@default false
|
|
1413
|
+
*/
|
|
1414
|
+
preserveSymlinks?: boolean;
|
|
1415
|
+
|
|
1416
|
+
/**
|
|
1417
|
+
Keep outdated console output in watch mode instead of clearing the screen.
|
|
1418
|
+
|
|
1419
|
+
@default false
|
|
1420
|
+
*/
|
|
1421
|
+
preserveWatchOutput?: boolean;
|
|
1422
|
+
|
|
1423
|
+
/**
|
|
1424
|
+
Stylize errors and messages using color and context (experimental).
|
|
1425
|
+
|
|
1426
|
+
@default true // Unless piping to another program or redirecting output to a file.
|
|
1427
|
+
*/
|
|
1428
|
+
pretty?: boolean;
|
|
1429
|
+
|
|
1430
|
+
/**
|
|
1431
|
+
Do not emit comments to output.
|
|
1432
|
+
|
|
1433
|
+
@default false
|
|
1434
|
+
*/
|
|
1435
|
+
removeComments?: boolean;
|
|
1436
|
+
|
|
1437
|
+
/**
|
|
1438
|
+
Specifies the root directory of input files.
|
|
1439
|
+
|
|
1440
|
+
Use to control the output directory structure with `--outDir`.
|
|
1441
|
+
*/
|
|
1442
|
+
rootDir?: string;
|
|
1443
|
+
|
|
1444
|
+
/**
|
|
1445
|
+
Unconditionally emit imports for unresolved files.
|
|
1446
|
+
|
|
1447
|
+
@default false
|
|
1448
|
+
*/
|
|
1449
|
+
isolatedModules?: boolean;
|
|
1450
|
+
|
|
1451
|
+
/**
|
|
1452
|
+
Generates corresponding '.map' file.
|
|
1453
|
+
|
|
1454
|
+
@default false
|
|
1455
|
+
*/
|
|
1456
|
+
sourceMap?: boolean;
|
|
1457
|
+
|
|
1458
|
+
/**
|
|
1459
|
+
Specifies the location where debugger should locate TypeScript files instead of source locations.
|
|
1460
|
+
*/
|
|
1461
|
+
sourceRoot?: string;
|
|
1462
|
+
|
|
1463
|
+
/**
|
|
1464
|
+
Suppress excess property checks for object literals.
|
|
1465
|
+
|
|
1466
|
+
@default false
|
|
1467
|
+
@deprecated This option will be removed in TypeScript 5.5.
|
|
1468
|
+
*/
|
|
1469
|
+
suppressExcessPropertyErrors?: boolean;
|
|
1470
|
+
|
|
1471
|
+
/**
|
|
1472
|
+
Suppress noImplicitAny errors for indexing objects lacking index signatures.
|
|
1473
|
+
|
|
1474
|
+
@default false
|
|
1475
|
+
@deprecated This option will be removed in TypeScript 5.5.
|
|
1476
|
+
*/
|
|
1477
|
+
suppressImplicitAnyIndexErrors?: boolean;
|
|
1478
|
+
|
|
1479
|
+
|
|
1480
|
+
|
|
1481
|
+
/**
|
|
1482
|
+
Specify ECMAScript target version.
|
|
1483
|
+
|
|
1484
|
+
@default 'es3'
|
|
1485
|
+
*/
|
|
1486
|
+
target?: CompilerOptions.Target;
|
|
1487
|
+
|
|
1488
|
+
/**
|
|
1489
|
+
Default catch clause variables as `unknown` instead of `any`.
|
|
1490
|
+
|
|
1491
|
+
@default false
|
|
1492
|
+
*/
|
|
1493
|
+
useUnknownInCatchVariables?: boolean;
|
|
1494
|
+
|
|
1495
|
+
/**
|
|
1496
|
+
Watch input files.
|
|
1497
|
+
|
|
1498
|
+
@default false
|
|
1499
|
+
@deprecated Use watchOptions instead.
|
|
1500
|
+
*/
|
|
1501
|
+
watch?: boolean;
|
|
1502
|
+
|
|
1503
|
+
/**
|
|
1504
|
+
Specify the polling strategy to use when the system runs out of or doesn't support native file watchers.
|
|
1505
|
+
|
|
1506
|
+
@deprecated Use watchOptions.fallbackPolling instead.
|
|
1507
|
+
*/
|
|
1508
|
+
fallbackPolling?: CompilerOptions.FallbackPolling;
|
|
1509
|
+
|
|
1510
|
+
/**
|
|
1511
|
+
Specify the strategy for watching directories under systems that lack recursive file-watching functionality.
|
|
1512
|
+
|
|
1513
|
+
@default 'useFsEvents'
|
|
1514
|
+
@deprecated Use watchOptions.watchDirectory instead.
|
|
1515
|
+
*/
|
|
1516
|
+
watchDirectory?: CompilerOptions.WatchDirectory;
|
|
1517
|
+
|
|
1518
|
+
/**
|
|
1519
|
+
Specify the strategy for watching individual files.
|
|
1520
|
+
|
|
1521
|
+
@default 'useFsEvents'
|
|
1522
|
+
@deprecated Use watchOptions.watchFile instead.
|
|
1523
|
+
*/
|
|
1524
|
+
watchFile?: CompilerOptions.WatchFile;
|
|
1525
|
+
|
|
1526
|
+
/**
|
|
1527
|
+
Enables experimental support for ES7 decorators.
|
|
1528
|
+
|
|
1529
|
+
@default false
|
|
1530
|
+
*/
|
|
1531
|
+
experimentalDecorators?: boolean;
|
|
1532
|
+
|
|
1533
|
+
/**
|
|
1534
|
+
Emit design-type metadata for decorated declarations in source.
|
|
1535
|
+
|
|
1536
|
+
@default false
|
|
1537
|
+
*/
|
|
1538
|
+
emitDecoratorMetadata?: boolean;
|
|
1539
|
+
|
|
1540
|
+
/**
|
|
1541
|
+
Do not report errors on unused labels.
|
|
1542
|
+
|
|
1543
|
+
@default false
|
|
1544
|
+
*/
|
|
1545
|
+
allowUnusedLabels?: boolean;
|
|
1546
|
+
|
|
1547
|
+
/**
|
|
1548
|
+
Report error when not all code paths in function return a value.
|
|
1549
|
+
|
|
1550
|
+
@default false
|
|
1551
|
+
*/
|
|
1552
|
+
noImplicitReturns?: boolean;
|
|
1553
|
+
|
|
1554
|
+
/**
|
|
1555
|
+
Add `undefined` to a type when accessed using an index.
|
|
1556
|
+
|
|
1557
|
+
@default false
|
|
1558
|
+
*/
|
|
1559
|
+
noUncheckedIndexedAccess?: boolean;
|
|
1560
|
+
|
|
1561
|
+
/**
|
|
1562
|
+
Report errors for fallthrough cases in switch statement.
|
|
1563
|
+
|
|
1564
|
+
@default false
|
|
1565
|
+
*/
|
|
1566
|
+
noFallthroughCasesInSwitch?: boolean;
|
|
1567
|
+
|
|
1568
|
+
/**
|
|
1569
|
+
Ensure overriding members in derived classes are marked with an override modifier.
|
|
1570
|
+
|
|
1571
|
+
@default false
|
|
1572
|
+
*/
|
|
1573
|
+
noImplicitOverride?: boolean;
|
|
1574
|
+
|
|
1575
|
+
/**
|
|
1576
|
+
Do not report errors on unreachable code.
|
|
1577
|
+
|
|
1578
|
+
@default false
|
|
1579
|
+
*/
|
|
1580
|
+
allowUnreachableCode?: boolean;
|
|
1581
|
+
|
|
1582
|
+
/**
|
|
1583
|
+
Disallow inconsistently-cased references to the same file.
|
|
1584
|
+
|
|
1585
|
+
@default true
|
|
1586
|
+
*/
|
|
1587
|
+
forceConsistentCasingInFileNames?: boolean;
|
|
1588
|
+
|
|
1589
|
+
/**
|
|
1590
|
+
Emit a v8 CPU profile of the compiler run for debugging.
|
|
1591
|
+
|
|
1592
|
+
@default 'profile.cpuprofile'
|
|
1593
|
+
*/
|
|
1594
|
+
generateCpuProfile?: string;
|
|
1595
|
+
|
|
1596
|
+
/**
|
|
1597
|
+
Base directory to resolve non-relative module names.
|
|
1598
|
+
*/
|
|
1599
|
+
baseUrl?: string;
|
|
1600
|
+
|
|
1601
|
+
/**
|
|
1602
|
+
Specify path mapping to be computed relative to baseUrl option.
|
|
1603
|
+
*/
|
|
1604
|
+
paths?: Record<string, string[]>;
|
|
1605
|
+
|
|
1606
|
+
/**
|
|
1607
|
+
List of TypeScript language server plugins to load.
|
|
1608
|
+
*/
|
|
1609
|
+
plugins?: CompilerOptions.Plugin[];
|
|
1610
|
+
|
|
1611
|
+
/**
|
|
1612
|
+
Specify list of root directories to be used when resolving modules.
|
|
1613
|
+
*/
|
|
1614
|
+
rootDirs?: string[];
|
|
1615
|
+
|
|
1616
|
+
/**
|
|
1617
|
+
Specify list of directories for type definition files to be included.
|
|
1618
|
+
*/
|
|
1619
|
+
typeRoots?: string[];
|
|
1620
|
+
|
|
1621
|
+
/**
|
|
1622
|
+
Type declaration files to be included in compilation.
|
|
1623
|
+
*/
|
|
1624
|
+
types?: string[];
|
|
1625
|
+
|
|
1626
|
+
/**
|
|
1627
|
+
Enable tracing of the name resolution process.
|
|
1628
|
+
|
|
1629
|
+
@default false
|
|
1630
|
+
*/
|
|
1631
|
+
traceResolution?: boolean;
|
|
1632
|
+
|
|
1633
|
+
/**
|
|
1634
|
+
Allow javascript files to be compiled.
|
|
1635
|
+
|
|
1636
|
+
@default false
|
|
1637
|
+
*/
|
|
1638
|
+
allowJs?: boolean;
|
|
1639
|
+
|
|
1640
|
+
/**
|
|
1641
|
+
Do not truncate error messages.
|
|
1642
|
+
|
|
1643
|
+
@default false
|
|
1644
|
+
*/
|
|
1645
|
+
noErrorTruncation?: boolean;
|
|
1646
|
+
|
|
1647
|
+
/**
|
|
1648
|
+
Allow default imports from modules with no default export. This does not affect code emit, just typechecking.
|
|
1649
|
+
|
|
1650
|
+
@default module === 'system' || esModuleInterop
|
|
1651
|
+
*/
|
|
1652
|
+
allowSyntheticDefaultImports?: boolean;
|
|
1653
|
+
|
|
1654
|
+
/**
|
|
1655
|
+
Do not emit `'use strict'` directives in module output.
|
|
1656
|
+
|
|
1657
|
+
@default false
|
|
1658
|
+
@deprecated This option will be removed in TypeScript 5.5.
|
|
1659
|
+
*/
|
|
1660
|
+
noImplicitUseStrict?: boolean;
|
|
1661
|
+
|
|
1662
|
+
/**
|
|
1663
|
+
Enable to list all emitted files.
|
|
1664
|
+
|
|
1665
|
+
@default false
|
|
1666
|
+
*/
|
|
1667
|
+
listEmittedFiles?: boolean;
|
|
1668
|
+
|
|
1669
|
+
/**
|
|
1670
|
+
Disable size limit for JavaScript project.
|
|
1671
|
+
|
|
1672
|
+
@default false
|
|
1673
|
+
*/
|
|
1674
|
+
disableSizeLimit?: boolean;
|
|
1675
|
+
|
|
1676
|
+
/**
|
|
1677
|
+
List of library files to be included in the compilation.
|
|
1678
|
+
*/
|
|
1679
|
+
lib?: CompilerOptions.Lib[];
|
|
1680
|
+
|
|
1681
|
+
/**
|
|
1682
|
+
Enable strict null checks.
|
|
1683
|
+
|
|
1684
|
+
@default false
|
|
1685
|
+
*/
|
|
1686
|
+
strictNullChecks?: boolean;
|
|
1687
|
+
|
|
1688
|
+
/**
|
|
1689
|
+
The maximum dependency depth to search under `node_modules` and load JavaScript files. Only applicable with `--allowJs`.
|
|
1690
|
+
|
|
1691
|
+
@default 0
|
|
1692
|
+
*/
|
|
1693
|
+
maxNodeModuleJsDepth?: number;
|
|
1694
|
+
|
|
1695
|
+
/**
|
|
1696
|
+
Import emit helpers (e.g. `__extends`, `__rest`, etc..) from tslib.
|
|
1697
|
+
|
|
1698
|
+
@default false
|
|
1699
|
+
*/
|
|
1700
|
+
importHelpers?: boolean;
|
|
1701
|
+
|
|
1702
|
+
/**
|
|
1703
|
+
Specify emit/checking behavior for imports that are only used for types.
|
|
1704
|
+
|
|
1705
|
+
@default 'remove'
|
|
1706
|
+
@deprecated Use `verbatimModuleSyntax` instead.
|
|
1707
|
+
*/
|
|
1708
|
+
importsNotUsedAsValues?: CompilerOptions.ImportsNotUsedAsValues;
|
|
1709
|
+
|
|
1710
|
+
/**
|
|
1711
|
+
Parse in strict mode and emit `'use strict'` for each source file.
|
|
1712
|
+
|
|
1713
|
+
@default false
|
|
1714
|
+
*/
|
|
1715
|
+
alwaysStrict?: boolean;
|
|
1716
|
+
|
|
1717
|
+
/**
|
|
1718
|
+
Enable all strict type checking options.
|
|
1719
|
+
|
|
1720
|
+
@default false
|
|
1721
|
+
*/
|
|
1722
|
+
strict?: boolean;
|
|
1723
|
+
|
|
1724
|
+
/**
|
|
1725
|
+
Enable stricter checking of of the `bind`, `call`, and `apply` methods on functions.
|
|
1726
|
+
|
|
1727
|
+
@default false
|
|
1728
|
+
*/
|
|
1729
|
+
strictBindCallApply?: boolean;
|
|
1730
|
+
|
|
1731
|
+
/**
|
|
1732
|
+
Provide full support for iterables in `for-of`, spread, and destructuring when targeting `ES5` or `ES3`.
|
|
1733
|
+
|
|
1734
|
+
@default false
|
|
1735
|
+
*/
|
|
1736
|
+
downlevelIteration?: boolean;
|
|
1737
|
+
|
|
1738
|
+
/**
|
|
1739
|
+
Report errors in `.js` files.
|
|
1740
|
+
|
|
1741
|
+
@default false
|
|
1742
|
+
*/
|
|
1743
|
+
checkJs?: boolean;
|
|
1744
|
+
|
|
1745
|
+
/**
|
|
1746
|
+
Disable bivariant parameter checking for function types.
|
|
1747
|
+
|
|
1748
|
+
@default false
|
|
1749
|
+
*/
|
|
1750
|
+
strictFunctionTypes?: boolean;
|
|
1751
|
+
|
|
1752
|
+
/**
|
|
1753
|
+
Ensure non-undefined class properties are initialized in the constructor.
|
|
1754
|
+
|
|
1755
|
+
@default false
|
|
1756
|
+
*/
|
|
1757
|
+
strictPropertyInitialization?: boolean;
|
|
1758
|
+
|
|
1759
|
+
/**
|
|
1760
|
+
Emit `__importStar` and `__importDefault` helpers for runtime Babel ecosystem compatibility and enable `--allowSyntheticDefaultImports` for typesystem compatibility.
|
|
1761
|
+
|
|
1762
|
+
@default false
|
|
1763
|
+
*/
|
|
1764
|
+
esModuleInterop?: boolean;
|
|
1765
|
+
|
|
1766
|
+
/**
|
|
1767
|
+
Allow accessing UMD globals from modules.
|
|
1768
|
+
|
|
1769
|
+
@default false
|
|
1770
|
+
*/
|
|
1771
|
+
allowUmdGlobalAccess?: boolean;
|
|
1772
|
+
|
|
1773
|
+
/**
|
|
1774
|
+
Resolve `keyof` to string valued property names only (no numbers or symbols).
|
|
1775
|
+
|
|
1776
|
+
@default false
|
|
1777
|
+
@deprecated This option will be removed in TypeScript 5.5.
|
|
1778
|
+
*/
|
|
1779
|
+
keyofStringsOnly?: boolean;
|
|
1780
|
+
|
|
1781
|
+
/**
|
|
1782
|
+
Emit ECMAScript standard class fields.
|
|
1783
|
+
|
|
1784
|
+
@default false
|
|
1785
|
+
*/
|
|
1786
|
+
useDefineForClassFields?: boolean;
|
|
1787
|
+
|
|
1788
|
+
/**
|
|
1789
|
+
Generates a sourcemap for each corresponding `.d.ts` file.
|
|
1790
|
+
|
|
1791
|
+
@default false
|
|
1792
|
+
*/
|
|
1793
|
+
declarationMap?: boolean;
|
|
1794
|
+
|
|
1795
|
+
/**
|
|
1796
|
+
Include modules imported with `.json` extension.
|
|
1797
|
+
|
|
1798
|
+
@default false
|
|
1799
|
+
*/
|
|
1800
|
+
resolveJsonModule?: boolean;
|
|
1801
|
+
|
|
1802
|
+
/**
|
|
1803
|
+
Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it.
|
|
1804
|
+
|
|
1805
|
+
@default false
|
|
1806
|
+
*/
|
|
1807
|
+
assumeChangesOnlyAffectDirectDependencies?: boolean;
|
|
1808
|
+
|
|
1809
|
+
/**
|
|
1810
|
+
Output more detailed compiler performance information after building.
|
|
1811
|
+
|
|
1812
|
+
@default false
|
|
1813
|
+
*/
|
|
1814
|
+
extendedDiagnostics?: boolean;
|
|
1815
|
+
|
|
1816
|
+
/**
|
|
1817
|
+
Print names of files that are part of the compilation and then stop processing.
|
|
1818
|
+
|
|
1819
|
+
@default false
|
|
1820
|
+
*/
|
|
1821
|
+
listFilesOnly?: boolean;
|
|
1822
|
+
|
|
1823
|
+
/**
|
|
1824
|
+
Disable preferring source files instead of declaration files when referencing composite projects.
|
|
1825
|
+
|
|
1826
|
+
@default true if composite, false otherwise
|
|
1827
|
+
*/
|
|
1828
|
+
disableSourceOfProjectReferenceRedirect?: boolean;
|
|
1829
|
+
|
|
1830
|
+
/**
|
|
1831
|
+
Opt a project out of multi-project reference checking when editing.
|
|
1832
|
+
|
|
1833
|
+
@default false
|
|
1834
|
+
*/
|
|
1835
|
+
disableSolutionSearching?: boolean;
|
|
1836
|
+
|
|
1837
|
+
/**
|
|
1838
|
+
Print names of files which TypeScript sees as a part of your project and the reason they are part of the compilation.
|
|
1839
|
+
|
|
1840
|
+
@default false
|
|
1841
|
+
*/
|
|
1842
|
+
explainFiles?: boolean;
|
|
1843
|
+
|
|
1844
|
+
/**
|
|
1845
|
+
Preserve unused imported values in the JavaScript output that would otherwise be removed.
|
|
1846
|
+
|
|
1847
|
+
@default true
|
|
1848
|
+
@deprecated Use `verbatimModuleSyntax` instead.
|
|
1849
|
+
*/
|
|
1850
|
+
preserveValueImports?: boolean;
|
|
1851
|
+
|
|
1852
|
+
/**
|
|
1853
|
+
List of file name suffixes to search when resolving a module.
|
|
1854
|
+
*/
|
|
1855
|
+
moduleSuffixes?: string[];
|
|
1856
|
+
|
|
1857
|
+
/**
|
|
1858
|
+
Control what method is used to detect module-format JS files.
|
|
1859
|
+
|
|
1860
|
+
@default 'auto'
|
|
1861
|
+
*/
|
|
1862
|
+
moduleDetection?: CompilerOptions.ModuleDetection;
|
|
1863
|
+
|
|
1864
|
+
/**
|
|
1865
|
+
Allows TypeScript files to import each other with a TypeScript-specific extension like .ts, .mts, or .tsx.
|
|
1866
|
+
|
|
1867
|
+
@default false
|
|
1868
|
+
*/
|
|
1869
|
+
allowImportingTsExtensions?: boolean;
|
|
1870
|
+
|
|
1871
|
+
/**
|
|
1872
|
+
Forces TypeScript to consult the exports field of package.json files if it ever reads from a package in node_modules.
|
|
1873
|
+
|
|
1874
|
+
@default false
|
|
1875
|
+
*/
|
|
1876
|
+
resolvePackageJsonExports?: boolean;
|
|
1877
|
+
|
|
1878
|
+
/**
|
|
1879
|
+
Forces TypeScript to consult the imports field of package.json files when performing a lookup that starts with # from a file whose ancestor directory contains a package.json.
|
|
1880
|
+
|
|
1881
|
+
@default false
|
|
1882
|
+
*/
|
|
1883
|
+
resolvePackageJsonImports?: boolean;
|
|
1884
|
+
|
|
1885
|
+
/**
|
|
1886
|
+
Suppress errors for file formats that TypeScript does not understand.
|
|
1887
|
+
|
|
1888
|
+
@default false
|
|
1889
|
+
*/
|
|
1890
|
+
allowArbitraryExtensions?: boolean;
|
|
1891
|
+
|
|
1892
|
+
/**
|
|
1893
|
+
List of additional conditions that should succeed when TypeScript resolves from package.json.
|
|
1894
|
+
*/
|
|
1895
|
+
customConditions?: string[];
|
|
1896
|
+
|
|
1897
|
+
/**
|
|
1898
|
+
Anything that uses the type modifier is dropped entirely.
|
|
1899
|
+
|
|
1900
|
+
@default false
|
|
1901
|
+
*/
|
|
1902
|
+
verbatimModuleSyntax?: boolean;
|
|
1903
|
+
|
|
1904
|
+
/**
|
|
1905
|
+
Suppress deprecation warnings
|
|
1906
|
+
*/
|
|
1907
|
+
ignoreDeprecations?: CompilerOptions.IgnoreDeprecations;
|
|
1908
|
+
};
|
|
1909
|
+
|
|
1910
|
+
namespace WatchOptions {
|
|
1911
|
+
export type WatchFileKind =
|
|
1912
|
+
| 'FixedPollingInterval'
|
|
1913
|
+
| 'PriorityPollingInterval'
|
|
1914
|
+
| 'DynamicPriorityPolling'
|
|
1915
|
+
| 'FixedChunkSizePolling'
|
|
1916
|
+
| 'UseFsEvents'
|
|
1917
|
+
| 'UseFsEventsOnParentDirectory';
|
|
1918
|
+
|
|
1919
|
+
export type WatchDirectoryKind =
|
|
1920
|
+
| 'UseFsEvents'
|
|
1921
|
+
| 'FixedPollingInterval'
|
|
1922
|
+
| 'DynamicPriorityPolling'
|
|
1923
|
+
| 'FixedChunkSizePolling';
|
|
1924
|
+
|
|
1925
|
+
export type PollingWatchKind =
|
|
1926
|
+
| 'FixedInterval'
|
|
1927
|
+
| 'PriorityInterval'
|
|
1928
|
+
| 'DynamicPriority'
|
|
1929
|
+
| 'FixedChunkSize';
|
|
1930
|
+
}
|
|
1931
|
+
|
|
1932
|
+
export type WatchOptions = {
|
|
1933
|
+
|
|
1934
|
+
/**
|
|
1935
|
+
Specify the strategy for watching individual files.
|
|
1936
|
+
|
|
1937
|
+
@default 'UseFsEvents'
|
|
1938
|
+
*/
|
|
1939
|
+
watchFile?: WatchOptions.WatchFileKind | Lowercase<WatchOptions.WatchFileKind>;
|
|
1940
|
+
|
|
1941
|
+
/**
|
|
1942
|
+
Specify the strategy for watching directories under systems that lack recursive file-watching functionality.
|
|
1943
|
+
|
|
1944
|
+
@default 'UseFsEvents'
|
|
1945
|
+
*/
|
|
1946
|
+
watchDirectory?: WatchOptions.WatchDirectoryKind | Lowercase<WatchOptions.WatchDirectoryKind>;
|
|
1947
|
+
|
|
1948
|
+
/**
|
|
1949
|
+
Specify the polling strategy to use when the system runs out of or doesn't support native file watchers.
|
|
1950
|
+
*/
|
|
1951
|
+
fallbackPolling?: WatchOptions.PollingWatchKind | Lowercase<WatchOptions.PollingWatchKind>;
|
|
1952
|
+
|
|
1953
|
+
/**
|
|
1954
|
+
Enable synchronous updates on directory watchers for platforms that don't support recursive watching natively.
|
|
1955
|
+
*/
|
|
1956
|
+
synchronousWatchDirectory?: boolean;
|
|
1957
|
+
|
|
1958
|
+
/**
|
|
1959
|
+
Specifies a list of directories to exclude from watch
|
|
1960
|
+
*/
|
|
1961
|
+
excludeDirectories?: string[];
|
|
1962
|
+
|
|
1963
|
+
/**
|
|
1964
|
+
Specifies a list of files to exclude from watch
|
|
1965
|
+
*/
|
|
1966
|
+
excludeFiles?: string[];
|
|
1967
|
+
};
|
|
1968
|
+
|
|
1969
|
+
/**
|
|
1970
|
+
Auto type (.d.ts) acquisition options for this project.
|
|
1971
|
+
*/
|
|
1972
|
+
export type TypeAcquisition = {
|
|
1973
|
+
/**
|
|
1974
|
+
Enable auto type acquisition.
|
|
1975
|
+
*/
|
|
1976
|
+
enable?: boolean;
|
|
1977
|
+
|
|
1978
|
+
/**
|
|
1979
|
+
Specifies a list of type declarations to be included in auto type acquisition. For example, `['jquery', 'lodash']`.
|
|
1980
|
+
*/
|
|
1981
|
+
include?: string[];
|
|
1982
|
+
|
|
1983
|
+
/**
|
|
1984
|
+
Specifies a list of type declarations to be excluded from auto type acquisition. For example, `['jquery', 'lodash']`.
|
|
1985
|
+
*/
|
|
1986
|
+
exclude?: string[];
|
|
1987
|
+
};
|
|
1988
|
+
|
|
1989
|
+
export type References = {
|
|
1990
|
+
/**
|
|
1991
|
+
A normalized path on disk.
|
|
1992
|
+
*/
|
|
1993
|
+
path: string;
|
|
1994
|
+
|
|
1995
|
+
/**
|
|
1996
|
+
The path as the user originally wrote it.
|
|
1997
|
+
*/
|
|
1998
|
+
originalPath?: string;
|
|
1999
|
+
|
|
2000
|
+
/**
|
|
2001
|
+
True if the output of this reference should be prepended to the output of this project.
|
|
2002
|
+
|
|
2003
|
+
Only valid for `--outFile` compilations.
|
|
2004
|
+
@deprecated This option will be removed in TypeScript 5.5.
|
|
2005
|
+
*/
|
|
2006
|
+
prepend?: boolean;
|
|
2007
|
+
|
|
2008
|
+
/**
|
|
2009
|
+
True if it is intended that this reference form a circularity.
|
|
2010
|
+
*/
|
|
2011
|
+
circular?: boolean;
|
|
2012
|
+
};
|
|
2013
|
+
}
|
|
2014
|
+
|
|
2015
|
+
/**
|
|
2016
|
+
Type for [TypeScript's `tsconfig.json` file](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) (TypeScript 3.7).
|
|
2017
|
+
|
|
2018
|
+
@category File
|
|
2019
|
+
*/
|
|
2020
|
+
type TsConfigJson = {
|
|
2021
|
+
/**
|
|
2022
|
+
Instructs the TypeScript compiler how to compile `.ts` files.
|
|
2023
|
+
*/
|
|
2024
|
+
compilerOptions?: TsConfigJson.CompilerOptions;
|
|
2025
|
+
|
|
2026
|
+
/**
|
|
2027
|
+
Instructs the TypeScript compiler how to watch files.
|
|
2028
|
+
*/
|
|
2029
|
+
watchOptions?: TsConfigJson.WatchOptions;
|
|
2030
|
+
|
|
2031
|
+
/**
|
|
2032
|
+
Auto type (.d.ts) acquisition options for this project.
|
|
2033
|
+
*/
|
|
2034
|
+
typeAcquisition?: TsConfigJson.TypeAcquisition;
|
|
2035
|
+
|
|
2036
|
+
/**
|
|
2037
|
+
Enable Compile-on-Save for this project.
|
|
2038
|
+
*/
|
|
2039
|
+
compileOnSave?: boolean;
|
|
2040
|
+
|
|
2041
|
+
/**
|
|
2042
|
+
Path to base configuration file to inherit from.
|
|
2043
|
+
*/
|
|
2044
|
+
extends?: string | string[];
|
|
2045
|
+
|
|
2046
|
+
/**
|
|
2047
|
+
If no `files` or `include` property is present in a `tsconfig.json`, the compiler defaults to including all files in the containing directory and subdirectories except those specified by `exclude`. When a `files` property is specified, only those files and those specified by `include` are included.
|
|
2048
|
+
*/
|
|
2049
|
+
files?: string[];
|
|
2050
|
+
|
|
2051
|
+
/**
|
|
2052
|
+
Specifies a list of files to be excluded from compilation. The `exclude` property only affects the files included via the `include` property and not the `files` property.
|
|
2053
|
+
|
|
2054
|
+
Glob patterns require TypeScript version 2.0 or later.
|
|
2055
|
+
*/
|
|
2056
|
+
exclude?: string[];
|
|
2057
|
+
|
|
2058
|
+
/**
|
|
2059
|
+
Specifies a list of glob patterns that match files to be included in compilation.
|
|
2060
|
+
|
|
2061
|
+
If no `files` or `include` property is present in a `tsconfig.json`, the compiler defaults to including all files in the containing directory and subdirectories except those specified by `exclude`.
|
|
2062
|
+
*/
|
|
2063
|
+
include?: string[];
|
|
2064
|
+
|
|
2065
|
+
/**
|
|
2066
|
+
Referenced projects.
|
|
2067
|
+
*/
|
|
2068
|
+
references?: TsConfigJson.References[];
|
|
2069
|
+
};
|
|
2070
|
+
|
|
2071
|
+
type NormalizedPackageJson = Package & PackageJson;
|
|
2072
|
+
type PackageJson = PackageJson$1;
|
|
2073
|
+
type TsConfigJsonResolved = Except<TsConfigJson, "extends">;
|
|
2074
|
+
type Cache<T = any> = Map<string, T>;
|
|
2075
|
+
|
|
2076
|
+
export { type Cache as C, type JsonObject as J, type NormalizedPackageJson as N, type PackageJson as P, type TsConfigJsonResolved as T, TsConfigJson as a, PackageJson$1 as b };
|