1
+ // tslint:disable-next-line:no-implicit-dependencies
1
2
import * as ts from 'typescript' ;
2
3
3
4
// TODO: keep in sync with TypeScript
@@ -17,51 +18,12 @@ export enum ScriptKind {
17
18
}
18
19
19
20
export interface TypeScriptInstance {
20
- parseJsonConfigFileContent (
21
- json : any ,
22
- host : ts . ParseConfigHost ,
23
- basePath : string ,
24
- existingOptions ?: ts . CompilerOptions ,
25
- configFileName ?: string ,
26
- resolutionStack ?: ts . Path [ ] ,
27
- extraFileExtensions ?: ReadonlyArray < ts . FileExtensionInfo >
28
- ) : ts . ParsedCommandLine ;
29
- readConfigFile (
30
- fileName : string ,
31
- readFile : ( path : string ) => string | undefined
32
- ) : {
33
- config ?: any ;
34
- error ?: ts . Diagnostic ;
35
- } ;
36
- createCompilerHost (
37
- options : ts . CompilerOptions ,
38
- setParentNodes ?: boolean
39
- ) : ts . CompilerHost ;
40
- createProgram (
41
- rootNames : ReadonlyArray < string > ,
42
- options : ts . CompilerOptions ,
43
- host ?: ts . CompilerHost ,
44
- oldProgram ?: ts . Program ,
45
- configFileParsingDiagnostics ?: ReadonlyArray < ts . Diagnostic >
46
- ) : ts . Program ;
47
- flattenDiagnosticMessageText (
48
- messageText : string | ts . DiagnosticMessageChain | undefined ,
49
- newLine : string
50
- ) : string ;
51
- resolveModuleName (
52
- moduleName : string ,
53
- containingFile : string ,
54
- compilerOptions : ts . CompilerOptions ,
55
- host : ts . ModuleResolutionHost ,
56
- cache ?: ts . ModuleResolutionCache
57
- ) : ts . ResolvedModuleWithFailedLookupLocations ;
58
- createSourceFile (
59
- fileName : string ,
60
- sourceText : string ,
61
- languageVersion : ts . ScriptTarget ,
62
- setParentNodes ?: boolean ,
63
- scriptKind ?: ts . ScriptKind
64
- ) : ts . SourceFile ;
65
-
21
+ parseJsonConfigFileContent : typeof ts . parseJsonConfigFileContent ;
22
+ readConfigFile : typeof ts . readConfigFile ;
23
+ createCompilerHost : typeof ts . createCompilerHost ;
24
+ createProgram : typeof ts . createProgram ;
25
+ flattenDiagnosticMessageText : typeof ts . flattenDiagnosticMessageText ;
26
+ resolveModuleName : typeof ts . resolveModuleName ;
27
+ createSourceFile : typeof ts . createSourceFile ;
66
28
sys : ts . System ;
67
29
}
0 commit comments