@@ -15,6 +15,8 @@ export interface CreateOptions {
15
15
compiler? : string ;
16
16
compilerHost? : boolean ;
17
17
compilerOptions? : object ;
18
+ cwd? : string ;
19
+ // @deprecated
18
20
dir? : string ;
19
21
emit? : boolean ;
20
22
// (undocumented)
@@ -25,19 +27,23 @@ export interface CreateOptions {
25
27
logError? : boolean ;
26
28
pretty? : boolean ;
27
29
project? : string ;
30
+ projectSearchDir? : string ;
28
31
// (undocumented)
29
32
readFile? : (path : string ) => string | undefined ;
30
33
require? : Array <string >;
31
34
scope? : boolean ;
35
+ // (undocumented)
36
+ scopeDir? : string ;
32
37
skipIgnore? : boolean ;
33
38
skipProject? : boolean ;
34
39
// (undocumented)
35
40
transformers? : _ts .CustomTransformers | ((p : _ts .Program ) => _ts .CustomTransformers );
36
41
transpileOnly? : boolean ;
42
+ transpiler? : string | [string , object ];
37
43
typeCheck? : boolean ;
38
44
}
39
45
40
- // @public (undocumented)
46
+ // @public
41
47
export function createRepl(options ? : CreateReplOptions ): ReplService ;
42
48
43
49
// @public (undocumented)
@@ -56,14 +62,11 @@ export interface CreateReplOptions {
56
62
stdout? : NodeJS .WritableStream ;
57
63
}
58
64
59
- // @public
60
- export const DEFAULTS: RegisterOptions ;
61
-
62
- // @public
63
- export function normalizeSlashes(value : string ): string ;
64
-
65
- // @public
66
- export function parse(value : string | undefined ): object | undefined ;
65
+ // @public (undocumented)
66
+ export interface CreateTranspilerOptions {
67
+ // (undocumented)
68
+ service: Pick <Service , ' config' | ' options' >;
69
+ }
67
70
68
71
// @public @deprecated
69
72
export type Register = Service ;
@@ -112,14 +115,54 @@ export interface Service {
112
115
ts: TSCommon ;
113
116
}
114
117
118
+ // @public (undocumented)
119
+ export interface TranspileOptions {
120
+ // (undocumented)
121
+ fileName: string ;
122
+ }
123
+
124
+ // @public (undocumented)
125
+ export interface TranspileOutput {
126
+ // (undocumented)
127
+ diagnostics? : _ts .Diagnostic [];
128
+ // (undocumented)
129
+ outputText: string ;
130
+ // (undocumented)
131
+ sourceMapText? : string ;
132
+ }
133
+
134
+ // @public (undocumented)
135
+ export interface Transpiler {
136
+ // (undocumented)
137
+ transpile(input : string , options : TranspileOptions ): TranspileOutput ;
138
+ }
139
+
115
140
// @public
116
- export function split(value : string | undefined ): string [] | undefined ;
141
+ export type TranspilerFactory = (options : CreateTranspilerOptions ) => Transpiler ;
142
+
143
+ // @public
144
+ export interface TranspilerModule {
145
+ // (undocumented)
146
+ create: TranspilerFactory ;
147
+ }
117
148
118
149
// @public
119
150
export interface TSCommon {
151
+ // (undocumented)
152
+ createDocumentRegistry: typeof _ts .createDocumentRegistry ;
153
+ // (undocumented)
154
+ createEmitAndSemanticDiagnosticsBuilderProgram: typeof _ts .createEmitAndSemanticDiagnosticsBuilderProgram ;
155
+ // (undocumented)
156
+ createIncrementalCompilerHost: typeof _ts .createIncrementalCompilerHost ;
157
+ // (undocumented)
158
+ createIncrementalProgram: typeof _ts .createIncrementalProgram ;
120
159
// (undocumented)
121
160
createLanguageService: typeof _ts .createLanguageService ;
122
161
// (undocumented)
162
+ createModuleResolutionCache: typeof _ts .createModuleResolutionCache ;
163
+ // (undocumented)
164
+ createSourceFile: typeof _ts .createSourceFile ;
165
+ // (undocumented)
123
166
displayPartsToString: typeof _ts .displayPartsToString ;
124
167
// (undocumented)
125
168
findConfigFile: typeof _ts .findConfigFile ;
@@ -130,16 +173,26 @@ export interface TSCommon {
130
173
// (undocumented)
131
174
formatDiagnosticsWithColorAndContext: typeof _ts .formatDiagnosticsWithColorAndContext ;
132
175
// (undocumented)
176
+ getDefaultLibFileName: typeof _ts .getDefaultLibFileName ;
177
+ // (undocumented)
133
178
getDefaultLibFilePath: typeof _ts .getDefaultLibFilePath ;
134
179
// (undocumented)
135
180
getPreEmitDiagnostics: typeof _ts .getPreEmitDiagnostics ;
136
181
// (undocumented)
182
+ JsxEmit: typeof _ts .JsxEmit ;
183
+ // (undocumented)
137
184
ModuleKind: typeof _ts .ModuleKind ;
138
185
// (undocumented)
139
186
parseJsonConfigFileContent: typeof _ts .parseJsonConfigFileContent ;
140
187
// (undocumented)
141
188
readConfigFile: typeof _ts .readConfigFile ;
142
189
// (undocumented)
190
+ resolveModuleName: typeof _ts .resolveModuleName ;
191
+ // (undocumented)
192
+ resolveModuleNameFromCache: typeof _ts .resolveModuleNameFromCache ;
193
+ // (undocumented)
194
+ resolveTypeReferenceDirective: typeof _ts .resolveTypeReferenceDirective ;
195
+ // (undocumented)
143
196
ScriptSnapshot: typeof _ts .ScriptSnapshot ;
144
197
// (undocumented)
145
198
ScriptTarget: typeof _ts .ScriptTarget ;
@@ -152,7 +205,7 @@ export interface TSCommon {
152
205
}
153
206
154
207
// @public
155
- export interface TsConfigOptions extends Omit <RegisterOptions , ' transformers' | ' readFile' | ' fileExists' | ' skipProject' | ' project' | ' dir' > {
208
+ export interface TsConfigOptions extends Omit <RegisterOptions , ' transformers' | ' readFile' | ' fileExists' | ' skipProject' | ' project' | ' dir' | ' cwd ' | ' projectSearchDir ' | ' scope ' | ' scopeDir ' | ' experimentalEsmLoader ' > {
156
209
}
157
210
158
211
// @public
0 commit comments