|
7 | 7 | */ |
8 | 8 |
|
9 | 9 | declare var process: any; |
10 | | ->process : any |
| 10 | +>process : any, Symbol(process,Decl(APISample_compile.ts,7,11)) |
11 | 11 |
|
12 | 12 | declare var console: any; |
13 | | ->console : any |
| 13 | +>console : any, Symbol(console,Decl(APISample_compile.ts,8,11)) |
14 | 14 |
|
15 | 15 | declare var os: any; |
16 | | ->os : any |
| 16 | +>os : any, Symbol(os,Decl(APISample_compile.ts,9,11)) |
17 | 17 |
|
18 | 18 | import ts = require("typescript"); |
19 | | ->ts : typeof ts |
| 19 | +>ts : typeof ts, Symbol(ts,Decl(APISample_compile.ts,9,20)) |
20 | 20 |
|
21 | 21 | export function compile(fileNames: string[], options: ts.CompilerOptions): void { |
22 | | ->compile : (fileNames: string[], options: ts.CompilerOptions) => void |
23 | | ->fileNames : string[] |
24 | | ->options : ts.CompilerOptions |
25 | | ->ts : unknown |
26 | | ->CompilerOptions : ts.CompilerOptions |
| 22 | +>compile : (fileNames: string[], options: ts.CompilerOptions) => void, Symbol(compile,Decl(APISample_compile.ts,11,34)) |
| 23 | +>fileNames : string[], Symbol(fileNames,Decl(APISample_compile.ts,13,24)) |
| 24 | +>options : ts.CompilerOptions, Symbol(options,Decl(APISample_compile.ts,13,44)) |
| 25 | +>ts : any, Symbol(ts,Decl(APISample_compile.ts,9,20)) |
| 26 | +>CompilerOptions : ts.CompilerOptions, Symbol(ts.CompilerOptions,Decl(typescript.d.ts,1074,5)) |
27 | 27 |
|
28 | 28 | var program = ts.createProgram(fileNames, options); |
29 | | ->program : ts.Program |
| 29 | +>program : ts.Program, Symbol(program,Decl(APISample_compile.ts,14,7)) |
30 | 30 | >ts.createProgram(fileNames, options) : ts.Program |
31 | | ->ts.createProgram : (rootNames: string[], options: ts.CompilerOptions, host?: ts.CompilerHost) => ts.Program |
32 | | ->ts : typeof ts |
33 | | ->createProgram : (rootNames: string[], options: ts.CompilerOptions, host?: ts.CompilerHost) => ts.Program |
34 | | ->fileNames : string[] |
35 | | ->options : ts.CompilerOptions |
| 31 | +>ts.createProgram : (rootNames: string[], options: ts.CompilerOptions, host?: ts.CompilerHost) => ts.Program, Symbol(ts.createProgram,Decl(typescript.d.ts,1201,113)) |
| 32 | +>ts : typeof ts, Symbol(ts,Decl(APISample_compile.ts,9,20)) |
| 33 | +>createProgram : (rootNames: string[], options: ts.CompilerOptions, host?: ts.CompilerHost) => ts.Program, Symbol(ts.createProgram,Decl(typescript.d.ts,1201,113)) |
| 34 | +>fileNames : string[], Symbol(fileNames,Decl(APISample_compile.ts,13,24)) |
| 35 | +>options : ts.CompilerOptions, Symbol(options,Decl(APISample_compile.ts,13,44)) |
36 | 36 |
|
37 | 37 | var emitResult = program.emit(); |
38 | | ->emitResult : ts.EmitResult |
| 38 | +>emitResult : ts.EmitResult, Symbol(emitResult,Decl(APISample_compile.ts,15,7)) |
39 | 39 | >program.emit() : ts.EmitResult |
40 | | ->program.emit : (targetSourceFile?: ts.SourceFile, writeFile?: ts.WriteFileCallback) => ts.EmitResult |
41 | | ->program : ts.Program |
42 | | ->emit : (targetSourceFile?: ts.SourceFile, writeFile?: ts.WriteFileCallback) => ts.EmitResult |
| 40 | +>program.emit : (targetSourceFile?: ts.SourceFile, writeFile?: ts.WriteFileCallback) => ts.EmitResult, Symbol(ts.Program.emit,Decl(typescript.d.ts,767,39)) |
| 41 | +>program : ts.Program, Symbol(program,Decl(APISample_compile.ts,14,7)) |
| 42 | +>emit : (targetSourceFile?: ts.SourceFile, writeFile?: ts.WriteFileCallback) => ts.EmitResult, Symbol(ts.Program.emit,Decl(typescript.d.ts,767,39)) |
43 | 43 |
|
44 | 44 | var allDiagnostics = ts.getPreEmitDiagnostics(program).concat(emitResult.diagnostics); |
45 | | ->allDiagnostics : ts.Diagnostic[] |
| 45 | +>allDiagnostics : ts.Diagnostic[], Symbol(allDiagnostics,Decl(APISample_compile.ts,17,7)) |
46 | 46 | >ts.getPreEmitDiagnostics(program).concat(emitResult.diagnostics) : ts.Diagnostic[] |
47 | | ->ts.getPreEmitDiagnostics(program).concat : { <U extends ts.Diagnostic[]>(...items: U[]): ts.Diagnostic[]; (...items: ts.Diagnostic[]): ts.Diagnostic[]; } |
| 47 | +>ts.getPreEmitDiagnostics(program).concat : { <U extends ts.Diagnostic[]>(...items: U[]): ts.Diagnostic[]; (...items: ts.Diagnostic[]): ts.Diagnostic[]; }, Symbol(Array.concat,Decl(lib.d.ts,1025,13),Decl(lib.d.ts,1030,46)) |
48 | 48 | >ts.getPreEmitDiagnostics(program) : ts.Diagnostic[] |
49 | | ->ts.getPreEmitDiagnostics : (program: ts.Program) => ts.Diagnostic[] |
50 | | ->ts : typeof ts |
51 | | ->getPreEmitDiagnostics : (program: ts.Program) => ts.Diagnostic[] |
52 | | ->program : ts.Program |
53 | | ->concat : { <U extends ts.Diagnostic[]>(...items: U[]): ts.Diagnostic[]; (...items: ts.Diagnostic[]): ts.Diagnostic[]; } |
54 | | ->emitResult.diagnostics : ts.Diagnostic[] |
55 | | ->emitResult : ts.EmitResult |
56 | | ->diagnostics : ts.Diagnostic[] |
| 49 | +>ts.getPreEmitDiagnostics : (program: ts.Program) => ts.Diagnostic[], Symbol(ts.getPreEmitDiagnostics,Decl(typescript.d.ts,1199,98)) |
| 50 | +>ts : typeof ts, Symbol(ts,Decl(APISample_compile.ts,9,20)) |
| 51 | +>getPreEmitDiagnostics : (program: ts.Program) => ts.Diagnostic[], Symbol(ts.getPreEmitDiagnostics,Decl(typescript.d.ts,1199,98)) |
| 52 | +>program : ts.Program, Symbol(program,Decl(APISample_compile.ts,14,7)) |
| 53 | +>concat : { <U extends ts.Diagnostic[]>(...items: U[]): ts.Diagnostic[]; (...items: ts.Diagnostic[]): ts.Diagnostic[]; }, Symbol(Array.concat,Decl(lib.d.ts,1025,13),Decl(lib.d.ts,1030,46)) |
| 54 | +>emitResult.diagnostics : ts.Diagnostic[], Symbol(ts.EmitResult.diagnostics,Decl(typescript.d.ts,820,29)) |
| 55 | +>emitResult : ts.EmitResult, Symbol(emitResult,Decl(APISample_compile.ts,15,7)) |
| 56 | +>diagnostics : ts.Diagnostic[], Symbol(ts.EmitResult.diagnostics,Decl(typescript.d.ts,820,29)) |
57 | 57 |
|
58 | 58 | allDiagnostics.forEach(diagnostic => { |
59 | 59 | >allDiagnostics.forEach(diagnostic => { var { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start); var message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n'); console.log(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`); }) : void |
60 | | ->allDiagnostics.forEach : (callbackfn: (value: ts.Diagnostic, index: number, array: ts.Diagnostic[]) => void, thisArg?: any) => void |
61 | | ->allDiagnostics : ts.Diagnostic[] |
62 | | ->forEach : (callbackfn: (value: ts.Diagnostic, index: number, array: ts.Diagnostic[]) => void, thisArg?: any) => void |
| 60 | +>allDiagnostics.forEach : (callbackfn: (value: ts.Diagnostic, index: number, array: ts.Diagnostic[]) => void, thisArg?: any) => void, Symbol(Array.forEach,Decl(lib.d.ts,1108,95)) |
| 61 | +>allDiagnostics : ts.Diagnostic[], Symbol(allDiagnostics,Decl(APISample_compile.ts,17,7)) |
| 62 | +>forEach : (callbackfn: (value: ts.Diagnostic, index: number, array: ts.Diagnostic[]) => void, thisArg?: any) => void, Symbol(Array.forEach,Decl(lib.d.ts,1108,95)) |
63 | 63 | >diagnostic => { var { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start); var message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n'); console.log(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`); } : (diagnostic: ts.Diagnostic) => void |
64 | | ->diagnostic : ts.Diagnostic |
| 64 | +>diagnostic : ts.Diagnostic, Symbol(diagnostic,Decl(APISample_compile.ts,19,27)) |
65 | 65 |
|
66 | 66 | var { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start); |
67 | | ->line : number |
68 | | ->character : number |
| 67 | +>line : number, Symbol(line,Decl(APISample_compile.ts,20,13)) |
| 68 | +>character : number, Symbol(character,Decl(APISample_compile.ts,20,19)) |
69 | 69 | >diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start) : ts.LineAndCharacter |
70 | | ->diagnostic.file.getLineAndCharacterOfPosition : (pos: number) => ts.LineAndCharacter |
71 | | ->diagnostic.file : ts.SourceFile |
72 | | ->diagnostic : ts.Diagnostic |
73 | | ->file : ts.SourceFile |
74 | | ->getLineAndCharacterOfPosition : (pos: number) => ts.LineAndCharacter |
75 | | ->diagnostic.start : number |
76 | | ->diagnostic : ts.Diagnostic |
77 | | ->start : number |
| 70 | +>diagnostic.file.getLineAndCharacterOfPosition : (pos: number) => ts.LineAndCharacter, Symbol(ts.SourceFile.getLineAndCharacterOfPosition,Decl(typescript.d.ts,1263,46)) |
| 71 | +>diagnostic.file : ts.SourceFile, Symbol(ts.Diagnostic.file,Decl(typescript.d.ts,1062,26)) |
| 72 | +>diagnostic : ts.Diagnostic, Symbol(diagnostic,Decl(APISample_compile.ts,19,27)) |
| 73 | +>file : ts.SourceFile, Symbol(ts.Diagnostic.file,Decl(typescript.d.ts,1062,26)) |
| 74 | +>getLineAndCharacterOfPosition : (pos: number) => ts.LineAndCharacter, Symbol(ts.SourceFile.getLineAndCharacterOfPosition,Decl(typescript.d.ts,1263,46)) |
| 75 | +>diagnostic.start : number, Symbol(ts.Diagnostic.start,Decl(typescript.d.ts,1063,25)) |
| 76 | +>diagnostic : ts.Diagnostic, Symbol(diagnostic,Decl(APISample_compile.ts,19,27)) |
| 77 | +>start : number, Symbol(ts.Diagnostic.start,Decl(typescript.d.ts,1063,25)) |
78 | 78 |
|
79 | 79 | var message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n'); |
80 | | ->message : string |
| 80 | +>message : string, Symbol(message,Decl(APISample_compile.ts,21,11)) |
81 | 81 | >ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n') : string |
82 | | ->ts.flattenDiagnosticMessageText : (messageText: string | ts.DiagnosticMessageChain, newLine: string) => string |
83 | | ->ts : typeof ts |
84 | | ->flattenDiagnosticMessageText : (messageText: string | ts.DiagnosticMessageChain, newLine: string) => string |
85 | | ->diagnostic.messageText : string | ts.DiagnosticMessageChain |
86 | | ->diagnostic : ts.Diagnostic |
87 | | ->messageText : string | ts.DiagnosticMessageChain |
| 82 | +>ts.flattenDiagnosticMessageText : (messageText: string | ts.DiagnosticMessageChain, newLine: string) => string, Symbol(ts.flattenDiagnosticMessageText,Decl(typescript.d.ts,1200,67)) |
| 83 | +>ts : typeof ts, Symbol(ts,Decl(APISample_compile.ts,9,20)) |
| 84 | +>flattenDiagnosticMessageText : (messageText: string | ts.DiagnosticMessageChain, newLine: string) => string, Symbol(ts.flattenDiagnosticMessageText,Decl(typescript.d.ts,1200,67)) |
| 85 | +>diagnostic.messageText : string | ts.DiagnosticMessageChain, Symbol(ts.Diagnostic.messageText,Decl(typescript.d.ts,1065,23)) |
| 86 | +>diagnostic : ts.Diagnostic, Symbol(diagnostic,Decl(APISample_compile.ts,19,27)) |
| 87 | +>messageText : string | ts.DiagnosticMessageChain, Symbol(ts.Diagnostic.messageText,Decl(typescript.d.ts,1065,23)) |
88 | 88 | >'\n' : string |
89 | 89 |
|
90 | 90 | console.log(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`); |
91 | 91 | >console.log(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`) : any |
92 | 92 | >console.log : any |
93 | | ->console : any |
| 93 | +>console : any, Symbol(console,Decl(APISample_compile.ts,8,11)) |
94 | 94 | >log : any |
95 | 95 | >`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}` : string |
96 | | ->diagnostic.file.fileName : string |
97 | | ->diagnostic.file : ts.SourceFile |
98 | | ->diagnostic : ts.Diagnostic |
99 | | ->file : ts.SourceFile |
100 | | ->fileName : string |
| 96 | +>diagnostic.file.fileName : string, Symbol(ts.SourceFile.fileName,Decl(typescript.d.ts,743,29)) |
| 97 | +>diagnostic.file : ts.SourceFile, Symbol(ts.Diagnostic.file,Decl(typescript.d.ts,1062,26)) |
| 98 | +>diagnostic : ts.Diagnostic, Symbol(diagnostic,Decl(APISample_compile.ts,19,27)) |
| 99 | +>file : ts.SourceFile, Symbol(ts.Diagnostic.file,Decl(typescript.d.ts,1062,26)) |
| 100 | +>fileName : string, Symbol(ts.SourceFile.fileName,Decl(typescript.d.ts,743,29)) |
101 | 101 | >line + 1 : number |
102 | | ->line : number |
| 102 | +>line : number, Symbol(line,Decl(APISample_compile.ts,20,13)) |
103 | 103 | >1 : number |
104 | 104 | >character + 1 : number |
105 | | ->character : number |
| 105 | +>character : number, Symbol(character,Decl(APISample_compile.ts,20,19)) |
106 | 106 | >1 : number |
107 | | ->message : string |
| 107 | +>message : string, Symbol(message,Decl(APISample_compile.ts,21,11)) |
108 | 108 |
|
109 | 109 | }); |
110 | 110 |
|
111 | 111 | var exitCode = emitResult.emitSkipped ? 1 : 0; |
112 | | ->exitCode : number |
| 112 | +>exitCode : number, Symbol(exitCode,Decl(APISample_compile.ts,25,7)) |
113 | 113 | >emitResult.emitSkipped ? 1 : 0 : number |
114 | | ->emitResult.emitSkipped : boolean |
115 | | ->emitResult : ts.EmitResult |
116 | | ->emitSkipped : boolean |
| 114 | +>emitResult.emitSkipped : boolean, Symbol(ts.EmitResult.emitSkipped,Decl(typescript.d.ts,819,26)) |
| 115 | +>emitResult : ts.EmitResult, Symbol(emitResult,Decl(APISample_compile.ts,15,7)) |
| 116 | +>emitSkipped : boolean, Symbol(ts.EmitResult.emitSkipped,Decl(typescript.d.ts,819,26)) |
117 | 117 | >1 : number |
118 | 118 | >0 : number |
119 | 119 |
|
120 | 120 | console.log(`Process exiting with code '${exitCode}'.`); |
121 | 121 | >console.log(`Process exiting with code '${exitCode}'.`) : any |
122 | 122 | >console.log : any |
123 | | ->console : any |
| 123 | +>console : any, Symbol(console,Decl(APISample_compile.ts,8,11)) |
124 | 124 | >log : any |
125 | 125 | >`Process exiting with code '${exitCode}'.` : string |
126 | | ->exitCode : number |
| 126 | +>exitCode : number, Symbol(exitCode,Decl(APISample_compile.ts,25,7)) |
127 | 127 |
|
128 | 128 | process.exit(exitCode); |
129 | 129 | >process.exit(exitCode) : any |
130 | 130 | >process.exit : any |
131 | | ->process : any |
| 131 | +>process : any, Symbol(process,Decl(APISample_compile.ts,7,11)) |
132 | 132 | >exit : any |
133 | | ->exitCode : number |
| 133 | +>exitCode : number, Symbol(exitCode,Decl(APISample_compile.ts,25,7)) |
134 | 134 | } |
135 | 135 |
|
136 | 136 | compile(process.argv.slice(2), { |
137 | 137 | >compile(process.argv.slice(2), { noEmitOnError: true, noImplicitAny: true, target: ts.ScriptTarget.ES5, module: ts.ModuleKind.CommonJS}) : void |
138 | | ->compile : (fileNames: string[], options: ts.CompilerOptions) => void |
| 138 | +>compile : (fileNames: string[], options: ts.CompilerOptions) => void, Symbol(compile,Decl(APISample_compile.ts,11,34)) |
139 | 139 | >process.argv.slice(2) : any |
140 | 140 | >process.argv.slice : any |
141 | 141 | >process.argv : any |
142 | | ->process : any |
| 142 | +>process : any, Symbol(process,Decl(APISample_compile.ts,7,11)) |
143 | 143 | >argv : any |
144 | 144 | >slice : any |
145 | 145 | >2 : number |
146 | 146 | >{ noEmitOnError: true, noImplicitAny: true, target: ts.ScriptTarget.ES5, module: ts.ModuleKind.CommonJS} : { [x: string]: boolean | ts.ScriptTarget | ts.ModuleKind; noEmitOnError: boolean; noImplicitAny: boolean; target: ts.ScriptTarget; module: ts.ModuleKind; } |
147 | 147 |
|
148 | 148 | noEmitOnError: true, noImplicitAny: true, |
149 | | ->noEmitOnError : boolean |
| 149 | +>noEmitOnError : boolean, Symbol(noEmitOnError,Decl(APISample_compile.ts,30,32)) |
150 | 150 | >true : boolean |
151 | | ->noImplicitAny : boolean |
| 151 | +>noImplicitAny : boolean, Symbol(noImplicitAny,Decl(APISample_compile.ts,31,24)) |
152 | 152 | >true : boolean |
153 | 153 |
|
154 | 154 | target: ts.ScriptTarget.ES5, module: ts.ModuleKind.CommonJS |
155 | | ->target : ts.ScriptTarget |
156 | | ->ts.ScriptTarget.ES5 : ts.ScriptTarget |
157 | | ->ts.ScriptTarget : typeof ts.ScriptTarget |
158 | | ->ts : typeof ts |
159 | | ->ScriptTarget : typeof ts.ScriptTarget |
160 | | ->ES5 : ts.ScriptTarget |
161 | | ->module : ts.ModuleKind |
162 | | ->ts.ModuleKind.CommonJS : ts.ModuleKind |
163 | | ->ts.ModuleKind : typeof ts.ModuleKind |
164 | | ->ts : typeof ts |
165 | | ->ModuleKind : typeof ts.ModuleKind |
166 | | ->CommonJS : ts.ModuleKind |
| 155 | +>target : ts.ScriptTarget, Symbol(target,Decl(APISample_compile.ts,31,45)) |
| 156 | +>ts.ScriptTarget.ES5 : ts.ScriptTarget, Symbol(ts.ScriptTarget.ES5,Decl(typescript.d.ts,1117,16)) |
| 157 | +>ts.ScriptTarget : typeof ts.ScriptTarget, Symbol(ts.ScriptTarget,Decl(typescript.d.ts,1115,5)) |
| 158 | +>ts : typeof ts, Symbol(ts,Decl(APISample_compile.ts,9,20)) |
| 159 | +>ScriptTarget : typeof ts.ScriptTarget, Symbol(ts.ScriptTarget,Decl(typescript.d.ts,1115,5)) |
| 160 | +>ES5 : ts.ScriptTarget, Symbol(ts.ScriptTarget.ES5,Decl(typescript.d.ts,1117,16)) |
| 161 | +>module : ts.ModuleKind, Symbol(module,Decl(APISample_compile.ts,32,32)) |
| 162 | +>ts.ModuleKind.CommonJS : ts.ModuleKind, Symbol(ts.ModuleKind.CommonJS,Decl(typescript.d.ts,1108,17)) |
| 163 | +>ts.ModuleKind : typeof ts.ModuleKind, Symbol(ts.ModuleKind,Decl(typescript.d.ts,1106,5)) |
| 164 | +>ts : typeof ts, Symbol(ts,Decl(APISample_compile.ts,9,20)) |
| 165 | +>ModuleKind : typeof ts.ModuleKind, Symbol(ts.ModuleKind,Decl(typescript.d.ts,1106,5)) |
| 166 | +>CommonJS : ts.ModuleKind, Symbol(ts.ModuleKind.CommonJS,Decl(typescript.d.ts,1108,17)) |
167 | 167 |
|
168 | 168 | }); |
0 commit comments