From a2e888de13b6c99e950dd5d47d4de1d69279ce25 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Tue, 14 Apr 2015 22:20:08 -0700 Subject: [PATCH] Accept baselines --- .../reference/APISample_compile.types | 32 ++++----- .../reference/APISample_linter.types | 30 ++++---- .../reference/APISample_transform.types | 12 ++-- .../reference/APISample_watcher.types | 70 +++++++++---------- 4 files changed, 72 insertions(+), 72 deletions(-) diff --git a/tests/baselines/reference/APISample_compile.types b/tests/baselines/reference/APISample_compile.types index d147ded3f0e..fef97ec9211 100644 --- a/tests/baselines/reference/APISample_compile.types +++ b/tests/baselines/reference/APISample_compile.types @@ -28,9 +28,9 @@ export function compile(fileNames: string[], options: ts.CompilerOptions): void var program = ts.createProgram(fileNames, options); >program : ts.Program, Symbol(program, Decl(APISample_compile.ts, 14, 7)) >ts.createProgram(fileNames, options) : ts.Program ->ts.createProgram : (rootNames: string[], options: ts.CompilerOptions, host?: ts.CompilerHost) => ts.Program, Symbol(ts.createProgram, Decl(typescript.d.ts, 1201, 113)) +>ts.createProgram : (rootNames: string[], options: ts.CompilerOptions, host?: ts.CompilerHost) => ts.Program, Symbol(ts.createProgram, Decl(typescript.d.ts, 1202, 113)) >ts : typeof ts, Symbol(ts, Decl(APISample_compile.ts, 9, 20)) ->createProgram : (rootNames: string[], options: ts.CompilerOptions, host?: ts.CompilerHost) => ts.Program, Symbol(ts.createProgram, Decl(typescript.d.ts, 1201, 113)) +>createProgram : (rootNames: string[], options: ts.CompilerOptions, host?: ts.CompilerHost) => ts.Program, Symbol(ts.createProgram, Decl(typescript.d.ts, 1202, 113)) >fileNames : string[], Symbol(fileNames, Decl(APISample_compile.ts, 13, 24)) >options : ts.CompilerOptions, Symbol(options, Decl(APISample_compile.ts, 13, 44)) @@ -46,9 +46,9 @@ export function compile(fileNames: string[], options: ts.CompilerOptions): void >ts.getPreEmitDiagnostics(program).concat(emitResult.diagnostics) : ts.Diagnostic[] >ts.getPreEmitDiagnostics(program).concat : { (...items: U[]): ts.Diagnostic[]; (...items: ts.Diagnostic[]): ts.Diagnostic[]; }, Symbol(Array.concat, Decl(lib.d.ts, 1025, 13), Decl(lib.d.ts, 1030, 46)) >ts.getPreEmitDiagnostics(program) : ts.Diagnostic[] ->ts.getPreEmitDiagnostics : (program: ts.Program) => ts.Diagnostic[], Symbol(ts.getPreEmitDiagnostics, Decl(typescript.d.ts, 1199, 98)) +>ts.getPreEmitDiagnostics : (program: ts.Program) => ts.Diagnostic[], Symbol(ts.getPreEmitDiagnostics, Decl(typescript.d.ts, 1200, 98)) >ts : typeof ts, Symbol(ts, Decl(APISample_compile.ts, 9, 20)) ->getPreEmitDiagnostics : (program: ts.Program) => ts.Diagnostic[], Symbol(ts.getPreEmitDiagnostics, Decl(typescript.d.ts, 1199, 98)) +>getPreEmitDiagnostics : (program: ts.Program) => ts.Diagnostic[], Symbol(ts.getPreEmitDiagnostics, Decl(typescript.d.ts, 1200, 98)) >program : ts.Program, Symbol(program, Decl(APISample_compile.ts, 14, 7)) >concat : { (...items: U[]): ts.Diagnostic[]; (...items: ts.Diagnostic[]): ts.Diagnostic[]; }, Symbol(Array.concat, Decl(lib.d.ts, 1025, 13), Decl(lib.d.ts, 1030, 46)) >emitResult.diagnostics : ts.Diagnostic[], Symbol(ts.EmitResult.diagnostics, Decl(typescript.d.ts, 820, 29)) @@ -67,11 +67,11 @@ export function compile(fileNames: string[], options: ts.CompilerOptions): void >line : number, Symbol(line, Decl(APISample_compile.ts, 20, 13)) >character : number, Symbol(character, Decl(APISample_compile.ts, 20, 19)) >diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start) : ts.LineAndCharacter ->diagnostic.file.getLineAndCharacterOfPosition : (pos: number) => ts.LineAndCharacter, Symbol(ts.SourceFile.getLineAndCharacterOfPosition, Decl(typescript.d.ts, 1263, 46)) +>diagnostic.file.getLineAndCharacterOfPosition : (pos: number) => ts.LineAndCharacter, Symbol(ts.SourceFile.getLineAndCharacterOfPosition, Decl(typescript.d.ts, 1264, 46)) >diagnostic.file : ts.SourceFile, Symbol(ts.Diagnostic.file, Decl(typescript.d.ts, 1062, 26)) >diagnostic : ts.Diagnostic, Symbol(diagnostic, Decl(APISample_compile.ts, 19, 27)) >file : ts.SourceFile, Symbol(ts.Diagnostic.file, Decl(typescript.d.ts, 1062, 26)) ->getLineAndCharacterOfPosition : (pos: number) => ts.LineAndCharacter, Symbol(ts.SourceFile.getLineAndCharacterOfPosition, Decl(typescript.d.ts, 1263, 46)) +>getLineAndCharacterOfPosition : (pos: number) => ts.LineAndCharacter, Symbol(ts.SourceFile.getLineAndCharacterOfPosition, Decl(typescript.d.ts, 1264, 46)) >diagnostic.start : number, Symbol(ts.Diagnostic.start, Decl(typescript.d.ts, 1063, 25)) >diagnostic : ts.Diagnostic, Symbol(diagnostic, Decl(APISample_compile.ts, 19, 27)) >start : number, Symbol(ts.Diagnostic.start, Decl(typescript.d.ts, 1063, 25)) @@ -79,9 +79,9 @@ export function compile(fileNames: string[], options: ts.CompilerOptions): void var message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n'); >message : string, Symbol(message, Decl(APISample_compile.ts, 21, 11)) >ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n') : string ->ts.flattenDiagnosticMessageText : (messageText: string | ts.DiagnosticMessageChain, newLine: string) => string, Symbol(ts.flattenDiagnosticMessageText, Decl(typescript.d.ts, 1200, 67)) +>ts.flattenDiagnosticMessageText : (messageText: string | ts.DiagnosticMessageChain, newLine: string) => string, Symbol(ts.flattenDiagnosticMessageText, Decl(typescript.d.ts, 1201, 67)) >ts : typeof ts, Symbol(ts, Decl(APISample_compile.ts, 9, 20)) ->flattenDiagnosticMessageText : (messageText: string | ts.DiagnosticMessageChain, newLine: string) => string, Symbol(ts.flattenDiagnosticMessageText, Decl(typescript.d.ts, 1200, 67)) +>flattenDiagnosticMessageText : (messageText: string | ts.DiagnosticMessageChain, newLine: string) => string, Symbol(ts.flattenDiagnosticMessageText, Decl(typescript.d.ts, 1201, 67)) >diagnostic.messageText : string | ts.DiagnosticMessageChain, Symbol(ts.Diagnostic.messageText, Decl(typescript.d.ts, 1065, 23)) >diagnostic : ts.Diagnostic, Symbol(diagnostic, Decl(APISample_compile.ts, 19, 27)) >messageText : string | ts.DiagnosticMessageChain, Symbol(ts.Diagnostic.messageText, Decl(typescript.d.ts, 1065, 23)) @@ -153,16 +153,16 @@ compile(process.argv.slice(2), { target: ts.ScriptTarget.ES5, module: ts.ModuleKind.CommonJS >target : ts.ScriptTarget, Symbol(target, Decl(APISample_compile.ts, 31, 45)) ->ts.ScriptTarget.ES5 : ts.ScriptTarget, Symbol(ts.ScriptTarget.ES5, Decl(typescript.d.ts, 1117, 16)) ->ts.ScriptTarget : typeof ts.ScriptTarget, Symbol(ts.ScriptTarget, Decl(typescript.d.ts, 1115, 5)) +>ts.ScriptTarget.ES5 : ts.ScriptTarget, Symbol(ts.ScriptTarget.ES5, Decl(typescript.d.ts, 1118, 16)) +>ts.ScriptTarget : typeof ts.ScriptTarget, Symbol(ts.ScriptTarget, Decl(typescript.d.ts, 1116, 5)) >ts : typeof ts, Symbol(ts, Decl(APISample_compile.ts, 9, 20)) ->ScriptTarget : typeof ts.ScriptTarget, Symbol(ts.ScriptTarget, Decl(typescript.d.ts, 1115, 5)) ->ES5 : ts.ScriptTarget, Symbol(ts.ScriptTarget.ES5, Decl(typescript.d.ts, 1117, 16)) +>ScriptTarget : typeof ts.ScriptTarget, Symbol(ts.ScriptTarget, Decl(typescript.d.ts, 1116, 5)) +>ES5 : ts.ScriptTarget, Symbol(ts.ScriptTarget.ES5, Decl(typescript.d.ts, 1118, 16)) >module : ts.ModuleKind, Symbol(module, Decl(APISample_compile.ts, 32, 32)) ->ts.ModuleKind.CommonJS : ts.ModuleKind, Symbol(ts.ModuleKind.CommonJS, Decl(typescript.d.ts, 1108, 17)) ->ts.ModuleKind : typeof ts.ModuleKind, Symbol(ts.ModuleKind, Decl(typescript.d.ts, 1106, 5)) +>ts.ModuleKind.CommonJS : ts.ModuleKind, Symbol(ts.ModuleKind.CommonJS, Decl(typescript.d.ts, 1109, 17)) +>ts.ModuleKind : typeof ts.ModuleKind, Symbol(ts.ModuleKind, Decl(typescript.d.ts, 1107, 5)) >ts : typeof ts, Symbol(ts, Decl(APISample_compile.ts, 9, 20)) ->ModuleKind : typeof ts.ModuleKind, Symbol(ts.ModuleKind, Decl(typescript.d.ts, 1106, 5)) ->CommonJS : ts.ModuleKind, Symbol(ts.ModuleKind.CommonJS, Decl(typescript.d.ts, 1108, 17)) +>ModuleKind : typeof ts.ModuleKind, Symbol(ts.ModuleKind, Decl(typescript.d.ts, 1107, 5)) +>CommonJS : ts.ModuleKind, Symbol(ts.ModuleKind.CommonJS, Decl(typescript.d.ts, 1109, 17)) }); diff --git a/tests/baselines/reference/APISample_linter.types b/tests/baselines/reference/APISample_linter.types index c285bc15390..d9628c0fb0e 100644 --- a/tests/baselines/reference/APISample_linter.types +++ b/tests/baselines/reference/APISample_linter.types @@ -22,7 +22,7 @@ export function delint(sourceFile: ts.SourceFile) { >delint : (sourceFile: ts.SourceFile) => void, Symbol(delint, Decl(APISample_linter.ts, 11, 33)) >sourceFile : ts.SourceFile, Symbol(sourceFile, Decl(APISample_linter.ts, 13, 23)) >ts : any, Symbol(ts, Decl(APISample_linter.ts, 11, 6)) ->SourceFile : ts.SourceFile, Symbol(ts.SourceFile, Decl(typescript.d.ts, 740, 5), Decl(typescript.d.ts, 1261, 5)) +>SourceFile : ts.SourceFile, Symbol(ts.SourceFile, Decl(typescript.d.ts, 740, 5), Decl(typescript.d.ts, 1262, 5)) delintNode(sourceFile); >delintNode(sourceFile) : void @@ -33,7 +33,7 @@ export function delint(sourceFile: ts.SourceFile) { >delintNode : (node: ts.Node) => void, Symbol(delintNode, Decl(APISample_linter.ts, 14, 27)) >node : ts.Node, Symbol(node, Decl(APISample_linter.ts, 16, 24)) >ts : any, Symbol(ts, Decl(APISample_linter.ts, 11, 6)) ->Node : ts.Node, Symbol(ts.Node, Decl(typescript.d.ts, 296, 5), Decl(typescript.d.ts, 1221, 32)) +>Node : ts.Node, Symbol(ts.Node, Decl(typescript.d.ts, 296, 5), Decl(typescript.d.ts, 1222, 32)) switch (node.kind) { >node.kind : ts.SyntaxKind, Symbol(ts.Node.kind, Decl(typescript.d.ts, 297, 38)) @@ -219,9 +219,9 @@ export function delint(sourceFile: ts.SourceFile) { ts.forEachChild(node, delintNode); >ts.forEachChild(node, delintNode) : void ->ts.forEachChild : (node: ts.Node, cbNode: (node: ts.Node) => T, cbNodeArray?: (nodes: ts.Node[]) => T) => T, Symbol(ts.forEachChild, Decl(typescript.d.ts, 1186, 48)) +>ts.forEachChild : (node: ts.Node, cbNode: (node: ts.Node) => T, cbNodeArray?: (nodes: ts.Node[]) => T) => T, Symbol(ts.forEachChild, Decl(typescript.d.ts, 1187, 48)) >ts : typeof ts, Symbol(ts, Decl(APISample_linter.ts, 11, 6)) ->forEachChild : (node: ts.Node, cbNode: (node: ts.Node) => T, cbNodeArray?: (nodes: ts.Node[]) => T) => T, Symbol(ts.forEachChild, Decl(typescript.d.ts, 1186, 48)) +>forEachChild : (node: ts.Node, cbNode: (node: ts.Node) => T, cbNodeArray?: (nodes: ts.Node[]) => T) => T, Symbol(ts.forEachChild, Decl(typescript.d.ts, 1187, 48)) >node : ts.Node, Symbol(node, Decl(APISample_linter.ts, 16, 24)) >delintNode : (node: ts.Node) => void, Symbol(delintNode, Decl(APISample_linter.ts, 14, 27)) } @@ -230,20 +230,20 @@ export function delint(sourceFile: ts.SourceFile) { >report : (node: ts.Node, message: string) => void, Symbol(report, Decl(APISample_linter.ts, 48, 5)) >node : ts.Node, Symbol(node, Decl(APISample_linter.ts, 50, 20)) >ts : any, Symbol(ts, Decl(APISample_linter.ts, 11, 6)) ->Node : ts.Node, Symbol(ts.Node, Decl(typescript.d.ts, 296, 5), Decl(typescript.d.ts, 1221, 32)) +>Node : ts.Node, Symbol(ts.Node, Decl(typescript.d.ts, 296, 5), Decl(typescript.d.ts, 1222, 32)) >message : string, Symbol(message, Decl(APISample_linter.ts, 50, 34)) let { line, character } = sourceFile.getLineAndCharacterOfPosition(node.getStart()); >line : number, Symbol(line, Decl(APISample_linter.ts, 51, 13)) >character : number, Symbol(character, Decl(APISample_linter.ts, 51, 19)) >sourceFile.getLineAndCharacterOfPosition(node.getStart()) : ts.LineAndCharacter ->sourceFile.getLineAndCharacterOfPosition : (pos: number) => ts.LineAndCharacter, Symbol(ts.SourceFile.getLineAndCharacterOfPosition, Decl(typescript.d.ts, 1263, 46)) +>sourceFile.getLineAndCharacterOfPosition : (pos: number) => ts.LineAndCharacter, Symbol(ts.SourceFile.getLineAndCharacterOfPosition, Decl(typescript.d.ts, 1264, 46)) >sourceFile : ts.SourceFile, Symbol(sourceFile, Decl(APISample_linter.ts, 13, 23)) ->getLineAndCharacterOfPosition : (pos: number) => ts.LineAndCharacter, Symbol(ts.SourceFile.getLineAndCharacterOfPosition, Decl(typescript.d.ts, 1263, 46)) +>getLineAndCharacterOfPosition : (pos: number) => ts.LineAndCharacter, Symbol(ts.SourceFile.getLineAndCharacterOfPosition, Decl(typescript.d.ts, 1264, 46)) >node.getStart() : number ->node.getStart : (sourceFile?: ts.SourceFile) => number, Symbol(ts.Node.getStart, Decl(typescript.d.ts, 1226, 53)) +>node.getStart : (sourceFile?: ts.SourceFile) => number, Symbol(ts.Node.getStart, Decl(typescript.d.ts, 1227, 53)) >node : ts.Node, Symbol(node, Decl(APISample_linter.ts, 50, 20)) ->getStart : (sourceFile?: ts.SourceFile) => number, Symbol(ts.Node.getStart, Decl(typescript.d.ts, 1226, 53)) +>getStart : (sourceFile?: ts.SourceFile) => number, Symbol(ts.Node.getStart, Decl(typescript.d.ts, 1227, 53)) console.log(`${sourceFile.fileName} (${line + 1},${character + 1}): ${message}`); >console.log(`${sourceFile.fileName} (${line + 1},${character + 1}): ${message}`) : any @@ -286,9 +286,9 @@ fileNames.forEach(fileName => { let sourceFile = ts.createSourceFile(fileName, readFileSync(fileName).toString(), ts.ScriptTarget.ES6, /*setParentNodes */ true); >sourceFile : ts.SourceFile, Symbol(sourceFile, Decl(APISample_linter.ts, 59, 7)) >ts.createSourceFile(fileName, readFileSync(fileName).toString(), ts.ScriptTarget.ES6, /*setParentNodes */ true) : ts.SourceFile ->ts.createSourceFile : (fileName: string, sourceText: string, languageVersion: ts.ScriptTarget, setParentNodes?: boolean) => ts.SourceFile, Symbol(ts.createSourceFile, Decl(typescript.d.ts, 1190, 62)) +>ts.createSourceFile : (fileName: string, sourceText: string, languageVersion: ts.ScriptTarget, setParentNodes?: boolean) => ts.SourceFile, Symbol(ts.createSourceFile, Decl(typescript.d.ts, 1191, 62)) >ts : typeof ts, Symbol(ts, Decl(APISample_linter.ts, 11, 6)) ->createSourceFile : (fileName: string, sourceText: string, languageVersion: ts.ScriptTarget, setParentNodes?: boolean) => ts.SourceFile, Symbol(ts.createSourceFile, Decl(typescript.d.ts, 1190, 62)) +>createSourceFile : (fileName: string, sourceText: string, languageVersion: ts.ScriptTarget, setParentNodes?: boolean) => ts.SourceFile, Symbol(ts.createSourceFile, Decl(typescript.d.ts, 1191, 62)) >fileName : any, Symbol(fileName, Decl(APISample_linter.ts, 57, 18)) >readFileSync(fileName).toString() : any >readFileSync(fileName).toString : any @@ -296,11 +296,11 @@ fileNames.forEach(fileName => { >readFileSync : any, Symbol(readFileSync, Decl(APISample_linter.ts, 9, 11)) >fileName : any, Symbol(fileName, Decl(APISample_linter.ts, 57, 18)) >toString : any ->ts.ScriptTarget.ES6 : ts.ScriptTarget, Symbol(ts.ScriptTarget.ES6, Decl(typescript.d.ts, 1118, 16)) ->ts.ScriptTarget : typeof ts.ScriptTarget, Symbol(ts.ScriptTarget, Decl(typescript.d.ts, 1115, 5)) +>ts.ScriptTarget.ES6 : ts.ScriptTarget, Symbol(ts.ScriptTarget.ES6, Decl(typescript.d.ts, 1119, 16)) +>ts.ScriptTarget : typeof ts.ScriptTarget, Symbol(ts.ScriptTarget, Decl(typescript.d.ts, 1116, 5)) >ts : typeof ts, Symbol(ts, Decl(APISample_linter.ts, 11, 6)) ->ScriptTarget : typeof ts.ScriptTarget, Symbol(ts.ScriptTarget, Decl(typescript.d.ts, 1115, 5)) ->ES6 : ts.ScriptTarget, Symbol(ts.ScriptTarget.ES6, Decl(typescript.d.ts, 1118, 16)) +>ScriptTarget : typeof ts.ScriptTarget, Symbol(ts.ScriptTarget, Decl(typescript.d.ts, 1116, 5)) +>ES6 : ts.ScriptTarget, Symbol(ts.ScriptTarget.ES6, Decl(typescript.d.ts, 1119, 16)) >true : boolean // delint it diff --git a/tests/baselines/reference/APISample_transform.types b/tests/baselines/reference/APISample_transform.types index 6e27f70d877..4bd9052bffb 100644 --- a/tests/baselines/reference/APISample_transform.types +++ b/tests/baselines/reference/APISample_transform.types @@ -19,17 +19,17 @@ const source = "let x: string = 'string'"; let result = ts.transpile(source, { module: ts.ModuleKind.CommonJS }); >result : string, Symbol(result, Decl(APISample_transform.ts, 13, 3)) >ts.transpile(source, { module: ts.ModuleKind.CommonJS }) : string ->ts.transpile : (input: string, compilerOptions?: ts.CompilerOptions, fileName?: string, diagnostics?: ts.Diagnostic[]) => string, Symbol(ts.transpile, Decl(typescript.d.ts, 1729, 5)) +>ts.transpile : (input: string, compilerOptions?: ts.CompilerOptions, fileName?: string, diagnostics?: ts.Diagnostic[]) => string, Symbol(ts.transpile, Decl(typescript.d.ts, 1730, 5)) >ts : typeof ts, Symbol(ts, Decl(APISample_transform.ts, 9, 6)) ->transpile : (input: string, compilerOptions?: ts.CompilerOptions, fileName?: string, diagnostics?: ts.Diagnostic[]) => string, Symbol(ts.transpile, Decl(typescript.d.ts, 1729, 5)) +>transpile : (input: string, compilerOptions?: ts.CompilerOptions, fileName?: string, diagnostics?: ts.Diagnostic[]) => string, Symbol(ts.transpile, Decl(typescript.d.ts, 1730, 5)) >source : string, Symbol(source, Decl(APISample_transform.ts, 11, 5)) >{ module: ts.ModuleKind.CommonJS } : { [x: string]: ts.ModuleKind; module: ts.ModuleKind; } >module : ts.ModuleKind, Symbol(module, Decl(APISample_transform.ts, 13, 35)) ->ts.ModuleKind.CommonJS : ts.ModuleKind, Symbol(ts.ModuleKind.CommonJS, Decl(typescript.d.ts, 1108, 17)) ->ts.ModuleKind : typeof ts.ModuleKind, Symbol(ts.ModuleKind, Decl(typescript.d.ts, 1106, 5)) +>ts.ModuleKind.CommonJS : ts.ModuleKind, Symbol(ts.ModuleKind.CommonJS, Decl(typescript.d.ts, 1109, 17)) +>ts.ModuleKind : typeof ts.ModuleKind, Symbol(ts.ModuleKind, Decl(typescript.d.ts, 1107, 5)) >ts : typeof ts, Symbol(ts, Decl(APISample_transform.ts, 9, 6)) ->ModuleKind : typeof ts.ModuleKind, Symbol(ts.ModuleKind, Decl(typescript.d.ts, 1106, 5)) ->CommonJS : ts.ModuleKind, Symbol(ts.ModuleKind.CommonJS, Decl(typescript.d.ts, 1108, 17)) +>ModuleKind : typeof ts.ModuleKind, Symbol(ts.ModuleKind, Decl(typescript.d.ts, 1107, 5)) +>CommonJS : ts.ModuleKind, Symbol(ts.ModuleKind.CommonJS, Decl(typescript.d.ts, 1109, 17)) console.log(JSON.stringify(result)); >console.log(JSON.stringify(result)) : any diff --git a/tests/baselines/reference/APISample_watcher.types b/tests/baselines/reference/APISample_watcher.types index abc915e3776..a1902c98e48 100644 --- a/tests/baselines/reference/APISample_watcher.types +++ b/tests/baselines/reference/APISample_watcher.types @@ -59,7 +59,7 @@ function watch(rootFileNames: string[], options: ts.CompilerOptions) { const servicesHost: ts.LanguageServiceHost = { >servicesHost : ts.LanguageServiceHost, Symbol(servicesHost, Decl(APISample_watcher.ts, 23, 9)) >ts : any, Symbol(ts, Decl(APISample_watcher.ts, 12, 6)) ->LanguageServiceHost : ts.LanguageServiceHost, Symbol(ts.LanguageServiceHost, Decl(typescript.d.ts, 1295, 5)) +>LanguageServiceHost : ts.LanguageServiceHost, Symbol(ts.LanguageServiceHost, Decl(typescript.d.ts, 1296, 5)) >{ getScriptFileNames: () => rootFileNames, getScriptVersion: (fileName) => files[fileName] && files[fileName].version.toString(), getScriptSnapshot: (fileName) => { if (!fs.existsSync(fileName)) { return undefined; } return ts.ScriptSnapshot.fromString(fs.readFileSync(fileName).toString()); }, getCurrentDirectory: () => process.cwd(), getCompilationSettings: () => options, getDefaultLibFileName: (options) => ts.getDefaultLibFilePath(options), } : { getScriptFileNames: () => string[]; getScriptVersion: (fileName: string) => string; getScriptSnapshot: (fileName: string) => ts.IScriptSnapshot; getCurrentDirectory: () => any; getCompilationSettings: () => ts.CompilerOptions; getDefaultLibFileName: (options: ts.CompilerOptions) => string; } getScriptFileNames: () => rootFileNames, @@ -103,11 +103,11 @@ function watch(rootFileNames: string[], options: ts.CompilerOptions) { return ts.ScriptSnapshot.fromString(fs.readFileSync(fileName).toString()); >ts.ScriptSnapshot.fromString(fs.readFileSync(fileName).toString()) : ts.IScriptSnapshot ->ts.ScriptSnapshot.fromString : (text: string) => ts.IScriptSnapshot, Symbol(ts.ScriptSnapshot.fromString, Decl(typescript.d.ts, 1288, 27)) ->ts.ScriptSnapshot : typeof ts.ScriptSnapshot, Symbol(ts.ScriptSnapshot, Decl(typescript.d.ts, 1287, 5)) +>ts.ScriptSnapshot.fromString : (text: string) => ts.IScriptSnapshot, Symbol(ts.ScriptSnapshot.fromString, Decl(typescript.d.ts, 1289, 27)) +>ts.ScriptSnapshot : typeof ts.ScriptSnapshot, Symbol(ts.ScriptSnapshot, Decl(typescript.d.ts, 1288, 5)) >ts : typeof ts, Symbol(ts, Decl(APISample_watcher.ts, 12, 6)) ->ScriptSnapshot : typeof ts.ScriptSnapshot, Symbol(ts.ScriptSnapshot, Decl(typescript.d.ts, 1287, 5)) ->fromString : (text: string) => ts.IScriptSnapshot, Symbol(ts.ScriptSnapshot.fromString, Decl(typescript.d.ts, 1288, 27)) +>ScriptSnapshot : typeof ts.ScriptSnapshot, Symbol(ts.ScriptSnapshot, Decl(typescript.d.ts, 1288, 5)) +>fromString : (text: string) => ts.IScriptSnapshot, Symbol(ts.ScriptSnapshot.fromString, Decl(typescript.d.ts, 1289, 27)) >fs.readFileSync(fileName).toString() : any >fs.readFileSync(fileName).toString : any >fs.readFileSync(fileName) : any @@ -136,9 +136,9 @@ function watch(rootFileNames: string[], options: ts.CompilerOptions) { >(options) => ts.getDefaultLibFilePath(options) : (options: ts.CompilerOptions) => string >options : ts.CompilerOptions, Symbol(options, Decl(APISample_watcher.ts, 35, 32)) >ts.getDefaultLibFilePath(options) : string ->ts.getDefaultLibFilePath : (options: ts.CompilerOptions) => string, Symbol(ts.getDefaultLibFilePath, Decl(typescript.d.ts, 1737, 44)) +>ts.getDefaultLibFilePath : (options: ts.CompilerOptions) => string, Symbol(ts.getDefaultLibFilePath, Decl(typescript.d.ts, 1738, 44)) >ts : typeof ts, Symbol(ts, Decl(APISample_watcher.ts, 12, 6)) ->getDefaultLibFilePath : (options: ts.CompilerOptions) => string, Symbol(ts.getDefaultLibFilePath, Decl(typescript.d.ts, 1737, 44)) +>getDefaultLibFilePath : (options: ts.CompilerOptions) => string, Symbol(ts.getDefaultLibFilePath, Decl(typescript.d.ts, 1738, 44)) >options : ts.CompilerOptions, Symbol(options, Decl(APISample_watcher.ts, 35, 32)) }; @@ -147,14 +147,14 @@ function watch(rootFileNames: string[], options: ts.CompilerOptions) { const services = ts.createLanguageService(servicesHost, ts.createDocumentRegistry()) >services : ts.LanguageService, Symbol(services, Decl(APISample_watcher.ts, 39, 9)) >ts.createLanguageService(servicesHost, ts.createDocumentRegistry()) : ts.LanguageService ->ts.createLanguageService : (host: ts.LanguageServiceHost, documentRegistry?: ts.DocumentRegistry) => ts.LanguageService, Symbol(ts.createLanguageService, Decl(typescript.d.ts, 1735, 97)) +>ts.createLanguageService : (host: ts.LanguageServiceHost, documentRegistry?: ts.DocumentRegistry) => ts.LanguageService, Symbol(ts.createLanguageService, Decl(typescript.d.ts, 1736, 97)) >ts : typeof ts, Symbol(ts, Decl(APISample_watcher.ts, 12, 6)) ->createLanguageService : (host: ts.LanguageServiceHost, documentRegistry?: ts.DocumentRegistry) => ts.LanguageService, Symbol(ts.createLanguageService, Decl(typescript.d.ts, 1735, 97)) +>createLanguageService : (host: ts.LanguageServiceHost, documentRegistry?: ts.DocumentRegistry) => ts.LanguageService, Symbol(ts.createLanguageService, Decl(typescript.d.ts, 1736, 97)) >servicesHost : ts.LanguageServiceHost, Symbol(servicesHost, Decl(APISample_watcher.ts, 23, 9)) >ts.createDocumentRegistry() : ts.DocumentRegistry ->ts.createDocumentRegistry : () => ts.DocumentRegistry, Symbol(ts.createDocumentRegistry, Decl(typescript.d.ts, 1733, 193)) +>ts.createDocumentRegistry : () => ts.DocumentRegistry, Symbol(ts.createDocumentRegistry, Decl(typescript.d.ts, 1734, 193)) >ts : typeof ts, Symbol(ts, Decl(APISample_watcher.ts, 12, 6)) ->createDocumentRegistry : () => ts.DocumentRegistry, Symbol(ts.createDocumentRegistry, Decl(typescript.d.ts, 1733, 193)) +>createDocumentRegistry : () => ts.DocumentRegistry, Symbol(ts.createDocumentRegistry, Decl(typescript.d.ts, 1734, 193)) // Now let's watch the files rootFileNames.forEach(fileName => { @@ -231,16 +231,16 @@ function watch(rootFileNames: string[], options: ts.CompilerOptions) { let output = services.getEmitOutput(fileName); >output : ts.EmitOutput, Symbol(output, Decl(APISample_watcher.ts, 64, 11)) >services.getEmitOutput(fileName) : ts.EmitOutput ->services.getEmitOutput : (fileName: string) => ts.EmitOutput, Symbol(ts.LanguageService.getEmitOutput, Decl(typescript.d.ts, 1339, 132)) +>services.getEmitOutput : (fileName: string) => ts.EmitOutput, Symbol(ts.LanguageService.getEmitOutput, Decl(typescript.d.ts, 1340, 132)) >services : ts.LanguageService, Symbol(services, Decl(APISample_watcher.ts, 39, 9)) ->getEmitOutput : (fileName: string) => ts.EmitOutput, Symbol(ts.LanguageService.getEmitOutput, Decl(typescript.d.ts, 1339, 132)) +>getEmitOutput : (fileName: string) => ts.EmitOutput, Symbol(ts.LanguageService.getEmitOutput, Decl(typescript.d.ts, 1340, 132)) >fileName : string, Symbol(fileName, Decl(APISample_watcher.ts, 63, 22)) if (!output.emitSkipped) { >!output.emitSkipped : boolean ->output.emitSkipped : boolean, Symbol(ts.EmitOutput.emitSkipped, Decl(typescript.d.ts, 1542, 34)) +>output.emitSkipped : boolean, Symbol(ts.EmitOutput.emitSkipped, Decl(typescript.d.ts, 1543, 34)) >output : ts.EmitOutput, Symbol(output, Decl(APISample_watcher.ts, 64, 11)) ->emitSkipped : boolean, Symbol(ts.EmitOutput.emitSkipped, Decl(typescript.d.ts, 1542, 34)) +>emitSkipped : boolean, Symbol(ts.EmitOutput.emitSkipped, Decl(typescript.d.ts, 1543, 34)) console.log(`Emitting ${fileName}`); >console.log(`Emitting ${fileName}`) : any @@ -268,9 +268,9 @@ function watch(rootFileNames: string[], options: ts.CompilerOptions) { output.outputFiles.forEach(o => { >output.outputFiles.forEach(o => { fs.writeFileSync(o.name, o.text, "utf8"); }) : void >output.outputFiles.forEach : (callbackfn: (value: ts.OutputFile, index: number, array: ts.OutputFile[]) => void, thisArg?: any) => void, Symbol(Array.forEach, Decl(lib.d.ts, 1108, 95)) ->output.outputFiles : ts.OutputFile[], Symbol(ts.EmitOutput.outputFiles, Decl(typescript.d.ts, 1541, 26)) +>output.outputFiles : ts.OutputFile[], Symbol(ts.EmitOutput.outputFiles, Decl(typescript.d.ts, 1542, 26)) >output : ts.EmitOutput, Symbol(output, Decl(APISample_watcher.ts, 64, 11)) ->outputFiles : ts.OutputFile[], Symbol(ts.EmitOutput.outputFiles, Decl(typescript.d.ts, 1541, 26)) +>outputFiles : ts.OutputFile[], Symbol(ts.EmitOutput.outputFiles, Decl(typescript.d.ts, 1542, 26)) >forEach : (callbackfn: (value: ts.OutputFile, index: number, array: ts.OutputFile[]) => void, thisArg?: any) => void, Symbol(Array.forEach, Decl(lib.d.ts, 1108, 95)) >o => { fs.writeFileSync(o.name, o.text, "utf8"); } : (o: ts.OutputFile) => void >o : ts.OutputFile, Symbol(o, Decl(APISample_watcher.ts, 74, 35)) @@ -280,12 +280,12 @@ function watch(rootFileNames: string[], options: ts.CompilerOptions) { >fs.writeFileSync : any >fs : any, Symbol(fs, Decl(APISample_watcher.ts, 9, 11)) >writeFileSync : any ->o.name : string, Symbol(ts.OutputFile.name, Decl(typescript.d.ts, 1550, 26)) +>o.name : string, Symbol(ts.OutputFile.name, Decl(typescript.d.ts, 1551, 26)) >o : ts.OutputFile, Symbol(o, Decl(APISample_watcher.ts, 74, 35)) ->name : string, Symbol(ts.OutputFile.name, Decl(typescript.d.ts, 1550, 26)) ->o.text : string, Symbol(ts.OutputFile.text, Decl(typescript.d.ts, 1552, 36)) +>name : string, Symbol(ts.OutputFile.name, Decl(typescript.d.ts, 1551, 26)) +>o.text : string, Symbol(ts.OutputFile.text, Decl(typescript.d.ts, 1553, 36)) >o : ts.OutputFile, Symbol(o, Decl(APISample_watcher.ts, 74, 35)) ->text : string, Symbol(ts.OutputFile.text, Decl(typescript.d.ts, 1552, 36)) +>text : string, Symbol(ts.OutputFile.text, Decl(typescript.d.ts, 1553, 36)) >"utf8" : string }); @@ -302,24 +302,24 @@ function watch(rootFileNames: string[], options: ts.CompilerOptions) { >services.getCompilerOptionsDiagnostics() .concat(services.getSyntacticDiagnostics(fileName)) : ts.Diagnostic[] >services.getCompilerOptionsDiagnostics() .concat : { (...items: U[]): ts.Diagnostic[]; (...items: ts.Diagnostic[]): ts.Diagnostic[]; }, Symbol(Array.concat, Decl(lib.d.ts, 1025, 13), Decl(lib.d.ts, 1030, 46)) >services.getCompilerOptionsDiagnostics() : ts.Diagnostic[] ->services.getCompilerOptionsDiagnostics : () => ts.Diagnostic[], Symbol(ts.LanguageService.getCompilerOptionsDiagnostics, Decl(typescript.d.ts, 1313, 63)) +>services.getCompilerOptionsDiagnostics : () => ts.Diagnostic[], Symbol(ts.LanguageService.getCompilerOptionsDiagnostics, Decl(typescript.d.ts, 1314, 63)) >services : ts.LanguageService, Symbol(services, Decl(APISample_watcher.ts, 39, 9)) ->getCompilerOptionsDiagnostics : () => ts.Diagnostic[], Symbol(ts.LanguageService.getCompilerOptionsDiagnostics, Decl(typescript.d.ts, 1313, 63)) +>getCompilerOptionsDiagnostics : () => ts.Diagnostic[], Symbol(ts.LanguageService.getCompilerOptionsDiagnostics, Decl(typescript.d.ts, 1314, 63)) .concat(services.getSyntacticDiagnostics(fileName)) >concat : { (...items: U[]): ts.Diagnostic[]; (...items: ts.Diagnostic[]): ts.Diagnostic[]; }, Symbol(Array.concat, Decl(lib.d.ts, 1025, 13), Decl(lib.d.ts, 1030, 46)) >services.getSyntacticDiagnostics(fileName) : ts.Diagnostic[] ->services.getSyntacticDiagnostics : (fileName: string) => ts.Diagnostic[], Symbol(ts.LanguageService.getSyntacticDiagnostics, Decl(typescript.d.ts, 1311, 37)) +>services.getSyntacticDiagnostics : (fileName: string) => ts.Diagnostic[], Symbol(ts.LanguageService.getSyntacticDiagnostics, Decl(typescript.d.ts, 1312, 37)) >services : ts.LanguageService, Symbol(services, Decl(APISample_watcher.ts, 39, 9)) ->getSyntacticDiagnostics : (fileName: string) => ts.Diagnostic[], Symbol(ts.LanguageService.getSyntacticDiagnostics, Decl(typescript.d.ts, 1311, 37)) +>getSyntacticDiagnostics : (fileName: string) => ts.Diagnostic[], Symbol(ts.LanguageService.getSyntacticDiagnostics, Decl(typescript.d.ts, 1312, 37)) >fileName : string, Symbol(fileName, Decl(APISample_watcher.ts, 79, 23)) .concat(services.getSemanticDiagnostics(fileName)); >concat : { (...items: U[]): ts.Diagnostic[]; (...items: ts.Diagnostic[]): ts.Diagnostic[]; }, Symbol(Array.concat, Decl(lib.d.ts, 1025, 13), Decl(lib.d.ts, 1030, 46)) >services.getSemanticDiagnostics(fileName) : ts.Diagnostic[] ->services.getSemanticDiagnostics : (fileName: string) => ts.Diagnostic[], Symbol(ts.LanguageService.getSemanticDiagnostics, Decl(typescript.d.ts, 1312, 64)) +>services.getSemanticDiagnostics : (fileName: string) => ts.Diagnostic[], Symbol(ts.LanguageService.getSemanticDiagnostics, Decl(typescript.d.ts, 1313, 64)) >services : ts.LanguageService, Symbol(services, Decl(APISample_watcher.ts, 39, 9)) ->getSemanticDiagnostics : (fileName: string) => ts.Diagnostic[], Symbol(ts.LanguageService.getSemanticDiagnostics, Decl(typescript.d.ts, 1312, 64)) +>getSemanticDiagnostics : (fileName: string) => ts.Diagnostic[], Symbol(ts.LanguageService.getSemanticDiagnostics, Decl(typescript.d.ts, 1313, 64)) >fileName : string, Symbol(fileName, Decl(APISample_watcher.ts, 79, 23)) allDiagnostics.forEach(diagnostic => { @@ -333,9 +333,9 @@ function watch(rootFileNames: string[], options: ts.CompilerOptions) { let message = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n"); >message : string, Symbol(message, Decl(APISample_watcher.ts, 85, 15)) >ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n") : string ->ts.flattenDiagnosticMessageText : (messageText: string | ts.DiagnosticMessageChain, newLine: string) => string, Symbol(ts.flattenDiagnosticMessageText, Decl(typescript.d.ts, 1200, 67)) +>ts.flattenDiagnosticMessageText : (messageText: string | ts.DiagnosticMessageChain, newLine: string) => string, Symbol(ts.flattenDiagnosticMessageText, Decl(typescript.d.ts, 1201, 67)) >ts : typeof ts, Symbol(ts, Decl(APISample_watcher.ts, 12, 6)) ->flattenDiagnosticMessageText : (messageText: string | ts.DiagnosticMessageChain, newLine: string) => string, Symbol(ts.flattenDiagnosticMessageText, Decl(typescript.d.ts, 1200, 67)) +>flattenDiagnosticMessageText : (messageText: string | ts.DiagnosticMessageChain, newLine: string) => string, Symbol(ts.flattenDiagnosticMessageText, Decl(typescript.d.ts, 1201, 67)) >diagnostic.messageText : string | ts.DiagnosticMessageChain, Symbol(ts.Diagnostic.messageText, Decl(typescript.d.ts, 1065, 23)) >diagnostic : ts.Diagnostic, Symbol(diagnostic, Decl(APISample_watcher.ts, 84, 31)) >messageText : string | ts.DiagnosticMessageChain, Symbol(ts.Diagnostic.messageText, Decl(typescript.d.ts, 1065, 23)) @@ -350,11 +350,11 @@ function watch(rootFileNames: string[], options: ts.CompilerOptions) { >line : number, Symbol(line, Decl(APISample_watcher.ts, 87, 21)) >character : number, Symbol(character, Decl(APISample_watcher.ts, 87, 27)) >diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start) : ts.LineAndCharacter ->diagnostic.file.getLineAndCharacterOfPosition : (pos: number) => ts.LineAndCharacter, Symbol(ts.SourceFile.getLineAndCharacterOfPosition, Decl(typescript.d.ts, 1263, 46)) +>diagnostic.file.getLineAndCharacterOfPosition : (pos: number) => ts.LineAndCharacter, Symbol(ts.SourceFile.getLineAndCharacterOfPosition, Decl(typescript.d.ts, 1264, 46)) >diagnostic.file : ts.SourceFile, Symbol(ts.Diagnostic.file, Decl(typescript.d.ts, 1062, 26)) >diagnostic : ts.Diagnostic, Symbol(diagnostic, Decl(APISample_watcher.ts, 84, 31)) >file : ts.SourceFile, Symbol(ts.Diagnostic.file, Decl(typescript.d.ts, 1062, 26)) ->getLineAndCharacterOfPosition : (pos: number) => ts.LineAndCharacter, Symbol(ts.SourceFile.getLineAndCharacterOfPosition, Decl(typescript.d.ts, 1263, 46)) +>getLineAndCharacterOfPosition : (pos: number) => ts.LineAndCharacter, Symbol(ts.SourceFile.getLineAndCharacterOfPosition, Decl(typescript.d.ts, 1264, 46)) >diagnostic.start : number, Symbol(ts.Diagnostic.start, Decl(typescript.d.ts, 1063, 25)) >diagnostic : ts.Diagnostic, Symbol(diagnostic, Decl(APISample_watcher.ts, 84, 31)) >start : number, Symbol(ts.Diagnostic.start, Decl(typescript.d.ts, 1063, 25)) @@ -435,9 +435,9 @@ watch(currentDirectoryFiles, { module: ts.ModuleKind.CommonJS }); >currentDirectoryFiles : any, Symbol(currentDirectoryFiles, Decl(APISample_watcher.ts, 98, 5)) >{ module: ts.ModuleKind.CommonJS } : { [x: string]: ts.ModuleKind; module: ts.ModuleKind; } >module : ts.ModuleKind, Symbol(module, Decl(APISample_watcher.ts, 102, 30)) ->ts.ModuleKind.CommonJS : ts.ModuleKind, Symbol(ts.ModuleKind.CommonJS, Decl(typescript.d.ts, 1108, 17)) ->ts.ModuleKind : typeof ts.ModuleKind, Symbol(ts.ModuleKind, Decl(typescript.d.ts, 1106, 5)) +>ts.ModuleKind.CommonJS : ts.ModuleKind, Symbol(ts.ModuleKind.CommonJS, Decl(typescript.d.ts, 1109, 17)) +>ts.ModuleKind : typeof ts.ModuleKind, Symbol(ts.ModuleKind, Decl(typescript.d.ts, 1107, 5)) >ts : typeof ts, Symbol(ts, Decl(APISample_watcher.ts, 12, 6)) ->ModuleKind : typeof ts.ModuleKind, Symbol(ts.ModuleKind, Decl(typescript.d.ts, 1106, 5)) ->CommonJS : ts.ModuleKind, Symbol(ts.ModuleKind.CommonJS, Decl(typescript.d.ts, 1108, 17)) +>ModuleKind : typeof ts.ModuleKind, Symbol(ts.ModuleKind, Decl(typescript.d.ts, 1107, 5)) +>CommonJS : ts.ModuleKind, Symbol(ts.ModuleKind.CommonJS, Decl(typescript.d.ts, 1109, 17))