@effected/tsconfig-json 0.1.0
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/CompilerOptions.js +345 -0
- package/LICENSE +21 -0
- package/PortableTsconfig.js +138 -0
- package/README.md +96 -0
- package/ResolvedTsconfig.js +245 -0
- package/TsEnumCodec.js +203 -0
- package/TsconfigDiscovery.js +29 -0
- package/TsconfigJson.js +122 -0
- package/TsconfigLoader.js +160 -0
- package/index.d.ts +645 -0
- package/index.js +9 -0
- package/internal/extendsTarget.js +234 -0
- package/package.json +48 -0
- package/tsdoc-metadata.json +11 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,645 @@
|
|
|
1
|
+
import { Effect, FileSystem, Option, Path, PlatformError, Schema } from "effect";
|
|
2
|
+
//#region src/CompilerOptions.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* `compilerOptions.target` — the ECMAScript target. `es5` is deprecated in TS
|
|
5
|
+
* 6.0; `es3` has no literal (dead per R1.3 — a `target: "es3"` value fails
|
|
6
|
+
* decode against this schema rather than silently passing through, since
|
|
7
|
+
* `target` itself is a live, typed field).
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
declare const Target: Schema.decodeTo<Schema.Literals<readonly ["es5", "es6", "es2015", "es2016", "es2017", "es2018", "es2019", "es2020", "es2021", "es2022", "es2023", "es2024", "es2025", "esnext"]>, Schema.String, never, never>;
|
|
12
|
+
/**
|
|
13
|
+
* `compilerOptions.module` — the module output format. `none`, `amd`, `umd`
|
|
14
|
+
* and `system` are deprecated in TS 6.0.
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
declare const Module: Schema.decodeTo<Schema.Literals<readonly ["none", "commonjs", "amd", "umd", "system", "es6", "es2015", "es2020", "es2022", "esnext", "node16", "node18", "node20", "nodenext", "preserve"]>, Schema.String, never, never>;
|
|
19
|
+
/**
|
|
20
|
+
* `compilerOptions.moduleResolution`. `node10`, `node` and `classic` are
|
|
21
|
+
* deprecated in TS 6.0.
|
|
22
|
+
*
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
declare const ModuleResolution: Schema.decodeTo<Schema.Literals<readonly ["node10", "node", "classic", "node16", "nodenext", "bundler"]>, Schema.String, never, never>;
|
|
26
|
+
/**
|
|
27
|
+
* `compilerOptions.jsx`. There is no `none` literal — tsc's option map has
|
|
28
|
+
* only these five.
|
|
29
|
+
*
|
|
30
|
+
* @public
|
|
31
|
+
*/
|
|
32
|
+
declare const Jsx: Schema.decodeTo<Schema.Literals<readonly ["preserve", "react-native", "react-jsx", "react-jsxdev", "react"]>, Schema.String, never, never>;
|
|
33
|
+
/** `compilerOptions.newLine`. @public */
|
|
34
|
+
declare const NewLine: Schema.decodeTo<Schema.Literals<readonly ["crlf", "lf"]>, Schema.String, never, never>;
|
|
35
|
+
/** `compilerOptions.moduleDetection`. @public */
|
|
36
|
+
declare const ModuleDetection: Schema.decodeTo<Schema.Literals<readonly ["auto", "legacy", "force"]>, Schema.String, never, never>;
|
|
37
|
+
/**
|
|
38
|
+
* `compilerOptions.lib` member values — the complete TS 6.0.3 set, lowercase
|
|
39
|
+
* canonical, per R1.2.
|
|
40
|
+
*
|
|
41
|
+
* @public
|
|
42
|
+
*/
|
|
43
|
+
declare const Lib: Schema.decodeTo<Schema.Literals<readonly ["es5", "es6", "es7", "es2015", "es2016", "es2017", "es2018", "es2019", "es2020", "es2021", "es2022", "es2023", "es2024", "es2025", "esnext", "dom", "dom.iterable", "dom.asynciterable", "webworker", "webworker.importscripts", "webworker.iterable", "webworker.asynciterable", "scripthost", "es2015.core", "es2015.collection", "es2015.generator", "es2015.iterable", "es2015.promise", "es2015.proxy", "es2015.reflect", "es2015.symbol", "es2015.symbol.wellknown", "es2016.array.include", "es2016.intl", "es2017.arraybuffer", "es2017.date", "es2017.object", "es2017.sharedmemory", "es2017.string", "es2017.intl", "es2017.typedarrays", "es2018.asyncgenerator", "es2018.asynciterable", "es2018.intl", "es2018.promise", "es2018.regexp", "es2019.array", "es2019.object", "es2019.string", "es2019.symbol", "es2019.intl", "es2020.bigint", "es2020.date", "es2020.promise", "es2020.sharedmemory", "es2020.string", "es2020.symbol.wellknown", "es2020.intl", "es2020.number", "es2021.promise", "es2021.string", "es2021.weakref", "es2021.intl", "es2022.array", "es2022.error", "es2022.intl", "es2022.object", "es2022.string", "es2022.regexp", "es2023.array", "es2023.collection", "es2023.intl", "es2024.arraybuffer", "es2024.collection", "es2024.object", "es2024.promise", "es2024.regexp", "es2024.sharedmemory", "es2024.string", "es2025.collection", "es2025.float16", "es2025.intl", "es2025.iterator", "es2025.promise", "es2025.regexp", "esnext.asynciterable", "esnext.symbol", "esnext.bigint", "esnext.weakref", "esnext.object", "esnext.regexp", "esnext.string", "esnext.float16", "esnext.iterator", "esnext.promise", "esnext.array", "esnext.collection", "esnext.date", "esnext.decorators", "esnext.disposable", "esnext.error", "esnext.intl", "esnext.sharedmemory", "esnext.temporal", "esnext.typedarrays", "decorators", "decorators.legacy"]>, Schema.String, never, never>;
|
|
44
|
+
/**
|
|
45
|
+
* `compilerOptions`, decoded as every R1.3-live boolean, R1.4 string/path/
|
|
46
|
+
* array/record/number, and R1.2 enum field — each `optionalKey` — intersected
|
|
47
|
+
* with a passthrough record so unknown and dead (R1.3 dead-list) keys survive
|
|
48
|
+
* decode and re-encode untouched, per the forward-tolerance constraint.
|
|
49
|
+
*
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
declare const CompilerOptions: Schema.StructWithRest<Schema.Struct<{
|
|
53
|
+
readonly target: Schema.optionalKey<Schema.decodeTo<Schema.Literals<readonly ["es5", "es6", "es2015", "es2016", "es2017", "es2018", "es2019", "es2020", "es2021", "es2022", "es2023", "es2024", "es2025", "esnext"]>, Schema.String, never, never>>;
|
|
54
|
+
readonly module: Schema.optionalKey<Schema.decodeTo<Schema.Literals<readonly ["none", "commonjs", "amd", "umd", "system", "es6", "es2015", "es2020", "es2022", "esnext", "node16", "node18", "node20", "nodenext", "preserve"]>, Schema.String, never, never>>;
|
|
55
|
+
readonly moduleResolution: Schema.optionalKey<Schema.decodeTo<Schema.Literals<readonly ["node10", "node", "classic", "node16", "nodenext", "bundler"]>, Schema.String, never, never>>;
|
|
56
|
+
readonly jsx: Schema.optionalKey<Schema.decodeTo<Schema.Literals<readonly ["preserve", "react-native", "react-jsx", "react-jsxdev", "react"]>, Schema.String, never, never>>;
|
|
57
|
+
readonly newLine: Schema.optionalKey<Schema.decodeTo<Schema.Literals<readonly ["crlf", "lf"]>, Schema.String, never, never>>;
|
|
58
|
+
readonly moduleDetection: Schema.optionalKey<Schema.decodeTo<Schema.Literals<readonly ["auto", "legacy", "force"]>, Schema.String, never, never>>;
|
|
59
|
+
readonly lib: Schema.optionalKey<Schema.$Array<Schema.decodeTo<Schema.Literals<readonly ["es5", "es6", "es7", "es2015", "es2016", "es2017", "es2018", "es2019", "es2020", "es2021", "es2022", "es2023", "es2024", "es2025", "esnext", "dom", "dom.iterable", "dom.asynciterable", "webworker", "webworker.importscripts", "webworker.iterable", "webworker.asynciterable", "scripthost", "es2015.core", "es2015.collection", "es2015.generator", "es2015.iterable", "es2015.promise", "es2015.proxy", "es2015.reflect", "es2015.symbol", "es2015.symbol.wellknown", "es2016.array.include", "es2016.intl", "es2017.arraybuffer", "es2017.date", "es2017.object", "es2017.sharedmemory", "es2017.string", "es2017.intl", "es2017.typedarrays", "es2018.asyncgenerator", "es2018.asynciterable", "es2018.intl", "es2018.promise", "es2018.regexp", "es2019.array", "es2019.object", "es2019.string", "es2019.symbol", "es2019.intl", "es2020.bigint", "es2020.date", "es2020.promise", "es2020.sharedmemory", "es2020.string", "es2020.symbol.wellknown", "es2020.intl", "es2020.number", "es2021.promise", "es2021.string", "es2021.weakref", "es2021.intl", "es2022.array", "es2022.error", "es2022.intl", "es2022.object", "es2022.string", "es2022.regexp", "es2023.array", "es2023.collection", "es2023.intl", "es2024.arraybuffer", "es2024.collection", "es2024.object", "es2024.promise", "es2024.regexp", "es2024.sharedmemory", "es2024.string", "es2025.collection", "es2025.float16", "es2025.intl", "es2025.iterator", "es2025.promise", "es2025.regexp", "esnext.asynciterable", "esnext.symbol", "esnext.bigint", "esnext.weakref", "esnext.object", "esnext.regexp", "esnext.string", "esnext.float16", "esnext.iterator", "esnext.promise", "esnext.array", "esnext.collection", "esnext.date", "esnext.decorators", "esnext.disposable", "esnext.error", "esnext.intl", "esnext.sharedmemory", "esnext.temporal", "esnext.typedarrays", "decorators", "decorators.legacy"]>, Schema.String, never, never>>>;
|
|
60
|
+
readonly ignoreDeprecations: Schema.optionalKey<Schema.Literals<readonly ["5.0", "6.0"]>>;
|
|
61
|
+
readonly strict: Schema.optionalKey<Schema.Boolean>;
|
|
62
|
+
readonly noImplicitAny: Schema.optionalKey<Schema.Boolean>;
|
|
63
|
+
readonly strictNullChecks: Schema.optionalKey<Schema.Boolean>;
|
|
64
|
+
readonly strictFunctionTypes: Schema.optionalKey<Schema.Boolean>;
|
|
65
|
+
readonly strictBindCallApply: Schema.optionalKey<Schema.Boolean>;
|
|
66
|
+
readonly strictPropertyInitialization: Schema.optionalKey<Schema.Boolean>;
|
|
67
|
+
readonly strictBuiltinIteratorReturn: Schema.optionalKey<Schema.Boolean>;
|
|
68
|
+
readonly noImplicitThis: Schema.optionalKey<Schema.Boolean>;
|
|
69
|
+
readonly useUnknownInCatchVariables: Schema.optionalKey<Schema.Boolean>;
|
|
70
|
+
/** @deprecated Deprecated in TypeScript 6.0 when set to `false`. */
|
|
71
|
+
readonly alwaysStrict: Schema.optionalKey<Schema.Boolean>;
|
|
72
|
+
readonly noUnusedLocals: Schema.optionalKey<Schema.Boolean>;
|
|
73
|
+
readonly noUnusedParameters: Schema.optionalKey<Schema.Boolean>;
|
|
74
|
+
readonly exactOptionalPropertyTypes: Schema.optionalKey<Schema.Boolean>;
|
|
75
|
+
readonly noImplicitReturns: Schema.optionalKey<Schema.Boolean>;
|
|
76
|
+
readonly noFallthroughCasesInSwitch: Schema.optionalKey<Schema.Boolean>;
|
|
77
|
+
readonly noUncheckedIndexedAccess: Schema.optionalKey<Schema.Boolean>;
|
|
78
|
+
readonly noImplicitOverride: Schema.optionalKey<Schema.Boolean>;
|
|
79
|
+
readonly noPropertyAccessFromIndexSignature: Schema.optionalKey<Schema.Boolean>;
|
|
80
|
+
readonly allowUnusedLabels: Schema.optionalKey<Schema.Boolean>;
|
|
81
|
+
readonly allowUnreachableCode: Schema.optionalKey<Schema.Boolean>;
|
|
82
|
+
readonly noUncheckedSideEffectImports: Schema.optionalKey<Schema.Boolean>;
|
|
83
|
+
readonly allowJs: Schema.optionalKey<Schema.Boolean>;
|
|
84
|
+
readonly checkJs: Schema.optionalKey<Schema.Boolean>;
|
|
85
|
+
readonly resolveJsonModule: Schema.optionalKey<Schema.Boolean>;
|
|
86
|
+
readonly allowArbitraryExtensions: Schema.optionalKey<Schema.Boolean>;
|
|
87
|
+
readonly allowImportingTsExtensions: Schema.optionalKey<Schema.Boolean>;
|
|
88
|
+
readonly rewriteRelativeImportExtensions: Schema.optionalKey<Schema.Boolean>;
|
|
89
|
+
readonly resolvePackageJsonExports: Schema.optionalKey<Schema.Boolean>;
|
|
90
|
+
readonly resolvePackageJsonImports: Schema.optionalKey<Schema.Boolean>;
|
|
91
|
+
/** @deprecated Deprecated in TypeScript 6.0 when set to `false`. */
|
|
92
|
+
readonly allowSyntheticDefaultImports: Schema.optionalKey<Schema.Boolean>;
|
|
93
|
+
/** @deprecated Deprecated in TypeScript 6.0 when set to `false`. */
|
|
94
|
+
readonly esModuleInterop: Schema.optionalKey<Schema.Boolean>;
|
|
95
|
+
readonly preserveSymlinks: Schema.optionalKey<Schema.Boolean>;
|
|
96
|
+
readonly allowUmdGlobalAccess: Schema.optionalKey<Schema.Boolean>;
|
|
97
|
+
readonly verbatimModuleSyntax: Schema.optionalKey<Schema.Boolean>;
|
|
98
|
+
readonly isolatedModules: Schema.optionalKey<Schema.Boolean>;
|
|
99
|
+
readonly isolatedDeclarations: Schema.optionalKey<Schema.Boolean>;
|
|
100
|
+
readonly erasableSyntaxOnly: Schema.optionalKey<Schema.Boolean>;
|
|
101
|
+
readonly forceConsistentCasingInFileNames: Schema.optionalKey<Schema.Boolean>;
|
|
102
|
+
readonly declaration: Schema.optionalKey<Schema.Boolean>;
|
|
103
|
+
readonly declarationMap: Schema.optionalKey<Schema.Boolean>;
|
|
104
|
+
readonly emitDeclarationOnly: Schema.optionalKey<Schema.Boolean>;
|
|
105
|
+
readonly sourceMap: Schema.optionalKey<Schema.Boolean>;
|
|
106
|
+
readonly inlineSourceMap: Schema.optionalKey<Schema.Boolean>;
|
|
107
|
+
readonly inlineSources: Schema.optionalKey<Schema.Boolean>;
|
|
108
|
+
readonly removeComments: Schema.optionalKey<Schema.Boolean>;
|
|
109
|
+
readonly importHelpers: Schema.optionalKey<Schema.Boolean>;
|
|
110
|
+
/** @deprecated Deprecated in TypeScript 6.0. */
|
|
111
|
+
readonly downlevelIteration: Schema.optionalKey<Schema.Boolean>;
|
|
112
|
+
readonly emitBOM: Schema.optionalKey<Schema.Boolean>;
|
|
113
|
+
readonly noEmit: Schema.optionalKey<Schema.Boolean>;
|
|
114
|
+
readonly noEmitHelpers: Schema.optionalKey<Schema.Boolean>;
|
|
115
|
+
readonly noEmitOnError: Schema.optionalKey<Schema.Boolean>;
|
|
116
|
+
readonly preserveConstEnums: Schema.optionalKey<Schema.Boolean>;
|
|
117
|
+
readonly stripInternal: Schema.optionalKey<Schema.Boolean>;
|
|
118
|
+
readonly experimentalDecorators: Schema.optionalKey<Schema.Boolean>;
|
|
119
|
+
readonly emitDecoratorMetadata: Schema.optionalKey<Schema.Boolean>;
|
|
120
|
+
readonly useDefineForClassFields: Schema.optionalKey<Schema.Boolean>;
|
|
121
|
+
readonly noCheck: Schema.optionalKey<Schema.Boolean>;
|
|
122
|
+
readonly composite: Schema.optionalKey<Schema.Boolean>;
|
|
123
|
+
readonly incremental: Schema.optionalKey<Schema.Boolean>;
|
|
124
|
+
readonly disableSourceOfProjectReferenceRedirect: Schema.optionalKey<Schema.Boolean>;
|
|
125
|
+
readonly disableSolutionSearching: Schema.optionalKey<Schema.Boolean>;
|
|
126
|
+
readonly disableReferencedProjectLoad: Schema.optionalKey<Schema.Boolean>;
|
|
127
|
+
readonly assumeChangesOnlyAffectDirectDependencies: Schema.optionalKey<Schema.Boolean>;
|
|
128
|
+
readonly noErrorTruncation: Schema.optionalKey<Schema.Boolean>;
|
|
129
|
+
readonly noLib: Schema.optionalKey<Schema.Boolean>;
|
|
130
|
+
readonly noResolve: Schema.optionalKey<Schema.Boolean>;
|
|
131
|
+
readonly skipDefaultLibCheck: Schema.optionalKey<Schema.Boolean>;
|
|
132
|
+
readonly skipLibCheck: Schema.optionalKey<Schema.Boolean>;
|
|
133
|
+
readonly diagnostics: Schema.optionalKey<Schema.Boolean>;
|
|
134
|
+
readonly extendedDiagnostics: Schema.optionalKey<Schema.Boolean>;
|
|
135
|
+
readonly listFiles: Schema.optionalKey<Schema.Boolean>;
|
|
136
|
+
readonly listFilesOnly: Schema.optionalKey<Schema.Boolean>;
|
|
137
|
+
readonly listEmittedFiles: Schema.optionalKey<Schema.Boolean>;
|
|
138
|
+
readonly explainFiles: Schema.optionalKey<Schema.Boolean>;
|
|
139
|
+
readonly traceResolution: Schema.optionalKey<Schema.Boolean>;
|
|
140
|
+
readonly preserveWatchOutput: Schema.optionalKey<Schema.Boolean>;
|
|
141
|
+
readonly pretty: Schema.optionalKey<Schema.Boolean>;
|
|
142
|
+
readonly disableSizeLimit: Schema.optionalKey<Schema.Boolean>;
|
|
143
|
+
readonly libReplacement: Schema.optionalKey<Schema.Boolean>;
|
|
144
|
+
readonly stableTypeOrdering: Schema.optionalKey<Schema.Boolean>;
|
|
145
|
+
/** @deprecated Deprecated in TypeScript 6.0. */
|
|
146
|
+
readonly outFile: Schema.optionalKey<Schema.String>;
|
|
147
|
+
readonly outDir: Schema.optionalKey<Schema.String>;
|
|
148
|
+
readonly rootDir: Schema.optionalKey<Schema.String>;
|
|
149
|
+
readonly declarationDir: Schema.optionalKey<Schema.String>;
|
|
150
|
+
readonly sourceRoot: Schema.optionalKey<Schema.String>;
|
|
151
|
+
readonly mapRoot: Schema.optionalKey<Schema.String>;
|
|
152
|
+
readonly tsBuildInfoFile: Schema.optionalKey<Schema.String>;
|
|
153
|
+
/** @deprecated Deprecated in TypeScript 6.0. */
|
|
154
|
+
readonly baseUrl: Schema.optionalKey<Schema.String>;
|
|
155
|
+
readonly generateCpuProfile: Schema.optionalKey<Schema.String>;
|
|
156
|
+
readonly generateTrace: Schema.optionalKey<Schema.String>;
|
|
157
|
+
readonly typeRoots: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
158
|
+
readonly rootDirs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
159
|
+
readonly jsxFactory: Schema.optionalKey<Schema.String>;
|
|
160
|
+
readonly jsxFragmentFactory: Schema.optionalKey<Schema.String>;
|
|
161
|
+
readonly jsxImportSource: Schema.optionalKey<Schema.String>;
|
|
162
|
+
readonly reactNamespace: Schema.optionalKey<Schema.String>;
|
|
163
|
+
readonly types: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
164
|
+
readonly customConditions: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
165
|
+
readonly moduleSuffixes: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
166
|
+
readonly paths: Schema.optionalKey<Schema.$Record<Schema.String, Schema.$Array<Schema.String>>>;
|
|
167
|
+
readonly plugins: Schema.optionalKey<Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
168
|
+
readonly name: Schema.String;
|
|
169
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
|
|
170
|
+
readonly maxNodeModuleJsDepth: Schema.optionalKey<Schema.Number>;
|
|
171
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
172
|
+
/**
|
|
173
|
+
* Type-only companion namespace for {@link (CompilerOptions:variable)}, exposing its
|
|
174
|
+
* decoded and encoded shapes.
|
|
175
|
+
*
|
|
176
|
+
* @public
|
|
177
|
+
*/
|
|
178
|
+
declare namespace CompilerOptions {
|
|
179
|
+
/**
|
|
180
|
+
* The decoded `compilerOptions` shape: every typed field optional, plus passthrough for unknown keys.
|
|
181
|
+
*
|
|
182
|
+
* @public
|
|
183
|
+
*/
|
|
184
|
+
type Type = typeof CompilerOptions.Type;
|
|
185
|
+
/**
|
|
186
|
+
* The encoded (on-disk JSON) `compilerOptions` shape.
|
|
187
|
+
*
|
|
188
|
+
* @public
|
|
189
|
+
*/
|
|
190
|
+
type Encoded = typeof CompilerOptions.Encoded;
|
|
191
|
+
}
|
|
192
|
+
//#endregion
|
|
193
|
+
//#region src/TsconfigJson.d.ts
|
|
194
|
+
/** `watchOptions.watchFile`. @public */
|
|
195
|
+
declare const WatchFile: Schema.decodeTo<Schema.Literals<readonly ["fixedpollinginterval", "prioritypollinginterval", "dynamicprioritypolling", "fixedchunksizepolling", "usefsevents", "usefseventsonparentdirectory"]>, Schema.String, never, never>;
|
|
196
|
+
/** `watchOptions.watchDirectory`. @public */
|
|
197
|
+
declare const WatchDirectory: Schema.decodeTo<Schema.Literals<readonly ["usefsevents", "fixedpollinginterval", "dynamicprioritypolling", "fixedchunksizepolling"]>, Schema.String, never, never>;
|
|
198
|
+
/** `watchOptions.fallbackPolling`. @public */
|
|
199
|
+
declare const FallbackPolling: Schema.decodeTo<Schema.Literals<readonly ["fixedinterval", "priorityinterval", "dynamicpriority", "fixedchunksize"]>, Schema.String, never, never>;
|
|
200
|
+
/**
|
|
201
|
+
* One `references[]` entry: `path` is required and non-empty; every other key
|
|
202
|
+
* is preserved verbatim (per R1.5).
|
|
203
|
+
*
|
|
204
|
+
* @public
|
|
205
|
+
*/
|
|
206
|
+
declare const Reference: Schema.StructWithRest<Schema.Struct<{
|
|
207
|
+
readonly path: Schema.String;
|
|
208
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
209
|
+
/**
|
|
210
|
+
* Type-only companion namespace for {@link (Reference:variable)}.
|
|
211
|
+
*
|
|
212
|
+
* @public
|
|
213
|
+
*/
|
|
214
|
+
declare namespace Reference {
|
|
215
|
+
/**
|
|
216
|
+
* The decoded `references[]` entry shape.
|
|
217
|
+
*
|
|
218
|
+
* @public
|
|
219
|
+
*/
|
|
220
|
+
type Type = typeof Reference.Type;
|
|
221
|
+
/**
|
|
222
|
+
* The encoded (on-disk JSON) `references[]` entry shape.
|
|
223
|
+
*
|
|
224
|
+
* @public
|
|
225
|
+
*/
|
|
226
|
+
type Encoded = typeof Reference.Encoded;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* `watchOptions` — the three enum fields (R1.2), the two live booleans/arrays
|
|
230
|
+
* (R1.5), and a passthrough record (schemastore's `force` is phantom).
|
|
231
|
+
*
|
|
232
|
+
* @public
|
|
233
|
+
*/
|
|
234
|
+
declare const WatchOptions: Schema.StructWithRest<Schema.Struct<{
|
|
235
|
+
readonly watchFile: Schema.optionalKey<Schema.decodeTo<Schema.Literals<readonly ["fixedpollinginterval", "prioritypollinginterval", "dynamicprioritypolling", "fixedchunksizepolling", "usefsevents", "usefseventsonparentdirectory"]>, Schema.String, never, never>>;
|
|
236
|
+
readonly watchDirectory: Schema.optionalKey<Schema.decodeTo<Schema.Literals<readonly ["usefsevents", "fixedpollinginterval", "dynamicprioritypolling", "fixedchunksizepolling"]>, Schema.String, never, never>>;
|
|
237
|
+
readonly fallbackPolling: Schema.optionalKey<Schema.decodeTo<Schema.Literals<readonly ["fixedinterval", "priorityinterval", "dynamicpriority", "fixedchunksize"]>, Schema.String, never, never>>;
|
|
238
|
+
readonly synchronousWatchDirectory: Schema.optionalKey<Schema.Boolean>;
|
|
239
|
+
readonly excludeDirectories: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
240
|
+
readonly excludeFiles: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
241
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
242
|
+
/**
|
|
243
|
+
* Type-only companion namespace for {@link (WatchOptions:variable)}.
|
|
244
|
+
*
|
|
245
|
+
* @public
|
|
246
|
+
*/
|
|
247
|
+
declare namespace WatchOptions {
|
|
248
|
+
/**
|
|
249
|
+
* The decoded `watchOptions` shape.
|
|
250
|
+
*
|
|
251
|
+
* @public
|
|
252
|
+
*/
|
|
253
|
+
type Type = typeof WatchOptions.Type;
|
|
254
|
+
/**
|
|
255
|
+
* The encoded (on-disk JSON) `watchOptions` shape.
|
|
256
|
+
*
|
|
257
|
+
* @public
|
|
258
|
+
*/
|
|
259
|
+
type Encoded = typeof WatchOptions.Encoded;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* `typeAcquisition` — per R1.5.
|
|
263
|
+
*
|
|
264
|
+
* @public
|
|
265
|
+
*/
|
|
266
|
+
declare const TypeAcquisition: Schema.StructWithRest<Schema.Struct<{
|
|
267
|
+
readonly enable: Schema.optionalKey<Schema.Boolean>;
|
|
268
|
+
readonly include: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
269
|
+
readonly exclude: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
270
|
+
readonly disableFilenameBasedTypeAcquisition: Schema.optionalKey<Schema.Boolean>;
|
|
271
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
272
|
+
/**
|
|
273
|
+
* Type-only companion namespace for {@link (TypeAcquisition:variable)}.
|
|
274
|
+
*
|
|
275
|
+
* @public
|
|
276
|
+
*/
|
|
277
|
+
declare namespace TypeAcquisition {
|
|
278
|
+
/**
|
|
279
|
+
* The decoded `typeAcquisition` shape.
|
|
280
|
+
*
|
|
281
|
+
* @public
|
|
282
|
+
*/
|
|
283
|
+
type Type = typeof TypeAcquisition.Type;
|
|
284
|
+
/**
|
|
285
|
+
* The encoded (on-disk JSON) `typeAcquisition` shape.
|
|
286
|
+
*
|
|
287
|
+
* @public
|
|
288
|
+
*/
|
|
289
|
+
type Encoded = typeof TypeAcquisition.Encoded;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* The tsconfig.json document: every typed top-level field (R1.1) optional,
|
|
293
|
+
* plus a passthrough record so unrecognized keys (`buildOptions`, `ts-node`,
|
|
294
|
+
* …) survive decode and re-encode untouched — tsc itself silently ignores
|
|
295
|
+
* unknown top-level keys, and this schema follows suit.
|
|
296
|
+
*
|
|
297
|
+
* @public
|
|
298
|
+
*/
|
|
299
|
+
declare const TsconfigJson: Schema.StructWithRest<Schema.Struct<{
|
|
300
|
+
readonly compilerOptions: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
301
|
+
readonly target: Schema.optionalKey<Schema.decodeTo<Schema.Literals<readonly ["es5", "es6", "es2015", "es2016", "es2017", "es2018", "es2019", "es2020", "es2021", "es2022", "es2023", "es2024", "es2025", "esnext"]>, Schema.String, never, never>>;
|
|
302
|
+
readonly module: Schema.optionalKey<Schema.decodeTo<Schema.Literals<readonly ["none", "commonjs", "amd", "umd", "system", "es6", "es2015", "es2020", "es2022", "esnext", "node16", "node18", "node20", "nodenext", "preserve"]>, Schema.String, never, never>>;
|
|
303
|
+
readonly moduleResolution: Schema.optionalKey<Schema.decodeTo<Schema.Literals<readonly ["node10", "node", "classic", "node16", "nodenext", "bundler"]>, Schema.String, never, never>>;
|
|
304
|
+
readonly jsx: Schema.optionalKey<Schema.decodeTo<Schema.Literals<readonly ["preserve", "react-native", "react-jsx", "react-jsxdev", "react"]>, Schema.String, never, never>>;
|
|
305
|
+
readonly newLine: Schema.optionalKey<Schema.decodeTo<Schema.Literals<readonly ["crlf", "lf"]>, Schema.String, never, never>>;
|
|
306
|
+
readonly moduleDetection: Schema.optionalKey<Schema.decodeTo<Schema.Literals<readonly ["auto", "legacy", "force"]>, Schema.String, never, never>>;
|
|
307
|
+
readonly lib: Schema.optionalKey<Schema.$Array<Schema.decodeTo<Schema.Literals<readonly ["es5", "es6", "es7", "es2015", "es2016", "es2017", "es2018", "es2019", "es2020", "es2021", "es2022", "es2023", "es2024", "es2025", "esnext", "dom", "dom.iterable", "dom.asynciterable", "webworker", "webworker.importscripts", "webworker.iterable", "webworker.asynciterable", "scripthost", "es2015.core", "es2015.collection", "es2015.generator", "es2015.iterable", "es2015.promise", "es2015.proxy", "es2015.reflect", "es2015.symbol", "es2015.symbol.wellknown", "es2016.array.include", "es2016.intl", "es2017.arraybuffer", "es2017.date", "es2017.object", "es2017.sharedmemory", "es2017.string", "es2017.intl", "es2017.typedarrays", "es2018.asyncgenerator", "es2018.asynciterable", "es2018.intl", "es2018.promise", "es2018.regexp", "es2019.array", "es2019.object", "es2019.string", "es2019.symbol", "es2019.intl", "es2020.bigint", "es2020.date", "es2020.promise", "es2020.sharedmemory", "es2020.string", "es2020.symbol.wellknown", "es2020.intl", "es2020.number", "es2021.promise", "es2021.string", "es2021.weakref", "es2021.intl", "es2022.array", "es2022.error", "es2022.intl", "es2022.object", "es2022.string", "es2022.regexp", "es2023.array", "es2023.collection", "es2023.intl", "es2024.arraybuffer", "es2024.collection", "es2024.object", "es2024.promise", "es2024.regexp", "es2024.sharedmemory", "es2024.string", "es2025.collection", "es2025.float16", "es2025.intl", "es2025.iterator", "es2025.promise", "es2025.regexp", "esnext.asynciterable", "esnext.symbol", "esnext.bigint", "esnext.weakref", "esnext.object", "esnext.regexp", "esnext.string", "esnext.float16", "esnext.iterator", "esnext.promise", "esnext.array", "esnext.collection", "esnext.date", "esnext.decorators", "esnext.disposable", "esnext.error", "esnext.intl", "esnext.sharedmemory", "esnext.temporal", "esnext.typedarrays", "decorators", "decorators.legacy"]>, Schema.String, never, never>>>;
|
|
308
|
+
readonly ignoreDeprecations: Schema.optionalKey<Schema.Literals<readonly ["5.0", "6.0"]>>;
|
|
309
|
+
readonly strict: Schema.optionalKey<Schema.Boolean>;
|
|
310
|
+
readonly noImplicitAny: Schema.optionalKey<Schema.Boolean>;
|
|
311
|
+
readonly strictNullChecks: Schema.optionalKey<Schema.Boolean>;
|
|
312
|
+
readonly strictFunctionTypes: Schema.optionalKey<Schema.Boolean>;
|
|
313
|
+
readonly strictBindCallApply: Schema.optionalKey<Schema.Boolean>;
|
|
314
|
+
readonly strictPropertyInitialization: Schema.optionalKey<Schema.Boolean>;
|
|
315
|
+
readonly strictBuiltinIteratorReturn: Schema.optionalKey<Schema.Boolean>;
|
|
316
|
+
readonly noImplicitThis: Schema.optionalKey<Schema.Boolean>;
|
|
317
|
+
readonly useUnknownInCatchVariables: Schema.optionalKey<Schema.Boolean>;
|
|
318
|
+
readonly alwaysStrict: Schema.optionalKey<Schema.Boolean>;
|
|
319
|
+
readonly noUnusedLocals: Schema.optionalKey<Schema.Boolean>;
|
|
320
|
+
readonly noUnusedParameters: Schema.optionalKey<Schema.Boolean>;
|
|
321
|
+
readonly exactOptionalPropertyTypes: Schema.optionalKey<Schema.Boolean>;
|
|
322
|
+
readonly noImplicitReturns: Schema.optionalKey<Schema.Boolean>;
|
|
323
|
+
readonly noFallthroughCasesInSwitch: Schema.optionalKey<Schema.Boolean>;
|
|
324
|
+
readonly noUncheckedIndexedAccess: Schema.optionalKey<Schema.Boolean>;
|
|
325
|
+
readonly noImplicitOverride: Schema.optionalKey<Schema.Boolean>;
|
|
326
|
+
readonly noPropertyAccessFromIndexSignature: Schema.optionalKey<Schema.Boolean>;
|
|
327
|
+
readonly allowUnusedLabels: Schema.optionalKey<Schema.Boolean>;
|
|
328
|
+
readonly allowUnreachableCode: Schema.optionalKey<Schema.Boolean>;
|
|
329
|
+
readonly noUncheckedSideEffectImports: Schema.optionalKey<Schema.Boolean>;
|
|
330
|
+
readonly allowJs: Schema.optionalKey<Schema.Boolean>;
|
|
331
|
+
readonly checkJs: Schema.optionalKey<Schema.Boolean>;
|
|
332
|
+
readonly resolveJsonModule: Schema.optionalKey<Schema.Boolean>;
|
|
333
|
+
readonly allowArbitraryExtensions: Schema.optionalKey<Schema.Boolean>;
|
|
334
|
+
readonly allowImportingTsExtensions: Schema.optionalKey<Schema.Boolean>;
|
|
335
|
+
readonly rewriteRelativeImportExtensions: Schema.optionalKey<Schema.Boolean>;
|
|
336
|
+
readonly resolvePackageJsonExports: Schema.optionalKey<Schema.Boolean>;
|
|
337
|
+
readonly resolvePackageJsonImports: Schema.optionalKey<Schema.Boolean>;
|
|
338
|
+
readonly allowSyntheticDefaultImports: Schema.optionalKey<Schema.Boolean>;
|
|
339
|
+
readonly esModuleInterop: Schema.optionalKey<Schema.Boolean>;
|
|
340
|
+
readonly preserveSymlinks: Schema.optionalKey<Schema.Boolean>;
|
|
341
|
+
readonly allowUmdGlobalAccess: Schema.optionalKey<Schema.Boolean>;
|
|
342
|
+
readonly verbatimModuleSyntax: Schema.optionalKey<Schema.Boolean>;
|
|
343
|
+
readonly isolatedModules: Schema.optionalKey<Schema.Boolean>;
|
|
344
|
+
readonly isolatedDeclarations: Schema.optionalKey<Schema.Boolean>;
|
|
345
|
+
readonly erasableSyntaxOnly: Schema.optionalKey<Schema.Boolean>;
|
|
346
|
+
readonly forceConsistentCasingInFileNames: Schema.optionalKey<Schema.Boolean>;
|
|
347
|
+
readonly declaration: Schema.optionalKey<Schema.Boolean>;
|
|
348
|
+
readonly declarationMap: Schema.optionalKey<Schema.Boolean>;
|
|
349
|
+
readonly emitDeclarationOnly: Schema.optionalKey<Schema.Boolean>;
|
|
350
|
+
readonly sourceMap: Schema.optionalKey<Schema.Boolean>;
|
|
351
|
+
readonly inlineSourceMap: Schema.optionalKey<Schema.Boolean>;
|
|
352
|
+
readonly inlineSources: Schema.optionalKey<Schema.Boolean>;
|
|
353
|
+
readonly removeComments: Schema.optionalKey<Schema.Boolean>;
|
|
354
|
+
readonly importHelpers: Schema.optionalKey<Schema.Boolean>;
|
|
355
|
+
readonly downlevelIteration: Schema.optionalKey<Schema.Boolean>;
|
|
356
|
+
readonly emitBOM: Schema.optionalKey<Schema.Boolean>;
|
|
357
|
+
readonly noEmit: Schema.optionalKey<Schema.Boolean>;
|
|
358
|
+
readonly noEmitHelpers: Schema.optionalKey<Schema.Boolean>;
|
|
359
|
+
readonly noEmitOnError: Schema.optionalKey<Schema.Boolean>;
|
|
360
|
+
readonly preserveConstEnums: Schema.optionalKey<Schema.Boolean>;
|
|
361
|
+
readonly stripInternal: Schema.optionalKey<Schema.Boolean>;
|
|
362
|
+
readonly experimentalDecorators: Schema.optionalKey<Schema.Boolean>;
|
|
363
|
+
readonly emitDecoratorMetadata: Schema.optionalKey<Schema.Boolean>;
|
|
364
|
+
readonly useDefineForClassFields: Schema.optionalKey<Schema.Boolean>;
|
|
365
|
+
readonly noCheck: Schema.optionalKey<Schema.Boolean>;
|
|
366
|
+
readonly composite: Schema.optionalKey<Schema.Boolean>;
|
|
367
|
+
readonly incremental: Schema.optionalKey<Schema.Boolean>;
|
|
368
|
+
readonly disableSourceOfProjectReferenceRedirect: Schema.optionalKey<Schema.Boolean>;
|
|
369
|
+
readonly disableSolutionSearching: Schema.optionalKey<Schema.Boolean>;
|
|
370
|
+
readonly disableReferencedProjectLoad: Schema.optionalKey<Schema.Boolean>;
|
|
371
|
+
readonly assumeChangesOnlyAffectDirectDependencies: Schema.optionalKey<Schema.Boolean>;
|
|
372
|
+
readonly noErrorTruncation: Schema.optionalKey<Schema.Boolean>;
|
|
373
|
+
readonly noLib: Schema.optionalKey<Schema.Boolean>;
|
|
374
|
+
readonly noResolve: Schema.optionalKey<Schema.Boolean>;
|
|
375
|
+
readonly skipDefaultLibCheck: Schema.optionalKey<Schema.Boolean>;
|
|
376
|
+
readonly skipLibCheck: Schema.optionalKey<Schema.Boolean>;
|
|
377
|
+
readonly diagnostics: Schema.optionalKey<Schema.Boolean>;
|
|
378
|
+
readonly extendedDiagnostics: Schema.optionalKey<Schema.Boolean>;
|
|
379
|
+
readonly listFiles: Schema.optionalKey<Schema.Boolean>;
|
|
380
|
+
readonly listFilesOnly: Schema.optionalKey<Schema.Boolean>;
|
|
381
|
+
readonly listEmittedFiles: Schema.optionalKey<Schema.Boolean>;
|
|
382
|
+
readonly explainFiles: Schema.optionalKey<Schema.Boolean>;
|
|
383
|
+
readonly traceResolution: Schema.optionalKey<Schema.Boolean>;
|
|
384
|
+
readonly preserveWatchOutput: Schema.optionalKey<Schema.Boolean>;
|
|
385
|
+
readonly pretty: Schema.optionalKey<Schema.Boolean>;
|
|
386
|
+
readonly disableSizeLimit: Schema.optionalKey<Schema.Boolean>;
|
|
387
|
+
readonly libReplacement: Schema.optionalKey<Schema.Boolean>;
|
|
388
|
+
readonly stableTypeOrdering: Schema.optionalKey<Schema.Boolean>;
|
|
389
|
+
readonly outFile: Schema.optionalKey<Schema.String>;
|
|
390
|
+
readonly outDir: Schema.optionalKey<Schema.String>;
|
|
391
|
+
readonly rootDir: Schema.optionalKey<Schema.String>;
|
|
392
|
+
readonly declarationDir: Schema.optionalKey<Schema.String>;
|
|
393
|
+
readonly sourceRoot: Schema.optionalKey<Schema.String>;
|
|
394
|
+
readonly mapRoot: Schema.optionalKey<Schema.String>;
|
|
395
|
+
readonly tsBuildInfoFile: Schema.optionalKey<Schema.String>;
|
|
396
|
+
readonly baseUrl: Schema.optionalKey<Schema.String>;
|
|
397
|
+
readonly generateCpuProfile: Schema.optionalKey<Schema.String>;
|
|
398
|
+
readonly generateTrace: Schema.optionalKey<Schema.String>;
|
|
399
|
+
readonly typeRoots: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
400
|
+
readonly rootDirs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
401
|
+
readonly jsxFactory: Schema.optionalKey<Schema.String>;
|
|
402
|
+
readonly jsxFragmentFactory: Schema.optionalKey<Schema.String>;
|
|
403
|
+
readonly jsxImportSource: Schema.optionalKey<Schema.String>;
|
|
404
|
+
readonly reactNamespace: Schema.optionalKey<Schema.String>;
|
|
405
|
+
readonly types: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
406
|
+
readonly customConditions: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
407
|
+
readonly moduleSuffixes: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
408
|
+
readonly paths: Schema.optionalKey<Schema.$Record<Schema.String, Schema.$Array<Schema.String>>>;
|
|
409
|
+
readonly plugins: Schema.optionalKey<Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
410
|
+
readonly name: Schema.String;
|
|
411
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
|
|
412
|
+
readonly maxNodeModuleJsDepth: Schema.optionalKey<Schema.Number>;
|
|
413
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
414
|
+
readonly extends: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.$Array<Schema.String>]>>;
|
|
415
|
+
readonly files: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
416
|
+
readonly include: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
417
|
+
readonly exclude: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
418
|
+
readonly references: Schema.optionalKey<Schema.$Array<Schema.StructWithRest<Schema.Struct<{
|
|
419
|
+
readonly path: Schema.String;
|
|
420
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
|
|
421
|
+
readonly watchOptions: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
422
|
+
readonly watchFile: Schema.optionalKey<Schema.decodeTo<Schema.Literals<readonly ["fixedpollinginterval", "prioritypollinginterval", "dynamicprioritypolling", "fixedchunksizepolling", "usefsevents", "usefseventsonparentdirectory"]>, Schema.String, never, never>>;
|
|
423
|
+
readonly watchDirectory: Schema.optionalKey<Schema.decodeTo<Schema.Literals<readonly ["usefsevents", "fixedpollinginterval", "dynamicprioritypolling", "fixedchunksizepolling"]>, Schema.String, never, never>>;
|
|
424
|
+
readonly fallbackPolling: Schema.optionalKey<Schema.decodeTo<Schema.Literals<readonly ["fixedinterval", "priorityinterval", "dynamicpriority", "fixedchunksize"]>, Schema.String, never, never>>;
|
|
425
|
+
readonly synchronousWatchDirectory: Schema.optionalKey<Schema.Boolean>;
|
|
426
|
+
readonly excludeDirectories: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
427
|
+
readonly excludeFiles: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
428
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
429
|
+
readonly typeAcquisition: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
430
|
+
readonly enable: Schema.optionalKey<Schema.Boolean>;
|
|
431
|
+
readonly include: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
432
|
+
readonly exclude: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
433
|
+
readonly disableFilenameBasedTypeAcquisition: Schema.optionalKey<Schema.Boolean>;
|
|
434
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>;
|
|
435
|
+
readonly compileOnSave: Schema.optionalKey<Schema.Boolean>;
|
|
436
|
+
readonly $schema: Schema.optionalKey<Schema.String>;
|
|
437
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
438
|
+
/**
|
|
439
|
+
* Type-only companion namespace for {@link (TsconfigJson:variable)}, exposing its decoded
|
|
440
|
+
* and encoded shapes plus the JSONC codec.
|
|
441
|
+
*
|
|
442
|
+
* @public
|
|
443
|
+
*/
|
|
444
|
+
declare namespace TsconfigJson {
|
|
445
|
+
/**
|
|
446
|
+
* The decoded tsconfig.json shape: every typed field optional, plus passthrough for unknown keys.
|
|
447
|
+
*
|
|
448
|
+
* @public
|
|
449
|
+
*/
|
|
450
|
+
type Type = typeof TsconfigJson.Type;
|
|
451
|
+
/**
|
|
452
|
+
* The encoded (on-disk JSON) tsconfig.json shape.
|
|
453
|
+
*
|
|
454
|
+
* @public
|
|
455
|
+
*/
|
|
456
|
+
type Encoded = typeof TsconfigJson.Encoded;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Decodes a JSONC-encoded tsconfig.json document straight into
|
|
460
|
+
* {@link (TsconfigJson:variable)}. Bound once at module top level —
|
|
461
|
+
* `Jsonc.schema` is schema-producing, and this is the shared instance (the
|
|
462
|
+
* house `FromString` idiom, R3.3; `TsconfigJson` is a `Schema.StructWithRest`
|
|
463
|
+
* value rather than a `Schema.Class`, so the codec is a sibling export, not a
|
|
464
|
+
* static).
|
|
465
|
+
*
|
|
466
|
+
* @public
|
|
467
|
+
*/
|
|
468
|
+
declare const TsconfigJsonFromString: Schema.Codec<typeof TsconfigJson.Type, string>;
|
|
469
|
+
declare const TsconfigParseError_base: Schema.Class<TsconfigParseError, Schema.TaggedStruct<"TsconfigParseError", {
|
|
470
|
+
/** The file path that failed to parse, or `""` when not file-bound. */
|
|
471
|
+
readonly path: Schema.String;
|
|
472
|
+
/** The underlying decode failure. */
|
|
473
|
+
readonly cause: Schema.Defect;
|
|
474
|
+
}>, import("effect/Cause").YieldableError>;
|
|
475
|
+
/**
|
|
476
|
+
* Raised when a tsconfig.json document fails to parse or decode. `path` is
|
|
477
|
+
* the file path when the failure is file-bound, and the empty string
|
|
478
|
+
* otherwise (e.g. decoding an in-memory string). The loader (Task 8) wraps
|
|
479
|
+
* file-bound decode failures in this error; this module only declares it.
|
|
480
|
+
*
|
|
481
|
+
* @public
|
|
482
|
+
*/
|
|
483
|
+
declare class TsconfigParseError extends TsconfigParseError_base {
|
|
484
|
+
get message(): string;
|
|
485
|
+
}
|
|
486
|
+
//#endregion
|
|
487
|
+
//#region src/ResolvedTsconfig.d.ts
|
|
488
|
+
/**
|
|
489
|
+
* The result of resolving a tsconfig.json's full `extends` chain: the merged
|
|
490
|
+
* compiler options and inherited settings, flattened per R2/E4, with enough
|
|
491
|
+
* provenance for the consumer (`configPath`, `extendedPaths`, and `pathsBase`,
|
|
492
|
+
* the directory of the config that declared `paths`). Unknown top-level keys
|
|
493
|
+
* survive as passthrough via the index signature.
|
|
494
|
+
*
|
|
495
|
+
* @public
|
|
496
|
+
*/
|
|
497
|
+
interface ResolvedTsconfig {
|
|
498
|
+
/** The own (most-derived) config's path — the last of {@link (ResolvedTsconfig:interface).extendedPaths}. */
|
|
499
|
+
readonly configPath: string;
|
|
500
|
+
/** The full resolution chain, base-most first and own config last. */
|
|
501
|
+
readonly extendedPaths: ReadonlyArray<string>;
|
|
502
|
+
/** The per-key merged compiler options (derived wins; `paths` replaced wholesale). */
|
|
503
|
+
readonly compilerOptions: CompilerOptions.Type;
|
|
504
|
+
/** The resolved `files`, if any config in the chain declared it. */
|
|
505
|
+
readonly files?: ReadonlyArray<string>;
|
|
506
|
+
/** The resolved `include`, if any config in the chain declared it. */
|
|
507
|
+
readonly include?: ReadonlyArray<string>;
|
|
508
|
+
/** The resolved `exclude`, if any config in the chain declared it. */
|
|
509
|
+
readonly exclude?: ReadonlyArray<string>;
|
|
510
|
+
/** The own config's `references` (never inherited). */
|
|
511
|
+
readonly references?: ReadonlyArray<Reference.Type>;
|
|
512
|
+
/** The per-key merged `watchOptions`. */
|
|
513
|
+
readonly watchOptions?: WatchOptions.Type;
|
|
514
|
+
/** The own config's `typeAcquisition` (never inherited). */
|
|
515
|
+
readonly typeAcquisition?: TypeAcquisition.Type;
|
|
516
|
+
/** `compileOnSave`, inherited only when own is undefined and the inherited value is truthy. */
|
|
517
|
+
readonly compileOnSave?: boolean;
|
|
518
|
+
/** The directory of the config that declared `paths` (E4), against which `paths` values resolve. */
|
|
519
|
+
readonly pathsBase?: string;
|
|
520
|
+
/** Unknown top-level keys, preserved through the merge (forward tolerance). */
|
|
521
|
+
readonly [key: string]: unknown;
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* The pure extends-merge engine: parse-time path absolutization
|
|
525
|
+
* ({@link (ResolvedTsconfig:variable).absolutize}), the per-field merge fold
|
|
526
|
+
* ({@link (ResolvedTsconfig:variable).merge}), and the `${configDir}` final
|
|
527
|
+
* phase ({@link (ResolvedTsconfig:variable).substituteConfigDir}).
|
|
528
|
+
*
|
|
529
|
+
* @public
|
|
530
|
+
*/
|
|
531
|
+
declare const ResolvedTsconfig: {
|
|
532
|
+
readonly absolutize: (doc: TsconfigJson.Type, configDir: string, join: (a: string, b: string) => string) => TsconfigJson.Type;
|
|
533
|
+
readonly merge: (base: ResolvedTsconfig, derived: TsconfigJson.Type, derivedPath: string) => ResolvedTsconfig;
|
|
534
|
+
readonly substituteConfigDir: (resolved: ResolvedTsconfig, finalDir: string) => ResolvedTsconfig;
|
|
535
|
+
};
|
|
536
|
+
//#endregion
|
|
537
|
+
//#region src/PortableTsconfig.d.ts
|
|
538
|
+
/**
|
|
539
|
+
* A portable, JSON-serializable tsconfig.json (compilerOptions-only), for
|
|
540
|
+
* virtual TypeScript environments that control their own file paths and emit
|
|
541
|
+
* settings externally. Carries only knowably-portable options: no absolute or
|
|
542
|
+
* machine-specific paths, and no emit or file-selection surface.
|
|
543
|
+
*
|
|
544
|
+
* @public
|
|
545
|
+
*/
|
|
546
|
+
interface PortableTsconfig {
|
|
547
|
+
/** The tsconfig JSON Schema URL, stamped for IDE support. */
|
|
548
|
+
readonly $schema: "https://json.schemastore.org/tsconfig";
|
|
549
|
+
/** The allow-listed, forced-flag-applied compiler options. */
|
|
550
|
+
readonly compilerOptions: Record<string, unknown>;
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* The portable-tsconfig filter: {@link (PortableTsconfig:variable).make}
|
|
554
|
+
* narrows a resolved or bare compiler-options object to the allow-listed,
|
|
555
|
+
* machine-independent subset described on {@link (PortableTsconfig:interface)}.
|
|
556
|
+
*
|
|
557
|
+
* @public
|
|
558
|
+
*/
|
|
559
|
+
declare const PortableTsconfig: {
|
|
560
|
+
readonly make: (input: ResolvedTsconfig | CompilerOptions.Type) => PortableTsconfig;
|
|
561
|
+
};
|
|
562
|
+
//#endregion
|
|
563
|
+
//#region src/TsconfigDiscovery.d.ts
|
|
564
|
+
/**
|
|
565
|
+
* Options for {@link TsconfigDiscovery.findNearest}.
|
|
566
|
+
*
|
|
567
|
+
* @public
|
|
568
|
+
*/
|
|
569
|
+
interface FindNearestOptions {
|
|
570
|
+
/** The config file name to search for. Defaults to `"tsconfig.json"`. */
|
|
571
|
+
readonly filename?: string;
|
|
572
|
+
/** Stop ascending after this directory, inclusive. */
|
|
573
|
+
readonly stopAt?: string;
|
|
574
|
+
}
|
|
575
|
+
/**
|
|
576
|
+
* Nearest-config upward discovery for `tsconfig.json`.
|
|
577
|
+
*
|
|
578
|
+
* @public
|
|
579
|
+
*/
|
|
580
|
+
declare const TsconfigDiscovery: {
|
|
581
|
+
readonly findNearest: (start: string, options?: FindNearestOptions) => Effect.Effect<Option.Option<string>, never, FileSystem.FileSystem | Path.Path>;
|
|
582
|
+
};
|
|
583
|
+
//#endregion
|
|
584
|
+
//#region src/TsconfigLoader.d.ts
|
|
585
|
+
declare const TsconfigExtendsError_base: Schema.Class<TsconfigExtendsError, Schema.TaggedStruct<"TsconfigExtendsError", {
|
|
586
|
+
/** The config whose `extends` could not be resolved. */
|
|
587
|
+
readonly path: Schema.String;
|
|
588
|
+
/** The target that failed: the spec, the re-entered path, or the refused path. */
|
|
589
|
+
readonly target: Schema.String;
|
|
590
|
+
/** Why resolution failed. */
|
|
591
|
+
readonly reason: Schema.Literals<readonly ["not-found", "cycle", "depth", "empty"]>;
|
|
592
|
+
/** The full resolution chain of normalized absolute config paths. */
|
|
593
|
+
readonly chain: Schema.$Array<Schema.String>;
|
|
594
|
+
}>, import("effect/Cause").YieldableError>;
|
|
595
|
+
/**
|
|
596
|
+
* Raised when a config's `extends` chain cannot be resolved: an unresolvable
|
|
597
|
+
* target (`"not-found"`), a re-entrant chain (`"cycle"`), a chain deeper than
|
|
598
|
+
* `MAX_EXTENDS_DEPTH` (`"depth"`), or an empty target string (`"empty"`).
|
|
599
|
+
* `path` is the config whose `extends` failed, `target` is what it tried to
|
|
600
|
+
* extend (the offending spec for `"not-found"`/`"empty"`, the re-entered config
|
|
601
|
+
* path for `"cycle"`, the refused config for `"depth"`), and `chain` is the full
|
|
602
|
+
* resolution chain of normalized absolute paths.
|
|
603
|
+
*
|
|
604
|
+
* @public
|
|
605
|
+
*/
|
|
606
|
+
declare class TsconfigExtendsError extends TsconfigExtendsError_base {
|
|
607
|
+
get message(): string;
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* The tsconfig.json loader: {@link TsconfigLoader.load} reads and decodes one
|
|
611
|
+
* config file, {@link TsconfigLoader.resolve} runs the full load -\> extends -\>
|
|
612
|
+
* merge -\> `${configDir}` pipeline.
|
|
613
|
+
*
|
|
614
|
+
* @public
|
|
615
|
+
*/
|
|
616
|
+
declare const TsconfigLoader: {
|
|
617
|
+
readonly load: (configPath: string) => Effect.Effect<TsconfigJson.Type, TsconfigParseError | PlatformError.PlatformError, FileSystem.FileSystem | Path.Path>;
|
|
618
|
+
readonly resolve: (configPath: string) => Effect.Effect<ResolvedTsconfig, TsconfigParseError | TsconfigExtendsError | PlatformError.PlatformError, FileSystem.FileSystem | Path.Path>;
|
|
619
|
+
};
|
|
620
|
+
//#endregion
|
|
621
|
+
//#region src/TsEnumCodec.d.ts
|
|
622
|
+
/**
|
|
623
|
+
* The nine `compilerOptions` / `watchOptions` enum families this codec knows,
|
|
624
|
+
* per R1.6.
|
|
625
|
+
*
|
|
626
|
+
* @public
|
|
627
|
+
*/
|
|
628
|
+
type EnumFamily = "target" | "module" | "moduleResolution" | "jsx" | "newLine" | "moduleDetection" | "watchFile" | "watchDirectory" | "fallbackPolling";
|
|
629
|
+
/**
|
|
630
|
+
* The string↔numeric enum codec for `compilerOptions` / `watchOptions`
|
|
631
|
+
* families, per R1.6. Plain data: every lookup is a synchronous map read
|
|
632
|
+
* returning `Option.Option`, never a thrown error.
|
|
633
|
+
*
|
|
634
|
+
* @public
|
|
635
|
+
*/
|
|
636
|
+
declare const TsEnumCodec: {
|
|
637
|
+
readonly encode: (family: EnumFamily, value: string) => Option.Option<number>;
|
|
638
|
+
readonly decode: (family: EnumFamily, value: number) => Option.Option<string>;
|
|
639
|
+
readonly normalizeLibReference: (lib: string) => string;
|
|
640
|
+
readonly encodeCompilerOptions: (options: CompilerOptions.Type) => Record<string, unknown>;
|
|
641
|
+
readonly decodeCompilerOptions: (numeric: Readonly<Record<string, unknown>>) => Record<string, unknown>;
|
|
642
|
+
};
|
|
643
|
+
//#endregion
|
|
644
|
+
export { CompilerOptions, type EnumFamily, FallbackPolling, type FindNearestOptions, Jsx, Lib, Module, ModuleDetection, ModuleResolution, NewLine, PortableTsconfig, Reference, ResolvedTsconfig, Target, TsEnumCodec, TsconfigDiscovery, TsconfigExtendsError, TsconfigJson, TsconfigJsonFromString, TsconfigLoader, TsconfigParseError, TypeAcquisition, WatchDirectory, WatchFile, WatchOptions };
|
|
645
|
+
//# sourceMappingURL=index.d.ts.map
|