@@ -28,6 +28,7 @@ export interface CreateOptions {
28
28
emit? : boolean ;
29
29
esm? : boolean ;
30
30
experimentalReplAwait? : boolean ;
31
+ experimentalSpecifierResolution? : ' node' | ' explicit' ;
31
32
// (undocumented)
32
33
fileExists? : (path : string ) => boolean ;
33
34
files? : boolean ;
@@ -59,7 +60,7 @@ export interface CreateOptions {
59
60
// @public
60
61
export function createRepl(options ? : CreateReplOptions ): ReplService ;
61
62
62
- // @public (undocumented)
63
+ // @public
63
64
export interface CreateReplOptions {
64
65
// (undocumented)
65
66
service? : Service ;
@@ -75,7 +76,7 @@ export interface CreateReplOptions {
75
76
stdout? : NodeJS .WritableStream ;
76
77
}
77
78
78
- // @public (undocumented)
79
+ // @public
79
80
export interface CreateTranspilerOptions {
80
81
// (undocumented)
81
82
service: Pick <Service , Extract <' config' | ' options' | ' projectLocalResolveHelper' , keyof Service >>;
@@ -85,7 +86,13 @@ export interface CreateTranspilerOptions {
85
86
export type EvalAwarePartialHost = Pick <CreateOptions , ' readFile' | ' fileExists' >;
86
87
87
88
// @public (undocumented)
88
- export type ModuleTypes = Record <string , ' cjs' | ' esm' | ' package' >;
89
+ export type ExperimentalSpecifierResolution = ' node' | ' explicit' ;
90
+
91
+ // @public (undocumented)
92
+ export type ModuleTypeOverride = ' cjs' | ' esm' | ' package' ;
93
+
94
+ // @public (undocumented)
95
+ export type ModuleTypes = Record <string , ModuleTypeOverride >;
89
96
90
97
// @public (undocumented)
91
98
export interface NodeLoaderHooksAPI1 {
@@ -131,6 +138,7 @@ export namespace NodeLoaderHooksAPI2 {
131
138
}, defaultLoad : NodeLoaderHooksAPI2 [' load' ]) => Promise <{
132
139
format: NodeLoaderHooksFormat ;
133
140
source: string | Buffer | undefined ;
141
+ shortCircuit? : boolean ;
134
142
}>;
135
143
// (undocumented)
136
144
export interface NodeImportAssertions {
@@ -147,12 +155,16 @@ export namespace NodeLoaderHooksAPI2 {
147
155
}, defaultResolve : ResolveHook ) => Promise <{
148
156
url: string ;
149
157
format? : NodeLoaderHooksFormat ;
158
+ shortCircuit? : boolean ;
150
159
}>;
151
160
}
152
161
153
162
// @public (undocumented)
154
163
export type NodeLoaderHooksFormat = ' builtin' | ' commonjs' | ' dynamic' | ' json' | ' module' | ' wasm' ;
155
164
165
+ // @public
166
+ export type NodeModuleEmitKind = ' nodeesm' | ' nodecjs' ;
167
+
156
168
// @public @deprecated
157
169
export type Register = Service ;
158
170
@@ -167,7 +179,7 @@ export const REGISTER_INSTANCE: unique symbol;
167
179
168
180
// @public
169
181
export interface RegisterOptions extends CreateOptions {
170
- experimentalResolverFeatures ? : boolean ;
182
+ experimentalResolver ? : boolean ;
171
183
}
172
184
173
185
// @public (undocumented)
@@ -202,13 +214,13 @@ export interface Service {
202
214
ts: TSCommon ;
203
215
}
204
216
205
- // @public (undocumented)
217
+ // @public
206
218
export interface TranspileOptions {
207
219
// (undocumented)
208
220
fileName: string ;
209
221
}
210
222
211
- // @public (undocumented)
223
+ // @public
212
224
export interface TranspileOutput {
213
225
// (undocumented)
214
226
diagnostics? : _ts .Diagnostic [];
@@ -218,7 +230,7 @@ export interface TranspileOutput {
218
230
sourceMapText? : string ;
219
231
}
220
232
221
- // @public (undocumented)
233
+ // @public
222
234
export interface Transpiler {
223
235
// (undocumented)
224
236
transpile(input : string , options : TranspileOptions ): TranspileOutput ;
@@ -270,7 +282,7 @@ export interface TSCommon {
270
282
// (undocumented)
271
283
JsxEmit: typeof _ts .JsxEmit ;
272
284
// (undocumented)
273
- ModuleKind: typeof _ts . ModuleKind ;
285
+ ModuleKind: TSCommon . ModuleKindEnum ;
274
286
// (undocumented)
275
287
ModuleResolutionKind: typeof _ts .ModuleResolutionKind ;
276
288
// (undocumented)
@@ -307,6 +319,12 @@ export namespace TSCommon {
307
319
resolveTypeReferenceDirectives? (typeDirectiveNames : string [] | _ts .FileReference [], containingFile : string , redirectedReference : _ts .ResolvedProjectReference | undefined , options : _ts .CompilerOptions , containingFileMode ? : _ts .SourceFile [' impliedNodeFormat' ] | undefined ): (_ts .ResolvedTypeReferenceDirective | undefined )[];
308
320
}
309
321
// (undocumented)
322
+ export type ModuleKindEnum = typeof _ts .ModuleKind & {
323
+ Node16: typeof _ts .ModuleKind extends {
324
+ Node16: any ;
325
+ } ? typeof _ts .ModuleKind [' Node16' ] : 100 ;
326
+ };
327
+ // (undocumented)
310
328
export type ModuleResolutionHost = _ts .ModuleResolutionHost ;
311
329
// (undocumented)
312
330
export type ParsedCommandLine = _ts .ParsedCommandLine ;
@@ -328,10 +346,12 @@ export interface TsConfigOptions extends Omit<RegisterOptions, 'transformers' |
328
346
329
347
// @public
330
348
export class TSError extends BaseError {
331
- constructor (diagnosticText : string , diagnosticCodes : number []);
349
+ constructor (diagnosticText : string , diagnosticCodes : number [], diagnostics ? : ReadonlyArray < _ts . Diagnostic > );
332
350
// (undocumented)
333
351
diagnosticCodes: number [];
334
352
// (undocumented)
353
+ diagnostics: ReadonlyArray <_ts .Diagnostic >;
354
+ // (undocumented)
335
355
diagnosticText: string ;
336
356
// (undocumented)
337
357
name: string ;
0 commit comments