From ddb3ca0f484f43b045d19d764c4896e820100492 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 1 Dec 2014 17:27:11 -0800 Subject: [PATCH 001/141] Augment escapeString to fix downlevel template literal emit. --- src/compiler/core.ts | 31 ++++++++++++++----- .../reference/templateStringTermination2.js | 2 +- .../reference/templateStringTermination4.js | 2 +- .../reference/templateStringTermination5.js | 2 +- .../templateStringWhitespaceEscapes1.js | 7 +++++ .../templateStringWhitespaceEscapes1.types | 5 +++ .../templateStringWhitespaceEscapes1_ES6.js | 6 ++++ ...templateStringWhitespaceEscapes1_ES6.types | 4 +++ .../templateStringWhitespaceEscapes2.js | 9 ++++++ .../templateStringWhitespaceEscapes2.types | 6 ++++ .../templateStringWhitespaceEscapes2_ES6.js | 8 +++++ ...templateStringWhitespaceEscapes2_ES6.types | 5 +++ .../templateStringWhitespaceEscapes1.ts | 3 ++ .../templateStringWhitespaceEscapes1_ES6.ts | 3 ++ .../templateStringWhitespaceEscapes2.ts | 4 +++ .../templateStringWhitespaceEscapes2_ES6.ts | 4 +++ 16 files changed, 91 insertions(+), 10 deletions(-) create mode 100644 tests/baselines/reference/templateStringWhitespaceEscapes1.js create mode 100644 tests/baselines/reference/templateStringWhitespaceEscapes1.types create mode 100644 tests/baselines/reference/templateStringWhitespaceEscapes1_ES6.js create mode 100644 tests/baselines/reference/templateStringWhitespaceEscapes1_ES6.types create mode 100644 tests/baselines/reference/templateStringWhitespaceEscapes2.js create mode 100644 tests/baselines/reference/templateStringWhitespaceEscapes2.types create mode 100644 tests/baselines/reference/templateStringWhitespaceEscapes2_ES6.js create mode 100644 tests/baselines/reference/templateStringWhitespaceEscapes2_ES6.types create mode 100644 tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes1.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes1_ES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes2.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes2_ES6.ts diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 6bbf9a13d03..1d3ae6429fa 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -591,27 +591,44 @@ module ts { return path; } - var escapedCharsRegExp = /[\t\v\f\b\0\r\n\"\\\u2028\u2029\u0085]/g; + var backslashOrDoubleQuote = /[\"\\]/g; + var escapedCharsRegExp = /[\0-\19\t\v\f\b\0\r\n\u2028\u2029\u0085]/g; var escapedCharsMap: Map = { + "\0": "\\0", "\t": "\\t", "\v": "\\v", "\f": "\\f", "\b": "\\b", - "\0": "\\0", "\r": "\\r", "\n": "\\n", + "\\": "\\\\", "\"": "\\\"", "\u2028": "\\u2028", // lineSeparator "\u2029": "\\u2029", // paragraphSeparator "\u0085": "\\u0085" // nextLine }; - /** NOTE: This *does not* support the full escape characters, it only supports the subset that can be used in file names - * or string literals. If the information encoded in the map changes, this needs to be revisited. */ + /** + * Based heavily on the abstract 'Quote' operation from ECMA-262 (24.3.2.2), + * but augmented for a few select characters. + * Note that this doesn't actually wrap the input in double quotes. + */ export function escapeString(s: string): string { - return escapedCharsRegExp.test(s) ? s.replace(escapedCharsRegExp, c => { - return escapedCharsMap[c] || c; - }) : s; + // Prioritize '"' and '\' + s = backslashOrDoubleQuote.test(s) ? s.replace(backslashOrDoubleQuote, getReplacement) : s; + s = escapedCharsRegExp.test(s) ? s.replace(escapedCharsRegExp, getReplacement) : s; + + return s; + + function getReplacement(c: string) { + return escapedCharsMap[c] || unicodeEscape(c); + } + + function unicodeEscape(c: string): string { + var hexCharCode = c.charCodeAt(0).toString(16); + var paddedHexCode = ("0000" + hexCharCode).slice(-4); + return "\\u" + paddedHexCode; + } } export interface ObjectAllocator { diff --git a/tests/baselines/reference/templateStringTermination2.js b/tests/baselines/reference/templateStringTermination2.js index de7792482ee..37fd3ffd6f9 100644 --- a/tests/baselines/reference/templateStringTermination2.js +++ b/tests/baselines/reference/templateStringTermination2.js @@ -3,4 +3,4 @@ `\\` //// [templateStringTermination2.js] -"\"; +"\\"; diff --git a/tests/baselines/reference/templateStringTermination4.js b/tests/baselines/reference/templateStringTermination4.js index 7ef49703665..29bbe4e9316 100644 --- a/tests/baselines/reference/templateStringTermination4.js +++ b/tests/baselines/reference/templateStringTermination4.js @@ -3,4 +3,4 @@ `\\\\` //// [templateStringTermination4.js] -"\\"; +"\\\\"; diff --git a/tests/baselines/reference/templateStringTermination5.js b/tests/baselines/reference/templateStringTermination5.js index af7f1d6a0a6..769597f5209 100644 --- a/tests/baselines/reference/templateStringTermination5.js +++ b/tests/baselines/reference/templateStringTermination5.js @@ -3,4 +3,4 @@ `\\\\\\` //// [templateStringTermination5.js] -"\\\"; +"\\\\\\"; diff --git a/tests/baselines/reference/templateStringWhitespaceEscapes1.js b/tests/baselines/reference/templateStringWhitespaceEscapes1.js new file mode 100644 index 00000000000..1edd38c315b --- /dev/null +++ b/tests/baselines/reference/templateStringWhitespaceEscapes1.js @@ -0,0 +1,7 @@ +//// [templateStringWhitespaceEscapes1.ts] + + +`\t\n\v\f\r`; + +//// [templateStringWhitespaceEscapes1.js] +"\t\n\v\f\r"; diff --git a/tests/baselines/reference/templateStringWhitespaceEscapes1.types b/tests/baselines/reference/templateStringWhitespaceEscapes1.types new file mode 100644 index 00000000000..6c1598e0549 --- /dev/null +++ b/tests/baselines/reference/templateStringWhitespaceEscapes1.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes1.ts === + +No type information for this code. +No type information for this code.`\t\n\v\f\r`; +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringWhitespaceEscapes1_ES6.js b/tests/baselines/reference/templateStringWhitespaceEscapes1_ES6.js new file mode 100644 index 00000000000..55b93bd68a6 --- /dev/null +++ b/tests/baselines/reference/templateStringWhitespaceEscapes1_ES6.js @@ -0,0 +1,6 @@ +//// [templateStringWhitespaceEscapes1_ES6.ts] + +`\t\n\v\f\r`; + +//// [templateStringWhitespaceEscapes1_ES6.js] +`\t\n\v\f\r`; diff --git a/tests/baselines/reference/templateStringWhitespaceEscapes1_ES6.types b/tests/baselines/reference/templateStringWhitespaceEscapes1_ES6.types new file mode 100644 index 00000000000..53a6c6f9cf9 --- /dev/null +++ b/tests/baselines/reference/templateStringWhitespaceEscapes1_ES6.types @@ -0,0 +1,4 @@ +=== tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes1_ES6.ts === + +No type information for this code.`\t\n\v\f\r`; +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringWhitespaceEscapes2.js b/tests/baselines/reference/templateStringWhitespaceEscapes2.js new file mode 100644 index 00000000000..144b1e78b8b --- /dev/null +++ b/tests/baselines/reference/templateStringWhitespaceEscapes2.js @@ -0,0 +1,9 @@ +//// [templateStringWhitespaceEscapes2.ts] + + +// , , , , , +`\u0009\u000B\u000C\u0020\u00A0\uFEFF`; + +//// [templateStringWhitespaceEscapes2.js] +// , , , , , +"\t\v\f  "; diff --git a/tests/baselines/reference/templateStringWhitespaceEscapes2.types b/tests/baselines/reference/templateStringWhitespaceEscapes2.types new file mode 100644 index 00000000000..7c7de875379 --- /dev/null +++ b/tests/baselines/reference/templateStringWhitespaceEscapes2.types @@ -0,0 +1,6 @@ +=== tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes2.ts === + +No type information for this code. +No type information for this code.// , , , , , +No type information for this code.`\u0009\u000B\u000C\u0020\u00A0\uFEFF`; +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringWhitespaceEscapes2_ES6.js b/tests/baselines/reference/templateStringWhitespaceEscapes2_ES6.js new file mode 100644 index 00000000000..bf901c5e843 --- /dev/null +++ b/tests/baselines/reference/templateStringWhitespaceEscapes2_ES6.js @@ -0,0 +1,8 @@ +//// [templateStringWhitespaceEscapes2_ES6.ts] + +// , , , , , +`\u0009\u000B\u000C\u0020\u00A0\uFEFF`; + +//// [templateStringWhitespaceEscapes2_ES6.js] +// , , , , , +`\u0009\u000B\u000C\u0020\u00A0\uFEFF`; diff --git a/tests/baselines/reference/templateStringWhitespaceEscapes2_ES6.types b/tests/baselines/reference/templateStringWhitespaceEscapes2_ES6.types new file mode 100644 index 00000000000..834ce22cc32 --- /dev/null +++ b/tests/baselines/reference/templateStringWhitespaceEscapes2_ES6.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes2_ES6.ts === + +No type information for this code.// , , , , , +No type information for this code.`\u0009\u000B\u000C\u0020\u00A0\uFEFF`; +No type information for this code. \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes1.ts b/tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes1.ts new file mode 100644 index 00000000000..3d1a5459a43 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes1.ts @@ -0,0 +1,3 @@ + + +`\t\n\v\f\r`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes1_ES6.ts b/tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes1_ES6.ts new file mode 100644 index 00000000000..8a16e77e0b2 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes1_ES6.ts @@ -0,0 +1,3 @@ +//@target: es6 + +`\t\n\v\f\r`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes2.ts b/tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes2.ts new file mode 100644 index 00000000000..6df666971ea --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes2.ts @@ -0,0 +1,4 @@ + + +// , , , , , +`\u0009\u000B\u000C\u0020\u00A0\uFEFF`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes2_ES6.ts b/tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes2_ES6.ts new file mode 100644 index 00000000000..5ebaf3fad5f --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringWhitespaceEscapes2_ES6.ts @@ -0,0 +1,4 @@ +//@target: es6 + +// , , , , , +`\u0009\u000B\u000C\u0020\u00A0\uFEFF`; \ No newline at end of file From a6b6b6b81683e02ef7ad1517586f1e995056ff2a Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 2 Dec 2014 13:00:37 -0800 Subject: [PATCH 002/141] Fixed issue where old-Mac newlines don't work in harness. --- src/harness/harness.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 1a5938d2be0..dc8129cbb05 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -69,14 +69,18 @@ module Utils { } } - /** Splits the given string on \r\n or on only \n if that fails */ + /** Splits the given string on \r\n, or on only \n if that fails, or on only \r if *that* fails. */ export function splitContentByNewlines(content: string) { // Split up the input file by line // Note: IE JS engine incorrectly handles consecutive delimiters here when using RegExp split, so - // we have to string-based splitting instead and try to figure out the delimiting chars + // we have to use string-based splitting instead and try to figure out the delimiting chars var lines = content.split('\r\n'); if (lines.length === 1) { lines = content.split('\n'); + + if (lines.length === 1) { + lines = content.split("\r"); + } } return lines; } @@ -962,6 +966,10 @@ module Harness { var lineStarts = ts.computeLineStarts(inputFile.content); var lines = inputFile.content.split('\n'); + if (lines.length === 1) { + lines = lines[0].split("\r"); + } + lines.forEach((line, lineIndex) => { if (line.length > 0 && line.charAt(line.length - 1) === '\r') { line = line.substr(0, line.length - 1); From 4c4e5a43e00fa6aa864ef63b705b08cb9fc33776 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 2 Dec 2014 13:53:56 -0800 Subject: [PATCH 003/141] Added multiline tests. --- .../baselines/reference/templateStringMultiline1.js | 11 +++++++++++ .../reference/templateStringMultiline1.types | 8 ++++++++ .../reference/templateStringMultiline1_ES6.js | 12 ++++++++++++ .../reference/templateStringMultiline1_ES6.types | 7 +++++++ .../baselines/reference/templateStringMultiline2.js | 11 +++++++++++ .../reference/templateStringMultiline2.types | 8 ++++++++ .../reference/templateStringMultiline2_ES6.js | 12 ++++++++++++ .../reference/templateStringMultiline2_ES6.types | 7 +++++++ .../baselines/reference/templateStringMultiline3.js | 11 +++++++++++ .../reference/templateStringMultiline3.types | 8 ++++++++ .../reference/templateStringMultiline3_ES6.js | 12 ++++++++++++ .../reference/templateStringMultiline3_ES6.types | 7 +++++++ .../es6/templates/templateStringMultiline1.ts | 6 ++++++ .../es6/templates/templateStringMultiline1_ES6.ts | 6 ++++++ .../es6/templates/templateStringMultiline2.ts | 6 ++++++ .../es6/templates/templateStringMultiline2_ES6.ts | 6 ++++++ .../es6/templates/templateStringMultiline3.ts | 1 + .../es6/templates/templateStringMultiline3_ES6.ts | 1 + 18 files changed, 140 insertions(+) create mode 100644 tests/baselines/reference/templateStringMultiline1.js create mode 100644 tests/baselines/reference/templateStringMultiline1.types create mode 100644 tests/baselines/reference/templateStringMultiline1_ES6.js create mode 100644 tests/baselines/reference/templateStringMultiline1_ES6.types create mode 100644 tests/baselines/reference/templateStringMultiline2.js create mode 100644 tests/baselines/reference/templateStringMultiline2.types create mode 100644 tests/baselines/reference/templateStringMultiline2_ES6.js create mode 100644 tests/baselines/reference/templateStringMultiline2_ES6.types create mode 100644 tests/baselines/reference/templateStringMultiline3.js create mode 100644 tests/baselines/reference/templateStringMultiline3.types create mode 100644 tests/baselines/reference/templateStringMultiline3_ES6.js create mode 100644 tests/baselines/reference/templateStringMultiline3_ES6.types create mode 100644 tests/cases/conformance/es6/templates/templateStringMultiline1.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringMultiline1_ES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringMultiline2.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringMultiline2_ES6.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringMultiline3.ts create mode 100644 tests/cases/conformance/es6/templates/templateStringMultiline3_ES6.ts diff --git a/tests/baselines/reference/templateStringMultiline1.js b/tests/baselines/reference/templateStringMultiline1.js new file mode 100644 index 00000000000..e81cb89926a --- /dev/null +++ b/tests/baselines/reference/templateStringMultiline1.js @@ -0,0 +1,11 @@ +//// [templateStringMultiline1.ts] + + +// newlines are +` +\ +` + +//// [templateStringMultiline1.js] +// newlines are +"\n"; diff --git a/tests/baselines/reference/templateStringMultiline1.types b/tests/baselines/reference/templateStringMultiline1.types new file mode 100644 index 00000000000..3b169c1b1cb --- /dev/null +++ b/tests/baselines/reference/templateStringMultiline1.types @@ -0,0 +1,8 @@ +=== tests/cases/conformance/es6/templates/templateStringMultiline1.ts === + +No type information for this code. +No type information for this code.// newlines are +No type information for this code.` +No type information for this code.\ +No type information for this code.` +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringMultiline1_ES6.js b/tests/baselines/reference/templateStringMultiline1_ES6.js new file mode 100644 index 00000000000..a44df4d0cc3 --- /dev/null +++ b/tests/baselines/reference/templateStringMultiline1_ES6.js @@ -0,0 +1,12 @@ +//// [templateStringMultiline1_ES6.ts] + +// newlines are +` +\ +` + +//// [templateStringMultiline1_ES6.js] +// newlines are +` +\ +`; diff --git a/tests/baselines/reference/templateStringMultiline1_ES6.types b/tests/baselines/reference/templateStringMultiline1_ES6.types new file mode 100644 index 00000000000..5e4716ac607 --- /dev/null +++ b/tests/baselines/reference/templateStringMultiline1_ES6.types @@ -0,0 +1,7 @@ +=== tests/cases/conformance/es6/templates/templateStringMultiline1_ES6.ts === + +No type information for this code.// newlines are +No type information for this code.` +No type information for this code.\ +No type information for this code.` +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringMultiline2.js b/tests/baselines/reference/templateStringMultiline2.js new file mode 100644 index 00000000000..a87e506f07d --- /dev/null +++ b/tests/baselines/reference/templateStringMultiline2.js @@ -0,0 +1,11 @@ +//// [templateStringMultiline2.ts] + + +// newlines are +` +\ +` + +//// [templateStringMultiline2.js] +// newlines are +"\n"; diff --git a/tests/baselines/reference/templateStringMultiline2.types b/tests/baselines/reference/templateStringMultiline2.types new file mode 100644 index 00000000000..b4b341416c9 --- /dev/null +++ b/tests/baselines/reference/templateStringMultiline2.types @@ -0,0 +1,8 @@ +=== tests/cases/conformance/es6/templates/templateStringMultiline2.ts === + +No type information for this code. +No type information for this code.// newlines are +No type information for this code.` +No type information for this code.\ +No type information for this code.` +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringMultiline2_ES6.js b/tests/baselines/reference/templateStringMultiline2_ES6.js new file mode 100644 index 00000000000..168c8bac39b --- /dev/null +++ b/tests/baselines/reference/templateStringMultiline2_ES6.js @@ -0,0 +1,12 @@ +//// [templateStringMultiline2_ES6.ts] + +// newlines are +` +\ +` + +//// [templateStringMultiline2_ES6.js] +// newlines are +` +\ +`; diff --git a/tests/baselines/reference/templateStringMultiline2_ES6.types b/tests/baselines/reference/templateStringMultiline2_ES6.types new file mode 100644 index 00000000000..288191d3d0f --- /dev/null +++ b/tests/baselines/reference/templateStringMultiline2_ES6.types @@ -0,0 +1,7 @@ +=== tests/cases/conformance/es6/templates/templateStringMultiline2_ES6.ts === + +No type information for this code.// newlines are +No type information for this code.` +No type information for this code.\ +No type information for this code.` +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringMultiline3.js b/tests/baselines/reference/templateStringMultiline3.js new file mode 100644 index 00000000000..bff65582515 --- /dev/null +++ b/tests/baselines/reference/templateStringMultiline3.js @@ -0,0 +1,11 @@ +//// [templateStringMultiline3.ts] + + +// newlines are +` +\ +` + +//// [templateStringMultiline3.js] +// newlines are +"\n"; diff --git a/tests/baselines/reference/templateStringMultiline3.types b/tests/baselines/reference/templateStringMultiline3.types new file mode 100644 index 00000000000..a0e1f6f8871 --- /dev/null +++ b/tests/baselines/reference/templateStringMultiline3.types @@ -0,0 +1,8 @@ +=== tests/cases/conformance/es6/templates/templateStringMultiline3.ts === + +No type information for this code. +No type information for this code.// newlines are +No type information for this code.` +No type information for this code.\ +No type information for this code.` +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringMultiline3_ES6.js b/tests/baselines/reference/templateStringMultiline3_ES6.js new file mode 100644 index 00000000000..aad544c13bb --- /dev/null +++ b/tests/baselines/reference/templateStringMultiline3_ES6.js @@ -0,0 +1,12 @@ +//// [templateStringMultiline3_ES6.ts] + +// newlines are +` +\ +` + +//// [templateStringMultiline3_ES6.js] +// newlines are +` +\ +`; diff --git a/tests/baselines/reference/templateStringMultiline3_ES6.types b/tests/baselines/reference/templateStringMultiline3_ES6.types new file mode 100644 index 00000000000..e4fa8a7edf4 --- /dev/null +++ b/tests/baselines/reference/templateStringMultiline3_ES6.types @@ -0,0 +1,7 @@ +=== tests/cases/conformance/es6/templates/templateStringMultiline3_ES6.ts === + +No type information for this code.// newlines are +No type information for this code.` +No type information for this code.\ +No type information for this code.` +No type information for this code. \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringMultiline1.ts b/tests/cases/conformance/es6/templates/templateStringMultiline1.ts new file mode 100644 index 00000000000..57a62da60a5 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringMultiline1.ts @@ -0,0 +1,6 @@ + + +// newlines are +` +\ +` \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringMultiline1_ES6.ts b/tests/cases/conformance/es6/templates/templateStringMultiline1_ES6.ts new file mode 100644 index 00000000000..19861c5ffb4 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringMultiline1_ES6.ts @@ -0,0 +1,6 @@ +//@target: es6 + +// newlines are +` +\ +` \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringMultiline2.ts b/tests/cases/conformance/es6/templates/templateStringMultiline2.ts new file mode 100644 index 00000000000..1de31c36175 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringMultiline2.ts @@ -0,0 +1,6 @@ + + +// newlines are +` +\ +` \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringMultiline2_ES6.ts b/tests/cases/conformance/es6/templates/templateStringMultiline2_ES6.ts new file mode 100644 index 00000000000..69be653d938 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringMultiline2_ES6.ts @@ -0,0 +1,6 @@ +//@target: es6 + +// newlines are +` +\ +` \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringMultiline3.ts b/tests/cases/conformance/es6/templates/templateStringMultiline3.ts new file mode 100644 index 00000000000..fbde56ac230 --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringMultiline3.ts @@ -0,0 +1 @@ + // newlines are ` \ ` \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringMultiline3_ES6.ts b/tests/cases/conformance/es6/templates/templateStringMultiline3_ES6.ts new file mode 100644 index 00000000000..4d2613f9f9f --- /dev/null +++ b/tests/cases/conformance/es6/templates/templateStringMultiline3_ES6.ts @@ -0,0 +1 @@ +//@target: es6 // newlines are ` \ ` \ No newline at end of file From 538f033f0d453d17f0ded0e263bd831593bf12db Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 2 Dec 2014 13:56:02 -0800 Subject: [PATCH 004/141] Moved position increment in scanner; removed confusing comment. --- src/compiler/scanner.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index fcb8c9b0c31..b1766388e14 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -631,14 +631,14 @@ module ts { // Speculated ECMAScript 6 Spec 11.8.6.1: // and LineTerminatorSequences are normalized to for Template Values - // An explicit EscapeSequence is needed to include a or sequence. if (currChar === CharacterCodes.carriageReturn) { contents += text.substring(start, pos); + pos++; - if (pos + 1 < len && text.charCodeAt(pos + 1) === CharacterCodes.lineFeed) { + if (pos < len && text.charCodeAt(pos) === CharacterCodes.lineFeed) { pos++; } - pos++; + contents += "\n"; start = pos; continue; From 80c67db75bc811b8cd57374856ed54d4da7036c0 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Sat, 6 Dec 2014 21:23:54 -0800 Subject: [PATCH 005/141] add error\trace message that should be exposed by the host --- src/services/services.ts | 2 ++ src/services/shims.ts | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/src/services/services.ts b/src/services/services.ts index 980b7ecda3d..1d5418aff75 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -865,6 +865,8 @@ module ts { export interface Logger { log(s: string): void; + trace(s: string): void; + error(s: string): void; } // diff --git a/src/services/shims.ts b/src/services/shims.ts index 5556743830f..a79948a3121 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -341,6 +341,14 @@ module ts { this.shimHost.log(s); } + public trace(s: string): void { + this.shimHost.trace(s); + } + + public error(s: string): void { + this.shimHost.error(s); + } + public getCompilationSettings(): CompilerOptions { var settingsJson = this.shimHost.getCompilationSettings(); if (settingsJson == null || settingsJson == "") { From 89a065185b7a6029baa6159376530bd346ea95e7 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Sat, 6 Dec 2014 23:04:17 -0800 Subject: [PATCH 006/141] added getApiVersion method to TypeScriptServicesFactory --- src/services/services.ts | 3 +++ src/services/shims.ts | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/src/services/services.ts b/src/services/services.ts index 1d5418aff75..fa09ee5daa0 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -14,6 +14,9 @@ /// module ts { + + export var ScriptAPIVersion = "1.4" + export interface Node { getSourceFile(): SourceFile; getChildCount(sourceFile?: SourceFile): number; diff --git a/src/services/shims.ts b/src/services/shims.ts index a79948a3121..2157ae2336e 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -867,6 +867,13 @@ module ts { private _shims: Shim[] = []; private documentRegistry: DocumentRegistry = createDocumentRegistry(); + /* + * Returns script API version. + */ + public getApiVersion(dummy: any): string { + return ScriptAPIVersion; + } + public createLanguageServiceShim(host: LanguageServiceShimHost): LanguageServiceShim { try { var hostAdapter = new LanguageServiceShimHostAdapter(host); From a4a87f87fa108c1ac28074c940e9e60269ad50e4 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Sun, 7 Dec 2014 15:17:20 -0800 Subject: [PATCH 007/141] removed dummy parameter from getApiVersion method --- src/services/shims.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/shims.ts b/src/services/shims.ts index 2157ae2336e..dec48facc35 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -870,7 +870,7 @@ module ts { /* * Returns script API version. */ - public getApiVersion(dummy: any): string { + public getApiVersion(): string { return ScriptAPIVersion; } From 3469b4ce03b9b22e21215e255e0af41f0bfff361 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Sun, 7 Dec 2014 21:41:15 -0800 Subject: [PATCH 008/141] addressed CR feedback: rename getApiVersion to getServicesVersion --- src/services/services.ts | 2 +- src/services/shims.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/services.ts b/src/services/services.ts index fa09ee5daa0..7703c3633bf 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -15,7 +15,7 @@ module ts { - export var ScriptAPIVersion = "1.4" + export var servicesVersion = "0.4" export interface Node { getSourceFile(): SourceFile; diff --git a/src/services/shims.ts b/src/services/shims.ts index dec48facc35..d139381c225 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -870,8 +870,8 @@ module ts { /* * Returns script API version. */ - public getApiVersion(): string { - return ScriptAPIVersion; + public getServicesVersion(): string { + return servicesVersion; } public createLanguageServiceShim(host: LanguageServiceShimHost): LanguageServiceShim { From 087180135203d9517025b996394d1c5937ff771f Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Tue, 9 Dec 2014 04:55:33 -0800 Subject: [PATCH 009/141] inherit delta from nodes on the same line --- src/services/formatting.ts | 37 ++++++++++++++++++- .../formattingExpressionsInIfCondition.ts | 11 ++++++ 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 tests/cases/fourslash/formattingExpressionsInIfCondition.ts diff --git a/src/services/formatting.ts b/src/services/formatting.ts index 9660d9af6df..ad18df41317 100644 --- a/src/services/formatting.ts +++ b/src/services/formatting.ts @@ -247,6 +247,41 @@ module ts.formatting { return precedingToken ? precedingToken.end : enclosingNode.pos; } + /* + * For cases like + * if (a || + * b ||$ + * c) {...} + * If we hit Enter at $ we want line ' b ||' to be indented. + * Formatting will be applied to the last two lines. + * Node that fully encloses these lines is binary expression 'a ||...'. + * Initial indentation for this node will be 0. + * Binary expressions don't introduce new indentation scopes, however it is possible + * that some parent node on the same line does - like if statement in this case. + * Note that we are considering parents only from the same line with initial node - + * if parent is on the different line - its delta was already contributed + * to the initial indentation. + */ + function getOwnOrInheritedDelta(n: Node, options: FormatCodeOptions, sourceFile: SourceFile): number { + var previousLine = Constants.Unknown; + var childKind = SyntaxKind.Unknown; + while (n) { + var line = sourceFile.getLineAndCharacterFromPosition(n.getStart(sourceFile)).line; + if (previousLine !== Constants.Unknown && line !== previousLine) { + break; + } + + if (SmartIndenter.shouldIndentChildNode(n.kind, childKind)) { + return options.IndentSize; + } + + previousLine = line; + childKind = n.kind; + n = n.parent; + } + return 0; + } + function formatSpan(originalRange: TextRange, sourceFile: SourceFile, options: FormatCodeOptions, @@ -276,7 +311,7 @@ module ts.formatting { if (formattingScanner.isOnToken()) { var startLine = sourceFile.getLineAndCharacterFromPosition(enclosingNode.getStart(sourceFile)).line; - var delta = SmartIndenter.shouldIndentChildNode(enclosingNode.kind, SyntaxKind.Unknown) ? options.IndentSize : 0; + var delta = getOwnOrInheritedDelta(enclosingNode, options, sourceFile); processNode(enclosingNode, enclosingNode, startLine, initialIndentation, delta); } diff --git a/tests/cases/fourslash/formattingExpressionsInIfCondition.ts b/tests/cases/fourslash/formattingExpressionsInIfCondition.ts new file mode 100644 index 00000000000..1075de908fa --- /dev/null +++ b/tests/cases/fourslash/formattingExpressionsInIfCondition.ts @@ -0,0 +1,11 @@ +/// + +////if (a === 1 || +//// /*0*/b === 2 ||/*1*/ +//// c === 3) { +////} + +goTo.marker("1"); +edit.insert("\n"); +goTo.marker("0"); +verify.currentLineContentIs(" b === 2 ||"); \ No newline at end of file From 0a1eabc9aa494f3ca0e0f1335dffbfa14bc47940 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Tue, 9 Dec 2014 14:08:44 -0800 Subject: [PATCH 010/141] Add new compiler flag to suppress noImplicitAny errors for object access --- src/compiler/checker.ts | 2 +- src/compiler/commandLineParser.ts | 11 +- .../diagnosticInformationMap.generated.ts | 3 + src/compiler/diagnosticMessages.json | 13 ++ src/compiler/parser.ts | 2 +- src/compiler/types.ts | 7 +- src/harness/harness.ts | 12 +- .../noImplicitAnyIndexingSuppressed.js | 81 ++++++++++++ .../noImplicitAnyIndexingSuppressed.types | 118 ++++++++++++++++++ .../noImplicitAnyIndexingSuppressed.ts | 49 ++++++++ 10 files changed, 292 insertions(+), 6 deletions(-) create mode 100644 tests/baselines/reference/noImplicitAnyIndexingSuppressed.js create mode 100644 tests/baselines/reference/noImplicitAnyIndexingSuppressed.types create mode 100644 tests/cases/compiler/noImplicitAnyIndexingSuppressed.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 6d913f7360c..81450948b68 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5385,7 +5385,7 @@ module ts { } // Fall back to any. - if (compilerOptions.noImplicitAny && objectType !== anyType) { + if (compilerOptions.noImplicitAny && (compilerOptions.suppress & ErrorGroup.ImplicitAnyIndex) === 0 && objectType !== anyType) { error(node, Diagnostics.Index_signature_of_object_type_implicitly_has_an_any_type); } diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 3fabf6c8588..394a1422543 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -128,9 +128,16 @@ module ts { name: "preserveConstEnums", type: "boolean", description: Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code - } + }, + { + name: "suppress", + type: { "implicitanyindex": ErrorGroup.ImplicitAnyIndex}, + description: Diagnostics.Suppress_a_set_of_compiler_checks, + paramType: Diagnostics.ERRORGROUP, + error: Diagnostics.Argument_for_suppress_option_can_only_be_implicitAnyIndex + }, ]; - + var shortOptionNames: Map = {}; var optionNameMap: Map = {}; diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 7377c42b238..75c73ccde17 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -398,6 +398,7 @@ module ts { VERSION: { code: 6036, category: DiagnosticCategory.Message, key: "VERSION" }, LOCATION: { code: 6037, category: DiagnosticCategory.Message, key: "LOCATION" }, DIRECTORY: { code: 6038, category: DiagnosticCategory.Message, key: "DIRECTORY" }, + ERRORGROUP: { code: 6039, category: DiagnosticCategory.Message, key: "ERRORGROUP" }, Compilation_complete_Watching_for_file_changes: { code: 6042, category: DiagnosticCategory.Message, key: "Compilation complete. Watching for file changes." }, Generates_corresponding_map_file: { code: 6043, category: DiagnosticCategory.Message, key: "Generates corresponding '.map' file." }, Compiler_option_0_expects_an_argument: { code: 6044, category: DiagnosticCategory.Error, key: "Compiler option '{0}' expects an argument." }, @@ -411,6 +412,8 @@ module ts { Warn_on_expressions_and_declarations_with_an_implied_any_type: { code: 6052, category: DiagnosticCategory.Message, key: "Warn on expressions and declarations with an implied 'any' type." }, File_0_not_found: { code: 6053, category: DiagnosticCategory.Error, key: "File '{0}' not found." }, File_0_must_have_extension_ts_or_d_ts: { code: 6054, category: DiagnosticCategory.Error, key: "File '{0}' must have extension '.ts' or '.d.ts'." }, + Suppress_a_set_of_compiler_checks: { code: 6055, category: DiagnosticCategory.Message, key: "Suppress a set of compiler checks." }, + Argument_for_suppress_option_can_only_be_implicitAnyIndex: { code: 6056, category: DiagnosticCategory.Error, key: "Argument for '--suppress' option can only be 'implicitAnyIndex'." }, Variable_0_implicitly_has_an_1_type: { code: 7005, category: DiagnosticCategory.Error, key: "Variable '{0}' implicitly has an '{1}' type." }, Parameter_0_implicitly_has_an_1_type: { code: 7006, category: DiagnosticCategory.Error, key: "Parameter '{0}' implicitly has an '{1}' type." }, Member_0_implicitly_has_an_1_type: { code: 7008, category: DiagnosticCategory.Error, key: "Member '{0}' implicitly has an '{1}' type." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index f0dba54e1a1..54ca28e69ac 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1591,6 +1591,10 @@ "category": "Message", "code": 6038 }, + "ERRORGROUP": { + "category": "Message", + "code": 6039 + }, "Compilation complete. Watching for file changes.": { "category": "Message", "code": 6042 @@ -1643,6 +1647,15 @@ "category": "Error", "code": 6054 }, + "Suppress a set of compiler checks.": { + "category": "Message", + "code": 6055 + }, + "Argument for '--suppress' option can only be 'implicitAnyIndex'.": { + "category": "Error", + "code": 6056 + }, + "Variable '{0}' implicitly has an '{1}' type.": { "category": "Error", diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index deb2eb17fc8..ec6a7849638 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -27,7 +27,7 @@ module ts { node.parserContextFlags |= ParserContextFlags.ContainsError; } - // Also mark that we've propogated the child information to this node. This way we can + // Also mark that we've propagated the child information to this node. This way we can // always consult the bit directly on this node without needing to check its children // again. node.parserContextFlags |= ParserContextFlags.HasPropagatedChildContainsErrorFlag; diff --git a/src/compiler/types.ts b/src/compiler/types.ts index c2d57876e6a..ecfb266f088 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1381,6 +1381,7 @@ module ts { watch?: boolean; preserveConstEnums?: boolean; allowNonTsExtensions?: boolean; + suppress?: ErrorGroup; [option: string]: string | number | boolean; } @@ -1555,7 +1556,11 @@ module ts { tab = 0x09, // \t verticalTab = 0x0B, // \v } - + + export const enum ErrorGroup { + ImplicitAnyIndex = 0x01 + } + export interface CancellationToken { isCancellationRequested(): boolean; } diff --git a/src/harness/harness.ts b/src/harness/harness.ts index c0d3ddedce3..d94804375db 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -777,6 +777,16 @@ module Harness { case 'preserveconstenums': options.preserveConstEnums = setting.value === 'true'; break; + + case 'suppress': + if (typeof setting.value === 'string' && setting.value.toLowerCase() === 'implicitanyindex') { + options.suppress = ts.ErrorGroup.ImplicitAnyIndex; + } + else { + throw new Error('Unkown value for suppress ' + setting.value); + } + break; + default: throw new Error('Unsupported compiler setting ' + setting.flag); } @@ -1162,7 +1172,7 @@ module Harness { var optionRegex = /^[\/]{2}\s*@(\w+)\s*:\s*(\S*)/gm; // multiple matches on multiple lines // List of allowed metadata names - var fileMetadataNames = ["filename", "comments", "declaration", "module", "nolib", "sourcemap", "target", "out", "outdir", "noemitonerror","noimplicitany", "noresolve", "newline", "newlines", "emitbom", "errortruncation", "usecasesensitivefilenames", "preserveconstenums"]; + var fileMetadataNames = ["filename", "comments", "declaration", "module", "nolib", "sourcemap", "target", "out", "outdir", "noemitonerror", "noimplicitany", "noresolve", "newline", "newlines", "emitbom", "errortruncation", "usecasesensitivefilenames", "preserveconstenums", "suppress"]; function extractCompilerSettings(content: string): CompilerSetting[] { diff --git a/tests/baselines/reference/noImplicitAnyIndexingSuppressed.js b/tests/baselines/reference/noImplicitAnyIndexingSuppressed.js new file mode 100644 index 00000000000..5185a9b8db8 --- /dev/null +++ b/tests/baselines/reference/noImplicitAnyIndexingSuppressed.js @@ -0,0 +1,81 @@ +//// [noImplicitAnyIndexingSuppressed.ts] + +enum MyEmusEnum { + emu +} + +// Should be okay; should be a string. +var strRepresentation1 = MyEmusEnum[0] + +// Should be okay; should be a string. +var strRepresentation2 = MyEmusEnum[MyEmusEnum.emu] + +// Should be okay, as we suppress implicit 'any' property access checks +var strRepresentation3 = MyEmusEnum["monehh"]; + +// Should be okay; should be a MyEmusEnum +var strRepresentation4 = MyEmusEnum["emu"]; + + +// Should be okay, as we suppress implicit 'any' property access checks +var x = {}["hi"]; + +// Should be okay, as we suppress implicit 'any' property access checks +var y = {}[10]; + +var hi: any = "hi"; + +var emptyObj = {}; + +// Should be okay, as we suppress implicit 'any' property access checks +var z1 = emptyObj[hi]; +var z2 = (emptyObj)[hi]; + +interface MyMap { + [key: string]: T; +} + +var m: MyMap = { + "0": 0, + "1": 1, + "2": 2, + "Okay that's enough for today.": NaN +}; + +var mResult1 = m[MyEmusEnum.emu]; +var mResult2 = m[MyEmusEnum[MyEmusEnum.emu]]; +var mResult3 = m[hi]; + + + +//// [noImplicitAnyIndexingSuppressed.js] +var MyEmusEnum; +(function (MyEmusEnum) { + MyEmusEnum[MyEmusEnum["emu"] = 0] = "emu"; +})(MyEmusEnum || (MyEmusEnum = {})); +// Should be okay; should be a string. +var strRepresentation1 = MyEmusEnum[0]; +// Should be okay; should be a string. +var strRepresentation2 = MyEmusEnum[0 /* emu */]; +// Should be okay, as we suppress implicit 'any' property access checks +var strRepresentation3 = MyEmusEnum["monehh"]; +// Should be okay; should be a MyEmusEnum +var strRepresentation4 = 0 /* "emu" */; +// Should be okay, as we suppress implicit 'any' property access checks +var x = {}["hi"]; +// Should be okay, as we suppress implicit 'any' property access checks +var y = {}[10]; +var hi = "hi"; +var emptyObj = {}; +// Should be okay, as we suppress implicit 'any' property access checks +var z1 = emptyObj[hi]; +var z2 = emptyObj[hi]; +var m = { + "0": 0, + "1": 1, + "2": 2, + "Okay that's enough for today.": NaN +}; +var mResult1 = m[0 /* emu */]; +var mResult2 = m[MyEmusEnum[0 /* emu */]]; +var mResult3 = m[hi]; diff --git a/tests/baselines/reference/noImplicitAnyIndexingSuppressed.types b/tests/baselines/reference/noImplicitAnyIndexingSuppressed.types new file mode 100644 index 00000000000..20be75dc29e --- /dev/null +++ b/tests/baselines/reference/noImplicitAnyIndexingSuppressed.types @@ -0,0 +1,118 @@ +=== tests/cases/compiler/noImplicitAnyIndexingSuppressed.ts === + +enum MyEmusEnum { +>MyEmusEnum : MyEmusEnum + + emu +>emu : MyEmusEnum +} + +// Should be okay; should be a string. +var strRepresentation1 = MyEmusEnum[0] +>strRepresentation1 : string +>MyEmusEnum[0] : string +>MyEmusEnum : typeof MyEmusEnum + +// Should be okay; should be a string. +var strRepresentation2 = MyEmusEnum[MyEmusEnum.emu] +>strRepresentation2 : string +>MyEmusEnum[MyEmusEnum.emu] : string +>MyEmusEnum : typeof MyEmusEnum +>MyEmusEnum.emu : MyEmusEnum +>MyEmusEnum : typeof MyEmusEnum +>emu : MyEmusEnum + +// Should be okay, as we suppress implicit 'any' property access checks +var strRepresentation3 = MyEmusEnum["monehh"]; +>strRepresentation3 : any +>MyEmusEnum["monehh"] : any +>MyEmusEnum : typeof MyEmusEnum + +// Should be okay; should be a MyEmusEnum +var strRepresentation4 = MyEmusEnum["emu"]; +>strRepresentation4 : MyEmusEnum +>MyEmusEnum["emu"] : MyEmusEnum +>MyEmusEnum : typeof MyEmusEnum + + +// Should be okay, as we suppress implicit 'any' property access checks +var x = {}["hi"]; +>x : any +>{}["hi"] : any +>{} : {} + +// Should be okay, as we suppress implicit 'any' property access checks +var y = {}[10]; +>y : any +>{}[10] : any +>{} : {} + +var hi: any = "hi"; +>hi : any + +var emptyObj = {}; +>emptyObj : {} +>{} : {} + +// Should be okay, as we suppress implicit 'any' property access checks +var z1 = emptyObj[hi]; +>z1 : any +>emptyObj[hi] : any +>emptyObj : {} +>hi : any + +var z2 = (emptyObj)[hi]; +>z2 : any +>(emptyObj)[hi] : any +>(emptyObj) : any +>emptyObj : any +>emptyObj : {} +>hi : any + +interface MyMap { +>MyMap : MyMap +>T : T + + [key: string]: T; +>key : string +>T : T +} + +var m: MyMap = { +>m : MyMap +>MyMap : MyMap +>{ "0": 0, "1": 1, "2": 2, "Okay that's enough for today.": NaN} : { [x: string]: number; "0": number; "1": number; "2": number; "Okay that's enough for today.": number; } + + "0": 0, + "1": 1, + "2": 2, + "Okay that's enough for today.": NaN +>NaN : number + +}; + +var mResult1 = m[MyEmusEnum.emu]; +>mResult1 : number +>m[MyEmusEnum.emu] : number +>m : MyMap +>MyEmusEnum.emu : MyEmusEnum +>MyEmusEnum : typeof MyEmusEnum +>emu : MyEmusEnum + +var mResult2 = m[MyEmusEnum[MyEmusEnum.emu]]; +>mResult2 : number +>m[MyEmusEnum[MyEmusEnum.emu]] : number +>m : MyMap +>MyEmusEnum[MyEmusEnum.emu] : string +>MyEmusEnum : typeof MyEmusEnum +>MyEmusEnum.emu : MyEmusEnum +>MyEmusEnum : typeof MyEmusEnum +>emu : MyEmusEnum + +var mResult3 = m[hi]; +>mResult3 : number +>m[hi] : number +>m : MyMap +>hi : any + + diff --git a/tests/cases/compiler/noImplicitAnyIndexingSuppressed.ts b/tests/cases/compiler/noImplicitAnyIndexingSuppressed.ts new file mode 100644 index 00000000000..02121d254dd --- /dev/null +++ b/tests/cases/compiler/noImplicitAnyIndexingSuppressed.ts @@ -0,0 +1,49 @@ +//@noImplicitAny: true +//@suppress: implicitAnyIndex + +enum MyEmusEnum { + emu +} + +// Should be okay; should be a string. +var strRepresentation1 = MyEmusEnum[0] + +// Should be okay; should be a string. +var strRepresentation2 = MyEmusEnum[MyEmusEnum.emu] + +// Should be okay, as we suppress implicit 'any' property access checks +var strRepresentation3 = MyEmusEnum["monehh"]; + +// Should be okay; should be a MyEmusEnum +var strRepresentation4 = MyEmusEnum["emu"]; + + +// Should be okay, as we suppress implicit 'any' property access checks +var x = {}["hi"]; + +// Should be okay, as we suppress implicit 'any' property access checks +var y = {}[10]; + +var hi: any = "hi"; + +var emptyObj = {}; + +// Should be okay, as we suppress implicit 'any' property access checks +var z1 = emptyObj[hi]; +var z2 = (emptyObj)[hi]; + +interface MyMap { + [key: string]: T; +} + +var m: MyMap = { + "0": 0, + "1": 1, + "2": 2, + "Okay that's enough for today.": NaN +}; + +var mResult1 = m[MyEmusEnum.emu]; +var mResult2 = m[MyEmusEnum[MyEmusEnum.emu]]; +var mResult3 = m[hi]; + From 06e73d33bec6870ce5fa12aeda06c4bff13b825f Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Tue, 9 Dec 2014 14:13:44 -0800 Subject: [PATCH 011/141] Commandline definitions use a property "paramType" to specify the name of thier type e.g. File, Version, etc.., that was changed in the defintion to paramName, without changing the use site, changing it back to paramType. --- src/compiler/tsc.ts | 10 +++++----- src/compiler/types.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index fbe596ee0f7..b9e5b5710b4 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -447,12 +447,12 @@ module ts { var usageText = " "; if (option.shortName) { usageText += "-" + option.shortName; - usageText += getParamName(option); + usageText += getParamType(option); usageText += ", "; } usageText += "--" + option.name; - usageText += getParamName(option); + usageText += getParamType(option); usageColumn.push(usageText); descriptionColumn.push(getDiagnosticText(option.description)); @@ -477,9 +477,9 @@ module ts { sys.write(output); return; - function getParamName(option: CommandLineOption) { - if (option.paramName !== undefined) { - return " " + getDiagnosticText(option.paramName); + function getParamType(option: CommandLineOption) { + if (option.paramType !== undefined) { + return " " + getDiagnosticText(option.paramType); } return ""; } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index ecfb266f088..7868c4e970a 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1418,7 +1418,7 @@ module ts { type: string | Map; // "string", "number", "boolean", or an object literal mapping named values to actual values shortName?: string; // A short mnemonic for convenience - for instance, 'h' can be used in place of 'help'. description?: DiagnosticMessage; // The message describing what the command line switch does - paramName?: DiagnosticMessage; // The name to be used for a non-boolean option's parameter. + paramType?: DiagnosticMessage; // The name to be used for a non-boolean option's parameter. error?: DiagnosticMessage; // The error given when the argument does not fit a customized 'type'. } From 6170c56af4f133029b8c14825222f0045257d803 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 16:08:01 -0800 Subject: [PATCH 012/141] Remove 'isOpen' and 'version' from teh compiler's SourceFile type. Also, provide a way for creators of a source file to specify if they want parent nodes hooked up. --- src/compiler/parser.ts | 26 +++++++++++++++++++++++--- src/compiler/tsc.ts | 2 +- src/compiler/types.ts | 2 -- src/harness/harness.ts | 10 +++++----- src/harness/harnessLanguageService.ts | 10 ++++++++-- src/harness/projectsRunner.ts | 2 +- src/services/services.ts | 25 ++++++------------------- 7 files changed, 44 insertions(+), 33 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index d406b938d4e..4f4b7bd96e0 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -1015,7 +1015,24 @@ module ts { return 0; } - export function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen: boolean = false): SourceFile { + function fixupParentReferences(sourceFile: SourceFile) { + // normally parent references are set during binding. + // however here SourceFile data is used only for syntactic features so running the whole binding process is an overhead. + // walk over the nodes and set parent references + var parent: Node = sourceFile; + function walk(n: Node): void { + n.parent = parent; + + var saveParent = parent; + parent = n; + forEachChild(n, walk); + parent = saveParent; + } + + forEachChild(sourceFile, walk); + } + + export function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes = false): SourceFile { var parsingContext: ParsingContext; var identifiers: Map = {}; var identifierCount = 0; @@ -1131,10 +1148,13 @@ module ts { sourceFile.nodeCount = nodeCount; sourceFile.identifierCount = identifierCount; - sourceFile.version = version; - sourceFile.isOpen = isOpen; sourceFile.languageVersion = languageVersion; sourceFile.identifiers = identifiers; + + if (setParentNodes) { + fixupParentReferences(sourceFile); + } + return sourceFile; function setContextFlag(val: Boolean, flag: ParserContextFlags) { diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index fbe596ee0f7..bb031c0e902 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -158,7 +158,7 @@ module ts { } text = ""; } - return text !== undefined ? createSourceFile(filename, text, languageVersion, /*version:*/ "0") : undefined; + return text !== undefined ? createSourceFile(filename, text, languageVersion) : undefined; } function writeFile(fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void) { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 19baf052406..37a7775491e 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -895,8 +895,6 @@ module ts { nodeCount: number; identifierCount: number; symbolCount: number; - isOpen: boolean; - version: string; languageVersion: ScriptTarget; identifiers: Map; } diff --git a/src/harness/harness.ts b/src/harness/harness.ts index c0d3ddedce3..4afbc98c48a 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -538,8 +538,8 @@ module Harness { } export var defaultLibFileName = 'lib.d.ts'; - export var defaultLibSourceFile = ts.createSourceFile(defaultLibFileName, IO.readFile(libFolder + 'lib.core.d.ts'), /*languageVersion*/ ts.ScriptTarget.Latest, /*version:*/ "0"); - export var defaultES6LibSourceFile = ts.createSourceFile(defaultLibFileName, IO.readFile(libFolder + 'lib.core.es6.d.ts'), /*languageVersion*/ ts.ScriptTarget.Latest, /*version:*/ "0"); + export var defaultLibSourceFile = ts.createSourceFile(defaultLibFileName, IO.readFile(libFolder + 'lib.core.d.ts'), /*languageVersion*/ ts.ScriptTarget.Latest); + export var defaultES6LibSourceFile = ts.createSourceFile(defaultLibFileName, IO.readFile(libFolder + 'lib.core.es6.d.ts'), /*languageVersion*/ ts.ScriptTarget.Latest); // Cache these between executions so we don't have to re-parse them for every test @@ -565,7 +565,7 @@ module Harness { function register(file: { unitName: string; content: string; }) { if (file.content !== undefined) { var filename = ts.normalizeSlashes(file.unitName); - filemap[getCanonicalFileName(filename)] = ts.createSourceFile(filename, file.content, scriptTarget, /*version:*/ "0"); + filemap[getCanonicalFileName(filename)] = ts.createSourceFile(filename, file.content, scriptTarget); } }; inputFiles.forEach(register); @@ -579,7 +579,7 @@ module Harness { } else if (fn === fourslashFilename) { var tsFn = 'tests/cases/fourslash/' + fourslashFilename; - fourslashSourceFile = fourslashSourceFile || ts.createSourceFile(tsFn, Harness.IO.readFile(tsFn), scriptTarget, /*version*/ "0", /*isOpen*/ false); + fourslashSourceFile = fourslashSourceFile || ts.createSourceFile(tsFn, Harness.IO.readFile(tsFn), scriptTarget); return fourslashSourceFile; } else { @@ -786,7 +786,7 @@ module Harness { var register = (file: { unitName: string; content: string; }) => { if (file.content !== undefined) { var filename = ts.normalizeSlashes(file.unitName); - filemap[getCanonicalFileName(filename)] = ts.createSourceFile(filename, file.content, options.target, /*version:*/ "0"); + filemap[getCanonicalFileName(filename)] = ts.createSourceFile(filename, file.content, options.target); } }; inputFiles.forEach(register); diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts index d3082a17ba2..fe635349ec8 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -111,7 +111,10 @@ module Harness.LanguageService { scriptSnapshot: ts.IScriptSnapshot, version: string, isOpen: boolean): ts.SourceFile { - return ts.createSourceFile(fileName, scriptSnapshot.getText(0, scriptSnapshot.getLength()), compilationSettings.target, version, isOpen); + var sourceFile = ts.createSourceFile(fileName, scriptSnapshot.getText(0, scriptSnapshot.getLength()), compilationSettings.target); + sourceFile.version = version; + sourceFile.isOpen = isOpen; + return sourceFile; } public updateDocument( @@ -264,7 +267,10 @@ module Harness.LanguageService { /** Parse file given its source text */ public parseSourceText(fileName: string, sourceText: ts.IScriptSnapshot): ts.SourceFile { - return ts.createSourceFile(fileName, sourceText.getText(0, sourceText.getLength()), ts.ScriptTarget.Latest, "1", true); + var result = ts.createSourceFile(fileName, sourceText.getText(0, sourceText.getLength()), ts.ScriptTarget.Latest); + result.version = "1"; + result.isOpen = true; + return result; } /** Parse a file on disk given its fileName */ diff --git a/src/harness/projectsRunner.ts b/src/harness/projectsRunner.ts index f46f9ae3698..fc841aa3e3c 100644 --- a/src/harness/projectsRunner.ts +++ b/src/harness/projectsRunner.ts @@ -176,7 +176,7 @@ class ProjectRunner extends RunnerBase { else { var text = getSourceFileText(filename); if (text !== undefined) { - sourceFile = ts.createSourceFile(filename, text, languageVersion, /*version:*/ "0"); + sourceFile = ts.createSourceFile(filename, text, languageVersion); } } diff --git a/src/services/services.ts b/src/services/services.ts index 759d2bac2c5..b435c554420 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -59,6 +59,9 @@ module ts { } export interface SourceFile { + isOpen: boolean; + version: string; + getScriptSnapshot(): IScriptSnapshot; getNamedDeclarations(): Declaration[]; update(scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; @@ -866,7 +869,9 @@ module ts { } public static createSourceFileObject(filename: string, scriptSnapshot: IScriptSnapshot, languageVersion: ScriptTarget, version: string, isOpen: boolean) { - var newSourceFile = createSourceFile(filename, scriptSnapshot.getText(0, scriptSnapshot.getLength()), languageVersion, version, isOpen); + var newSourceFile = createSourceFile(filename, scriptSnapshot.getText(0, scriptSnapshot.getLength()), languageVersion, /*setParentNodes:*/ true); + newSourceFile.version = version; + newSourceFile.isOpen = isOpen; newSourceFile.scriptSnapshot = scriptSnapshot; return newSourceFile; } @@ -1678,7 +1683,6 @@ module ts { this.host.log("SyntaxTreeCache.Initialize: createSourceFile: " + (new Date().getTime() - start)); var start = new Date().getTime(); - fixupParentReferences(sourceFile); this.host.log("SyntaxTreeCache.Initialize: fixupParentRefs : " + (new Date().getTime() - start)); } else if (this.currentFileVersion !== version) { @@ -1693,7 +1697,6 @@ module ts { this.host.log("SyntaxTreeCache.Initialize: updateSourceFile: " + (new Date().getTime() - start)); var start = new Date().getTime(); - fixupParentReferences(sourceFile); this.host.log("SyntaxTreeCache.Initialize: fixupParentRefs : " + (new Date().getTime() - start)); } @@ -1703,22 +1706,6 @@ module ts { this.currentFilename = filename; this.currentSourceFile = sourceFile; } - - function fixupParentReferences(sourceFile: SourceFile) { - // normally parent references are set during binding. - // however here SourceFile data is used only for syntactic features so running the whole binding process is an overhead. - // walk over the nodes and set parent references - var parent: Node = sourceFile; - function walk(n: Node): void { - n.parent = parent; - - var saveParent = parent; - parent = n; - forEachChild(n, walk); - parent = saveParent; - } - forEachChild(sourceFile, walk); - } } public getCurrentSourceFile(filename: string): SourceFile { From fa4b68fa6c70a318263ea4fa124b2f5b1ccc35c6 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 16:39:52 -0800 Subject: [PATCH 013/141] Initial test harness for incremental parser tests. --- Jakefile | 1 + src/compiler/parser.ts | 1 + src/harness/harness.ts | 79 ++++++++++ src/harness/test262Runner.ts | 77 +--------- src/services/services.ts | 8 +- tests/cases/unittests/incrementalParser.ts | 166 +++++++++++++++++++++ 6 files changed, 252 insertions(+), 80 deletions(-) create mode 100644 tests/cases/unittests/incrementalParser.ts diff --git a/Jakefile b/Jakefile index 16330305b6a..039c085ba12 100644 --- a/Jakefile +++ b/Jakefile @@ -84,6 +84,7 @@ var harnessSources = [ ].map(function (f) { return path.join(harnessDirectory, f); }).concat([ + "incrementalParser.ts", "services/colorization.ts", "services/documentRegistry.ts", "services/preProcessFile.ts" diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 4f4b7bd96e0..a05b88cda87 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -359,6 +359,7 @@ module ts { case SyntaxKind.Block: case SyntaxKind.TryBlock: case SyntaxKind.FinallyBlock: + return children((node).statements); case SyntaxKind.ModuleBlock: return children((node).statements); case SyntaxKind.SourceFile: diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 4afbc98c48a..f51e492d6b5 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -111,6 +111,85 @@ module Utils { } }); } + + export function checkInvariants(node: ts.Node, parent: ts.Node): void { + if(node) { + if (node.pos < 0) { + throw new Error("node.pos < 0"); + } + if (node.end < 0) { + throw new Error("node.end < 0"); + } + if (node.end < node.pos) { + throw new Error("node.end < node.pos"); + } + if (node.parent !== parent) { + throw new Error("node.parent !== parent"); + } + if (parent) { + // Make sure each child is contained within the parent. + if (node.pos < parent.pos) { + throw new Error("node.pos < parent.pos"); + } + if (node.end > parent.end) { + throw new Error("node.end > parent.end"); + } + } + + ts.forEachChild(node, child => { + checkInvariants(child, node); + }); + + // Make sure each of the children is in order. + var currentPos = 0; + ts.forEachChild(node, + child => { + if (child.pos < currentPos) { + throw new Error("child.pos < currentPos"); + } + currentPos = child.end; + }, + (array: ts.NodeArray) => { + if (array.pos < node.pos) { + throw new Error("array.pos < node.pos"); + } + if (array.end > node.end) { + throw new Error("array.end > node.end"); + } + + if (array.pos < currentPos) { + throw new Error("array.pos < currentPos"); + } + for (var i = 0, n = array.length; i < n; i++) { + if (array[i].pos < currentPos) { + throw new Error("array[i].pos < currentPos"); + } + currentPos = array[i].end + } + + currentPos = array.end; + }); + + var childNodesAndArrays: any[] = []; + ts.forEachChild(node, child => { childNodesAndArrays.push(child) }, array => { childNodesAndArrays.push(array) }); + + for (var childName in node) { + if (childName === "parent" || childName === "nextContainer" || childName === "modifiers" || childName === "externalModuleIndicator") { + continue; + } + var child = (node)[childName]; + if (isNodeOrArray(child)) { + if (childNodesAndArrays.indexOf(child) < 0) { + throw new Error("Child when forEach'ing over node. " + (ts).SyntaxKind[node.kind] + "-" + childName); + } + } + } + } + } + + function isNodeOrArray(a: any): boolean { + return a !== undefined && typeof a.pos === "number"; + } } module Harness.Path { diff --git a/src/harness/test262Runner.ts b/src/harness/test262Runner.ts index a29c6ac8619..f9c083a2542 100644 --- a/src/harness/test262Runner.ts +++ b/src/harness/test262Runner.ts @@ -21,81 +21,6 @@ class Test262BaselineRunner extends RunnerBase { return Test262BaselineRunner.basePath + "/" + filename; } - private static checkInvariants(node: ts.Node, parent: ts.Node): void { - if (node) { - if (node.pos < 0) { - throw new Error("node.pos < 0"); - } - if (node.end < 0) { - throw new Error("node.end < 0"); - } - if (node.end < node.pos) { - throw new Error("node.end < node.pos"); - } - if (node.parent !== parent) { - throw new Error("node.parent !== parent"); - } - if (parent) { - // Make sure each child is contained within the parent. - if (node.pos < parent.pos) { - throw new Error("node.pos < parent.pos"); - } - if (node.end > parent.end) { - throw new Error("node.end > parent.end"); - } - } - - ts.forEachChild(node, child => { - Test262BaselineRunner.checkInvariants(child, node); - }); - - // Make sure each of the children is in order. - var currentPos = 0; - ts.forEachChild(node, - child => { - if (child.pos < currentPos) { - throw new Error("child.pos < currentPos"); - } - currentPos = child.end; - }, - (array: ts.NodeArray) => { - if (array.pos < node.pos) { - throw new Error("array.pos < node.pos"); - } - if (array.end > node.end) { - throw new Error("array.end > node.end"); - } - - if (array.pos < currentPos) { - throw new Error("array.pos < currentPos"); - } - for (var i = 0, n = array.length; i < n; i++) { - if (array[i].pos < currentPos) { - throw new Error("array[i].pos < currentPos"); - } - currentPos = array[i].end - } - - currentPos = array.end; - }); - - var childNodesAndArrays: any[] = []; - ts.forEachChild(node, child => { childNodesAndArrays.push(child) }, array => { childNodesAndArrays.push(array) }); - - for (var childName in node) { - if (childName === "parent" || childName === "nextContainer" || childName === "modifiers" || childName === "externalModuleIndicator") { - continue; - } - var child = (node)[childName]; - if (Test262BaselineRunner.isNodeOrArray(child)) { - if (childNodesAndArrays.indexOf(child) < 0) { - throw new Error("Child when forEach'ing over node. " + (ts).SyntaxKind[node.kind] + "-" + childName); - } - } - } - } - } - private static serializeSourceFile(file: ts.SourceFile): string { function getKindName(k: number): string { return (ts).SyntaxKind[k] @@ -264,7 +189,7 @@ class Test262BaselineRunner extends RunnerBase { it('satisfies invariants', () => { var sourceFile = testState.checker.getProgram().getSourceFile(Test262BaselineRunner.getTestFilePath(testState.filename)); - Test262BaselineRunner.checkInvariants(sourceFile, /*parent:*/ undefined); + Utils.checkInvariants(sourceFile, /*parent:*/ undefined); }); it('has the expected AST',() => { diff --git a/src/services/services.ts b/src/services/services.ts index b435c554420..07eafbcbeaf 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1679,7 +1679,7 @@ module ts { var scriptSnapshot = this.hostCache.getScriptSnapshot(filename); var start = new Date().getTime(); - sourceFile = createSourceFileFromScriptSnapshot(filename, scriptSnapshot, getDefaultCompilerOptions(), version, /*isOpen*/ true); + sourceFile = createLanguageServiceSourceFile(filename, scriptSnapshot, getDefaultCompilerOptions(), version, /*isOpen*/ true); this.host.log("SyntaxTreeCache.Initialize: createSourceFile: " + (new Date().getTime() - start)); var start = new Date().getTime(); @@ -1692,7 +1692,7 @@ module ts { var start = new Date().getTime(); sourceFile = !editRange - ? createSourceFileFromScriptSnapshot(filename, scriptSnapshot, getDefaultCompilerOptions(), version, /*isOpen*/ true) + ? createLanguageServiceSourceFile(filename, scriptSnapshot, getDefaultCompilerOptions(), version, /*isOpen*/ true) : this.currentSourceFile.update(scriptSnapshot, version, /*isOpen*/ true, editRange); this.host.log("SyntaxTreeCache.Initialize: updateSourceFile: " + (new Date().getTime() - start)); @@ -1718,7 +1718,7 @@ module ts { } } - function createSourceFileFromScriptSnapshot(filename: string, scriptSnapshot: IScriptSnapshot, settings: CompilerOptions, version: string, isOpen: boolean) { + export function createLanguageServiceSourceFile(filename: string, scriptSnapshot: IScriptSnapshot, settings: CompilerOptions, version: string, isOpen: boolean): SourceFile { return SourceFileObject.createSourceFileObject(filename, scriptSnapshot, settings.target, version, isOpen); } @@ -1769,7 +1769,7 @@ module ts { var bucket = getBucketForCompilationSettings(compilationSettings, /*createIfMissing*/ true); var entry = lookUp(bucket, filename); if (!entry) { - var sourceFile = createSourceFileFromScriptSnapshot(filename, scriptSnapshot, compilationSettings, version, isOpen); + var sourceFile = createLanguageServiceSourceFile(filename, scriptSnapshot, compilationSettings, version, isOpen); bucket[filename] = entry = { sourceFile: sourceFile, diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts new file mode 100644 index 00000000000..538996bc667 --- /dev/null +++ b/tests/cases/unittests/incrementalParser.ts @@ -0,0 +1,166 @@ +/// +/// + +module ts { + function withChange(text: IScriptSnapshot, start: number, length: number, newText: string): { text: IScriptSnapshot; textChangeRange: TextChangeRange; } { + var contents = text.getText(0, text.getLength()); + var newContents = contents.substr(0, start) + newText + contents.substring(start + length); + + return { text: ScriptSnapshot.fromString(newContents), textChangeRange: new TextChangeRange(new TextSpan(start, length), newText.length) } + } + + function withInsert(text: IScriptSnapshot, start: number, newText: string): { text: IScriptSnapshot; textChangeRange: TextChangeRange; } { + return withChange(text, start, 0, newText); + } + + function withDelete(text: IScriptSnapshot, start: number, length: number): { text: IScriptSnapshot; textChangeRange: TextChangeRange; } { + return withChange(text, start, length, ""); + } + + // NOTE: 'reusedElements' is the expected count of elements reused from the old tree to the new + // tree. It may change as we tweak the parser. If the count increases then that should always + // be a good thing. If it decreases, that's not great (less reusability), but that may be + // unavoidable. If it does decrease an investigation should be done to make sure that things + // are still ok and we're still appropriately reusing most of the tree. + function compareTrees(oldText: IScriptSnapshot, newText: IScriptSnapshot, textChangeRange: TextChangeRange, expectedReusedElements: number = -1): void { + // Create a tree for the new text, in a non-incremental fashion. + var options: CompilerOptions = {}; + options.target = ScriptTarget.ES5; + + var newTree = createLanguageServiceSourceFile(/*fileName:*/ "", newText, options, /*version:*/ "0", /*isOpen:*/ true); + Utils.checkInvariants(newTree, /*parent:*/ undefined); + + // Create a tree for the new text, in an incremental fashion. + var oldTree = createLanguageServiceSourceFile(/*fileName:*/ "", oldText, options, /*version:*/ "0", /*isOpen:*/ true); + Utils.checkInvariants(oldTree, /*parent:*/ undefined); + + var incrementalNewTree = oldTree.update(newText, "1", /*isOpen:*/ true, textChangeRange); + Utils.checkInvariants(incrementalNewTree, /*parent:*/ undefined); + + // We should get the same tree when doign a full or incremental parse. + assertStructuralEquals(newTree, incrementalNewTree); + + // There should be no reused nodes between two trees that are fully parsed. + Debug.assert(reusedElements(oldTree, newTree) === 0); + + if (expectedReusedElements !== -1) { + var actualReusedCount = reusedElements(oldTree, incrementalNewTree); + Debug.assert(actualReusedCount === expectedReusedElements, actualReusedCount + " !== " + expectedReusedElements); + } + } + + function assertStructuralEquals(node1: Node, node2: Node) { + if (node1 === node2) { + return; + } + + if (!node1 || !node2) { + throw new Error("!node1 || !node2"); + } + + if (node1.pos !== node2.pos) { + throw new Error("node1.pos !== node2.pos"); + } + + if (node1.end !== node2.end) { + throw new Error("node1.end !== node2.end"); + } + + if (node1.kind !== node2.kind) { + throw new Error("node1.kind !== node2.kind"); + } + + if (node1.flags !== node2.flags) { + throw new Error("node1.flags !== node2.flags"); + } + + if (node1.parserContextFlags !== node2.parserContextFlags) { + throw new Error("node1.parserContextFlags !== node2.parserContextFlags"); + } + + forEachChild(node1, + child1 => { + var childName = findChildName(node1, child1); + var child2: Node = (node2)[childName]; + + assertStructuralEquals(child1, child2); + }, + (array1: NodeArray) => { + var childName = findChildName(node1, array1); + var array2: NodeArray = (node2)[childName]; + + assertArrayStructuralEquals(array1, array2); + }); + } + + function assertArrayStructuralEquals(array1: NodeArray, array2: NodeArray) { + if (array1 === array2) { + return; + } + + if (!array1 || !array2) { + throw new Error("!array1 || !array2"); + } + + if (array1.pos !== array2.pos) { + throw new Error("array1.pos !== array2.pos"); + } + + if (array1.end !== array2.end) { + throw new Error("array1.end !== array2.end"); + } + + if (array1.length !== array2.length) { + throw new Error("array1.length !== array2.length"); + } + + for (var i = 0, n = array1.length; i < n; i++) { + assertStructuralEquals(array1[i], array2[i]); + } + } + + function findChildName(parent: any, child: any) { + for (var name in parent) { + if (parent.hasOwnProperty(name) && parent[name] === child) { + return name; + } + } + + throw new Error("Could not find child in parent"); + } + + function reusedElements(oldNode: SourceFile, newNode: SourceFile): number { + var allOldElements = collectElements(oldNode); + var allNewElements = collectElements(newNode); + + return filter(allOldElements, v => contains(allNewElements, v)).length; + } + + function collectElements(node: Node) { + var result: Node[] = []; + visit(node); + return result; + + function visit(node: Node) { + result.push(node); + forEachChild(node, visit); + } + } + + describe('Incremental',() => { + it('Inserting into method',() => { + var source = "class C {\r\n" + + " public foo1() { }\r\n" + + " public foo2() {\r\n" + + " return 1;\r\n" + + " }\r\n" + + " public foo3() { }\r\n" + + "}"; + + var oldText = ScriptSnapshot.fromString(source); + var semicolonIndex = source.indexOf(";"); + var newTextAndChange = withInsert(oldText, semicolonIndex, " + 1"); + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); + }); +} \ No newline at end of file From 783b0e53d1fa815a22e7ebe81fe985fc0caa6832 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 16:43:45 -0800 Subject: [PATCH 014/141] Remove unnecessary switch case. --- src/compiler/parser.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index a05b88cda87..4f4b7bd96e0 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -359,7 +359,6 @@ module ts { case SyntaxKind.Block: case SyntaxKind.TryBlock: case SyntaxKind.FinallyBlock: - return children((node).statements); case SyntaxKind.ModuleBlock: return children((node).statements); case SyntaxKind.SourceFile: From 9d457701cc707533fe8eafe038c18a582134797d Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 16:47:19 -0800 Subject: [PATCH 015/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 538996bc667..260a6855b5e 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -162,5 +162,20 @@ module ts { var newTextAndChange = withInsert(oldText, semicolonIndex, " + 1"); compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + + it('Deleting from method',() => { + var source = "class C {\r\n" + + " public foo1() { }\r\n" + + " public foo2() {\r\n" + + " return 1 + 1;\r\n" + + " }\r\n" + + " public foo3() { }\r\n" + + "}"; + + var index = source.indexOf("+ 1"); + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withDelete(oldText, index, "+ 1".length); + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); }); } \ No newline at end of file From a268cbf2d8c065893405445ec532d9e2fa100a70 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 16:50:31 -0800 Subject: [PATCH 016/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 260a6855b5e..9a80c400899 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -177,5 +177,15 @@ module ts { var newTextAndChange = withDelete(oldText, index, "+ 1".length); compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + + it('Regular expression 1', () => { + var source = "class C { public foo1() { /; } public foo2() { return 1;} public foo3() { } }"; + + var semicolonIndex = source.indexOf(";}"); + + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withInsert(oldText, semicolonIndex, "/"); + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); }); } \ No newline at end of file From 2497d9abdf38e863a7e9013439dfca4324fb9670 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 16:51:55 -0800 Subject: [PATCH 017/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 9a80c400899..6029c4b6113 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -187,5 +187,15 @@ module ts { var newTextAndChange = withInsert(oldText, semicolonIndex, "/"); compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + + it('Regular expression 2',() => { + var source = "class C { public foo1() { ; } public foo2() { return 1/;} public foo3() { } }"; + + var semicolonIndex = source.indexOf(";"); + + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withInsert(oldText, semicolonIndex, "/"); + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); }); } \ No newline at end of file From d8ff734bfc981a99efac3895d643e5a45cfc4864 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 16:53:18 -0800 Subject: [PATCH 018/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 6029c4b6113..44fa9f4a693 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -160,6 +160,7 @@ module ts { var oldText = ScriptSnapshot.fromString(source); var semicolonIndex = source.indexOf(";"); var newTextAndChange = withInsert(oldText, semicolonIndex, " + 1"); + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); @@ -175,6 +176,7 @@ module ts { var index = source.indexOf("+ 1"); var oldText = ScriptSnapshot.fromString(source); var newTextAndChange = withDelete(oldText, index, "+ 1".length); + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); @@ -182,9 +184,9 @@ module ts { var source = "class C { public foo1() { /; } public foo2() { return 1;} public foo3() { } }"; var semicolonIndex = source.indexOf(";}"); - var oldText = ScriptSnapshot.fromString(source); var newTextAndChange = withInsert(oldText, semicolonIndex, "/"); + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); @@ -192,9 +194,19 @@ module ts { var source = "class C { public foo1() { ; } public foo2() { return 1/;} public foo3() { } }"; var semicolonIndex = source.indexOf(";"); - var oldText = ScriptSnapshot.fromString(source); var newTextAndChange = withInsert(oldText, semicolonIndex, "/"); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); + + it('Regular comment 1',() => { + var source = "class C { public foo1() { /; } public foo2() { return 1; } public foo3() { } }"; + + var semicolonIndex = source.indexOf(";"); + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withInsert(oldText, semicolonIndex, "/"); + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); }); From 4de7fa0181ba3d721fed6769e49e1a71b3260309 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 16:54:06 -0800 Subject: [PATCH 019/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 44fa9f4a693..89c350084e6 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -200,7 +200,7 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); - it('Regular comment 1',() => { + it('Comment 1',() => { var source = "class C { public foo1() { /; } public foo2() { return 1; } public foo3() { } }"; var semicolonIndex = source.indexOf(";"); @@ -209,5 +209,14 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + + it('Comment 2',() => { + var source = "class C { public foo1() { /; } public foo2() { return 1; } public foo3() { } }"; + + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withInsert(oldText, 0, "//"); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); }); } \ No newline at end of file From bcffd5331c05f53d2f3f5e0c5f32ff6b09c1d517 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 16:55:02 -0800 Subject: [PATCH 020/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 89c350084e6..e2dd9b0f939 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -218,5 +218,14 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + + it('Comment 3',() => { + var source = "//class C { public foo1() { /; } public foo2() { return 1; } public foo3() { } }"; + + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withDelete(oldText, 0, 2); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); }); } \ No newline at end of file From 778e180e400a5aef10c1494c114c612bf49de335 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 16:56:00 -0800 Subject: [PATCH 021/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index e2dd9b0f939..d2cc0d49892 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -227,5 +227,15 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + + it('Comment 4',() => { + var source = "class C { public foo1() { /; } public foo2() { */ return 1; } public foo3() { } }"; + + var index = source.indexOf(";"); + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withInsert(oldText, index, "*"); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); }); } \ No newline at end of file From de84ddd8151da44b38abdf5875b393e07d155690 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 16:57:51 -0800 Subject: [PATCH 022/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index d2cc0d49892..41cee54c6c6 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -237,5 +237,20 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + + it('Parameter 1',() => { + // Should be able to reuse all the parameters. + var source = "class C {\r\n" + + " public foo2(a, b, c, d) {\r\n" + + " return 1;\r\n" + + " }\r\n" + + "}"; + + var semicolonIndex = source.indexOf(";"); + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withInsert(oldText, semicolonIndex, " + 1"); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); }); } \ No newline at end of file From 45f87131ab2a58040c601369ffdfcd63ab9c8dc4 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 16:59:02 -0800 Subject: [PATCH 023/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 41cee54c6c6..a68e794418d 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -252,5 +252,16 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + + it('Type member 1',() => { + // Should be able to reuse most of the type members. + var source = "interface I { a: number; b: string; (c): d; new (e): f; g(): h }"; + + var index = source.indexOf(": string"); + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withInsert(oldText, index, "?"); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); }); } \ No newline at end of file From a0a8ee0d4f7227862ed4a5f46eeeca4c0ffee011 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 17:05:14 -0800 Subject: [PATCH 024/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index a68e794418d..d69343312e2 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -263,5 +263,16 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + + it('Enum element 1',() => { + // Should be able to reuse most of the enum elements. + var source = "enum E { a = 1, b = 1 << 1, c = 3, e = 4, f = 5, g = 7, h = 8, i = 9, j = 10 }"; + + var index = source.indexOf("<<"); + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withChange(oldText, index, 2, "+"); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); }); } \ No newline at end of file From e41bed82e4201589850d44421be47f07469bad83 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 17:06:44 -0800 Subject: [PATCH 025/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index d69343312e2..e9031e45b50 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -274,5 +274,19 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + + it('Strict mode 1',() => { + // In non-strict mode 'package' means nothing and can be reused. In strict mode though + // we'll have to reparse the nodes (and generate an error for 'package();' + // + // Note: in this test we don't actually add 'use strict'. This is so we can compare + // reuse with/without a strict mode change. + var source = "foo1();\r\nfoo1();\r\nfoo1();\r\package();"; + + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withInsert(oldText, 0, "'strict';\r\n"); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); }); } \ No newline at end of file From bb34a20b4d6feb6544e860915c7d5c3050c3152d Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 17:07:51 -0800 Subject: [PATCH 026/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index e9031e45b50..df4c6fdc694 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -288,5 +288,17 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + + it('Strict mode 2',() => { + // In non-strict mode 'package' means nothing and can be reused. In strict mode though + // we'll have to reparse the nodes (and generate an error for 'package();' + var source = "foo1();\r\nfoo1();\r\nfoo1();\r\package();"; + + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withInsert(oldText, 0, "'use strict';\r\n"); + + // Note the decreased reuse of nodes compared to 'Strict mode 1' + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); }); } \ No newline at end of file From e59ba41d17097419b4b60902b6d00aba86633d25 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 17:09:33 -0800 Subject: [PATCH 027/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index df4c6fdc694..ad4d2c01c7a 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -300,5 +300,20 @@ module ts { // Note the decreased reuse of nodes compared to 'Strict mode 1' compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + + it('Strict mode 3',() => { + // In non-strict mode 'package' means nothing and can be reused. In strict mode though + // we'll have to reparse the nodes (and generate an error for 'package();' + // + // Note: in this test we don't actually remove 'use strict'. This is so we can compare + // reuse with/without a strict mode change. + var source = "'strict';\r\nfoo1();\r\nfoo1();\r\nfoo1();\r\npackage();"; + + var index = source.indexOf('f'); + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withDelete(oldText, 0, index); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); }); } \ No newline at end of file From 22f39c5f9940461427f495afcfb99ebaa90df616 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 17:11:32 -0800 Subject: [PATCH 028/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index ad4d2c01c7a..4ed24357d5c 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -315,5 +315,18 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + + it('Strict mode 4',() => { + // In non-strict mode 'package' means nothing and can be reused. In strict mode though + // we'll have to reparse the nodes (and generate an error for 'package();' + var source = "'use strict';\r\nfoo1();\r\nfoo1();\r\nfoo1();\r\npackage();"; + + var index = source.indexOf('f'); + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withDelete(oldText, 0, index); + + // Note the decreased reuse of nodes compared to testStrictMode3 + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); }); } \ No newline at end of file From 7f605332fc455a2e5acf5190eba7c7197fab3932 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 17:12:44 -0800 Subject: [PATCH 029/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 4ed24357d5c..1e74c0fc843 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -328,5 +328,15 @@ module ts { // Note the decreased reuse of nodes compared to testStrictMode3 compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + + it('Strict mode 5',() => { + var source = "'use blahhh';\r\nfoo1();\r\nfoo2();\r\nfoo3();\r\nfoo4();\r\nfoo4();\r\nfoo6();\r\nfoo7();\r\nfoo8();\r\nfoo9();\r\n"; + + var index = source.indexOf('b'); + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withChange(oldText, index, 6, "strict"); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); }); } \ No newline at end of file From fa86c88c47b9106021498f804ee5875f63a4c526 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 17:13:33 -0800 Subject: [PATCH 030/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 1e74c0fc843..b3732f9333b 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -338,5 +338,15 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + + it('Strict mode 6',() => { + var source = "'use strict';\r\nfoo1();\r\nfoo2();\r\nfoo3();\r\nfoo4();\r\nfoo4();\r\nfoo6();\r\nfoo7();\r\nfoo8();\r\nfoo9();\r\n"; + + var index = source.indexOf('s'); + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withChange(oldText, index, 6, "blahhh"); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 37); + }); }); } \ No newline at end of file From d5496779117506832cd1e8e5a716fd9f72821fb1 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 17:15:13 -0800 Subject: [PATCH 031/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index b3732f9333b..8f41ce5ea7c 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -346,7 +346,17 @@ module ts { var oldText = ScriptSnapshot.fromString(source); var newTextAndChange = withChange(oldText, index, 6, "blahhh"); - compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 37); + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); + + it('Strict mode 7',() => { + var source = "'use blahhh';\r\nfoo1();\r\nfoo2();\r\nfoo3();\r\nfoo4();\r\nfoo4();\r\nfoo6();\r\nfoo7();\r\nfoo8();\r\nfoo9();\r\n"; + + var index = source.indexOf('f'); + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withDelete(oldText, 0, index); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); }); } \ No newline at end of file From 82098d1568ec92f56dd37d8887e5405cff0422dd Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 17:18:18 -0800 Subject: [PATCH 032/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 8f41ce5ea7c..f2be1fdaf69 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -358,5 +358,15 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + + it('Parenthesized expression to arrow function',() => { + var source = "var v = (a, b, c, d, e)"; + + var index = source.indexOf('a'); + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withInsert(oldText, index + 1, ":"); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, -1); + }); }); } \ No newline at end of file From a1b8a7891b61ec73e87db8f2be1d7cf6675900be Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 17:19:44 -0800 Subject: [PATCH 033/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index f2be1fdaf69..23fa6b6f1b3 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -368,5 +368,15 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, -1); }); + + it('Arrow function to parenthesized expression',() => { + var source = "var v = (a:, b, c, d, e)"; + + var index = source.indexOf(':'); + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withDelete(oldText, index, 1); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, -1); + }); }); } \ No newline at end of file From d5e2ab993e93c5aba593054b5a2ad444e928b46b Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 17:20:44 -0800 Subject: [PATCH 034/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 23fa6b6f1b3..9749b58d1da 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -378,5 +378,15 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, -1); }); + + it('Speculative generic lookahead 1',() => { + var source = "var v = Fe"; + + var index = source.indexOf('b'); + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withInsert(oldText, index + 1, ",x"); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, -1); + }); }); } \ No newline at end of file From 6058dbbc2f56bc7e86dbb287e8cf98303366749b Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 17:21:30 -0800 Subject: [PATCH 035/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 9749b58d1da..ec8af54ca73 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -388,5 +388,15 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, -1); }); + + it('Speculative generic lookahead 2',() => { + var source = "var v = Fe"; + + var index = source.indexOf('b'); + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withInsert(oldText, index + 1, ",x"); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, -1); + }); }); } \ No newline at end of file From c482a9e0e3a2845a21aa28254f4b0e6437fe34b1 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 17:22:15 -0800 Subject: [PATCH 036/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index ec8af54ca73..3e51d8de8cc 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -398,5 +398,15 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, -1); }); + + it('Speculative generic lookahead 3',() => { + var source = "var v = Fe"; + + var index = source.indexOf('b'); + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withInsert(oldText, index + 1, ",x"); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, -1); + }); }); } \ No newline at end of file From 1cd2fb4333206e1d022d23aa5f0e74e1a59f6674 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 17:23:14 -0800 Subject: [PATCH 037/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 3e51d8de8cc..2ff47f52825 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -408,5 +408,15 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, -1); }); + + it('Speculative generic lookahead 4',() => { + var source = "var v = Fe"; + + var index = source.indexOf('b'); + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withInsert(oldText, index + 1, ",x"); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, -1); + }); }); } \ No newline at end of file From c7fcbb9f6b69b6152bcc00a32aa7f7bbeda4fb30 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 17:29:52 -0800 Subject: [PATCH 038/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 2ff47f52825..5ed3103e346 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -147,6 +147,18 @@ module ts { } } + function deleteCode(source: string, index: number, toDelete: string) { + var repeat = toDelete.length; + + for (var i = 0; i < repeat; i++) { + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withDelete(oldText, index, 1); + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, -1); + + source = newTextAndChange.text.getText(0, newTextAndChange.text.getLength()); + } + } + describe('Incremental',() => { it('Inserting into method',() => { var source = "class C {\r\n" + @@ -418,5 +430,14 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, -1); }); + + // Simulated typing tests. + + it('Type extends clause 1',() => { + var source = "interface IFoo { }\r\ninterface Array extends IFoo { }"; + + var index = source.indexOf('extends'); + deleteCode(source, index, "extends IFoo"); + }); }); } \ No newline at end of file From c436ff47a1718f0137fb37aa70426246350fa0fd Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 17:33:15 -0800 Subject: [PATCH 039/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 5ed3103e346..9f4dba5f9f7 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -431,6 +431,16 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, -1); }); + it('Assertion to arrow function',() => { + var source = "var v = (a);"; + + var index = source.indexOf(';'); + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withInsert(oldText, index, " => 1"); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); + // Simulated typing tests. it('Type extends clause 1',() => { From c307d306c03a39de7643095f34b4e7d68e4cd72c Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 17:34:26 -0800 Subject: [PATCH 040/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 9f4dba5f9f7..7c81320678f 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -441,6 +441,16 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + it('Arrow function to assertion',() => { + var source = "var v = (a) => 1;"; + + var index = source.indexOf(' =>'); + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withDelete(oldText, index, " => 1".length); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); + // Simulated typing tests. it('Type extends clause 1',() => { From e564fa5c9d7776908a86d8342f624af6f0a58a0a Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 17:37:17 -0800 Subject: [PATCH 041/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 7c81320678f..185f1510e2c 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -451,6 +451,16 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + it('Contextual shift to shift-equals',() => { + var source = "var v = 1 >> = 2"; + + var index = source.indexOf('>> ='); + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withDelete(oldText, index + 2, 1); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); + // Simulated typing tests. it('Type extends clause 1',() => { From 666363a7de4f9f6222049069bbd8c9a03d5ab916 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 17:42:36 -0800 Subject: [PATCH 042/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 185f1510e2c..a464bdbe49d 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -461,6 +461,16 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + it('Contextual shift-equals to shift',() => { + var source = "var v = 1 >>= 2"; + + var index = source.indexOf('>>='); + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withInsert(oldText, index + 2, " "); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); + // Simulated typing tests. it('Type extends clause 1',() => { From 5b2778c200a90a4bddff8d32bdcf8429cd2cc4ab Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 17:45:50 -0800 Subject: [PATCH 043/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index a464bdbe49d..38b1716e21a 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -471,6 +471,16 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + it('Contextual shift to generic invocation',() => { + var source = "var v = T>>(2)"; + + var index = source.indexOf('T'); + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withInsert(oldText, index, "Foo { From 418c0d9d91ff169a20331744b0ec367b65b2138a Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 17:57:13 -0800 Subject: [PATCH 044/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 38b1716e21a..531388b5cab 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -481,6 +481,16 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + it('Test generic invocation to contextual shift',() => { + var source = "var v = Foo>(2)"; + + var index = source.indexOf('Foo { From b8942992a02e47899244b8ff105423aff78229d6 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 17:58:23 -0800 Subject: [PATCH 045/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 531388b5cab..50387a32def 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -491,6 +491,16 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + it('Contextual shift to generic type and initializer',() => { + var source = "var v = T>>=2;"; + + var index = source.indexOf('='); + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withChange(oldText, index, "= ".length, ": Foo { From 18f9acb7fc88ef12cfae3d95479a2f317a541c1f Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 18:00:08 -0800 Subject: [PATCH 046/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 50387a32def..fc2a4fd452a 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -501,6 +501,17 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + it('Generic type and initializer to contextual shift',() => { + var source = "var v : Foo>=2;"; + + var index = source.indexOf(':'); + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withChange(oldText, index, ": Foo { + var source = "var v = (a, b) = c"; + + var index = source.indexOf("= c") + 1; + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withInsert(oldText, index, ">"); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); it('Arrow function to parenthesized expression',() => { From ec13fbee96c2d0f03d906991c68cb67544fd863c Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 18:05:45 -0800 Subject: [PATCH 048/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 52d40c1de76..9027d58a312 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -391,14 +391,24 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); - it('Arrow function to parenthesized expression',() => { + it('Arrow function to parenthesized expression 1',() => { var source = "var v = (a:, b, c, d, e)"; var index = source.indexOf(':'); var oldText = ScriptSnapshot.fromString(source); var newTextAndChange = withDelete(oldText, index, 1); - compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, -1); + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); + + it('Arrow function to parenthesized expression 2',() => { + var source = "var v = (a, b) => c"; + + var index = source.indexOf(">"); + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withDelete(oldText, index, 1); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); it('Speculative generic lookahead 1',() => { From d6fa98d00b752bc64b2118dbd40cab3d8ab196d6 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 18:07:48 -0800 Subject: [PATCH 049/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 9027d58a312..6332b3f53f1 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -532,6 +532,16 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + it('Arithmetic operator to type argument list',() => { + var source = "var v = new Dictionary0"; + + var index = source.indexOf("0"); + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withChange(oldText, index, 1, "()"); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); + // Simulated typing tests. it('Type extends clause 1',() => { From 78c4b92216863c75b4b039f800d39daa68b81796 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 18:10:15 -0800 Subject: [PATCH 050/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 6332b3f53f1..169be8474ee 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -542,6 +542,16 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + it('Type argument list to arithmetic operator',() => { + var source = "var v = new Dictionary()"; + + var index = source.indexOf("()"); + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withDelete(oldText, index, 2); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, -1); + }); + // Simulated typing tests. it('Type extends clause 1',() => { From 025dd23c1bcfab8812f7b1b498780132b0bf58e8 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 18:11:56 -0800 Subject: [PATCH 051/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 169be8474ee..98f100380f4 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -549,7 +549,18 @@ module ts { var oldText = ScriptSnapshot.fromString(source); var newTextAndChange = withDelete(oldText, index, 2); - compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, -1); + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); + + it('Yield context 1',() => { + // We're changing from a non-generator to a genarator. We can't reuse statement nodes. + var source = "function foo() {\r\nyield(foo1);\r\n}"; + + var oldText = ScriptSnapshot.fromString(source); + var index = source.indexOf("foo"); + var newTextAndChange = withInsert(oldText, index, "*"); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); // Simulated typing tests. From 197b62e92abb00113c482019cf7ee7c99b298b87 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 18:13:09 -0800 Subject: [PATCH 052/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 98f100380f4..e0800c2c51d 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -563,6 +563,17 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + it('Yield context 2',() => { + // We're changing from a generator to a non-genarator. We can't reuse statement nodes. + var source = "function *foo() {\r\nyield(foo1);\r\n}"; + + var oldText = ScriptSnapshot.fromString(source); + var index = source.indexOf("*"); + var newTextAndChange = withDelete(oldText, index, "*".length); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); + // Simulated typing tests. it('Type extends clause 1',() => { From afec0fb9f08f2aab8a61321cc561c1edb4284825 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 18:17:11 -0800 Subject: [PATCH 053/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index e0800c2c51d..a2d296f459e 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -574,6 +574,16 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + it('Delete semicolon',() => { + var source = "export class Foo {\r\n}\r\n\r\nexport var foo = new Foo();\r\n\r\n export function test(foo: Foo) {\r\n return true;\r\n }\r\n"; + + var oldText = ScriptSnapshot.fromString(source); + var index = source.lastIndexOf(";"); + var newTextAndChange = withDelete(oldText, index, 1); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); + // Simulated typing tests. it('Type extends clause 1',() => { From 9b53947d5111c7be866dc918ff4cd83b15637e4c Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 18:23:25 -0800 Subject: [PATCH 054/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index a2d296f459e..35f75752419 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -584,6 +584,16 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + it('Edit after empty type parameter list',() => { + var source = "class Dictionary<> { }\r\nvar y;\r\n"; + + var oldText = ScriptSnapshot.fromString(source); + var index = source.length; + var newTextAndChange = withInsert(oldText, index, "var x;"); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); + // Simulated typing tests. it('Type extends clause 1',() => { From c489c4fcfec9597770c8513896c09383e87adbd3 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 18:24:16 -0800 Subject: [PATCH 055/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 35f75752419..1185e91f5b9 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -594,6 +594,16 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + it('Delete parameter after comment',() => { + var source = "function fn(/* comment! */ a: number, c) { }"; + + var oldText = ScriptSnapshot.fromString(source); + var index = source.indexOf("a:"); + var newTextAndChange = withDelete(oldText, index, "a: number,".length); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); + // Simulated typing tests. it('Type extends clause 1',() => { From dad3faecf3bdfddf7ab52f05beb92a30b1cdb8a0 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 18:25:10 -0800 Subject: [PATCH 056/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 1185e91f5b9..9dbb2839c69 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -604,6 +604,20 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + it('Modifier added to accessor',() => { + var source = + "class C {\ + set Bar(bar:string) {}\ +}\ +var o2 = { set Foo(val:number) { } };"; + + var oldText = ScriptSnapshot.fromString(source); + var index = source.indexOf("set"); + var newTextAndChange = withInsert(oldText, index, "public "); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); + // Simulated typing tests. it('Type extends clause 1',() => { From 467d303c67aef502d61f03d16c0d79916cc66dc7 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 18:26:50 -0800 Subject: [PATCH 057/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 9dbb2839c69..74a9c2fae58 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -618,6 +618,22 @@ var o2 = { set Foo(val:number) { } };"; compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + it('Insert parameter ahead of parameter',() => { + var source = + "alert(100);\ +\ +class OverloadedMonster {\ +constructor();\ +constructor(name) { }\ +}"; + + var oldText = ScriptSnapshot.fromString(source); + var index = source.indexOf("100"); + var newTextAndChange = withInsert(oldText, index, "'1', "); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); + // Simulated typing tests. it('Type extends clause 1',() => { From b8bb8e999871144bc0b475e05ae3fe74587605ee Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 18:27:59 -0800 Subject: [PATCH 058/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 74a9c2fae58..67078b788bc 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -606,7 +606,7 @@ module ts { it('Modifier added to accessor',() => { var source = - "class C {\ +"class C {\ set Bar(bar:string) {}\ }\ var o2 = { set Foo(val:number) { } };"; @@ -620,7 +620,7 @@ var o2 = { set Foo(val:number) { } };"; it('Insert parameter ahead of parameter',() => { var source = - "alert(100);\ +"alert(100);\ \ class OverloadedMonster {\ constructor();\ @@ -634,6 +634,19 @@ constructor(name) { }\ compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + it('Insert declare modifier before module',() => { + var source = +"module mAmbient {\ +module m3 { }\ +}"; + + var oldText = ScriptSnapshot.fromString(source); + var index = 0; + var newTextAndChange = withInsert(oldText, index, "declare "); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); + // Simulated typing tests. it('Type extends clause 1',() => { From 01ead476cf59f60578dac2f181f04ed008d920ce Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 18:29:18 -0800 Subject: [PATCH 059/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 23 ++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 67078b788bc..2571846f6f4 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -192,7 +192,7 @@ module ts { compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); - it('Regular expression 1', () => { + it('Regular expression 1',() => { var source = "class C { public foo1() { /; } public foo2() { return 1;} public foo3() { } }"; var semicolonIndex = source.indexOf(";}"); @@ -606,7 +606,7 @@ module ts { it('Modifier added to accessor',() => { var source = -"class C {\ + "class C {\ set Bar(bar:string) {}\ }\ var o2 = { set Foo(val:number) { } };"; @@ -620,7 +620,7 @@ var o2 = { set Foo(val:number) { } };"; it('Insert parameter ahead of parameter',() => { var source = -"alert(100);\ + "alert(100);\ \ class OverloadedMonster {\ constructor();\ @@ -636,7 +636,7 @@ constructor(name) { }\ it('Insert declare modifier before module',() => { var source = -"module mAmbient {\ + "module mAmbient {\ module m3 { }\ }"; @@ -647,6 +647,21 @@ module m3 { }\ compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + it('Insert function above arrow function with comment',() => { + + var source = + "\ +() =>\ + // do something\ +0;"; + + var oldText = ScriptSnapshot.fromString(source); + var index = 0; + var newTextAndChange = withInsert(oldText, index, "function Foo() { }"); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, -1); + }); + // Simulated typing tests. it('Type extends clause 1',() => { From 3928f743ac39620ec79c984af36b56f13f2024e8 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 18:30:40 -0800 Subject: [PATCH 060/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 2571846f6f4..e71f742e697 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -648,7 +648,6 @@ module m3 { }\ }); it('Insert function above arrow function with comment',() => { - var source = "\ () =>\ @@ -659,7 +658,17 @@ module m3 { }\ var index = 0; var newTextAndChange = withInsert(oldText, index, "function Foo() { }"); - compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, -1); + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); + + it('Finish incomplete regular expression',() => { + var source = "while (true) /3; return;" + + var oldText = ScriptSnapshot.fromString(source); + var index = source.length - 1; + var newTextAndChange = withInsert(oldText, index, "/"); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); // Simulated typing tests. From 58d36afbec94d72c678b41f2b0fc156a7a14202d Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 18:32:43 -0800 Subject: [PATCH 061/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index e71f742e697..8f0b0c814dd 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -671,6 +671,16 @@ module m3 { }\ compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + it('Regular expression to divide operation',() => { + var source = "return;\r\nwhile (true) /3/g;" + + var oldText = ScriptSnapshot.fromString(source); + var index = source.indexOf("while"); + var newTextAndChange = withDelete(oldText, index, "while ".length); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); + // Simulated typing tests. it('Type extends clause 1',() => { From 3c35b9097fa8b18173f53f85da745622879df357 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 18:35:23 -0800 Subject: [PATCH 062/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 8f0b0c814dd..49607ed68d4 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -681,6 +681,16 @@ module m3 { }\ compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + it('Divide operation to regular expression',() => { + var source = "return;\r\n(true) /3/g;" + + var oldText = ScriptSnapshot.fromString(source); + var index = source.indexOf("("); + var newTextAndChange = withInsert(oldText, index, "while "); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); + // Simulated typing tests. it('Type extends clause 1',() => { From 2a845726ab51878dfc14f0d5aa5ce8aa61e90b6f Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 18:36:32 -0800 Subject: [PATCH 063/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 49607ed68d4..e1b4fa0f00f 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -691,6 +691,18 @@ module m3 { }\ compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); }); + it('Unterminated comment after keyword converted to identifier',() => { + // 'public' as a keyword should be incrementally unusable (because it has an + // unterminated comment). When we convert it to an identifier, that shouldn't + // change anything, and we should still get the same errors. + var source = "return; a.public /*" + + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withInsert(oldText, 0, ""); + + compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0); + }); + // Simulated typing tests. it('Type extends clause 1',() => { From aa30ac8a9c5991f15c92bcda8ccd96ba02d9ea6c Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 19:37:26 -0800 Subject: [PATCH 064/141] Add incremental test. --- tests/cases/unittests/incrementalParser.ts | 64 ++++++++++++++++++---- 1 file changed, 53 insertions(+), 11 deletions(-) diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index e1b4fa0f00f..440ffc99f7d 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -17,24 +17,28 @@ module ts { return withChange(text, start, length, ""); } + function createTree(text: IScriptSnapshot, version: string) { + var options: CompilerOptions = {}; + options.target = ScriptTarget.ES5; + + return createLanguageServiceSourceFile(/*fileName:*/ "", text, options, version, /*isOpen:*/ true) + } + // NOTE: 'reusedElements' is the expected count of elements reused from the old tree to the new // tree. It may change as we tweak the parser. If the count increases then that should always // be a good thing. If it decreases, that's not great (less reusability), but that may be // unavoidable. If it does decrease an investigation should be done to make sure that things // are still ok and we're still appropriately reusing most of the tree. - function compareTrees(oldText: IScriptSnapshot, newText: IScriptSnapshot, textChangeRange: TextChangeRange, expectedReusedElements: number = -1): void { - // Create a tree for the new text, in a non-incremental fashion. - var options: CompilerOptions = {}; - options.target = ScriptTarget.ES5; + function compareTrees(oldText: IScriptSnapshot, newText: IScriptSnapshot, textChangeRange: TextChangeRange, expectedReusedElements: number, oldTree?: SourceFile): SourceFile { + oldTree = oldTree || createTree(oldText, /*version:*/ "."); + Utils.checkInvariants(oldTree, /*parent:*/ undefined); - var newTree = createLanguageServiceSourceFile(/*fileName:*/ "", newText, options, /*version:*/ "0", /*isOpen:*/ true); + // Create a tree for the new text, in a non-incremental fashion. + var newTree = createTree(newText, oldTree.version + "."); Utils.checkInvariants(newTree, /*parent:*/ undefined); // Create a tree for the new text, in an incremental fashion. - var oldTree = createLanguageServiceSourceFile(/*fileName:*/ "", oldText, options, /*version:*/ "0", /*isOpen:*/ true); - Utils.checkInvariants(oldTree, /*parent:*/ undefined); - - var incrementalNewTree = oldTree.update(newText, "1", /*isOpen:*/ true, textChangeRange); + var incrementalNewTree = oldTree.update(newText, oldTree.version + ".", /*isOpen:*/ true, textChangeRange); Utils.checkInvariants(incrementalNewTree, /*parent:*/ undefined); // We should get the same tree when doign a full or incremental parse. @@ -47,6 +51,8 @@ module ts { var actualReusedCount = reusedElements(oldTree, incrementalNewTree); Debug.assert(actualReusedCount === expectedReusedElements, actualReusedCount + " !== " + expectedReusedElements); } + + return incrementalNewTree; } function assertStructuralEquals(node1: Node, node2: Node) { @@ -149,13 +155,27 @@ module ts { function deleteCode(source: string, index: number, toDelete: string) { var repeat = toDelete.length; - + var oldTree = createTree(ScriptSnapshot.fromString(source), /*version:*/ "."); for (var i = 0; i < repeat; i++) { var oldText = ScriptSnapshot.fromString(source); var newTextAndChange = withDelete(oldText, index, 1); - compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, -1); + var newTree = compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, -1, oldTree); source = newTextAndChange.text.getText(0, newTextAndChange.text.getLength()); + oldTree = newTree; + } + } + + function insertCode(source: string, index: number, toInsert: string) { + var repeat = toInsert.length; + var oldTree = createTree(ScriptSnapshot.fromString(source), /*version:*/ "."); + for (var i = 0; i < repeat; i++) { + var oldText = ScriptSnapshot.fromString(source); + var newTextAndChange = withInsert(oldText, index + i, toInsert.charAt(i)); + var newTree = compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, -1, oldTree); + + source = newTextAndChange.text.getText(0, newTextAndChange.text.getLength()); + oldTree = newTree; } } @@ -711,5 +731,27 @@ module m3 { }\ var index = source.indexOf('extends'); deleteCode(source, index, "extends IFoo"); }); + + it('Type after incomplete enum 1',() => { + var source = "function foo() {\r\n" + + " function getOccurrencesAtPosition() {\r\n" + + " switch (node) {\r\n" + + " enum \r\n" + + " }\r\n" + + " \r\n" + + " return undefined;\r\n" + + " \r\n" + + " function keywordToReferenceEntry() {\r\n" + + " }\r\n" + + " }\r\n" + + " \r\n" + + " return {\r\n" + + " getEmitOutput: (filename): Bar => null,\r\n" + + " };\r\n" + + " }"; + + var index = source.indexOf("enum ") + "enum ".length; + insertCode(source, index, "Fo"); + }); }); } \ No newline at end of file From dd2c869d7b216bb13d5cc6ae14f65e3002c6523f Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 9 Dec 2014 19:49:40 -0800 Subject: [PATCH 065/141] Use chai asserts. --- src/harness/harness.ts | 56 ++++++-------------- src/harness/test262Runner.ts | 2 +- tests/cases/unittests/incrementalParser.ts | 60 ++++++---------------- 3 files changed, 35 insertions(+), 83 deletions(-) diff --git a/src/harness/harness.ts b/src/harness/harness.ts index f51e492d6b5..b6f21d91333 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -112,58 +112,37 @@ module Utils { }); } - export function checkInvariants(node: ts.Node, parent: ts.Node): void { - if(node) { - if (node.pos < 0) { - throw new Error("node.pos < 0"); - } - if (node.end < 0) { - throw new Error("node.end < 0"); - } - if (node.end < node.pos) { - throw new Error("node.end < node.pos"); - } - if (node.parent !== parent) { - throw new Error("node.parent !== parent"); - } + export function assertInvariants(node: ts.Node, parent: ts.Node): void { + if (node) { + assert.isFalse(node.pos < 0, "node.pos < 0"); + assert.isFalse(node.end < 0, "node.end < 0"); + assert.isFalse(node.end < node.pos, "node.end < node.pos"); + assert.equal(node.parent, parent, "node.parent !== parent"); + if (parent) { // Make sure each child is contained within the parent. - if (node.pos < parent.pos) { - throw new Error("node.pos < parent.pos"); - } - if (node.end > parent.end) { - throw new Error("node.end > parent.end"); - } + assert.isFalse(node.pos < parent.pos, "node.pos < parent.pos"); + assert.isFalse(node.end > parent.end, "node.end > parent.end"); } ts.forEachChild(node, child => { - checkInvariants(child, node); + assertInvariants(child, node); }); // Make sure each of the children is in order. var currentPos = 0; ts.forEachChild(node, child => { - if (child.pos < currentPos) { - throw new Error("child.pos < currentPos"); - } + assert.isFalse(child.pos < currentPos, "child.pos < currentPos"); currentPos = child.end; }, (array: ts.NodeArray) => { - if (array.pos < node.pos) { - throw new Error("array.pos < node.pos"); - } - if (array.end > node.end) { - throw new Error("array.end > node.end"); - } + assert.isFalse(array.pos < node.pos, "array.pos < node.pos"); + assert.isFalse(array.end > node.end, "array.end > node.end"); + assert.isFalse(array.pos < currentPos, "array.pos < currentPos"); - if (array.pos < currentPos) { - throw new Error("array.pos < currentPos"); - } for (var i = 0, n = array.length; i < n; i++) { - if (array[i].pos < currentPos) { - throw new Error("array[i].pos < currentPos"); - } + assert.isFalse(array[i].pos < currentPos, "array[i].pos < currentPos"); currentPos = array[i].end } @@ -179,9 +158,8 @@ module Utils { } var child = (node)[childName]; if (isNodeOrArray(child)) { - if (childNodesAndArrays.indexOf(child) < 0) { - throw new Error("Child when forEach'ing over node. " + (ts).SyntaxKind[node.kind] + "-" + childName); - } + assert.isFalse(childNodesAndArrays.indexOf(child) < 0, + "Missing child when forEach'ing over node: " + (ts).SyntaxKind[node.kind] + "-" + childName); } } } diff --git a/src/harness/test262Runner.ts b/src/harness/test262Runner.ts index f9c083a2542..b53011237b7 100644 --- a/src/harness/test262Runner.ts +++ b/src/harness/test262Runner.ts @@ -189,7 +189,7 @@ class Test262BaselineRunner extends RunnerBase { it('satisfies invariants', () => { var sourceFile = testState.checker.getProgram().getSourceFile(Test262BaselineRunner.getTestFilePath(testState.filename)); - Utils.checkInvariants(sourceFile, /*parent:*/ undefined); + Utils.assertInvariants(sourceFile, /*parent:*/ undefined); }); it('has the expected AST',() => { diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index 440ffc99f7d..f1e59809400 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -31,25 +31,25 @@ module ts { // are still ok and we're still appropriately reusing most of the tree. function compareTrees(oldText: IScriptSnapshot, newText: IScriptSnapshot, textChangeRange: TextChangeRange, expectedReusedElements: number, oldTree?: SourceFile): SourceFile { oldTree = oldTree || createTree(oldText, /*version:*/ "."); - Utils.checkInvariants(oldTree, /*parent:*/ undefined); + Utils.assertInvariants(oldTree, /*parent:*/ undefined); // Create a tree for the new text, in a non-incremental fashion. var newTree = createTree(newText, oldTree.version + "."); - Utils.checkInvariants(newTree, /*parent:*/ undefined); + Utils.assertInvariants(newTree, /*parent:*/ undefined); // Create a tree for the new text, in an incremental fashion. var incrementalNewTree = oldTree.update(newText, oldTree.version + ".", /*isOpen:*/ true, textChangeRange); - Utils.checkInvariants(incrementalNewTree, /*parent:*/ undefined); + Utils.assertInvariants(incrementalNewTree, /*parent:*/ undefined); // We should get the same tree when doign a full or incremental parse. assertStructuralEquals(newTree, incrementalNewTree); // There should be no reused nodes between two trees that are fully parsed. - Debug.assert(reusedElements(oldTree, newTree) === 0); + assert.isTrue(reusedElements(oldTree, newTree) === 0); if (expectedReusedElements !== -1) { var actualReusedCount = reusedElements(oldTree, incrementalNewTree); - Debug.assert(actualReusedCount === expectedReusedElements, actualReusedCount + " !== " + expectedReusedElements); + assert.equal(actualReusedCount, expectedReusedElements, actualReusedCount + " !== " + expectedReusedElements); } return incrementalNewTree; @@ -60,29 +60,13 @@ module ts { return; } - if (!node1 || !node2) { - throw new Error("!node1 || !node2"); - } - - if (node1.pos !== node2.pos) { - throw new Error("node1.pos !== node2.pos"); - } - - if (node1.end !== node2.end) { - throw new Error("node1.end !== node2.end"); - } - - if (node1.kind !== node2.kind) { - throw new Error("node1.kind !== node2.kind"); - } - - if (node1.flags !== node2.flags) { - throw new Error("node1.flags !== node2.flags"); - } - - if (node1.parserContextFlags !== node2.parserContextFlags) { - throw new Error("node1.parserContextFlags !== node2.parserContextFlags"); - } + assert(node1, "node1"); + assert(node2, "node2"); + assert.equal(node1.pos, node2.pos, "node1.pos !== node2.pos"); + assert.equal(node1.end, node2.end, "node1.end !== node2.end"); + assert.equal(node1.kind, node2.kind, "node1.kind !== node2.kind"); + assert.equal(node1.flags, node2.flags, "node1.flags !== node2.flags"); + assert.equal(node1.parserContextFlags, node2.parserContextFlags, "node1.parserContextFlags !== node2.parserContextFlags"); forEachChild(node1, child1 => { @@ -104,21 +88,11 @@ module ts { return; } - if (!array1 || !array2) { - throw new Error("!array1 || !array2"); - } - - if (array1.pos !== array2.pos) { - throw new Error("array1.pos !== array2.pos"); - } - - if (array1.end !== array2.end) { - throw new Error("array1.end !== array2.end"); - } - - if (array1.length !== array2.length) { - throw new Error("array1.length !== array2.length"); - } + assert(array1, "array1"); + assert(array2, "array2"); + assert.equal(array1.pos, array2.pos, "array1.pos !== array2.pos"); + assert.equal(array1.end, array2.end, "array1.end !== array2.end"); + assert.equal(array1.length, array2.length, "array1.length !== array2.length"); for (var i = 0, n = array1.length; i < n; i++) { assertStructuralEquals(array1[i], array2[i]); From 956a08943b435adca101a1f55690e921ece45833 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Wed, 10 Dec 2014 09:03:12 -0800 Subject: [PATCH 066/141] Remove compiletionSettings handeling from shims --- src/compiler/types.ts | 12 +-- src/harness/fourslash.ts | 20 ++-- src/harness/harnessLanguageService.ts | 4 +- src/services/shims.ts | 131 +------------------------- 4 files changed, 20 insertions(+), 147 deletions(-) diff --git a/src/compiler/types.ts b/src/compiler/types.ts index c2d57876e6a..1ef26dd6f54 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1385,9 +1385,9 @@ module ts { } export const enum ModuleKind { - None, - CommonJS, - AMD, + None = 0, + CommonJS = 1, + AMD = 2, } export interface LineAndCharacter { @@ -1400,9 +1400,9 @@ module ts { export const enum ScriptTarget { - ES3, - ES5, - ES6, + ES3 = 0, + ES5 = 1, + ES6 = 2, Latest = ES6, } diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 0114d213398..be03b148be0 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -145,14 +145,14 @@ module FourSlash { testOptMetadataNames.mapRoot, testOptMetadataNames.module, testOptMetadataNames.out, testOptMetadataNames.outDir, testOptMetadataNames.sourceMap, testOptMetadataNames.sourceRoot] - function convertGlobalOptionsToCompilationSettings(globalOptions: { [idx: string]: string }): ts.CompilationSettings { - var settings: ts.CompilationSettings = {}; + function convertGlobalOptionsToCompilerOptions(globalOptions: { [idx: string]: string }): ts.CompilerOptions { + var settings: ts.CompilerOptions = {}; // Convert all property in globalOptions into ts.CompilationSettings for (var prop in globalOptions) { if (globalOptions.hasOwnProperty(prop)) { switch (prop) { case testOptMetadataNames.declaration: - settings.generateDeclarationFiles = true; + settings.declaration = true; break; case testOptMetadataNames.mapRoot: settings.mapRoot = globalOptions[prop]; @@ -161,24 +161,24 @@ module FourSlash { // create appropriate external module target for CompilationSettings switch (globalOptions[prop]) { case "AMD": - settings.moduleGenTarget = ts.ModuleGenTarget.Asynchronous; + settings.module = ts.ModuleKind.AMD; break; case "CommonJS": - settings.moduleGenTarget = ts.ModuleGenTarget.Synchronous; + settings.module = ts.ModuleKind.CommonJS; break; default: - settings.moduleGenTarget = ts.ModuleGenTarget.Unspecified; + settings.module = ts.ModuleKind.None; break; } break; case testOptMetadataNames.out: - settings.outFileOption = globalOptions[prop]; + settings.out = globalOptions[prop]; break; case testOptMetadataNames.outDir: - settings.outDirOption = globalOptions[prop]; + settings.outDir = globalOptions[prop]; break; case testOptMetadataNames.sourceMap: - settings.mapSourceFiles = true; + settings.sourceMap = true; break; case testOptMetadataNames.sourceRoot: settings.sourceRoot = globalOptions[prop]; @@ -300,7 +300,7 @@ module FourSlash { this.cancellationToken = new TestCancellationToken(); this.languageServiceShimHost = new Harness.LanguageService.TypeScriptLS(this.cancellationToken); - var compilationSettings = convertGlobalOptionsToCompilationSettings(this.testData.globalOptions); + var compilationSettings = convertGlobalOptionsToCompilerOptions(this.testData.globalOptions); this.languageServiceShimHost.setCompilationSettings(compilationSettings); var startResolveFileRef: FourSlashFile = undefined; diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts index d3082a17ba2..56fdd0404cd 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -134,7 +134,7 @@ module Harness.LanguageService { private ls: ts.LanguageServiceShim = null; private fileNameToScript: ts.Map = {}; - private settings: ts.CompilationSettings = {}; + private settings: ts.CompilerOptions = {}; constructor(private cancellationToken: ts.CancellationToken = CancellationToken.None) { } @@ -245,7 +245,7 @@ module Harness.LanguageService { return this.ls; } - public setCompilationSettings(settings: ts.CompilationSettings) { + public setCompilationSettings(settings: ts.CompilerOptions) { for (var key in settings) { if (settings.hasOwnProperty(key)) { this.settings[key] = settings[key]; diff --git a/src/services/shims.ts b/src/services/shims.ts index 5556743830f..5e4ebaf0d06 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -169,131 +169,6 @@ module ts { getDefaultCompilationSettings(): string; } - /// TODO: delete this, it is only needed until the VS interface is updated - export const enum LanguageVersion { - EcmaScript3 = 0, - EcmaScript5 = 1, - EcmaScript6 = 2, - } - - export const enum ModuleGenTarget { - Unspecified = 0, - Synchronous = 1, - Asynchronous = 2, - } - - export interface CompilationSettings { - propagateEnumConstants?: boolean; - removeComments?: boolean; - watch?: boolean; - noResolve?: boolean; - allowAutomaticSemicolonInsertion?: boolean; - noImplicitAny?: boolean; - noLib?: boolean; - codeGenTarget?: LanguageVersion; - moduleGenTarget?: ModuleGenTarget; - outFileOption?: string; - outDirOption?: string; - mapSourceFiles?: boolean; - mapRoot?: string; - sourceRoot?: string; - generateDeclarationFiles?: boolean; - useCaseSensitiveFileResolution?: boolean; - gatherDiagnostics?: boolean; - codepage?: number; - emitBOM?: boolean; - - // Declare indexer signature - [index: string]: any; - } - - function languageVersionToScriptTarget(languageVersion: LanguageVersion): ScriptTarget { - if (typeof languageVersion === "undefined") return undefined; - - switch (languageVersion) { - case LanguageVersion.EcmaScript3: return ScriptTarget.ES3 - case LanguageVersion.EcmaScript5: return ScriptTarget.ES5; - case LanguageVersion.EcmaScript6: return ScriptTarget.ES6; - default: throw Error("unsupported LanguageVersion value: " + languageVersion); - } - } - - function moduleGenTargetToModuleKind(moduleGenTarget: ModuleGenTarget): ModuleKind { - if (typeof moduleGenTarget === "undefined") return undefined; - - switch (moduleGenTarget) { - case ModuleGenTarget.Asynchronous: return ModuleKind.AMD; - case ModuleGenTarget.Synchronous: return ModuleKind.CommonJS; - case ModuleGenTarget.Unspecified: return ModuleKind.None; - default: throw Error("unsupported ModuleGenTarget value: " + moduleGenTarget); - } - } - - function scriptTargetTolanguageVersion(scriptTarget: ScriptTarget): LanguageVersion { - if (typeof scriptTarget === "undefined") return undefined; - - switch (scriptTarget) { - case ScriptTarget.ES3: return LanguageVersion.EcmaScript3; - case ScriptTarget.ES5: return LanguageVersion.EcmaScript5; - case ScriptTarget.ES6: return LanguageVersion.EcmaScript6; - default: throw Error("unsupported ScriptTarget value: " + scriptTarget); - } - } - - function moduleKindToModuleGenTarget(moduleKind: ModuleKind): ModuleGenTarget { - if (typeof moduleKind === "undefined") return undefined; - - switch (moduleKind) { - case ModuleKind.AMD: return ModuleGenTarget.Asynchronous; - case ModuleKind.CommonJS: return ModuleGenTarget.Synchronous; - case ModuleKind.None: return ModuleGenTarget.Unspecified; - default: throw Error("unsupported ModuleKind value: " + moduleKind); - } - } - - function compilationSettingsToCompilerOptions(settings: CompilationSettings): CompilerOptions { - // TODO: we should not be converting, but use options all the way - var options: CompilerOptions = {}; - //options.propagateEnumConstants = settings.propagateEnumConstants; - options.removeComments = settings.removeComments; - options.noResolve = settings.noResolve; - options.noImplicitAny = settings.noImplicitAny; - options.noLib = settings.noLib; - options.target = languageVersionToScriptTarget(settings.codeGenTarget); - options.module = moduleGenTargetToModuleKind(settings.moduleGenTarget); - options.out = settings.outFileOption; - options.outDir = settings.outDirOption; - options.sourceMap = settings.mapSourceFiles; - options.mapRoot = settings.mapRoot; - options.sourceRoot = settings.sourceRoot; - options.declaration = settings.generateDeclarationFiles; - //options.useCaseSensitiveFileResolution = settings.useCaseSensitiveFileResolution; - options.codepage = settings.codepage; - options.emitBOM = settings.emitBOM; - return options; - } - - function compilerOptionsToCompilationSettings(options: CompilerOptions): CompilationSettings { - var settings: CompilationSettings = {}; - //options.propagateEnumConstants = settings.propagateEnumConstants; - settings.removeComments = options.removeComments; - settings.noResolve = options.noResolve; - settings.noImplicitAny = options.noImplicitAny; - settings.noLib = options.noLib; - settings.codeGenTarget = scriptTargetTolanguageVersion(options.target); - settings.moduleGenTarget = moduleKindToModuleGenTarget(options.module); - settings.outFileOption = options.out; - settings.outDirOption = options.outDir; - settings.mapSourceFiles = options.sourceMap; - settings.mapRoot = options.mapRoot; - settings.sourceRoot = options.sourceRoot; - settings.generateDeclarationFiles = options.declaration; - // settings.useCaseSensitiveFileResolution = options.useCaseSensitiveFileResolution; - settings.codepage = options.codepage; - settings.emitBOM = options.emitBOM; - return settings; - } - function logInternalError(logger: Logger, err: Error) { logger.log("*INTERNAL ERROR* - Exception in typescript services: " + err.message); } @@ -347,9 +222,7 @@ module ts { throw Error("LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings"); return null; } - var options = compilationSettingsToCompilerOptions(JSON.parse(settingsJson)); - - return options; + return JSON.parse(settingsJson); } public getScriptFileNames(): string[] { @@ -850,7 +723,7 @@ module ts { return this.forwardJSONCall( "getDefaultCompilationSettings()", () => { - return compilerOptionsToCompilationSettings(getDefaultCompilerOptions()); + return getDefaultCompilerOptions(); }); } } From 1170a1c43604d8b2b3d3b83f53890ebba0481458 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Wed, 10 Dec 2014 10:09:40 -0800 Subject: [PATCH 067/141] Only set parents for parse trees in the LS for the syntactic trees. we don't need this for the semantic trees because the compiler will set them all during the binding. --- src/compiler/parser.ts | 15 ++++++++++----- src/services/services.ts | 16 ++++++++-------- tests/cases/unittests/incrementalParser.ts | 5 +---- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 4f4b7bd96e0..d810c5126fa 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -1021,12 +1021,17 @@ module ts { // walk over the nodes and set parent references var parent: Node = sourceFile; function walk(n: Node): void { - n.parent = parent; + // walk down setting parents that differ from the parent we think it should be. This + // allows us to quickly bail out of setting parents for subtrees during incremental + // parsing + if (n.parent !== parent) { + n.parent = parent; - var saveParent = parent; - parent = n; - forEachChild(n, walk); - parent = saveParent; + var saveParent = parent; + parent = n; + forEachChild(n, walk); + parent = saveParent; + } } forEachChild(sourceFile, walk); diff --git a/src/services/services.ts b/src/services/services.ts index 07eafbcbeaf..31ba819df29 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -865,11 +865,11 @@ module ts { } } - return SourceFileObject.createSourceFileObject(this.filename, scriptSnapshot, this.languageVersion, version, isOpen); + return createLanguageServiceSourceFile(this.filename, scriptSnapshot, this.languageVersion, version, isOpen, /*setNodeParents:*/ true); } - public static createSourceFileObject(filename: string, scriptSnapshot: IScriptSnapshot, languageVersion: ScriptTarget, version: string, isOpen: boolean) { - var newSourceFile = createSourceFile(filename, scriptSnapshot.getText(0, scriptSnapshot.getLength()), languageVersion, /*setParentNodes:*/ true); + public static createSourceFileObject(filename: string, scriptSnapshot: IScriptSnapshot, languageVersion: ScriptTarget, version: string, isOpen: boolean, setParentNodes: boolean) { + var newSourceFile = createSourceFile(filename, scriptSnapshot.getText(0, scriptSnapshot.getLength()), languageVersion, setParentNodes); newSourceFile.version = version; newSourceFile.isOpen = isOpen; newSourceFile.scriptSnapshot = scriptSnapshot; @@ -1679,7 +1679,7 @@ module ts { var scriptSnapshot = this.hostCache.getScriptSnapshot(filename); var start = new Date().getTime(); - sourceFile = createLanguageServiceSourceFile(filename, scriptSnapshot, getDefaultCompilerOptions(), version, /*isOpen*/ true); + sourceFile = createLanguageServiceSourceFile(filename, scriptSnapshot, getDefaultCompilerOptions().target, version, /*isOpen*/ true, /*setNodeParents:*/ true); this.host.log("SyntaxTreeCache.Initialize: createSourceFile: " + (new Date().getTime() - start)); var start = new Date().getTime(); @@ -1692,7 +1692,7 @@ module ts { var start = new Date().getTime(); sourceFile = !editRange - ? createLanguageServiceSourceFile(filename, scriptSnapshot, getDefaultCompilerOptions(), version, /*isOpen*/ true) + ? createLanguageServiceSourceFile(filename, scriptSnapshot, getDefaultCompilerOptions().target, version, /*isOpen*/ true, /*setNodeParents:*/ true) : this.currentSourceFile.update(scriptSnapshot, version, /*isOpen*/ true, editRange); this.host.log("SyntaxTreeCache.Initialize: updateSourceFile: " + (new Date().getTime() - start)); @@ -1718,8 +1718,8 @@ module ts { } } - export function createLanguageServiceSourceFile(filename: string, scriptSnapshot: IScriptSnapshot, settings: CompilerOptions, version: string, isOpen: boolean): SourceFile { - return SourceFileObject.createSourceFileObject(filename, scriptSnapshot, settings.target, version, isOpen); + export function createLanguageServiceSourceFile(filename: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, isOpen: boolean, setNodeParents: boolean): SourceFile { + return SourceFileObject.createSourceFileObject(filename, scriptSnapshot, scriptTarget, version, isOpen, setNodeParents); } export function createDocumentRegistry(): DocumentRegistry { @@ -1769,7 +1769,7 @@ module ts { var bucket = getBucketForCompilationSettings(compilationSettings, /*createIfMissing*/ true); var entry = lookUp(bucket, filename); if (!entry) { - var sourceFile = createLanguageServiceSourceFile(filename, scriptSnapshot, compilationSettings, version, isOpen); + var sourceFile = createLanguageServiceSourceFile(filename, scriptSnapshot, compilationSettings.target, version, isOpen, /*setNodeParents:*/ false); bucket[filename] = entry = { sourceFile: sourceFile, diff --git a/tests/cases/unittests/incrementalParser.ts b/tests/cases/unittests/incrementalParser.ts index f1e59809400..74b67810d26 100644 --- a/tests/cases/unittests/incrementalParser.ts +++ b/tests/cases/unittests/incrementalParser.ts @@ -18,10 +18,7 @@ module ts { } function createTree(text: IScriptSnapshot, version: string) { - var options: CompilerOptions = {}; - options.target = ScriptTarget.ES5; - - return createLanguageServiceSourceFile(/*fileName:*/ "", text, options, version, /*isOpen:*/ true) + return createLanguageServiceSourceFile(/*fileName:*/ "", text, ScriptTarget.ES5, version, /*isOpen:*/ true, /*setNodeParents:*/ true) } // NOTE: 'reusedElements' is the expected count of elements reused from the old tree to the new From 7c09b724dc18c4937b08e8f910a0e37d50190b88 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Wed, 10 Dec 2014 10:16:51 -0800 Subject: [PATCH 068/141] Type guards do no affect values of type any --- src/compiler/checker.ts | 8 ++++---- src/compiler/types.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 8c383368df2..2d377350c65 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -6609,11 +6609,11 @@ module ts { // and the right operand to be of type Any or a subtype of the 'Function' interface type. // The result is always of the Boolean primitive type. // NOTE: do not raise error if leftType is unknown as related error was already reported - if (leftType !== unknownType && !isStructuredType(leftType)) { + if (!(leftType.flags & TypeFlags.Any || isStructuredType(leftType))) { error(node.left, Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); } // NOTE: do not raise error if right is unknown as related error was already reported - if (rightType !== unknownType && rightType !== anyType && !isTypeSubtypeOf(rightType, globalFunctionType)) { + if (!(rightType.flags & TypeFlags.Any || isTypeSubtypeOf(rightType, globalFunctionType))) { error(node.right, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type); } return booleanType; @@ -6627,7 +6627,7 @@ module ts { if (leftType !== anyType && leftType !== stringType && leftType !== numberType) { error(node.left, Diagnostics.The_left_hand_side_of_an_in_expression_must_be_of_types_any_string_or_number); } - if (!isStructuredType(rightType)) { + if (!(rightType.flags & TypeFlags.Any || isStructuredType(rightType))) { error(node.right, Diagnostics.The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); } return booleanType; @@ -7975,7 +7975,7 @@ module ts { var exprType = checkExpression(node.expression); // unknownType is returned i.e. if node.expression is identifier whose name cannot be resolved // in this case error about missing name is already reported - do not report extra one - if (!isStructuredType(exprType) && exprType !== unknownType) { + if (!(exprType.flags & TypeFlags.Any || isStructuredType(exprType))) { error(node.expression, Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter); } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 19baf052406..844f097e250 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1240,7 +1240,7 @@ module ts { StringLike = String | StringLiteral, NumberLike = Number | Enum, ObjectType = Class | Interface | Reference | Tuple | Anonymous, - Structured = Any | ObjectType | Union | TypeParameter + Structured = ObjectType | Union | TypeParameter } // Properties common to all types From 37b5c74b93ee3a85d1e7b79b3da99e49950d5bd9 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Wed, 10 Dec 2014 10:17:48 -0800 Subject: [PATCH 069/141] Adding test case --- tests/baselines/reference/typeGuardsWithAny.js | 12 ++++++++++++ .../baselines/reference/typeGuardsWithAny.types | 17 +++++++++++++++++ .../expressions/typeGuards/typeGuardsWithAny.ts | 4 ++++ 3 files changed, 33 insertions(+) create mode 100644 tests/baselines/reference/typeGuardsWithAny.js create mode 100644 tests/baselines/reference/typeGuardsWithAny.types create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardsWithAny.ts diff --git a/tests/baselines/reference/typeGuardsWithAny.js b/tests/baselines/reference/typeGuardsWithAny.js new file mode 100644 index 00000000000..628ea425185 --- /dev/null +++ b/tests/baselines/reference/typeGuardsWithAny.js @@ -0,0 +1,12 @@ +//// [typeGuardsWithAny.ts] +var x: any = { p: 0 }; +if (x instanceof Object) { + x.p; // No error, type any is not narrowed +} + + +//// [typeGuardsWithAny.js] +var x = { p: 0 }; +if (x instanceof Object) { + x.p; // No error, type any is not narrowed +} diff --git a/tests/baselines/reference/typeGuardsWithAny.types b/tests/baselines/reference/typeGuardsWithAny.types new file mode 100644 index 00000000000..d79f813715b --- /dev/null +++ b/tests/baselines/reference/typeGuardsWithAny.types @@ -0,0 +1,17 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardsWithAny.ts === +var x: any = { p: 0 }; +>x : any +>{ p: 0 } : { p: number; } +>p : number + +if (x instanceof Object) { +>x instanceof Object : boolean +>x : any +>Object : ObjectConstructor + + x.p; // No error, type any is not narrowed +>x.p : any +>x : any +>p : any +} + diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardsWithAny.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardsWithAny.ts new file mode 100644 index 00000000000..4e58d1a4acc --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardsWithAny.ts @@ -0,0 +1,4 @@ +var x: any = { p: 0 }; +if (x instanceof Object) { + x.p; // No error, type any is not narrowed +} From b0574cbdf95e16149422c1d4506404e7a41163d2 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Wed, 10 Dec 2014 12:37:09 -0800 Subject: [PATCH 070/141] Respond to code review comments --- src/compiler/checker.ts | 2 +- src/compiler/commandLineParser.ts | 22 +++++++++---------- .../diagnosticInformationMap.generated.ts | 4 +--- src/compiler/diagnosticMessages.json | 11 +--------- src/compiler/types.ts | 10 +++------ src/harness/harness.ts | 11 +++------- .../noImplicitAnyIndexingSuppressed.ts | 2 +- 7 files changed, 20 insertions(+), 42 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 81450948b68..62312c115d2 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5385,7 +5385,7 @@ module ts { } // Fall back to any. - if (compilerOptions.noImplicitAny && (compilerOptions.suppress & ErrorGroup.ImplicitAnyIndex) === 0 && objectType !== anyType) { + if (compilerOptions.noImplicitAny && !compilerOptions.suppressImplicitAnyIndexErrors && objectType !== anyType) { error(node, Diagnostics.Index_signature_of_object_type_implicitly_has_an_any_type); } diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 394a1422543..cbe69b37167 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -88,6 +88,11 @@ module ts { description: Diagnostics.Redirect_output_structure_to_the_directory, paramType: Diagnostics.DIRECTORY, }, + { + name: "preserveConstEnums", + type: "boolean", + description: Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code + }, { name: "removeComments", type: "boolean", @@ -104,6 +109,11 @@ module ts { description: Diagnostics.Specifies_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations, paramType: Diagnostics.LOCATION, }, + { + name: "suppressImplicitAnyIndexErrors", + type: "boolean", + description: Diagnostics.Suppress_noImplicitAny_errors_for_indexing_into_objects_lacking_index_signatures, + }, { name: "target", shortName: "t", @@ -124,18 +134,6 @@ module ts { type: "boolean", description: Diagnostics.Watch_input_files, }, - { - name: "preserveConstEnums", - type: "boolean", - description: Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code - }, - { - name: "suppress", - type: { "implicitanyindex": ErrorGroup.ImplicitAnyIndex}, - description: Diagnostics.Suppress_a_set_of_compiler_checks, - paramType: Diagnostics.ERRORGROUP, - error: Diagnostics.Argument_for_suppress_option_can_only_be_implicitAnyIndex - }, ]; var shortOptionNames: Map = {}; diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 75c73ccde17..daacddaeddb 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -398,7 +398,6 @@ module ts { VERSION: { code: 6036, category: DiagnosticCategory.Message, key: "VERSION" }, LOCATION: { code: 6037, category: DiagnosticCategory.Message, key: "LOCATION" }, DIRECTORY: { code: 6038, category: DiagnosticCategory.Message, key: "DIRECTORY" }, - ERRORGROUP: { code: 6039, category: DiagnosticCategory.Message, key: "ERRORGROUP" }, Compilation_complete_Watching_for_file_changes: { code: 6042, category: DiagnosticCategory.Message, key: "Compilation complete. Watching for file changes." }, Generates_corresponding_map_file: { code: 6043, category: DiagnosticCategory.Message, key: "Generates corresponding '.map' file." }, Compiler_option_0_expects_an_argument: { code: 6044, category: DiagnosticCategory.Error, key: "Compiler option '{0}' expects an argument." }, @@ -412,8 +411,7 @@ module ts { Warn_on_expressions_and_declarations_with_an_implied_any_type: { code: 6052, category: DiagnosticCategory.Message, key: "Warn on expressions and declarations with an implied 'any' type." }, File_0_not_found: { code: 6053, category: DiagnosticCategory.Error, key: "File '{0}' not found." }, File_0_must_have_extension_ts_or_d_ts: { code: 6054, category: DiagnosticCategory.Error, key: "File '{0}' must have extension '.ts' or '.d.ts'." }, - Suppress_a_set_of_compiler_checks: { code: 6055, category: DiagnosticCategory.Message, key: "Suppress a set of compiler checks." }, - Argument_for_suppress_option_can_only_be_implicitAnyIndex: { code: 6056, category: DiagnosticCategory.Error, key: "Argument for '--suppress' option can only be 'implicitAnyIndex'." }, + Suppress_noImplicitAny_errors_for_indexing_into_objects_lacking_index_signatures: { code: 6055, category: DiagnosticCategory.Message, key: "Suppress noImplicitAny errors for indexing into objects lacking index signatures." }, Variable_0_implicitly_has_an_1_type: { code: 7005, category: DiagnosticCategory.Error, key: "Variable '{0}' implicitly has an '{1}' type." }, Parameter_0_implicitly_has_an_1_type: { code: 7006, category: DiagnosticCategory.Error, key: "Parameter '{0}' implicitly has an '{1}' type." }, Member_0_implicitly_has_an_1_type: { code: 7008, category: DiagnosticCategory.Error, key: "Member '{0}' implicitly has an '{1}' type." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 54ca28e69ac..da24c881253 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1591,10 +1591,6 @@ "category": "Message", "code": 6038 }, - "ERRORGROUP": { - "category": "Message", - "code": 6039 - }, "Compilation complete. Watching for file changes.": { "category": "Message", "code": 6042 @@ -1647,15 +1643,10 @@ "category": "Error", "code": 6054 }, - "Suppress a set of compiler checks.": { + "Suppress noImplicitAny errors for indexing into objects lacking index signatures.": { "category": "Message", "code": 6055 }, - "Argument for '--suppress' option can only be 'implicitAnyIndex'.": { - "category": "Error", - "code": 6056 - }, - "Variable '{0}' implicitly has an '{1}' type.": { "category": "Error", diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 7868c4e970a..7262938d61e 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1356,6 +1356,7 @@ module ts { } export interface CompilerOptions { + allowNonTsExtensions?: boolean; charset?: string; codepage?: number; declaration?: boolean; @@ -1373,15 +1374,14 @@ module ts { noResolve?: boolean; out?: string; outDir?: string; + preserveConstEnums?: boolean; removeComments?: boolean; sourceMap?: boolean; sourceRoot?: string; + suppressImplicitAnyIndexErrors?: boolean; target?: ScriptTarget; version?: boolean; watch?: boolean; - preserveConstEnums?: boolean; - allowNonTsExtensions?: boolean; - suppress?: ErrorGroup; [option: string]: string | number | boolean; } @@ -1557,10 +1557,6 @@ module ts { verticalTab = 0x0B, // \v } - export const enum ErrorGroup { - ImplicitAnyIndex = 0x01 - } - export interface CancellationToken { isCancellationRequested(): boolean; } diff --git a/src/harness/harness.ts b/src/harness/harness.ts index d94804375db..6404d70befb 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -778,13 +778,8 @@ module Harness { options.preserveConstEnums = setting.value === 'true'; break; - case 'suppress': - if (typeof setting.value === 'string' && setting.value.toLowerCase() === 'implicitanyindex') { - options.suppress = ts.ErrorGroup.ImplicitAnyIndex; - } - else { - throw new Error('Unkown value for suppress ' + setting.value); - } + case 'suppressimplicitanyindexerrors': + options.suppressImplicitAnyIndexErrors = setting.value === 'true'; break; default: @@ -1172,7 +1167,7 @@ module Harness { var optionRegex = /^[\/]{2}\s*@(\w+)\s*:\s*(\S*)/gm; // multiple matches on multiple lines // List of allowed metadata names - var fileMetadataNames = ["filename", "comments", "declaration", "module", "nolib", "sourcemap", "target", "out", "outdir", "noemitonerror", "noimplicitany", "noresolve", "newline", "newlines", "emitbom", "errortruncation", "usecasesensitivefilenames", "preserveconstenums", "suppress"]; + var fileMetadataNames = ["filename", "comments", "declaration", "module", "nolib", "sourcemap", "target", "out", "outdir", "noemitonerror", "noimplicitany", "noresolve", "newline", "newlines", "emitbom", "errortruncation", "usecasesensitivefilenames", "preserveconstenums", "suppressimplicitanyindexerrors"]; function extractCompilerSettings(content: string): CompilerSetting[] { diff --git a/tests/cases/compiler/noImplicitAnyIndexingSuppressed.ts b/tests/cases/compiler/noImplicitAnyIndexingSuppressed.ts index 02121d254dd..42ae529fddc 100644 --- a/tests/cases/compiler/noImplicitAnyIndexingSuppressed.ts +++ b/tests/cases/compiler/noImplicitAnyIndexingSuppressed.ts @@ -1,5 +1,5 @@ //@noImplicitAny: true -//@suppress: implicitAnyIndex +//@suppressImplicitAnyIndexErrors: true enum MyEmusEnum { emu From 46fcf91981c779854db1b041d02ef42722ac80a3 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Wed, 10 Dec 2014 13:02:31 -0800 Subject: [PATCH 071/141] Respond to code review comments --- src/harness/fourslash.ts | 1 + src/services/shims.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index be03b148be0..2d81524bf6d 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -167,6 +167,7 @@ module FourSlash { settings.module = ts.ModuleKind.CommonJS; break; default: + ts.Debug.assert(typeof globalOptions[prop] === "undefined" || globalOptions[prop] === "None"); settings.module = ts.ModuleKind.None; break; } diff --git a/src/services/shims.ts b/src/services/shims.ts index 5e4ebaf0d06..a86d1f5231d 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -222,7 +222,7 @@ module ts { throw Error("LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings"); return null; } - return JSON.parse(settingsJson); + return JSON.parse(settingsJson); } public getScriptFileNames(): string[] { From 30ada4cffe77ac1f84fbd8ad9efd0fedb0c40774 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 10 Dec 2014 14:03:14 -0800 Subject: [PATCH 072/141] conditionals are now introduce indentation scope --- src/services/smartIndenter.ts | 1 + .../cases/fourslash/formattingConditionals.ts | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 tests/cases/fourslash/formattingConditionals.ts diff --git a/src/services/smartIndenter.ts b/src/services/smartIndenter.ts index cafd92a7551..758c06226a4 100644 --- a/src/services/smartIndenter.ts +++ b/src/services/smartIndenter.ts @@ -342,6 +342,7 @@ module ts.formatting { case SyntaxKind.VariableDeclaration: case SyntaxKind.ExportAssignment: case SyntaxKind.ReturnStatement: + case SyntaxKind.ConditionalExpression: return true; } return false; diff --git a/tests/cases/fourslash/formattingConditionals.ts b/tests/cases/fourslash/formattingConditionals.ts new file mode 100644 index 00000000000..65029134b87 --- /dev/null +++ b/tests/cases/fourslash/formattingConditionals.ts @@ -0,0 +1,23 @@ +/// + + +////var v = +/////*0*/a === b +/////*1*/? c +/////*2*/: d; + +////var v = a === b +/////*3*/? c +/////*4*/: d; + +function verifyLine(marker: string, content: string) { + goTo.marker(marker); + verify.currentLineContentIs(content); +} + +format.document(); +verifyLine("0", " a === b"); +verifyLine("1", " ? c"); +verifyLine("2", " : d;"); +verifyLine("3", " ? c"); +verifyLine("4", " : d;"); From 2876ba6a6cb1c133235b25e8a9d6f7417ba07a6e Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Wed, 10 Dec 2014 14:25:02 -0800 Subject: [PATCH 073/141] Addressing CR feedback --- src/compiler/checker.ts | 8 ++++---- src/compiler/types.ts | 1 - tests/baselines/reference/typeGuardsWithAny.js | 10 ++++++++-- tests/baselines/reference/typeGuardsWithAny.types | 8 +++++++- .../expressions/typeGuards/typeGuardsWithAny.ts | 5 ++++- 5 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 2d377350c65..1e8a87bc4d4 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -4622,8 +4622,8 @@ module ts { // Get the narrowed type of a given symbol at a given location function getNarrowedTypeOfSymbol(symbol: Symbol, node: Node) { var type = getTypeOfSymbol(symbol); - // Only narrow when symbol is variable of a structured type - if (node && (symbol.flags & SymbolFlags.Variable && type.flags & TypeFlags.Structured)) { + // Only narrow when symbol is variable of an object, union, or type parameter type + if (node && symbol.flags & SymbolFlags.Variable && type.flags & (TypeFlags.ObjectType | TypeFlags.Union | TypeFlags.TypeParameter)) { loop: while (node.parent) { var child = node; node = node.parent; @@ -6587,12 +6587,12 @@ module ts { return numberType; } - // Return true if type is any, an object type, a type parameter, or a union type composed of only those kinds of types + // Return true if type an object type, a type parameter, or a union type composed of only those kinds of types function isStructuredType(type: Type): boolean { if (type.flags & TypeFlags.Union) { return !forEach((type).types, t => !isStructuredType(t)); } - return (type.flags & TypeFlags.Structured) !== 0; + return (type.flags & (TypeFlags.ObjectType | TypeFlags.TypeParameter)) !== 0; } function isConstEnumObjectType(type: Type): boolean { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 844f097e250..7d68d4b5a00 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1240,7 +1240,6 @@ module ts { StringLike = String | StringLiteral, NumberLike = Number | Enum, ObjectType = Class | Interface | Reference | Tuple | Anonymous, - Structured = ObjectType | Union | TypeParameter } // Properties common to all types diff --git a/tests/baselines/reference/typeGuardsWithAny.js b/tests/baselines/reference/typeGuardsWithAny.js index 628ea425185..56676fb6d68 100644 --- a/tests/baselines/reference/typeGuardsWithAny.js +++ b/tests/baselines/reference/typeGuardsWithAny.js @@ -1,12 +1,18 @@ //// [typeGuardsWithAny.ts] var x: any = { p: 0 }; if (x instanceof Object) { - x.p; // No error, type any is not narrowed + x.p; // No error, type any unaffected by type guard +} +else { + x.p; // No error, type any unaffected by type guard } //// [typeGuardsWithAny.js] var x = { p: 0 }; if (x instanceof Object) { - x.p; // No error, type any is not narrowed + x.p; // No error, type any unaffected by type guard +} +else { + x.p; // No error, type any unaffected by type guard } diff --git a/tests/baselines/reference/typeGuardsWithAny.types b/tests/baselines/reference/typeGuardsWithAny.types index d79f813715b..ee628c9c249 100644 --- a/tests/baselines/reference/typeGuardsWithAny.types +++ b/tests/baselines/reference/typeGuardsWithAny.types @@ -9,7 +9,13 @@ if (x instanceof Object) { >x : any >Object : ObjectConstructor - x.p; // No error, type any is not narrowed + x.p; // No error, type any unaffected by type guard +>x.p : any +>x : any +>p : any +} +else { + x.p; // No error, type any unaffected by type guard >x.p : any >x : any >p : any diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardsWithAny.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardsWithAny.ts index 4e58d1a4acc..e7e756ea8e0 100644 --- a/tests/cases/conformance/expressions/typeGuards/typeGuardsWithAny.ts +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardsWithAny.ts @@ -1,4 +1,7 @@ var x: any = { p: 0 }; if (x instanceof Object) { - x.p; // No error, type any is not narrowed + x.p; // No error, type any unaffected by type guard +} +else { + x.p; // No error, type any unaffected by type guard } From 5c8173bd585c79e2fb5fdd10bfe09f6eaf2c0a56 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 10 Dec 2014 14:38:14 -0800 Subject: [PATCH 074/141] Allow typescript to be importable in node. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f6391394c6a..a52067a3d08 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "url" : "https://github.com/Microsoft/TypeScript.git" }, "preferGlobal" : true, - "main" : "./bin/tsc.js", + "main" : "./bin/typescriptServices.js", "bin" : { "tsc" : "./bin/tsc" }, From 73ee0382be10c3162f5a42036411228f7fbf3c7e Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 4 Dec 2014 16:37:12 -0800 Subject: [PATCH 075/141] Use __filename for 'getExecutingFilePath'. --- src/compiler/sys.ts | 5 +++-- src/harness/harness.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index e58d08589ba..adcedb02869 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -25,6 +25,7 @@ declare var require: any; declare var module: any; declare var process: any; declare var global: any; +declare var __filename: string; var sys: System = (function () { @@ -224,10 +225,10 @@ var sys: System = (function () { } }, getExecutingFilePath() { - return process.mainModule.filename; + return __filename; }, getCurrentDirectory() { - return (process).cwd(); + return process.cwd(); }, getMemoryUsage() { if (global.gc) { diff --git a/src/harness/harness.ts b/src/harness/harness.ts index c0d3ddedce3..387f6b6bc22 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -25,7 +25,7 @@ // this will work in the browser via browserify var _chai: typeof chai = require('chai'); var assert: typeof _chai.assert = _chai.assert; -declare var __dirname: any; // Node-specific +declare var __dirname: string; // Node-specific var global = Function("return this").call(null); module Utils { From 4deea66c1c7501f4a1b160033b95c5d0dad3cbde Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 5 Dec 2014 16:33:39 -0800 Subject: [PATCH 076/141] Put 'sys' into the 'ts' module. --- src/compiler/sys.ts | 466 +++++++++++++++++----------------- src/compiler/tsc.ts | 2 +- src/harness/fourslash.ts | 10 +- src/harness/harness.ts | 33 +-- src/harness/projectsRunner.ts | 24 +- src/harness/runner.ts | 2 +- src/harness/rwcRunner.ts | 16 +- 7 files changed, 279 insertions(+), 274 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index adcedb02869..27a8c305c4b 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -1,253 +1,255 @@ -interface System { - args: string[]; - newLine: string; - useCaseSensitiveFileNames: boolean; - write(s: string): void; - readFile(fileName: string, encoding?: string): string; - writeFile(fileName: string, data: string, writeByteOrderMark?: boolean): void; - watchFile?(fileName: string, callback: (fileName: string) => void): FileWatcher; - resolvePath(path: string): string; - fileExists(path: string): boolean; - directoryExists(path: string): boolean; - createDirectory(directoryName: string): void; - getExecutingFilePath(): string; - getCurrentDirectory(): string; - getMemoryUsage?(): number; - exit(exitCode?: number): void; -} +module ts { + export interface System { + args: string[]; + newLine: string; + useCaseSensitiveFileNames: boolean; + write(s: string): void; + readFile(fileName: string, encoding?: string): string; + writeFile(fileName: string, data: string, writeByteOrderMark?: boolean): void; + watchFile? (fileName: string, callback: (fileName: string) => void): FileWatcher; + resolvePath(path: string): string; + fileExists(path: string): boolean; + directoryExists(path: string): boolean; + createDirectory(directoryName: string): void; + getExecutingFilePath(): string; + getCurrentDirectory(): string; + getMemoryUsage? (): number; + exit(exitCode?: number): void; + } -interface FileWatcher { - close(): void; -} + export interface FileWatcher { + close(): void; + } -declare var require: any; -declare var module: any; -declare var process: any; -declare var global: any; -declare var __filename: string; + declare var require: any; + declare var module: any; + declare var process: any; + declare var global: any; + declare var __filename: string; -var sys: System = (function () { + export var sys: System = (function () { - function getWScriptSystem(): System { + function getWScriptSystem(): System { - var fso = new ActiveXObject("Scripting.FileSystemObject"); + var fso = new ActiveXObject("Scripting.FileSystemObject"); - var fileStream = new ActiveXObject("ADODB.Stream"); - fileStream.Type = 2 /*text*/; + var fileStream = new ActiveXObject("ADODB.Stream"); + fileStream.Type = 2 /*text*/; - var binaryStream = new ActiveXObject("ADODB.Stream"); - binaryStream.Type = 1 /*binary*/; + var binaryStream = new ActiveXObject("ADODB.Stream"); + binaryStream.Type = 1 /*binary*/; - var args: string[] = []; - for (var i = 0; i < WScript.Arguments.length; i++) { - args[i] = WScript.Arguments.Item(i); - } - - function readFile(fileName: string, encoding?: string): string { - if (!fso.FileExists(fileName)) { - return undefined; + var args: string[] = []; + for (var i = 0; i < WScript.Arguments.length; i++) { + args[i] = WScript.Arguments.Item(i); } - fileStream.Open(); - try { - if (encoding) { - fileStream.Charset = encoding; - fileStream.LoadFromFile(fileName); + + function readFile(fileName: string, encoding?: string): string { + if (!fso.FileExists(fileName)) { + return undefined; } - else { - // Load file and read the first two bytes into a string with no interpretation - fileStream.Charset = "x-ansi"; - fileStream.LoadFromFile(fileName); - var bom = fileStream.ReadText(2) || ""; - // Position must be at 0 before encoding can be changed - fileStream.Position = 0; - // [0xFF,0xFE] and [0xFE,0xFF] mean utf-16 (little or big endian), otherwise default to utf-8 - fileStream.Charset = bom.length >= 2 && (bom.charCodeAt(0) === 0xFF && bom.charCodeAt(1) === 0xFE || bom.charCodeAt(0) === 0xFE && bom.charCodeAt(1) === 0xFF) ? "unicode" : "utf-8"; - } - // ReadText method always strips byte order mark from resulting string - return fileStream.ReadText(); - } - catch (e) { - throw e; - } - finally { - fileStream.Close(); - } - } - - function writeFile(fileName: string, data: string, writeByteOrderMark?: boolean): void { - fileStream.Open(); - binaryStream.Open(); - try { - // Write characters in UTF-8 encoding - fileStream.Charset = "utf-8"; - fileStream.WriteText(data); - // If we don't want the BOM, then skip it by setting the starting location to 3 (size of BOM). - // If not, start from position 0, as the BOM will be added automatically when charset==utf8. - if (writeByteOrderMark) { - fileStream.Position = 0; - } - else { - fileStream.Position = 3; - } - fileStream.CopyTo(binaryStream); - binaryStream.SaveToFile(fileName, 2 /*overwrite*/); - } - finally { - binaryStream.Close(); - fileStream.Close(); - } - } - - return { - args, - newLine: "\r\n", - useCaseSensitiveFileNames: false, - write(s: string): void { - WScript.StdOut.Write(s); - }, - readFile, - writeFile, - resolvePath(path: string): string { - return fso.GetAbsolutePathName(path); - }, - fileExists(path: string): boolean { - return fso.FileExists(path); - }, - directoryExists(path: string) { - return fso.FolderExists(path); - }, - createDirectory(directoryName: string) { - if (!this.directoryExists(directoryName)) { - fso.CreateFolder(directoryName); - } - }, - getExecutingFilePath() { - return WScript.ScriptFullName; - }, - getCurrentDirectory() { - return new ActiveXObject("WScript.Shell").CurrentDirectory; - }, - exit(exitCode?: number): void { + fileStream.Open(); try { - WScript.Quit(exitCode); + if (encoding) { + fileStream.Charset = encoding; + fileStream.LoadFromFile(fileName); + } + else { + // Load file and read the first two bytes into a string with no interpretation + fileStream.Charset = "x-ansi"; + fileStream.LoadFromFile(fileName); + var bom = fileStream.ReadText(2) || ""; + // Position must be at 0 before encoding can be changed + fileStream.Position = 0; + // [0xFF,0xFE] and [0xFE,0xFF] mean utf-16 (little or big endian), otherwise default to utf-8 + fileStream.Charset = bom.length >= 2 && (bom.charCodeAt(0) === 0xFF && bom.charCodeAt(1) === 0xFE || bom.charCodeAt(0) === 0xFE && bom.charCodeAt(1) === 0xFF) ? "unicode" : "utf-8"; + } + // ReadText method always strips byte order mark from resulting string + return fileStream.ReadText(); } catch (e) { + throw e; + } + finally { + fileStream.Close(); } } - }; - } - function getNodeSystem(): System { - var _fs = require("fs"); - var _path = require("path"); - var _os = require('os'); - var platform: string = _os.platform(); - // win32\win64 are case insensitive platforms, MacOS (darwin) by default is also case insensitive - var useCaseSensitiveFileNames = platform !== "win32" && platform !== "win64" && platform !== "darwin"; - - function readFile(fileName: string, encoding?: string): string { - if (!_fs.existsSync(fileName)) { - return undefined; - } - var buffer = _fs.readFileSync(fileName); - var len = buffer.length; - if (len >= 2 && buffer[0] === 0xFE && buffer[1] === 0xFF) { - // Big endian UTF-16 byte order mark detected. Since big endian is not supported by node.js, - // flip all byte pairs and treat as little endian. - len &= ~1; - for (var i = 0; i < len; i += 2) { - var temp = buffer[i]; - buffer[i] = buffer[i + 1]; - buffer[i + 1] = temp; - } - return buffer.toString("utf16le", 2); - } - if (len >= 2 && buffer[0] === 0xFF && buffer[1] === 0xFE) { - // Little endian UTF-16 byte order mark detected - return buffer.toString("utf16le", 2); - } - if (len >= 3 && buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) { - // UTF-8 byte order mark detected - return buffer.toString("utf8", 3); - } - // Default is UTF-8 with no byte order mark - return buffer.toString("utf8"); - } - - function writeFile(fileName: string, data: string, writeByteOrderMark?: boolean): void { - // If a BOM is required, emit one - if (writeByteOrderMark) { - data = '\uFEFF' + data; - } - - _fs.writeFileSync(fileName, data, "utf8"); - } - - return { - args: process.argv.slice(2), - newLine: _os.EOL, - useCaseSensitiveFileNames: useCaseSensitiveFileNames, - write(s: string): void { - // 1 is a standard descriptor for stdout - _fs.writeSync(1, s); - }, - readFile, - writeFile, - watchFile: (fileName, callback) => { - // watchFile polls a file every 250ms, picking up file notifications. - _fs.watchFile(fileName, { persistent: true, interval: 250 }, fileChanged); - - return { - close() { _fs.unwatchFile(fileName, fileChanged); } - }; - - function fileChanged(curr: any, prev: any) { - if (+curr.mtime <= +prev.mtime) { - return; + function writeFile(fileName: string, data: string, writeByteOrderMark?: boolean): void { + fileStream.Open(); + binaryStream.Open(); + try { + // Write characters in UTF-8 encoding + fileStream.Charset = "utf-8"; + fileStream.WriteText(data); + // If we don't want the BOM, then skip it by setting the starting location to 3 (size of BOM). + // If not, start from position 0, as the BOM will be added automatically when charset==utf8. + if (writeByteOrderMark) { + fileStream.Position = 0; } - - callback(fileName); - }; - }, - resolvePath: function (path: string): string { - return _path.resolve(path); - }, - fileExists(path: string): boolean { - return _fs.existsSync(path); - }, - directoryExists(path: string) { - return _fs.existsSync(path) && _fs.statSync(path).isDirectory(); - }, - createDirectory(directoryName: string) { - if (!this.directoryExists(directoryName)) { - _fs.mkdirSync(directoryName); + else { + fileStream.Position = 3; + } + fileStream.CopyTo(binaryStream); + binaryStream.SaveToFile(fileName, 2 /*overwrite*/); } - }, - getExecutingFilePath() { - return __filename; - }, - getCurrentDirectory() { - return process.cwd(); - }, - getMemoryUsage() { - if (global.gc) { - global.gc(); + finally { + binaryStream.Close(); + fileStream.Close(); } - return process.memoryUsage().heapUsed; - }, - exit(exitCode?: number): void { - process.exit(exitCode); } - }; - } - if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") { - return getWScriptSystem(); - } - else if (typeof module !== "undefined" && module.exports) { - return getNodeSystem(); - } - else { - return undefined; // Unsupported host - } -})(); + + return { + args, + newLine: "\r\n", + useCaseSensitiveFileNames: false, + write(s: string): void { + WScript.StdOut.Write(s); + }, + readFile, + writeFile, + resolvePath(path: string): string { + return fso.GetAbsolutePathName(path); + }, + fileExists(path: string): boolean { + return fso.FileExists(path); + }, + directoryExists(path: string) { + return fso.FolderExists(path); + }, + createDirectory(directoryName: string) { + if (!this.directoryExists(directoryName)) { + fso.CreateFolder(directoryName); + } + }, + getExecutingFilePath() { + return WScript.ScriptFullName; + }, + getCurrentDirectory() { + return new ActiveXObject("WScript.Shell").CurrentDirectory; + }, + exit(exitCode?: number): void { + try { + WScript.Quit(exitCode); + } + catch (e) { + } + } + }; + } + function getNodeSystem(): System { + var _fs = require("fs"); + var _path = require("path"); + var _os = require('os'); + + var platform: string = _os.platform(); + // win32\win64 are case insensitive platforms, MacOS (darwin) by default is also case insensitive + var useCaseSensitiveFileNames = platform !== "win32" && platform !== "win64" && platform !== "darwin"; + + function readFile(fileName: string, encoding?: string): string { + if (!_fs.existsSync(fileName)) { + return undefined; + } + var buffer = _fs.readFileSync(fileName); + var len = buffer.length; + if (len >= 2 && buffer[0] === 0xFE && buffer[1] === 0xFF) { + // Big endian UTF-16 byte order mark detected. Since big endian is not supported by node.js, + // flip all byte pairs and treat as little endian. + len &= ~1; + for (var i = 0; i < len; i += 2) { + var temp = buffer[i]; + buffer[i] = buffer[i + 1]; + buffer[i + 1] = temp; + } + return buffer.toString("utf16le", 2); + } + if (len >= 2 && buffer[0] === 0xFF && buffer[1] === 0xFE) { + // Little endian UTF-16 byte order mark detected + return buffer.toString("utf16le", 2); + } + if (len >= 3 && buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) { + // UTF-8 byte order mark detected + return buffer.toString("utf8", 3); + } + // Default is UTF-8 with no byte order mark + return buffer.toString("utf8"); + } + + function writeFile(fileName: string, data: string, writeByteOrderMark?: boolean): void { + // If a BOM is required, emit one + if (writeByteOrderMark) { + data = '\uFEFF' + data; + } + + _fs.writeFileSync(fileName, data, "utf8"); + } + + return { + args: process.argv.slice(2), + newLine: _os.EOL, + useCaseSensitiveFileNames: useCaseSensitiveFileNames, + write(s: string): void { + // 1 is a standard descriptor for stdout + _fs.writeSync(1, s); + }, + readFile, + writeFile, + watchFile: (fileName, callback) => { + // watchFile polls a file every 250ms, picking up file notifications. + _fs.watchFile(fileName, { persistent: true, interval: 250 }, fileChanged); + + return { + close() { _fs.unwatchFile(fileName, fileChanged); } + }; + + function fileChanged(curr: any, prev: any) { + if (+curr.mtime <= +prev.mtime) { + return; + } + + callback(fileName); + }; + }, + resolvePath: function (path: string): string { + return _path.resolve(path); + }, + fileExists(path: string): boolean { + return _fs.existsSync(path); + }, + directoryExists(path: string) { + return _fs.existsSync(path) && _fs.statSync(path).isDirectory(); + }, + createDirectory(directoryName: string) { + if (!this.directoryExists(directoryName)) { + _fs.mkdirSync(directoryName); + } + }, + getExecutingFilePath() { + return __filename; + }, + getCurrentDirectory() { + return process.cwd(); + }, + getMemoryUsage() { + if (global.gc) { + global.gc(); + } + return process.memoryUsage().heapUsed; + }, + exit(exitCode?: number): void { + process.exit(exitCode); + } + }; + } + if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") { + return getWScriptSystem(); + } + else if (typeof module !== "undefined" && module.exports) { + return getNodeSystem(); + } + else { + return undefined; // Unsupported host + } + })(); +} \ No newline at end of file diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index fbe596ee0f7..1756f26ab48 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -490,4 +490,4 @@ module ts { } } -ts.executeCommandLine(sys.args); +ts.executeCommandLine(ts.sys.args); diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 0114d213398..da13735872d 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -363,7 +363,7 @@ module FourSlash { this.formatCodeOptions = { IndentSize: 4, TabSize: 4, - NewLineCharacter: sys.newLine, + NewLineCharacter: ts.sys.newLine, ConvertTabsToSpaces: true, InsertSpaceAfterCommaDelimiter: true, InsertSpaceAfterSemicolonInForStatements: true, @@ -1747,9 +1747,9 @@ module FourSlash { } function jsonMismatchString() { - return sys.newLine + - "expected: '" + sys.newLine + JSON.stringify(expected, (k,v) => v, 2) + "'" + sys.newLine + - "actual: '" + sys.newLine + JSON.stringify(actual, (k, v) => v, 2) + "'"; + return ts.sys.newLine + + "expected: '" + ts.sys.newLine + JSON.stringify(expected, (k,v) => v, 2) + "'" + ts.sys.newLine + + "actual: '" + ts.sys.newLine + JSON.stringify(actual, (k, v) => v, 2) + "'"; } } @@ -2246,7 +2246,7 @@ module FourSlash { { unitName: fileName, content: content }], (fn, contents) => result = contents, ts.ScriptTarget.Latest, - sys.useCaseSensitiveFileNames); + ts.sys.useCaseSensitiveFileNames); // TODO (drosen): We need to enforce checking on these tests. var program = ts.createProgram([Harness.Compiler.fourslashFilename, fileName], { out: "fourslashTestOutput.js", noResolve: true }, host); var checker = ts.createTypeChecker(program, /*fullTypeCheckMode*/ true); diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 387f6b6bc22..ba182e1b24d 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -22,6 +22,9 @@ /// /// +declare var require: any; +declare var process: any; + // this will work in the browser via browserify var _chai: typeof chai = require('chai'); var assert: typeof _chai.assert = _chai.assert; @@ -41,7 +44,7 @@ module Utils { export function getExecutionEnvironment() { if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") { return ExecutionEnvironment.CScript; - } else if (process && (process).execPath && (process).execPath.indexOf("node") !== -1) { + } else if (process && process.execPath && process.execPath.indexOf("node") !== -1) { return ExecutionEnvironment.Node; } else { return ExecutionEnvironment.Browser; @@ -89,7 +92,7 @@ module Utils { } try { - var content = sys.readFile(Harness.userSpecifiedroot + path); + var content = ts.sys.readFile(Harness.userSpecifiedroot + path); } catch (err) { return undefined; @@ -156,8 +159,8 @@ module Harness { fso = {}; } - export var readFile: typeof IO.readFile = sys.readFile; - export var writeFile: typeof IO.writeFile = sys.writeFile; + export var readFile: typeof IO.readFile = ts.sys.readFile; + export var writeFile: typeof IO.writeFile = ts.sys.writeFile; export var directoryName: typeof IO.directoryName = fso.GetParentFolderName; export var directoryExists: typeof IO.directoryExists = fso.FolderExists; export var fileExists: typeof IO.fileExists = fso.FileExists; @@ -218,8 +221,8 @@ module Harness { fs = pathModule = {}; } - export var readFile: typeof IO.readFile = sys.readFile; - export var writeFile: typeof IO.writeFile = sys.writeFile; + export var readFile: typeof IO.readFile = ts.sys.readFile; + export var writeFile: typeof IO.writeFile = ts.sys.writeFile; export var fileExists: typeof IO.fileExists = fs.existsSync; export var log: typeof IO.log = console.log; @@ -547,7 +550,7 @@ module Harness { export var fourslashSourceFile: ts.SourceFile; export function getCanonicalFileName(fileName: string): string { - return sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase(); + return ts.sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase(); } export function createCompilerHost(inputFiles: { unitName: string; content: string; }[], @@ -571,7 +574,7 @@ module Harness { inputFiles.forEach(register); return { - getCurrentDirectory: sys.getCurrentDirectory, + getCurrentDirectory: ts.sys.getCurrentDirectory, getCancellationToken: (): any => undefined, getSourceFile: (fn, languageVersion) => { if (Object.prototype.hasOwnProperty.call(filemap, getCanonicalFileName(fn))) { @@ -594,7 +597,7 @@ module Harness { writeFile, getCanonicalFileName, useCaseSensitiveFileNames: () => useCaseSensitiveFileNames, - getNewLine: ()=> sys.newLine + getNewLine: ()=> ts.sys.newLine }; } @@ -664,7 +667,7 @@ module Harness { settingsCallback(null); } - var useCaseSensitiveFileNames = sys.useCaseSensitiveFileNames; + var useCaseSensitiveFileNames = ts.sys.useCaseSensitiveFileNames; this.settings.forEach(setting => { switch (setting.flag.toLowerCase()) { // "filename", "comments", "declaration", "module", "nolib", "sourcemap", "target", "out", "outdir", "noimplicitany", "noresolve" @@ -742,7 +745,7 @@ module Harness { case 'newline': case 'newlines': - sys.newLine = setting.value; + ts.sys.newLine = setting.value; break; case 'comments': @@ -817,11 +820,11 @@ module Harness { }); this.lastErrors = errors; - var result = new CompilerResult(fileOutputs, errors, program, sys.getCurrentDirectory(), emitResult ? emitResult.sourceMaps : undefined); + var result = new CompilerResult(fileOutputs, errors, program, ts.sys.getCurrentDirectory(), emitResult ? emitResult.sourceMaps : undefined); onComplete(result, checker); // reset what newline means in case the last test changed it - sys.newLine = '\r\n'; + ts.sys.newLine = '\r\n'; return options; } @@ -916,7 +919,7 @@ module Harness { errorOutput += diagnotic.filename + "(" + diagnotic.line + "," + diagnotic.character + "): "; } - errorOutput += diagnotic.category + " TS" + diagnotic.code + ": " + diagnotic.message + sys.newLine; + errorOutput += diagnotic.category + " TS" + diagnotic.code + ": " + diagnotic.message + ts.sys.newLine; }); return errorOutput; @@ -1014,7 +1017,7 @@ module Harness { assert.equal(totalErrorsReported + numLibraryDiagnostics, diagnostics.length, 'total number of errors'); return minimalDiagnosticsToString(diagnostics) + - sys.newLine + sys.newLine + outputLines.join('\r\n'); + ts.sys.newLine + ts.sys.newLine + outputLines.join('\r\n'); } export function collateOutputs(outputFiles: Harness.Compiler.GeneratedFile[], clean?: (s: string) => string) { diff --git a/src/harness/projectsRunner.ts b/src/harness/projectsRunner.ts index f46f9ae3698..9e2432c1da4 100644 --- a/src/harness/projectsRunner.ts +++ b/src/harness/projectsRunner.ts @@ -60,7 +60,7 @@ class ProjectRunner extends RunnerBase { var testCase: ProjectRunnerTestCase; try { - var testFileText = sys.readFile(testCaseFileName); + var testFileText = ts.sys.readFile(testCaseFileName); } catch (e) { assert(false, "Unable to open testcase file: " + testCaseFileName + ": " + e.message); @@ -96,7 +96,7 @@ class ProjectRunner extends RunnerBase { } function cleanProjectUrl(url: string) { - var diskProjectPath = ts.normalizeSlashes(sys.resolvePath(testCase.projectRoot)); + var diskProjectPath = ts.normalizeSlashes(ts.sys.resolvePath(testCase.projectRoot)); var projectRootUrl = "file:///" + diskProjectPath; var normalizedProjectRoot = ts.normalizeSlashes(testCase.projectRoot); diskProjectPath = diskProjectPath.substr(0, diskProjectPath.lastIndexOf(normalizedProjectRoot)); @@ -119,7 +119,7 @@ class ProjectRunner extends RunnerBase { } function getCurrentDirectory() { - return sys.resolvePath(testCase.projectRoot); + return ts.sys.resolvePath(testCase.projectRoot); } function compileProjectFiles(moduleKind: ts.ModuleKind, getInputFiles: ()=> string[], @@ -161,8 +161,8 @@ class ProjectRunner extends RunnerBase { sourceMap: !!testCase.sourceMap, out: testCase.out, outDir: testCase.outDir, - mapRoot: testCase.resolveMapRoot && testCase.mapRoot ? sys.resolvePath(testCase.mapRoot) : testCase.mapRoot, - sourceRoot: testCase.resolveSourceRoot && testCase.sourceRoot ? sys.resolvePath(testCase.sourceRoot) : testCase.sourceRoot, + mapRoot: testCase.resolveMapRoot && testCase.mapRoot ? ts.sys.resolvePath(testCase.mapRoot) : testCase.mapRoot, + sourceRoot: testCase.resolveSourceRoot && testCase.sourceRoot ? ts.sys.resolvePath(testCase.sourceRoot) : testCase.sourceRoot, module: moduleKind, noResolve: testCase.noResolve }; @@ -190,8 +190,8 @@ class ProjectRunner extends RunnerBase { writeFile, getCurrentDirectory, getCanonicalFileName: Harness.Compiler.getCanonicalFileName, - useCaseSensitiveFileNames: () => sys.useCaseSensitiveFileNames, - getNewLine: () => sys.newLine + useCaseSensitiveFileNames: () => ts.sys.useCaseSensitiveFileNames, + getNewLine: () => ts.sys.newLine }; } } @@ -213,7 +213,7 @@ class ProjectRunner extends RunnerBase { function getSourceFileText(filename: string): string { try { - var text = sys.readFile(ts.isRootedDiskPath(filename) + var text = ts.sys.readFile(ts.isRootedDiskPath(filename) ? filename : ts.normalizeSlashes(testCase.projectRoot) + "/" + ts.normalizeSlashes(filename)); } @@ -260,14 +260,14 @@ class ProjectRunner extends RunnerBase { // Actual writing of file as in tc.ts function ensureDirectoryStructure(directoryname: string) { if (directoryname) { - if (!sys.directoryExists(directoryname)) { + if (!ts.sys.directoryExists(directoryname)) { ensureDirectoryStructure(ts.getDirectoryPath(directoryname)); - sys.createDirectory(directoryname); + ts.sys.createDirectory(directoryname); } } } ensureDirectoryStructure(ts.getDirectoryPath(ts.normalizePath(outputFilePath))); - sys.writeFile(outputFilePath, data, writeByteOrderMark); + ts.sys.writeFile(outputFilePath, data, writeByteOrderMark); outputFiles.push({ emittedFileName: filename, code: data, fileName: diskRelativeName, writeByteOrderMark: writeByteOrderMark }); } @@ -374,7 +374,7 @@ class ProjectRunner extends RunnerBase { it('Baseline of emitted result (' + moduleNameToString(compilerResult.moduleKind) + '): ' + testCaseFileName, () => { Harness.Baseline.runBaseline('Baseline of emitted result (' + moduleNameToString(compilerResult.moduleKind) + '): ' + testCaseFileName, getBaselineFolder(compilerResult.moduleKind) + outputFile.fileName, () => { try { - return sys.readFile(getProjectOutputFolder(outputFile.fileName, compilerResult.moduleKind)); + return ts.sys.readFile(getProjectOutputFolder(outputFile.fileName, compilerResult.moduleKind)); } catch (e) { return undefined; diff --git a/src/harness/runner.ts b/src/harness/runner.ts index da37c02e224..24349ada3fd 100644 --- a/src/harness/runner.ts +++ b/src/harness/runner.ts @@ -94,6 +94,6 @@ if (runners.length === 0) { //runners.push(new GeneratedFourslashRunner()); } -sys.newLine = '\r\n'; +ts.sys.newLine = '\r\n'; runTests(runners); diff --git a/src/harness/rwcRunner.ts b/src/harness/rwcRunner.ts index b8bc2a80a52..8d22b1da1d8 100644 --- a/src/harness/rwcRunner.ts +++ b/src/harness/rwcRunner.ts @@ -6,17 +6,17 @@ module RWC { function runWithIOLog(ioLog: IOLog, fn: () => void) { - var oldSys = sys; + var oldSys = ts.sys; - var wrappedSys = Playback.wrapSystem(sys); + var wrappedSys = Playback.wrapSystem(ts.sys); wrappedSys.startReplayFromData(ioLog); - sys = wrappedSys; + ts.sys = wrappedSys; try { fn(); } finally { wrappedSys.endReplay(); - sys = oldSys; + ts.sys = oldSys; } } @@ -74,7 +74,7 @@ module RWC { } ts.forEach(ioLog.filesRead, fileRead => { - var resolvedPath = ts.normalizeSlashes(sys.resolvePath(fileRead.path)); + var resolvedPath = ts.normalizeSlashes(ts.sys.resolvePath(fileRead.path)); var inInputList = ts.forEach(inputFiles, inputFile=> inputFile.unitName === resolvedPath); if (!inInputList) { // Add the file to other files @@ -92,9 +92,9 @@ module RWC { }); function getHarnessCompilerInputUnit(fileName: string) { - var unitName = ts.normalizeSlashes(sys.resolvePath(fileName)); + var unitName = ts.normalizeSlashes(ts.sys.resolvePath(fileName)); try { - var content = sys.readFile(unitName); + var content = ts.sys.readFile(unitName); } catch (e) { // Leave content undefined. @@ -160,7 +160,7 @@ module RWC { } return Harness.Compiler.minimalDiagnosticsToString(declFileCompilationResult.declResult.errors) + - sys.newLine + sys.newLine + + ts.sys.newLine + ts.sys.newLine + Harness.Compiler.getErrorBaseline(declFileCompilationResult.declInputFiles.concat(declFileCompilationResult.declOtherFiles), declFileCompilationResult.declResult.errors); }, false, baselineOpts); } From 0d9b2c8725ef337dff3efb839e07bf233274d6a3 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Sat, 6 Dec 2014 09:10:16 -0800 Subject: [PATCH 077/141] move text defintions to services.ts --- src/services/formatting/references.ts | 1 - src/services/services.ts | 296 +++++++++++++++++++++++++- src/services/text.ts | 296 -------------------------- 3 files changed, 295 insertions(+), 298 deletions(-) delete mode 100644 src/services/text.ts diff --git a/src/services/formatting/references.ts b/src/services/formatting/references.ts index 9f4b7e37436..3d19b33d821 100644 --- a/src/services/formatting/references.ts +++ b/src/services/formatting/references.ts @@ -13,7 +13,6 @@ // limitations under the License. // -/// /// /// /// diff --git a/src/services/services.ts b/src/services/services.ts index 980b7ecda3d..e31d2b42ee5 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -4,7 +4,6 @@ /// /// -/// /// /// /// @@ -933,6 +932,301 @@ module ts { dispose(): void; } + export class TextSpan { + private _start: number; + private _length: number; + + /** + * Creates a TextSpan instance beginning with the position Start and having the Length + * specified with length. + */ + constructor(start: number, length: number) { + Debug.assert(start >= 0, "start"); + Debug.assert(length >= 0, "length"); + + this._start = start; + this._length = length; + } + + public toJSON(key: any): any { + return { start: this._start, length: this._length }; + } + + public start(): number { + return this._start; + } + + public length(): number { + return this._length; + } + + public end(): number { + return this._start + this._length; + } + + public isEmpty(): boolean { + return this._length === 0; + } + + /** + * Determines whether the position lies within the span. Returns true if the position is greater than or equal to Start and strictly less + * than End, otherwise false. + * @param position The position to check. + */ + public containsPosition(position: number): boolean { + return position >= this._start && position < this.end(); + } + + /** + * Determines whether span falls completely within this span. Returns true if the specified span falls completely within this span, otherwise false. + * @param span The span to check. + */ + public containsTextSpan(span: TextSpan): boolean { + return span._start >= this._start && span.end() <= this.end(); + } + + /** + * Determines whether the given span overlaps this span. Two spans are considered to overlap + * if they have positions in common and neither is empty. Empty spans do not overlap with any + * other span. Returns true if the spans overlap, false otherwise. + * @param span The span to check. + */ + public overlapsWith(span: TextSpan): boolean { + var overlapStart = Math.max(this._start, span._start); + var overlapEnd = Math.min(this.end(), span.end()); + + return overlapStart < overlapEnd; + } + + /** + * Returns the overlap with the given span, or undefined if there is no overlap. + * @param span The span to check. + */ + public overlap(span: TextSpan): TextSpan { + var overlapStart = Math.max(this._start, span._start); + var overlapEnd = Math.min(this.end(), span.end()); + + if (overlapStart < overlapEnd) { + return TextSpan.fromBounds(overlapStart, overlapEnd); + } + + return undefined; + } + + /** + * Determines whether span intersects this span. Two spans are considered to + * intersect if they have positions in common or the end of one span + * coincides with the start of the other span. Returns true if the spans intersect, false otherwise. + * @param The span to check. + */ + public intersectsWithTextSpan(span: TextSpan): boolean { + return span._start <= this.end() && span.end() >= this._start; + } + + public intersectsWith(start: number, length: number): boolean { + var end = start + length; + return start <= this.end() && end >= this._start; + } + + /** + * Determines whether the given position intersects this span. + * A position is considered to intersect if it is between the start and + * end positions (inclusive) of this span. Returns true if the position intersects, false otherwise. + * @param position The position to check. + */ + public intersectsWithPosition(position: number): boolean { + return position <= this.end() && position >= this._start; + } + + /** + * Returns the intersection with the given span, or undefined if there is no intersection. + * @param span The span to check. + */ + public intersection(span: TextSpan): TextSpan { + var intersectStart = Math.max(this._start, span._start); + var intersectEnd = Math.min(this.end(), span.end()); + + if (intersectStart <= intersectEnd) { + return TextSpan.fromBounds(intersectStart, intersectEnd); + } + + return undefined; + } + + /** + * Creates a new TextSpan from the given start and end positions + * as opposed to a position and length. + */ + public static fromBounds(start: number, end: number): TextSpan { + Debug.assert(start >= 0); + Debug.assert(end - start >= 0); + return new TextSpan(start, end - start); + } + } + + export class TextChangeRange { + public static unchanged = new TextChangeRange(new TextSpan(0, 0), 0); + + private _span: TextSpan; + private _newLength: number; + + /** + * Initializes a new instance of TextChangeRange. + */ + constructor(span: TextSpan, newLength: number) { + Debug.assert(newLength >= 0, "newLength"); + + this._span = span; + this._newLength = newLength; + } + + /** + * The span of text before the edit which is being changed + */ + public span(): TextSpan { + return this._span; + } + + /** + * Width of the span after the edit. A 0 here would represent a delete + */ + public newLength(): number { + return this._newLength; + } + + public newSpan(): TextSpan { + return new TextSpan(this.span().start(), this.newLength()); + } + + public isUnchanged(): boolean { + return this.span().isEmpty() && this.newLength() === 0; + } + + /** + * Called to merge all the changes that occurred across several versions of a script snapshot + * into a single change. i.e. if a user keeps making successive edits to a script we will + * have a text change from V1 to V2, V2 to V3, ..., Vn. + * + * This function will then merge those changes into a single change range valid between V1 and + * Vn. + */ + public static collapseChangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange { + if (changes.length === 0) { + return TextChangeRange.unchanged; + } + + if (changes.length === 1) { + return changes[0]; + } + + // We change from talking about { { oldStart, oldLength }, newLength } to { oldStart, oldEnd, newEnd } + // as it makes things much easier to reason about. + var change0 = changes[0]; + + var oldStartN = change0.span().start(); + var oldEndN = change0.span().end(); + var newEndN = oldStartN + change0.newLength(); + + for (var i = 1; i < changes.length; i++) { + var nextChange = changes[i]; + + // Consider the following case: + // i.e. two edits. The first represents the text change range { { 10, 50 }, 30 }. i.e. The span starting + // at 10, with length 50 is reduced to length 30. The second represents the text change range { { 30, 30 }, 40 }. + // i.e. the span starting at 30 with length 30 is increased to length 40. + // + // 0 10 20 30 40 50 60 70 80 90 100 + // ------------------------------------------------------------------------------------------------------- + // | / + // | /---- + // T1 | /---- + // | /---- + // | /---- + // ------------------------------------------------------------------------------------------------------- + // | \ + // | \ + // T2 | \ + // | \ + // | \ + // ------------------------------------------------------------------------------------------------------- + // + // Merging these turns out to not be too difficult. First, determining the new start of the change is trivial + // it's just the min of the old and new starts. i.e.: + // + // 0 10 20 30 40 50 60 70 80 90 100 + // ------------------------------------------------------------*------------------------------------------ + // | / + // | /---- + // T1 | /---- + // | /---- + // | /---- + // ----------------------------------------$-------------------$------------------------------------------ + // . | \ + // . | \ + // T2 . | \ + // . | \ + // . | \ + // ----------------------------------------------------------------------*-------------------------------- + // + // (Note the dots represent the newly inferrred start. + // Determining the new and old end is also pretty simple. Basically it boils down to paying attention to the + // absolute positions at the asterixes, and the relative change between the dollar signs. Basically, we see + // which if the two $'s precedes the other, and we move that one forward until they line up. in this case that + // means: + // + // 0 10 20 30 40 50 60 70 80 90 100 + // --------------------------------------------------------------------------------*---------------------- + // | / + // | /---- + // T1 | /---- + // | /---- + // | /---- + // ------------------------------------------------------------$------------------------------------------ + // . | \ + // . | \ + // T2 . | \ + // . | \ + // . | \ + // ----------------------------------------------------------------------*-------------------------------- + // + // In other words (in this case), we're recognizing that the second edit happened after where the first edit + // ended with a delta of 20 characters (60 - 40). Thus, if we go back in time to where the first edit started + // that's the same as if we started at char 80 instead of 60. + // + // As it so happens, the same logic applies if the second edit precedes the first edit. In that case rahter + // than pusing the first edit forward to match the second, we'll push the second edit forward to match the + // first. + // + // In this case that means we have { oldStart: 10, oldEnd: 80, newEnd: 70 } or, in TextChangeRange + // semantics: { { start: 10, length: 70 }, newLength: 60 } + // + // The math then works out as follows. + // If we have { oldStart1, oldEnd1, newEnd1 } and { oldStart2, oldEnd2, newEnd2 } then we can compute the + // final result like so: + // + // { + // oldStart3: Min(oldStart1, oldStart2), + // oldEnd3 : Max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1)), + // newEnd3 : Max(newEnd2, newEnd2 + (newEnd1 - oldEnd2)) + // } + + var oldStart1 = oldStartN; + var oldEnd1 = oldEndN; + var newEnd1 = newEndN; + + var oldStart2 = nextChange.span().start(); + var oldEnd2 = nextChange.span().end(); + var newEnd2 = oldStart2 + nextChange.newLength(); + + oldStartN = Math.min(oldStart1, oldStart2); + oldEndN = Math.max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1)); + newEndN = Math.max(newEnd2, newEnd2 + (newEnd1 - oldEnd2)); + } + + return new TextChangeRange(TextSpan.fromBounds(oldStartN, oldEndN), /*newLength: */newEndN - oldStartN); + } + } + export interface ClassifiedSpan { textSpan: TextSpan; classificationType: string; // ClassificationTypeNames diff --git a/src/services/text.ts b/src/services/text.ts deleted file mode 100644 index fd768785dea..00000000000 --- a/src/services/text.ts +++ /dev/null @@ -1,296 +0,0 @@ -module ts { - export class TextSpan { - private _start: number; - private _length: number; - - /** - * Creates a TextSpan instance beginning with the position Start and having the Length - * specified with length. - */ - constructor(start: number, length: number) { - Debug.assert(start >= 0, "start"); - Debug.assert(length >= 0, "length"); - - this._start = start; - this._length = length; - } - - public toJSON(key: any): any { - return { start: this._start, length: this._length }; - } - - public start(): number { - return this._start; - } - - public length(): number { - return this._length; - } - - public end(): number { - return this._start + this._length; - } - - public isEmpty(): boolean { - return this._length === 0; - } - - /** - * Determines whether the position lies within the span. Returns true if the position is greater than or equal to Start and strictly less - * than End, otherwise false. - * @param position The position to check. - */ - public containsPosition(position: number): boolean { - return position >= this._start && position < this.end(); - } - - /** - * Determines whether span falls completely within this span. Returns true if the specified span falls completely within this span, otherwise false. - * @param span The span to check. - */ - public containsTextSpan(span: TextSpan): boolean { - return span._start >= this._start && span.end() <= this.end(); - } - - /** - * Determines whether the given span overlaps this span. Two spans are considered to overlap - * if they have positions in common and neither is empty. Empty spans do not overlap with any - * other span. Returns true if the spans overlap, false otherwise. - * @param span The span to check. - */ - public overlapsWith(span: TextSpan): boolean { - var overlapStart = Math.max(this._start, span._start); - var overlapEnd = Math.min(this.end(), span.end()); - - return overlapStart < overlapEnd; - } - - /** - * Returns the overlap with the given span, or undefined if there is no overlap. - * @param span The span to check. - */ - public overlap(span: TextSpan): TextSpan { - var overlapStart = Math.max(this._start, span._start); - var overlapEnd = Math.min(this.end(), span.end()); - - if (overlapStart < overlapEnd) { - return TextSpan.fromBounds(overlapStart, overlapEnd); - } - - return undefined; - } - - /** - * Determines whether span intersects this span. Two spans are considered to - * intersect if they have positions in common or the end of one span - * coincides with the start of the other span. Returns true if the spans intersect, false otherwise. - * @param The span to check. - */ - public intersectsWithTextSpan(span: TextSpan): boolean { - return span._start <= this.end() && span.end() >= this._start; - } - - public intersectsWith(start: number, length: number): boolean { - var end = start + length; - return start <= this.end() && end >= this._start; - } - - /** - * Determines whether the given position intersects this span. - * A position is considered to intersect if it is between the start and - * end positions (inclusive) of this span. Returns true if the position intersects, false otherwise. - * @param position The position to check. - */ - public intersectsWithPosition(position: number): boolean { - return position <= this.end() && position >= this._start; - } - - /** - * Returns the intersection with the given span, or undefined if there is no intersection. - * @param span The span to check. - */ - public intersection(span: TextSpan): TextSpan { - var intersectStart = Math.max(this._start, span._start); - var intersectEnd = Math.min(this.end(), span.end()); - - if (intersectStart <= intersectEnd) { - return TextSpan.fromBounds(intersectStart, intersectEnd); - } - - return undefined; - } - - /** - * Creates a new TextSpan from the given start and end positions - * as opposed to a position and length. - */ - public static fromBounds(start: number, end: number): TextSpan { - Debug.assert(start >= 0); - Debug.assert(end - start >= 0); - return new TextSpan(start, end - start); - } - } - - export class TextChangeRange { - public static unchanged = new TextChangeRange(new TextSpan(0, 0), 0); - - private _span: TextSpan; - private _newLength: number; - - /** - * Initializes a new instance of TextChangeRange. - */ - constructor(span: TextSpan, newLength: number) { - Debug.assert(newLength >= 0, "newLength"); - - this._span = span; - this._newLength = newLength; - } - - /** - * The span of text before the edit which is being changed - */ - public span(): TextSpan { - return this._span; - } - - /** - * Width of the span after the edit. A 0 here would represent a delete - */ - public newLength(): number { - return this._newLength; - } - - public newSpan(): TextSpan { - return new TextSpan(this.span().start(), this.newLength()); - } - - public isUnchanged(): boolean { - return this.span().isEmpty() && this.newLength() === 0; - } - - /** - * Called to merge all the changes that occurred across several versions of a script snapshot - * into a single change. i.e. if a user keeps making successive edits to a script we will - * have a text change from V1 to V2, V2 to V3, ..., Vn. - * - * This function will then merge those changes into a single change range valid between V1 and - * Vn. - */ - public static collapseChangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange { - if (changes.length === 0) { - return TextChangeRange.unchanged; - } - - if (changes.length === 1) { - return changes[0]; - } - - // We change from talking about { { oldStart, oldLength }, newLength } to { oldStart, oldEnd, newEnd } - // as it makes things much easier to reason about. - var change0 = changes[0]; - - var oldStartN = change0.span().start(); - var oldEndN = change0.span().end(); - var newEndN = oldStartN + change0.newLength(); - - for (var i = 1; i < changes.length; i++) { - var nextChange = changes[i]; - - // Consider the following case: - // i.e. two edits. The first represents the text change range { { 10, 50 }, 30 }. i.e. The span starting - // at 10, with length 50 is reduced to length 30. The second represents the text change range { { 30, 30 }, 40 }. - // i.e. the span starting at 30 with length 30 is increased to length 40. - // - // 0 10 20 30 40 50 60 70 80 90 100 - // ------------------------------------------------------------------------------------------------------- - // | / - // | /---- - // T1 | /---- - // | /---- - // | /---- - // ------------------------------------------------------------------------------------------------------- - // | \ - // | \ - // T2 | \ - // | \ - // | \ - // ------------------------------------------------------------------------------------------------------- - // - // Merging these turns out to not be too difficult. First, determining the new start of the change is trivial - // it's just the min of the old and new starts. i.e.: - // - // 0 10 20 30 40 50 60 70 80 90 100 - // ------------------------------------------------------------*------------------------------------------ - // | / - // | /---- - // T1 | /---- - // | /---- - // | /---- - // ----------------------------------------$-------------------$------------------------------------------ - // . | \ - // . | \ - // T2 . | \ - // . | \ - // . | \ - // ----------------------------------------------------------------------*-------------------------------- - // - // (Note the dots represent the newly inferrred start. - // Determining the new and old end is also pretty simple. Basically it boils down to paying attention to the - // absolute positions at the asterixes, and the relative change between the dollar signs. Basically, we see - // which if the two $'s precedes the other, and we move that one forward until they line up. in this case that - // means: - // - // 0 10 20 30 40 50 60 70 80 90 100 - // --------------------------------------------------------------------------------*---------------------- - // | / - // | /---- - // T1 | /---- - // | /---- - // | /---- - // ------------------------------------------------------------$------------------------------------------ - // . | \ - // . | \ - // T2 . | \ - // . | \ - // . | \ - // ----------------------------------------------------------------------*-------------------------------- - // - // In other words (in this case), we're recognizing that the second edit happened after where the first edit - // ended with a delta of 20 characters (60 - 40). Thus, if we go back in time to where the first edit started - // that's the same as if we started at char 80 instead of 60. - // - // As it so happens, the same logic applies if the second edit precedes the first edit. In that case rahter - // than pusing the first edit forward to match the second, we'll push the second edit forward to match the - // first. - // - // In this case that means we have { oldStart: 10, oldEnd: 80, newEnd: 70 } or, in TextChangeRange - // semantics: { { start: 10, length: 70 }, newLength: 60 } - // - // The math then works out as follows. - // If we have { oldStart1, oldEnd1, newEnd1 } and { oldStart2, oldEnd2, newEnd2 } then we can compute the - // final result like so: - // - // { - // oldStart3: Min(oldStart1, oldStart2), - // oldEnd3 : Max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1)), - // newEnd3 : Max(newEnd2, newEnd2 + (newEnd1 - oldEnd2)) - // } - - var oldStart1 = oldStartN; - var oldEnd1 = oldEndN; - var newEnd1 = newEndN; - - var oldStart2 = nextChange.span().start(); - var oldEnd2 = nextChange.span().end(); - var newEnd2 = oldStart2 + nextChange.newLength(); - - oldStartN = Math.min(oldStart1, oldStart2); - oldEndN = Math.max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1)); - newEndN = Math.max(newEnd2, newEnd2 + (newEnd1 - oldEnd2)); - } - - return new TextChangeRange(TextSpan.fromBounds(oldStartN, oldEndN), /*newLength: */newEndN - oldStartN); - } - } -} \ No newline at end of file From 7ed933f5c41a73adc77f8bcdd6421d81bca4d5db Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Wed, 10 Dec 2014 10:16:51 -0800 Subject: [PATCH 078/141] Type guards do no affect values of type any --- src/compiler/checker.ts | 8 ++++---- src/compiler/types.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 6d913f7360c..76e0d342a62 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -6422,11 +6422,11 @@ module ts { // and the right operand to be of type Any or a subtype of the 'Function' interface type. // The result is always of the Boolean primitive type. // NOTE: do not raise error if leftType is unknown as related error was already reported - if (leftType !== unknownType && !isStructuredType(leftType)) { + if (!(leftType.flags & TypeFlags.Any || isStructuredType(leftType))) { error(node.left, Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); } // NOTE: do not raise error if right is unknown as related error was already reported - if (rightType !== unknownType && rightType !== anyType && !isTypeSubtypeOf(rightType, globalFunctionType)) { + if (!(rightType.flags & TypeFlags.Any || isTypeSubtypeOf(rightType, globalFunctionType))) { error(node.right, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type); } return booleanType; @@ -6440,7 +6440,7 @@ module ts { if (leftType !== anyType && leftType !== stringType && leftType !== numberType) { error(node.left, Diagnostics.The_left_hand_side_of_an_in_expression_must_be_of_types_any_string_or_number); } - if (!isStructuredType(rightType)) { + if (!(rightType.flags & TypeFlags.Any || isStructuredType(rightType))) { error(node.right, Diagnostics.The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); } return booleanType; @@ -7796,7 +7796,7 @@ module ts { var exprType = checkExpression(node.expression); // unknownType is returned i.e. if node.expression is identifier whose name cannot be resolved // in this case error about missing name is already reported - do not report extra one - if (!isStructuredType(exprType) && exprType !== unknownType) { + if (!(exprType.flags & TypeFlags.Any || isStructuredType(exprType))) { error(node.expression, Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter); } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index c2d57876e6a..75b5cc644c6 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1201,7 +1201,7 @@ module ts { StringLike = String | StringLiteral, NumberLike = Number | Enum, ObjectType = Class | Interface | Reference | Tuple | Anonymous, - Structured = Any | ObjectType | Union | TypeParameter + Structured = ObjectType | Union | TypeParameter } // Properties common to all types From 523c1795b812dbd868c89446e9396a5f8081a81d Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Sun, 7 Dec 2014 20:55:37 -0800 Subject: [PATCH 079/141] use ts.System for tests --- src/harness/loggedIO.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/harness/loggedIO.ts b/src/harness/loggedIO.ts index c6305c50c10..c6d15c34a84 100644 --- a/src/harness/loggedIO.ts +++ b/src/harness/loggedIO.ts @@ -91,7 +91,7 @@ module Playback { return run; } - export interface PlaybackSystem extends System, PlaybackControl { } + export interface PlaybackSystem extends ts.System, PlaybackControl { } function createEmptyLog(): IOLog { return { @@ -221,7 +221,7 @@ module Playback { //console.log("Swallowed write operation during replay: " + name); } - export function wrapSystem(underlying: System): PlaybackSystem { + export function wrapSystem(underlying: ts.System): PlaybackSystem { var wrapper: PlaybackSystem = {}; initWrapper(wrapper, underlying); From 98c9f75e2165f5a187cbceda38972bd37423c6f2 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Wed, 10 Dec 2014 10:17:48 -0800 Subject: [PATCH 080/141] Adding test case --- tests/baselines/reference/typeGuardsWithAny.js | 12 ++++++++++++ .../baselines/reference/typeGuardsWithAny.types | 17 +++++++++++++++++ .../expressions/typeGuards/typeGuardsWithAny.ts | 4 ++++ 3 files changed, 33 insertions(+) create mode 100644 tests/baselines/reference/typeGuardsWithAny.js create mode 100644 tests/baselines/reference/typeGuardsWithAny.types create mode 100644 tests/cases/conformance/expressions/typeGuards/typeGuardsWithAny.ts diff --git a/tests/baselines/reference/typeGuardsWithAny.js b/tests/baselines/reference/typeGuardsWithAny.js new file mode 100644 index 00000000000..628ea425185 --- /dev/null +++ b/tests/baselines/reference/typeGuardsWithAny.js @@ -0,0 +1,12 @@ +//// [typeGuardsWithAny.ts] +var x: any = { p: 0 }; +if (x instanceof Object) { + x.p; // No error, type any is not narrowed +} + + +//// [typeGuardsWithAny.js] +var x = { p: 0 }; +if (x instanceof Object) { + x.p; // No error, type any is not narrowed +} diff --git a/tests/baselines/reference/typeGuardsWithAny.types b/tests/baselines/reference/typeGuardsWithAny.types new file mode 100644 index 00000000000..d79f813715b --- /dev/null +++ b/tests/baselines/reference/typeGuardsWithAny.types @@ -0,0 +1,17 @@ +=== tests/cases/conformance/expressions/typeGuards/typeGuardsWithAny.ts === +var x: any = { p: 0 }; +>x : any +>{ p: 0 } : { p: number; } +>p : number + +if (x instanceof Object) { +>x instanceof Object : boolean +>x : any +>Object : ObjectConstructor + + x.p; // No error, type any is not narrowed +>x.p : any +>x : any +>p : any +} + diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardsWithAny.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardsWithAny.ts new file mode 100644 index 00000000000..4e58d1a4acc --- /dev/null +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardsWithAny.ts @@ -0,0 +1,4 @@ +var x: any = { p: 0 }; +if (x instanceof Object) { + x.p; // No error, type any is not narrowed +} From fc950ed930dd3154230c74a40d3233c19de3a28b Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Sun, 7 Dec 2014 21:22:22 -0800 Subject: [PATCH 081/141] Move Map to types to ensure it is visible in definition files --- src/compiler/core.ts | 4 ---- src/compiler/types.ts | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 8dfc0d59ea9..e61602c1c45 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -15,10 +15,6 @@ module ts { True = -1 } - export interface Map { - [index: string]: T; - } - export const enum Comparison { LessThan = -1, EqualTo = 0, diff --git a/src/compiler/types.ts b/src/compiler/types.ts index c2d57876e6a..a08d2cb7a12 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1,6 +1,9 @@ /// module ts { + export interface Map { + [index: string]: T; + } export interface TextRange { pos: number; From cf340efe010c74be84305a4f5eddc478271583e9 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Sun, 7 Dec 2014 15:55:40 -0800 Subject: [PATCH 082/141] remove unused file --- src/services/findReferenceHelpers.ts | 152 --------------------------- 1 file changed, 152 deletions(-) delete mode 100644 src/services/findReferenceHelpers.ts diff --git a/src/services/findReferenceHelpers.ts b/src/services/findReferenceHelpers.ts deleted file mode 100644 index 68131a41115..00000000000 --- a/src/services/findReferenceHelpers.ts +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. -// See LICENSE.txt in the project root for complete license information. - -/// - -module TypeScript.Services { - export class FindReferenceHelpers { - public static compareSymbolsForLexicalIdentity(firstSymbol: TypeScript.PullSymbol, secondSymbol: TypeScript.PullSymbol): boolean { - // Unwrap modules so that we're always referring to the variable. - if (!firstSymbol.isAlias() && firstSymbol.isContainer()) { - var containerForFirstSymbol = (firstSymbol); - if (containerForFirstSymbol.getInstanceSymbol()) { - firstSymbol = containerForFirstSymbol.getInstanceSymbol(); - } - } - - if (!secondSymbol.isAlias() && secondSymbol.isContainer()) { - var containerForSecondSymbol = (secondSymbol); - if (containerForSecondSymbol.getInstanceSymbol()) { - secondSymbol = containerForSecondSymbol.getInstanceSymbol(); - } - } - - if (firstSymbol.kind === secondSymbol.kind) { - if (firstSymbol === secondSymbol) { - return true; - } - - // If we have two variables and they have the same name and the same parent, then - // they are the same symbol. - if (firstSymbol.kind === TypeScript.PullElementKind.Variable && - firstSymbol.name === secondSymbol.name && - firstSymbol.getDeclarations() && firstSymbol.getDeclarations().length >= 1 && - secondSymbol.getDeclarations() && secondSymbol.getDeclarations().length >= 1) { - - var firstSymbolDecl = firstSymbol.getDeclarations()[0]; - var secondSymbolDecl = secondSymbol.getDeclarations()[0]; - - return firstSymbolDecl.getParentDecl() === secondSymbolDecl.getParentDecl(); - } - - // If we have two properties that belong to an object literal, then we need ot see - // if they came from teh same object literal ast. - if (firstSymbol.kind === TypeScript.PullElementKind.Property && - firstSymbol.name === secondSymbol.name && - firstSymbol.getDeclarations() && firstSymbol.getDeclarations().length >= 1 && - secondSymbol.getDeclarations() && secondSymbol.getDeclarations().length >= 1) { - - var firstSymbolDecl = firstSymbol.getDeclarations()[0]; - var secondSymbolDecl = secondSymbol.getDeclarations()[0]; - - var firstParentDecl = firstSymbolDecl.getParentDecl(); - var secondParentDecl = secondSymbolDecl.getParentDecl(); - - if (firstParentDecl.kind === TypeScript.PullElementKind.ObjectLiteral && - secondParentDecl.kind === TypeScript.PullElementKind.ObjectLiteral) { - - return firstParentDecl.ast() === secondParentDecl.ast(); - } - } - - // check if we are dealing with the implementation of interface method or a method override - if (firstSymbol.name === secondSymbol.name) { - // at this point firstSymbol.kind === secondSymbol.kind so we can pick any of those - switch (firstSymbol.kind) { - case PullElementKind.Property: - case PullElementKind.Method: - case PullElementKind.GetAccessor: - case PullElementKind.SetAccessor: - // these kinds can only be defined in types - var t1 = firstSymbol.getContainer(); - var t2 = secondSymbol.getContainer(); - t1._resolveDeclaredSymbol(); - t2._resolveDeclaredSymbol(); - - return t1.hasBase(t2) || t2.hasBase(t1); - break; - } - } - - return false; - } - else { - switch (firstSymbol.kind) { - case TypeScript.PullElementKind.Class: { - return this.checkSymbolsForDeclarationEquality(firstSymbol, secondSymbol); - } - case TypeScript.PullElementKind.Property: { - if (firstSymbol.isAccessor()) { - var getterSymbol = (firstSymbol).getGetter(); - var setterSymbol = (firstSymbol).getSetter(); - - if (getterSymbol && getterSymbol === secondSymbol) { - return true; - } - - if (setterSymbol && setterSymbol === secondSymbol) { - return true; - } - } - return false; - } - case TypeScript.PullElementKind.Function: { - if (secondSymbol.isAccessor()) { - var getterSymbol = (secondSymbol).getGetter(); - var setterSymbol = (secondSymbol).getSetter(); - - if (getterSymbol && getterSymbol === firstSymbol) { - return true; - } - - if (setterSymbol && setterSymbol === firstSymbol) { - return true; - } - } - return false; - } - case TypeScript.PullElementKind.ConstructorMethod: { - return this.checkSymbolsForDeclarationEquality(firstSymbol, secondSymbol); - } - } - } - - return firstSymbol === secondSymbol; - } - - private static checkSymbolsForDeclarationEquality(firstSymbol: TypeScript.PullSymbol, secondSymbol: TypeScript.PullSymbol): boolean { - var firstSymbolDeclarations: TypeScript.PullDecl[] = firstSymbol.getDeclarations(); - var secondSymbolDeclarations: TypeScript.PullDecl[] = secondSymbol.getDeclarations(); - for (var i = 0, iLen = firstSymbolDeclarations.length; i < iLen; i++) { - for (var j = 0, jLen = secondSymbolDeclarations.length; j < jLen; j++) { - if (this.declarationsAreSameOrParents(firstSymbolDeclarations[i], secondSymbolDeclarations[j])) { - return true; - } - } - } - return false; - } - - private static declarationsAreSameOrParents(firstDecl: TypeScript.PullDecl, secondDecl: TypeScript.PullDecl): boolean { - var firstParent: TypeScript.PullDecl = firstDecl.getParentDecl(); - var secondParent: TypeScript.PullDecl = secondDecl.getParentDecl(); - if (firstDecl === secondDecl || - firstDecl === secondParent || - firstParent === secondDecl || - firstParent === secondParent) { - return true; - } - return false; - } - } -} \ No newline at end of file From f90e725aa0d6dc5c621ea1bd31fa23337f37dd30 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Sun, 7 Dec 2014 16:26:08 -0800 Subject: [PATCH 083/141] move formatting.ts and smartIndernter.ts into formatting folder to match thier namespace --- src/services/{ => formatting}/formatting.ts | 59 +++++++++++++++++-- src/services/formatting/formattingScanner.ts | 2 +- .../{ => formatting}/smartIndenter.ts | 2 +- src/services/services.ts | 6 +- 4 files changed, 60 insertions(+), 9 deletions(-) rename src/services/{ => formatting}/formatting.ts (93%) rename src/services/{ => formatting}/smartIndenter.ts (97%) diff --git a/src/services/formatting.ts b/src/services/formatting/formatting.ts similarity index 93% rename from src/services/formatting.ts rename to src/services/formatting/formatting.ts index ad18df41317..107251aabda 100644 --- a/src/services/formatting.ts +++ b/src/services/formatting/formatting.ts @@ -1,7 +1,6 @@ -/// -/// -/// -/// +/// +/// +/// module ts.formatting { @@ -983,4 +982,56 @@ module ts.formatting { return SyntaxKind.Unknown; } + + var internedTabsIndentation: string[]; + var internedSpacesIndentation: string[]; + + export function getIndentationString(indentation: number, options: FormatCodeOptions): string { + if (!options.ConvertTabsToSpaces) { + var tabs = Math.floor(indentation / options.TabSize); + var spaces = indentation - tabs * options.TabSize; + + var tabString: string; + if (!internedTabsIndentation) { + internedTabsIndentation = []; + } + + if (internedTabsIndentation[tabs] === undefined) { + internedTabsIndentation[tabs] = tabString = repeat('\t', tabs); + } + else { + tabString = internedTabsIndentation[tabs]; + } + + return spaces ? tabString + repeat(" ", spaces) : tabString; + } + else { + var spacesString: string; + var quotient = Math.floor(indentation / options.IndentSize); + var remainder = indentation % options.IndentSize; + if (!internedSpacesIndentation) { + internedSpacesIndentation = []; + } + + if (internedSpacesIndentation[quotient] === undefined) { + spacesString = repeat(" ", options.IndentSize * quotient); + internedSpacesIndentation[quotient] = spacesString; + } + else { + spacesString = internedSpacesIndentation[quotient]; + } + + + return remainder ? spacesString + repeat(" ", remainder) : spacesString; + } + + function repeat(value: string, count: number): string { + var s = ""; + for (var i = 0; i < count; ++i) { + s += value; + } + + return s; + } + } } \ No newline at end of file diff --git a/src/services/formatting/formattingScanner.ts b/src/services/formatting/formattingScanner.ts index 710881bf80b..7ddfecc17f2 100644 --- a/src/services/formatting/formattingScanner.ts +++ b/src/services/formatting/formattingScanner.ts @@ -1,4 +1,4 @@ -/// +/// /// module ts.formatting { diff --git a/src/services/smartIndenter.ts b/src/services/formatting/smartIndenter.ts similarity index 97% rename from src/services/smartIndenter.ts rename to src/services/formatting/smartIndenter.ts index e93cb5616a9..8da1ef0c93b 100644 --- a/src/services/smartIndenter.ts +++ b/src/services/formatting/smartIndenter.ts @@ -1,4 +1,4 @@ -/// +/// module ts.formatting { export module SmartIndenter { diff --git a/src/services/services.ts b/src/services/services.ts index e31d2b42ee5..f1744c8d4ab 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -4,13 +4,13 @@ /// /// +/// /// /// -/// /// /// -/// -/// +/// +/// module ts { export interface Node { From 35adeb8363d38a9c0b562e6c3ade5eea119df70c Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Wed, 10 Dec 2014 14:25:02 -0800 Subject: [PATCH 084/141] Addressing CR feedback --- src/compiler/checker.ts | 8 ++++---- src/compiler/types.ts | 1 - tests/baselines/reference/typeGuardsWithAny.js | 10 ++++++++-- tests/baselines/reference/typeGuardsWithAny.types | 8 +++++++- .../expressions/typeGuards/typeGuardsWithAny.ts | 5 ++++- 5 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 76e0d342a62..c3bea06c41f 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -4445,8 +4445,8 @@ module ts { // Get the narrowed type of a given symbol at a given location function getNarrowedTypeOfSymbol(symbol: Symbol, node: Node) { var type = getTypeOfSymbol(symbol); - // Only narrow when symbol is variable of a structured type - if (node && (symbol.flags & SymbolFlags.Variable && type.flags & TypeFlags.Structured)) { + // Only narrow when symbol is variable of an object, union, or type parameter type + if (node && symbol.flags & SymbolFlags.Variable && type.flags & (TypeFlags.ObjectType | TypeFlags.Union | TypeFlags.TypeParameter)) { loop: while (node.parent) { var child = node; node = node.parent; @@ -6400,12 +6400,12 @@ module ts { return numberType; } - // Return true if type is any, an object type, a type parameter, or a union type composed of only those kinds of types + // Return true if type an object type, a type parameter, or a union type composed of only those kinds of types function isStructuredType(type: Type): boolean { if (type.flags & TypeFlags.Union) { return !forEach((type).types, t => !isStructuredType(t)); } - return (type.flags & TypeFlags.Structured) !== 0; + return (type.flags & (TypeFlags.ObjectType | TypeFlags.TypeParameter)) !== 0; } function isConstEnumObjectType(type: Type) : boolean { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 75b5cc644c6..83a5d4a4e82 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1201,7 +1201,6 @@ module ts { StringLike = String | StringLiteral, NumberLike = Number | Enum, ObjectType = Class | Interface | Reference | Tuple | Anonymous, - Structured = ObjectType | Union | TypeParameter } // Properties common to all types diff --git a/tests/baselines/reference/typeGuardsWithAny.js b/tests/baselines/reference/typeGuardsWithAny.js index 628ea425185..56676fb6d68 100644 --- a/tests/baselines/reference/typeGuardsWithAny.js +++ b/tests/baselines/reference/typeGuardsWithAny.js @@ -1,12 +1,18 @@ //// [typeGuardsWithAny.ts] var x: any = { p: 0 }; if (x instanceof Object) { - x.p; // No error, type any is not narrowed + x.p; // No error, type any unaffected by type guard +} +else { + x.p; // No error, type any unaffected by type guard } //// [typeGuardsWithAny.js] var x = { p: 0 }; if (x instanceof Object) { - x.p; // No error, type any is not narrowed + x.p; // No error, type any unaffected by type guard +} +else { + x.p; // No error, type any unaffected by type guard } diff --git a/tests/baselines/reference/typeGuardsWithAny.types b/tests/baselines/reference/typeGuardsWithAny.types index d79f813715b..ee628c9c249 100644 --- a/tests/baselines/reference/typeGuardsWithAny.types +++ b/tests/baselines/reference/typeGuardsWithAny.types @@ -9,7 +9,13 @@ if (x instanceof Object) { >x : any >Object : ObjectConstructor - x.p; // No error, type any is not narrowed + x.p; // No error, type any unaffected by type guard +>x.p : any +>x : any +>p : any +} +else { + x.p; // No error, type any unaffected by type guard >x.p : any >x : any >p : any diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardsWithAny.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardsWithAny.ts index 4e58d1a4acc..e7e756ea8e0 100644 --- a/tests/cases/conformance/expressions/typeGuards/typeGuardsWithAny.ts +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardsWithAny.ts @@ -1,4 +1,7 @@ var x: any = { p: 0 }; if (x instanceof Object) { - x.p; // No error, type any is not narrowed + x.p; // No error, type any unaffected by type guard +} +else { + x.p; // No error, type any unaffected by type guard } From 6da0b57d1913684f2fbcc58e12653920d5278182 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 10 Dec 2014 14:49:59 -0800 Subject: [PATCH 085/141] Removed tokenSpan.ts. --- src/services/formatting/formatting.ts | 1 + src/services/formatting/references.ts | 3 +-- src/services/formatting/tokenSpan.ts | 24 ------------------------ 3 files changed, 2 insertions(+), 26 deletions(-) delete mode 100644 src/services/formatting/tokenSpan.ts diff --git a/src/services/formatting/formatting.ts b/src/services/formatting/formatting.ts index 107251aabda..22f90a0cdee 100644 --- a/src/services/formatting/formatting.ts +++ b/src/services/formatting/formatting.ts @@ -1,5 +1,6 @@ /// /// +/// /// module ts.formatting { diff --git a/src/services/formatting/references.ts b/src/services/formatting/references.ts index 3d19b33d821..b421424a61b 100644 --- a/src/services/formatting/references.ts +++ b/src/services/formatting/references.ts @@ -24,5 +24,4 @@ /// /// /// -/// -/// \ No newline at end of file +/// \ No newline at end of file diff --git a/src/services/formatting/tokenSpan.ts b/src/services/formatting/tokenSpan.ts deleted file mode 100644 index 1d8173a8227..00000000000 --- a/src/services/formatting/tokenSpan.ts +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module ts.formatting { - export class TokenSpan extends TextSpan { - constructor(public kind: SyntaxKind, start: number, length: number) { - super(start, length); - } - } -} \ No newline at end of file From 1fab80f3d98517aa22e1f257e2bcc509145f1ccd Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Sun, 7 Dec 2014 21:23:03 -0800 Subject: [PATCH 086/141] move OutliningSpan definitions to services to ensure it is visible in definitions file --- src/services/outliningElementsCollector.ts | 16 ---------------- src/services/services.ts | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/services/outliningElementsCollector.ts b/src/services/outliningElementsCollector.ts index 83eef2f4378..5af69cd3626 100644 --- a/src/services/outliningElementsCollector.ts +++ b/src/services/outliningElementsCollector.ts @@ -14,22 +14,6 @@ // module ts { - - export interface OutliningSpan { - /** - * @param textSpan The span of the document to actually collapse. - * @param hintSpan The span of the document to display when the user hovers over the - * collapsed span. - * @param bannerText The text to display in the editor for the collapsed region. - * @param autoCollapse Whether or not this region should be automatically collapsed when - * the 'Collapse to Definitions' command is invoked. - */ - textSpan: TextSpan; - hintSpan: TextSpan; - bannerText: string; - autoCollapse: boolean; - } - export module OutliningElementsCollector { export function collectElements(sourceFile: SourceFile): OutliningSpan[] { var elements: OutliningSpan[] = []; diff --git a/src/services/services.ts b/src/services/services.ts index f1744c8d4ab..31a9e7c638b 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1409,6 +1409,23 @@ module ts { documentation: SymbolDisplayPart[]; } + export interface OutliningSpan { + /** The span of the document to actually collapse. */ + textSpan: TextSpan; + + /** The span of the document to display when the user hovers over the collapsed span. */ + hintSpan: TextSpan; + + /** The text to display in the editor for the collapsed region. */ + bannerText: string; + + /** + * Whether or not this region should be automatically collapsed when + * the 'Collapse to Definitions' command is invoked. + */ + autoCollapse: boolean; + } + export interface EmitOutput { outputFiles: OutputFile[]; emitOutputStatus: EmitReturnStatus; From 6520663de75c0313d0114b6240c107206d2e33da Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 10 Dec 2014 14:52:42 -0800 Subject: [PATCH 087/141] add missing property to harnessLS --- src/harness/harnessLanguageService.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts index fe635349ec8..a093c75829c 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -142,6 +142,9 @@ module Harness.LanguageService { constructor(private cancellationToken: ts.CancellationToken = CancellationToken.None) { } + public trace(s: string) { + } + public addDefaultLibrary() { this.addScript(Harness.Compiler.defaultLibFileName, Harness.Compiler.defaultLibSourceFile.text); } From 520979d09489ef64348ed34f5b01dbddad36cbd0 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 10 Dec 2014 14:58:08 -0800 Subject: [PATCH 088/141] Make getLocalizedDiagnosticMessages and getCancellationToken optional --- src/harness/harness.ts | 1 - src/services/services.ts | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/harness/harness.ts b/src/harness/harness.ts index ba182e1b24d..e813b18b457 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -575,7 +575,6 @@ module Harness { return { getCurrentDirectory: ts.sys.getCurrentDirectory, - getCancellationToken: (): any => undefined, getSourceFile: (fn, languageVersion) => { if (Object.prototype.hasOwnProperty.call(filemap, getCanonicalFileName(fn))) { return filemap[getCanonicalFileName(fn)]; diff --git a/src/services/services.ts b/src/services/services.ts index 31a9e7c638b..ff917028eee 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -875,8 +875,8 @@ module ts { getScriptVersion(fileName: string): string; getScriptIsOpen(fileName: string): boolean; getScriptSnapshot(fileName: string): IScriptSnapshot; - getLocalizedDiagnosticMessages(): any; - getCancellationToken(): CancellationToken; + getLocalizedDiagnosticMessages?(): any; + getCancellationToken?(): CancellationToken; getCurrentDirectory(): string; getDefaultLibFilename(options: CompilerOptions): string; } @@ -2395,12 +2395,12 @@ module ts { var useCaseSensitivefilenames = false; var sourceFilesByName: Map = {}; var documentRegistry = documentRegistry; - var cancellationToken = new CancellationTokenObject(host.getCancellationToken()); + var cancellationToken = new CancellationTokenObject(host.getCancellationToken && host.getCancellationToken()); var activeCompletionSession: CompletionSession; // The current active completion session, used to get the completion entry details var writer: (filename: string, data: string, writeByteOrderMark: boolean) => void = undefined; // Check if the localized messages json is set, otherwise query the host for it - if (!localizedDiagnosticMessages) { + if (!localizedDiagnosticMessages && host.getLocalizedDiagnosticMessages) { localizedDiagnosticMessages = host.getLocalizedDiagnosticMessages(); } From f690f054fc7e67cc59438031bce2419148fd752d Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Mon, 8 Dec 2014 13:00:46 -0800 Subject: [PATCH 089/141] Remove unused parameter to getCompletionsAtPosition Conflicts: tests/baselines/reference/APISample_node_compile.js tests/baselines/reference/APISample_node_compile.types tests/baselines/reference/APISample_standalone_compile.js tests/baselines/reference/APISample_standalone_compile.types --- src/harness/fourslash.ts | 6 +++--- src/services/services.ts | 6 +++--- src/services/shims.ts | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index da13735872d..e523def8be2 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -750,11 +750,11 @@ module FourSlash { } private getMemberListAtCaret() { - return this.languageService.getCompletionsAtPosition(this.activeFile.fileName, this.currentCaretPosition, true); + return this.languageService.getCompletionsAtPosition(this.activeFile.fileName, this.currentCaretPosition); } private getCompletionListAtCaret() { - return this.languageService.getCompletionsAtPosition(this.activeFile.fileName, this.currentCaretPosition, false); + return this.languageService.getCompletionsAtPosition(this.activeFile.fileName, this.currentCaretPosition); } private getCompletionEntryDetails(entryName: string) { @@ -1364,7 +1364,7 @@ module FourSlash { this.languageService.getSignatureHelpItems(this.activeFile.fileName, offset); } else if (prevChar === ' ' && /A-Za-z_/.test(ch)) { /* Completions */ - this.languageService.getCompletionsAtPosition(this.activeFile.fileName, offset, false); + this.languageService.getCompletionsAtPosition(this.activeFile.fileName, offset); } if (i % errorCadence === 0) { diff --git a/src/services/services.ts b/src/services/services.ts index ff917028eee..76f4fece035 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -895,7 +895,7 @@ module ts { getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; - getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): CompletionInfo; + getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; @@ -2666,7 +2666,7 @@ module ts { }; } - function getCompletionsAtPosition(filename: string, position: number, isMemberCompletion: boolean) { + function getCompletionsAtPosition(filename: string, position: number) { synchronizeHostData(); filename = normalizeSlashes(filename); @@ -2741,7 +2741,7 @@ module ts { if (isRightOfDot) { // Right of dot member completion list var symbols: Symbol[] = []; - isMemberCompletion = true; + var isMemberCompletion = true; if (node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.QualifiedName || node.kind === SyntaxKind.PropertyAccessExpression) { var symbol = typeInfoResolver.getSymbolAtLocation(node); diff --git a/src/services/shims.ts b/src/services/shims.ts index 5556743830f..127e6c31209 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -88,7 +88,7 @@ module ts { getSyntacticClassifications(fileName: string, start: number, length: number): string; - getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): string; + getCompletionsAtPosition(fileName: string, position: number): string; getCompletionEntryDetails(fileName: string, position: number, entryName: string): string; getQuickInfoAtPosition(fileName: string, position: number): string; @@ -686,11 +686,11 @@ module ts { * to provide at the given source position and providing a member completion * list if requested. */ - public getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean) { + public getCompletionsAtPosition(fileName: string, position: number) { return this.forwardJSONCall( - "getCompletionsAtPosition('" + fileName + "', " + position + ", " + isMemberCompletion + ")", + "getCompletionsAtPosition('" + fileName + "', " + position + ")", () => { - var completion = this.languageService.getCompletionsAtPosition(fileName, position, isMemberCompletion); + var completion = this.languageService.getCompletionsAtPosition(fileName, position); return completion; }); } From e2baddd7161d433bb1ab23329a57b12efda69fd1 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 8 Dec 2014 17:42:08 -0800 Subject: [PATCH 090/141] Explicit default target for fourslash tests in the harness. --- src/harness/fourslash.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index e523def8be2..ac64e4c906e 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -2248,7 +2248,7 @@ module FourSlash { ts.ScriptTarget.Latest, ts.sys.useCaseSensitiveFileNames); // TODO (drosen): We need to enforce checking on these tests. - var program = ts.createProgram([Harness.Compiler.fourslashFilename, fileName], { out: "fourslashTestOutput.js", noResolve: true }, host); + var program = ts.createProgram([Harness.Compiler.fourslashFilename, fileName], { out: "fourslashTestOutput.js", noResolve: true, target: ts.ScriptTarget.ES3 }, host); var checker = ts.createTypeChecker(program, /*fullTypeCheckMode*/ true); var errors = program.getDiagnostics().concat(checker.getDiagnostics()); From 10d08b816e2988e9e3d35b9eb07a8e5917b91481 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 10 Dec 2014 15:08:26 -0800 Subject: [PATCH 091/141] do not indent leading comments that attached to tokens with errors --- src/services/formatting.ts | 13 +++++++++--- .../formattingCommentsBeforeErrors.ts | 20 +++++++++++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 tests/cases/fourslash/formattingCommentsBeforeErrors.ts diff --git a/src/services/formatting.ts b/src/services/formatting.ts index 0c2dd4c51dc..48d3c80445c 100644 --- a/src/services/formatting.ts +++ b/src/services/formatting.ts @@ -622,14 +622,21 @@ module ts.formatting { var tokenStart = sourceFile.getLineAndCharacterFromPosition(currentTokenInfo.token.pos); if (isTokenInRange) { + var rangeHasError = rangeContainsError(currentTokenInfo.token); // save prevStartLine since processRange will overwrite this value with current ones var prevStartLine = previousRangeStartLine; lineAdded = processRange(currentTokenInfo.token, tokenStart, parent, childContextNode, dynamicIndentation); - if (lineAdded !== undefined) { - indentToken = lineAdded; + if (rangeHasError) { + // do not indent comments\token if token range overlaps with some error + indentToken = false; } else { - indentToken = lastTriviaWasNewLine && tokenStart.line !== prevStartLine; + if (lineAdded !== undefined) { + indentToken = lineAdded; + } + else { + indentToken = lastTriviaWasNewLine && tokenStart.line !== prevStartLine; + } } } diff --git a/tests/cases/fourslash/formattingCommentsBeforeErrors.ts b/tests/cases/fourslash/formattingCommentsBeforeErrors.ts new file mode 100644 index 00000000000..bb7e616b267 --- /dev/null +++ b/tests/cases/fourslash/formattingCommentsBeforeErrors.ts @@ -0,0 +1,20 @@ +/// + +////module A { +//// interface B { +//// // a +//// // b +//// baz(); +/////*0*/ // d /*1*/asd a +//// // e +//// foo(); +//// // f asd +//// // g as +//// bar(); +//// } +////} + +goTo.marker("1"); +edit.insert("\n"); +goTo.marker("0"); +verify.currentLineContentIs(" // d "); \ No newline at end of file From c0779106793cd8783ee61158225e19b0461a6e0b Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Sat, 6 Dec 2014 23:04:17 -0800 Subject: [PATCH 092/141] added getApiVersion method to TypeScriptServicesFactory --- src/services/services.ts | 3 +++ src/services/shims.ts | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/src/services/services.ts b/src/services/services.ts index 980b7ecda3d..ea0639f2eff 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -14,6 +14,9 @@ /// module ts { + + export var ScriptAPIVersion = "1.4" + export interface Node { getSourceFile(): SourceFile; getChildCount(sourceFile?: SourceFile): number; diff --git a/src/services/shims.ts b/src/services/shims.ts index 5556743830f..095371f3845 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -859,6 +859,13 @@ module ts { private _shims: Shim[] = []; private documentRegistry: DocumentRegistry = createDocumentRegistry(); + /* + * Returns script API version. + */ + public getApiVersion(dummy: any): string { + return ScriptAPIVersion; + } + public createLanguageServiceShim(host: LanguageServiceShimHost): LanguageServiceShim { try { var hostAdapter = new LanguageServiceShimHostAdapter(host); From fbec3fe3c4732504cfca9a71eba479f909ea0e25 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Sun, 7 Dec 2014 15:17:20 -0800 Subject: [PATCH 093/141] removed dummy parameter from getApiVersion method --- src/services/shims.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/shims.ts b/src/services/shims.ts index 095371f3845..dbbb9068429 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -862,7 +862,7 @@ module ts { /* * Returns script API version. */ - public getApiVersion(dummy: any): string { + public getApiVersion(): string { return ScriptAPIVersion; } From 0a17fc687d07591522e6fcd9a08db05cdc76a9f6 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Sun, 7 Dec 2014 21:41:15 -0800 Subject: [PATCH 094/141] addressed CR feedback: rename getApiVersion to getServicesVersion --- src/services/services.ts | 2 +- src/services/shims.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/services.ts b/src/services/services.ts index ea0639f2eff..af460ff42cf 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -15,7 +15,7 @@ module ts { - export var ScriptAPIVersion = "1.4" + export var servicesVersion = "0.4" export interface Node { getSourceFile(): SourceFile; diff --git a/src/services/shims.ts b/src/services/shims.ts index dbbb9068429..379c56796d8 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -862,8 +862,8 @@ module ts { /* * Returns script API version. */ - public getApiVersion(): string { - return ScriptAPIVersion; + public getServicesVersion(): string { + return servicesVersion; } public createLanguageServiceShim(host: LanguageServiceShimHost): LanguageServiceShim { From c3bc360c533cd3f9e3ada6ddb7493c2497ac18bb Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 10 Dec 2014 14:52:42 -0800 Subject: [PATCH 095/141] add missing property to harnessLS --- src/harness/harnessLanguageService.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts index d3082a17ba2..0b908d87d86 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -139,6 +139,9 @@ module Harness.LanguageService { constructor(private cancellationToken: ts.CancellationToken = CancellationToken.None) { } + public trace(s: string) { + } + public addDefaultLibrary() { this.addScript(Harness.Compiler.defaultLibFileName, Harness.Compiler.defaultLibSourceFile.text); } From 7c6d731b62d4276cd858299a797d66f25ee3890a Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 10 Dec 2014 16:42:41 -0800 Subject: [PATCH 096/141] Moved non-exposed functions to utilities; fix up emitted .d.ts in Jakefile. --- Jakefile | 111 ++++-- src/compiler/checker.ts | 54 +-- src/compiler/parser.ts | 676 +----------------------------------- src/compiler/utilities.ts | 707 ++++++++++++++++++++++++++++++++++++++ src/services/services.ts | 179 +--------- src/services/utilities.ts | 178 +++++++++- 6 files changed, 991 insertions(+), 914 deletions(-) create mode 100644 src/compiler/utilities.ts diff --git a/Jakefile b/Jakefile index 16330305b6a..7c58800c79d 100644 --- a/Jakefile +++ b/Jakefile @@ -35,6 +35,7 @@ var compilerSources = [ "types.ts", "scanner.ts", "parser.ts", + "utilities.ts", "binder.ts", "checker.ts", "emitter.ts", @@ -47,26 +48,53 @@ var compilerSources = [ var servicesSources = [ "core.ts", + "sys.ts", "types.ts", "scanner.ts", "parser.ts", + "utilities.ts", "binder.ts", "checker.ts", - "emitter.ts" + "emitter.ts", + "diagnosticInformationMap.generated.ts" ].map(function (f) { return path.join(compilerDirectory, f); }).concat([ "breakpoints.ts", + "navigationBar.ts", + "outliningElementsCollector.ts", "services.ts", "shims.ts", "signatureHelp.ts", "utilities.ts", - "navigationBar.ts", - "outliningElementsCollector.ts" + "formatting/formatting.ts", + "formatting/formattingContext.ts", + "formatting/formattingRequestKind.ts", + "formatting/formattingScanner.ts", + "formatting/references.ts", + "formatting/rule.ts", + "formatting/ruleAction.ts", + "formatting/ruleDescriptor.ts", + "formatting/ruleFlag.ts", + "formatting/ruleOperation.ts", + "formatting/ruleOperationContext.ts", + "formatting/rules.ts", + "formatting/rulesMap.ts", + "formatting/rulesProvider.ts", + "formatting/smartIndenter.ts", + "formatting/tokenRange.ts" ].map(function (f) { return path.join(servicesDirectory, f); })); +var definitionsRoots = [ + "compiler/types.d.ts", + "compiler/scanner.d.ts", + "compiler/parser.d.ts", + "compiler/checker.d.ts", + "services/services.d.ts", +]; + var harnessSources = [ "harness.ts", "sourceMapRecorder.ts", @@ -148,25 +176,48 @@ var compilerFilename = "tsc.js"; * @param prefixes: a list of files to prepend to the target file * @param useBuiltCompiler: true to use the built compiler, false to use the LKG * @param noOutFile: true to compile without using --out + * @param generateDeclarations: true to compile using --declaration + * @param outDir: true to compile using --outDir + * @param keepComments: false to compile using --removeComments + * @param callback: a function to execute after the compilation process ends */ -function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOutFile, generateDeclarations, callback) { +function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOutFile, generateDeclarations, outDir, keepComments, noResolve, callback) { file(outFile, prereqs, function() { var dir = useBuiltCompiler ? builtLocalDirectory : LKGDirectory; - var options = "-removeComments --module commonjs -noImplicitAny "; + var options = "--module commonjs -noImplicitAny"; + + if (!keepComments) { + options += " -removeComments"; + } + if (generateDeclarations) { - options += "--declaration "; + options += " --declaration"; } if (useDebugMode) { - options += "--preserveConstEnums "; + options += " --preserveConstEnums"; + } + + if (outDir) { + options += " --outDir " + outDir; + } + + if (!noOutFile) { + options += " --out " + outFile; + } + + if(noResolve) { + options += " --noResolve"; + } + + if (useDebugMode) { + options += " -sourcemap -mapRoot file:///" + path.resolve(path.dirname(outFile)); } var cmd = host + " " + dir + compilerFilename + " " + options + " "; - cmd = cmd + sources.join(" ") + (!noOutFile ? " -out " + outFile : ""); - if (useDebugMode) { - cmd = cmd + " -sourcemap -mapRoot file:///" + path.resolve(path.dirname(outFile)); - } + cmd = cmd + sources.join(" "); console.log(cmd + "\n"); + var ex = jake.createExec([cmd]); // Add listeners for output and error ex.addListener("stdout", function(output) { @@ -259,24 +310,38 @@ var tscFile = path.join(builtLocalDirectory, compilerFilename); compileFile(tscFile, compilerSources, [builtLocalDirectory, copyright].concat(compilerSources), [copyright], /*useBuiltCompiler:*/ false); var servicesFile = path.join(builtLocalDirectory, "typescriptServices.js"); -var servicesDefinitionsFile = path.join(builtLocalDirectory, "typescriptServices.d.ts"); +compileFile(servicesFile, servicesSources,[builtLocalDirectory, copyright].concat(servicesSources), [copyright], /*useBuiltCompiler*/ true); -compileFile(servicesFile, - servicesSources, - [builtLocalDirectory, copyright].concat(servicesSources), - [copyright], +var nodeDefinitionsFile = path.join(builtLocalDirectory, "typescript.d.ts"); +var standaloneDefinitionsFile = path.join(builtLocalDirectory, "typescriptServices.d.ts"); +var tempDirPath = path.join(builtLocalDirectory, "temptempdir"); +compileFile(nodeDefinitionsFile, servicesSources,[builtLocalDirectory, copyright].concat(servicesSources), + /*prefixes*/ undefined, /*useBuiltCompiler*/ true, - /*noOutFile*/ false, + /*noOutFile*/ true, /*generateDeclarations*/ true, - /*callback*/ fixDeclarationFile); + /*outDir*/ tempDirPath, + /*keepComments*/ true, + /*noResolve*/ true, + /*callback*/ function () { + concatenateFiles(standaloneDefinitionsFile, definitionsRoots.map(function (f) { + return path.join(tempDirPath, f); + })); + prependFile(copyright, standaloneDefinitionsFile); -function fixDeclarationFile() { - fs.appendFileSync(servicesDefinitionsFile, os.EOL + "export = ts;") -} + // Create the node definition file by replacing 'ts' module with '"typescript"' as a module. + jake.cpR(standaloneDefinitionsFile, nodeDefinitionsFile, {silent: true}); + var definitionFileContents = fs.readFileSync(nodeDefinitionsFile).toString(); + definitionFileContents = definitionFileContents.replace(/declare module ts/g, 'declare module "typescript"'); + fs.writeFileSync(nodeDefinitionsFile, definitionFileContents); + + // Delete the temp dir + jake.rmRf(tempDirPath, {silent: true}); + }); // Local target to build the compiler and services desc("Builds the full compiler and services"); -task("local", ["generate-diagnostics", "lib", tscFile, servicesFile]); +task("local", ["generate-diagnostics", "lib", tscFile, servicesFile, nodeDefinitionsFile]); // Local target to build the compiler and services desc("Sets release mode flag"); @@ -327,7 +392,7 @@ task("generate-spec", [specMd]) // Makes a new LKG. This target does not build anything, but errors if not all the outputs are present in the built/local directory desc("Makes a new LKG out of the built js files"); task("LKG", ["clean", "release", "local"].concat(libraryTargets), function() { - var expectedFiles = [tscFile, servicesFile, servicesDefinitionsFile].concat(libraryTargets); + var expectedFiles = [tscFile, servicesFile, nodeDefinitionsFile, standaloneDefinitionsFile].concat(libraryTargets); var missingFiles = expectedFiles.filter(function (f) { return !fs.existsSync(f); }); diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 6d913f7360c..ec398315255 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -4,57 +4,12 @@ /// /// /// +/// module ts { var nextSymbolId = 1; var nextNodeId = 1; - var nextMergeId = 1; - - export function getDeclarationOfKind(symbol: Symbol, kind: SyntaxKind): Declaration { - var declarations = symbol.declarations; - for (var i = 0; i < declarations.length; i++) { - var declaration = declarations[i]; - if (declaration.kind === kind) { - return declaration; - } - } - - return undefined; - } - - export interface StringSymbolWriter extends SymbolWriter { - string(): string; - } - - // Pool writers to avoid needing to allocate them for every symbol we write. - var stringWriters: StringSymbolWriter[] = []; - export function getSingleLineStringWriter(): StringSymbolWriter { - if (stringWriters.length == 0) { - var str = ""; - - var writeText: (text: string) => void = text => str += text; - return { - string: () => str, - writeKeyword: writeText, - writeOperator: writeText, - writePunctuation: writeText, - writeSpace: writeText, - writeStringLiteral: writeText, - writeParameter: writeText, - writeSymbol: writeText, - - // Completely ignore indentation for string writers. And map newlines to - // a single space. - writeLine: () => str += " ", - increaseIndent: () => { }, - decreaseIndent: () => { }, - clear: () => str = "", - trackSymbol: () => { } - }; - } - - return stringWriters.pop(); - } + var nextMergeId = 1; /// fullTypeCheck denotes if this instance of the typechecker will be used to get semantic diagnostics. /// If fullTypeCheck === true, then the typechecker should do every possible check to produce all errors @@ -1019,11 +974,6 @@ module ts { }; } - function releaseStringWriter(writer: StringSymbolWriter) { - writer.clear() - stringWriters.push(writer); - } - function writeKeyword(writer: SymbolWriter, kind: SyntaxKind) { writer.writeKeyword(tokenToString(kind)); } diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index deb2eb17fc8..5c0d1535985 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -1,41 +1,11 @@ /// /// /// +/// module ts { var nodeConstructors = new Array Node>(SyntaxKind.Count); - export function getFullWidth(node: Node) { - return node.end - node.pos; - } - - function hasFlag(val: number, flag: number): boolean { - return (val & flag) !== 0; - } - - // Returns true if this node contains a parse error anywhere underneath it. - export function containsParseError(node: Node): boolean { - if (!hasFlag(node.parserContextFlags, ParserContextFlags.HasPropagatedChildContainsErrorFlag)) { - // A node is considered to contain a parse error if: - // a) the parser explicitly marked that it had an error - // b) any of it's children reported that it had an error. - var val = hasFlag(node.parserContextFlags, ParserContextFlags.ContainsError) || - forEachChild(node, containsParseError); - - // If so, mark ourselves accordingly. - if (val) { - node.parserContextFlags |= ParserContextFlags.ContainsError; - } - - // Also mark that we've propogated the child information to this node. This way we can - // always consult the bit directly on this node without needing to check its children - // again. - node.parserContextFlags |= ParserContextFlags.HasPropagatedChildContainsErrorFlag; - } - - return hasFlag(node.parserContextFlags, ParserContextFlags.ContainsError); - } - export function getNodeConstructor(kind: SyntaxKind): new () => Node { return nodeConstructors[kind] || (nodeConstructors[kind] = objectAllocator.getNodeConstructor(kind)); } @@ -54,181 +24,6 @@ module ts { amdModuleName: string; } - export function getSourceFileOfNode(node: Node): SourceFile { - while (node && node.kind !== SyntaxKind.SourceFile) node = node.parent; - return node; - } - - // This is a useful function for debugging purposes. - export function nodePosToString(node: Node): string { - var file = getSourceFileOfNode(node); - var loc = file.getLineAndCharacterFromPosition(node.pos); - return file.filename + "(" + loc.line + "," + loc.character + ")"; - } - - export function getStartPosOfNode(node: Node): number { - return node.pos; - } - - export function isMissingNode(node: Node) { - return node.pos === node.end && node.kind !== SyntaxKind.EndOfFileToken; - } - - export function getTokenPosOfNode(node: Node, sourceFile?: SourceFile): number { - // With nodes that have no width (i.e. 'Missing' nodes), we actually *don't* - // want to skip trivia because this will launch us forward to the next token. - if (isMissingNode(node)) { - return node.pos; - } - - return skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); - } - - export function getSourceTextOfNodeFromSourceFile(sourceFile: SourceFile, node: Node): string { - if (isMissingNode(node)) { - return ""; - } - - var text = sourceFile.text; - return text.substring(skipTrivia(text, node.pos), node.end); - } - - export function getTextOfNodeFromSourceText(sourceText: string, node: Node): string { - if (isMissingNode(node)) { - return ""; - } - - return sourceText.substring(skipTrivia(sourceText, node.pos), node.end); - } - - export function getTextOfNode(node: Node): string { - return getSourceTextOfNodeFromSourceFile(getSourceFileOfNode(node), node); - } - - // Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__' - export function escapeIdentifier(identifier: string): string { - return identifier.length >= 2 && identifier.charCodeAt(0) === CharacterCodes._ && identifier.charCodeAt(1) === CharacterCodes._ ? "_" + identifier : identifier; - } - - // Remove extra underscore from escaped identifier - export function unescapeIdentifier(identifier: string): string { - return identifier.length >= 3 && identifier.charCodeAt(0) === CharacterCodes._ && identifier.charCodeAt(1) === CharacterCodes._ && identifier.charCodeAt(2) === CharacterCodes._ ? identifier.substr(1) : identifier; - } - - // Return display name of an identifier - // Computed property names will just be emitted as "[]", where is the source - // text of the expression in the computed property. - export function declarationNameToString(name: DeclarationName) { - return getFullWidth(name) === 0 ? "(Missing)" : getTextOfNode(name); - } - - export function createDiagnosticForNode(node: Node, message: DiagnosticMessage, arg0?: any, arg1?: any, arg2?: any): Diagnostic { - node = getErrorSpanForNode(node); - var file = getSourceFileOfNode(node); - - var start = getFullWidth(node) === 0 ? node.pos : skipTrivia(file.text, node.pos); - var length = node.end - start; - - return createFileDiagnostic(file, start, length, message, arg0, arg1, arg2); - } - - export function createDiagnosticForNodeFromMessageChain(node: Node, messageChain: DiagnosticMessageChain, newLine: string): Diagnostic { - node = getErrorSpanForNode(node); - var file = getSourceFileOfNode(node); - var start = skipTrivia(file.text, node.pos); - var length = node.end - start; - return flattenDiagnosticChain(file, start, length, messageChain, newLine); - } - - export function getErrorSpanForNode(node: Node): Node { - var errorSpan: Node; - switch (node.kind) { - // This list is a work in progress. Add missing node kinds to improve their error - // spans. - case SyntaxKind.VariableDeclaration: - case SyntaxKind.ClassDeclaration: - case SyntaxKind.InterfaceDeclaration: - case SyntaxKind.ModuleDeclaration: - case SyntaxKind.EnumDeclaration: - case SyntaxKind.EnumMember: - errorSpan = (node).name; - break; - } - - // We now have the ideal error span, but it may be a node that is optional and absent - // (e.g. the name of a function expression), in which case errorSpan will be undefined. - // Alternatively, it might be required and missing (e.g. the name of a module), in which - // case its pos will equal its end (length 0). In either of these cases, we should fall - // back to the original node that the error was issued on. - return errorSpan && errorSpan.pos < errorSpan.end ? errorSpan : node; - } - - export function isExternalModule(file: SourceFile): boolean { - return file.externalModuleIndicator !== undefined; - } - - export function isDeclarationFile(file: SourceFile): boolean { - return (file.flags & NodeFlags.DeclarationFile) !== 0; - } - - export function isConstEnumDeclaration(node: Node): boolean { - return node.kind === SyntaxKind.EnumDeclaration && isConst(node); - } - - export function isConst(node: Node): boolean { - return !!(node.flags & NodeFlags.Const); - } - - export function isLet(node: Node): boolean { - return !!(node.flags & NodeFlags.Let); - } - - export function isPrologueDirective(node: Node): boolean { - return node.kind === SyntaxKind.ExpressionStatement && (node).expression.kind === SyntaxKind.StringLiteral; - } - - function isEvalOrArgumentsIdentifier(node: Node): boolean { - return node.kind === SyntaxKind.Identifier && - (node).text && - ((node).text === "eval" || (node).text === "arguments"); - } - - /// Should be called only on prologue directives (isPrologueDirective(node) should be true) - function isUseStrictPrologueDirective(node: Node): boolean { - Debug.assert(isPrologueDirective(node)); - return ((node).expression).text === "use strict"; - } - - export function getLeadingCommentRangesOfNode(node: Node, sourceFileOfNode?: SourceFile) { - sourceFileOfNode = sourceFileOfNode || getSourceFileOfNode(node); - - // If parameter/type parameter, the prev token trailing comments are part of this node too - if (node.kind === SyntaxKind.Parameter || node.kind === SyntaxKind.TypeParameter) { - // e.g. (/** blah */ a, /** blah */ b); - return concatenate(getTrailingCommentRanges(sourceFileOfNode.text, node.pos), - // e.g.: ( - // /** blah */ a, - // /** blah */ b); - getLeadingCommentRanges(sourceFileOfNode.text, node.pos)); - } - else { - return getLeadingCommentRanges(sourceFileOfNode.text, node.pos); - } - } - - export function getJsDocComments(node: Node, sourceFileOfNode: SourceFile) { - return filter(getLeadingCommentRangesOfNode(node, sourceFileOfNode), isJsDocComment); - - function isJsDocComment(comment: CommentRange) { - // True if the comment starts with '/**' but not if it is '/**/' - return sourceFileOfNode.text.charCodeAt(comment.pos + 1) === CharacterCodes.asterisk && - sourceFileOfNode.text.charCodeAt(comment.pos + 2) === CharacterCodes.asterisk && - sourceFileOfNode.text.charCodeAt(comment.pos + 3) !== CharacterCodes.slash; - } - } - - export var fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*/ - // Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes // stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise, // embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns @@ -473,401 +268,6 @@ module ts { } } - // Warning: This has the same semantics as the forEach family of functions, - // in that traversal terminates in the event that 'visitor' supplies a truthy value. - export function forEachReturnStatement(body: Block, visitor: (stmt: ReturnStatement) => T): T { - - return traverse(body); - - function traverse(node: Node): T { - switch (node.kind) { - case SyntaxKind.ReturnStatement: - return visitor(node); - case SyntaxKind.Block: - case SyntaxKind.IfStatement: - case SyntaxKind.DoStatement: - case SyntaxKind.WhileStatement: - case SyntaxKind.ForStatement: - case SyntaxKind.ForInStatement: - case SyntaxKind.WithStatement: - case SyntaxKind.SwitchStatement: - case SyntaxKind.CaseClause: - case SyntaxKind.DefaultClause: - case SyntaxKind.LabeledStatement: - case SyntaxKind.TryStatement: - case SyntaxKind.TryBlock: - case SyntaxKind.CatchClause: - case SyntaxKind.FinallyBlock: - return forEachChild(node, traverse); - } - } - } - - export function isAnyFunction(node: Node): boolean { - if (node) { - switch (node.kind) { - case SyntaxKind.FunctionExpression: - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.ArrowFunction: - case SyntaxKind.Method: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - case SyntaxKind.Constructor: - return true; - } - } - - return false; - } - - export function isFunctionBlock(node: Node) { - return node !== undefined && node.kind === SyntaxKind.Block && isAnyFunction(node.parent); - } - - export function isObjectLiteralMethod(node: Node) { - return node !== undefined && node.kind === SyntaxKind.Method && node.parent.kind === SyntaxKind.ObjectLiteralExpression; - } - - export function getContainingFunction(node: Node): FunctionLikeDeclaration { - while (true) { - node = node.parent; - if (!node || isAnyFunction(node)) { - return node; - } - } - } - - export function getThisContainer(node: Node, includeArrowFunctions: boolean): Node { - while (true) { - node = node.parent; - if (!node) { - return undefined; - } - switch (node.kind) { - case SyntaxKind.ArrowFunction: - if (!includeArrowFunctions) { - continue; - } - // Fall through - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.FunctionExpression: - case SyntaxKind.ModuleDeclaration: - case SyntaxKind.Property: - case SyntaxKind.Method: - case SyntaxKind.Constructor: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - case SyntaxKind.EnumDeclaration: - case SyntaxKind.SourceFile: - return node; - } - } - } - - export function getSuperContainer(node: Node): Node { - while (true) { - node = node.parent; - if (!node) { - return undefined; - } - switch (node.kind) { - case SyntaxKind.Property: - case SyntaxKind.Method: - case SyntaxKind.Constructor: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - return node; - } - } - } - - export function getInvokedExpression(node: CallLikeExpression): Expression { - if (node.kind === SyntaxKind.TaggedTemplateExpression) { - return (node).tag; - } - - // Will either be a CallExpression or NewExpression. - return (node).expression; - } - - export function isExpression(node: Node): boolean { - switch (node.kind) { - case SyntaxKind.ThisKeyword: - case SyntaxKind.SuperKeyword: - case SyntaxKind.NullKeyword: - case SyntaxKind.TrueKeyword: - case SyntaxKind.FalseKeyword: - case SyntaxKind.RegularExpressionLiteral: - case SyntaxKind.ArrayLiteralExpression: - case SyntaxKind.ObjectLiteralExpression: - case SyntaxKind.PropertyAccessExpression: - case SyntaxKind.ElementAccessExpression: - case SyntaxKind.CallExpression: - case SyntaxKind.NewExpression: - case SyntaxKind.TaggedTemplateExpression: - case SyntaxKind.TypeAssertionExpression: - case SyntaxKind.ParenthesizedExpression: - case SyntaxKind.FunctionExpression: - case SyntaxKind.ArrowFunction: - case SyntaxKind.VoidExpression: - case SyntaxKind.DeleteExpression: - case SyntaxKind.TypeOfExpression: - case SyntaxKind.PrefixUnaryExpression: - case SyntaxKind.PostfixUnaryExpression: - case SyntaxKind.BinaryExpression: - case SyntaxKind.ConditionalExpression: - case SyntaxKind.TemplateExpression: - case SyntaxKind.NoSubstitutionTemplateLiteral: - case SyntaxKind.OmittedExpression: - return true; - case SyntaxKind.QualifiedName: - while (node.parent.kind === SyntaxKind.QualifiedName) { - node = node.parent; - } - - return node.parent.kind === SyntaxKind.TypeQuery; - case SyntaxKind.Identifier: - if (node.parent.kind === SyntaxKind.TypeQuery) { - return true; - } - // fall through - case SyntaxKind.NumericLiteral: - case SyntaxKind.StringLiteral: - var parent = node.parent; - switch (parent.kind) { - case SyntaxKind.VariableDeclaration: - case SyntaxKind.Parameter: - case SyntaxKind.Property: - case SyntaxKind.EnumMember: - case SyntaxKind.PropertyAssignment: - return (parent).initializer === node; - case SyntaxKind.ExpressionStatement: - case SyntaxKind.IfStatement: - case SyntaxKind.DoStatement: - case SyntaxKind.WhileStatement: - case SyntaxKind.ReturnStatement: - case SyntaxKind.WithStatement: - case SyntaxKind.SwitchStatement: - case SyntaxKind.CaseClause: - case SyntaxKind.ThrowStatement: - case SyntaxKind.SwitchStatement: - return (parent).expression === node; - case SyntaxKind.ForStatement: - return (parent).initializer === node || - (parent).condition === node || - (parent).iterator === node; - case SyntaxKind.ForInStatement: - return (parent).variable === node || - (parent).expression === node; - case SyntaxKind.TypeAssertionExpression: - return node === (parent).expression; - case SyntaxKind.TemplateSpan: - return node === (parent).expression; - default: - if (isExpression(parent)) { - return true; - } - } - } - return false; - } - - export function isExternalModuleImportDeclaration(node: Node) { - return node.kind === SyntaxKind.ImportDeclaration && (node).moduleReference.kind === SyntaxKind.ExternalModuleReference; - } - - export function getExternalModuleImportDeclarationExpression(node: Node) { - Debug.assert(isExternalModuleImportDeclaration(node)); - return ((node).moduleReference).expression; - } - - export function isInternalModuleImportDeclaration(node: Node) { - return node.kind === SyntaxKind.ImportDeclaration && (node).moduleReference.kind !== SyntaxKind.ExternalModuleReference; - } - - export function hasDotDotDotToken(node: Node) { - return node && node.kind === SyntaxKind.Parameter && (node).dotDotDotToken !== undefined; - } - - export function hasQuestionToken(node: Node) { - if (node) { - switch (node.kind) { - case SyntaxKind.Parameter: - return (node).questionToken !== undefined; - case SyntaxKind.Method: - return (node).questionToken !== undefined; - case SyntaxKind.ShorthandPropertyAssignment: - case SyntaxKind.PropertyAssignment: - case SyntaxKind.Property: - return (node).questionToken !== undefined; - } - } - - return false; - } - - export function hasRestParameters(s: SignatureDeclaration): boolean { - return s.parameters.length > 0 && s.parameters[s.parameters.length - 1].dotDotDotToken !== undefined; - } - - export function isLiteralKind(kind: SyntaxKind): boolean { - return SyntaxKind.FirstLiteralToken <= kind && kind <= SyntaxKind.LastLiteralToken; - } - - export function isTextualLiteralKind(kind: SyntaxKind): boolean { - return kind === SyntaxKind.StringLiteral || kind === SyntaxKind.NoSubstitutionTemplateLiteral; - } - - export function isTemplateLiteralKind(kind: SyntaxKind): boolean { - return SyntaxKind.FirstTemplateToken <= kind && kind <= SyntaxKind.LastTemplateToken; - } - - export function isInAmbientContext(node: Node): boolean { - while (node) { - if (node.flags & (NodeFlags.Ambient | NodeFlags.DeclarationFile)) return true; - node = node.parent; - } - return false; - } - - export function isDeclaration(node: Node): boolean { - switch (node.kind) { - case SyntaxKind.TypeParameter: - case SyntaxKind.Parameter: - case SyntaxKind.VariableDeclaration: - case SyntaxKind.Property: - case SyntaxKind.PropertyAssignment: - case SyntaxKind.ShorthandPropertyAssignment: - case SyntaxKind.EnumMember: - case SyntaxKind.Method: - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - case SyntaxKind.Constructor: - case SyntaxKind.ClassDeclaration: - case SyntaxKind.InterfaceDeclaration: - case SyntaxKind.TypeAliasDeclaration: - case SyntaxKind.EnumDeclaration: - case SyntaxKind.ModuleDeclaration: - case SyntaxKind.ImportDeclaration: - return true; - } - return false; - } - - export function isStatement(n: Node): boolean { - switch(n.kind) { - case SyntaxKind.BreakStatement: - case SyntaxKind.ContinueStatement: - case SyntaxKind.DebuggerStatement: - case SyntaxKind.DoStatement: - case SyntaxKind.ExpressionStatement: - case SyntaxKind.EmptyStatement: - case SyntaxKind.ForInStatement: - case SyntaxKind.ForStatement: - case SyntaxKind.IfStatement: - case SyntaxKind.LabeledStatement: - case SyntaxKind.ReturnStatement: - case SyntaxKind.SwitchStatement: - case SyntaxKind.ThrowKeyword: - case SyntaxKind.TryStatement: - case SyntaxKind.VariableStatement: - case SyntaxKind.WhileStatement: - case SyntaxKind.WithStatement: - case SyntaxKind.ExportAssignment: - return true; - default: - return false; - } - } - - // True if the given identifier, string literal, or number literal is the name of a declaration node - export function isDeclarationOrFunctionExpressionOrCatchVariableName(name: Node): boolean { - if (name.kind !== SyntaxKind.Identifier && name.kind !== SyntaxKind.StringLiteral && name.kind !== SyntaxKind.NumericLiteral) { - return false; - } - - var parent = name.parent; - if (isDeclaration(parent) || parent.kind === SyntaxKind.FunctionExpression) { - return (parent).name === name; - } - - if (parent.kind === SyntaxKind.CatchClause) { - return (parent).name === name; - } - - return false; - } - - export function getClassBaseTypeNode(node: ClassDeclaration) { - var heritageClause = getHeritageClause(node.heritageClauses, SyntaxKind.ExtendsKeyword); - return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; - } - - export function getClassImplementedTypeNodes(node: ClassDeclaration) { - var heritageClause = getHeritageClause(node.heritageClauses, SyntaxKind.ImplementsKeyword); - return heritageClause ? heritageClause.types : undefined; - } - - export function getInterfaceBaseTypeNodes(node: InterfaceDeclaration) { - var heritageClause = getHeritageClause(node.heritageClauses, SyntaxKind.ExtendsKeyword); - return heritageClause ? heritageClause.types : undefined; - } - - export function getHeritageClause(clauses: NodeArray, kind: SyntaxKind) { - if (clauses) { - for (var i = 0, n = clauses.length; i < n; i++) { - if (clauses[i].token === kind) { - return clauses[i]; - } - } - } - - return undefined; - } - - export function tryResolveScriptReference(program: Program, sourceFile: SourceFile, reference: FileReference) { - if (!program.getCompilerOptions().noResolve) { - var referenceFileName = isRootedDiskPath(reference.filename) ? reference.filename : combinePaths(getDirectoryPath(sourceFile.filename), reference.filename); - referenceFileName = getNormalizedAbsolutePath(referenceFileName, program.getCompilerHost().getCurrentDirectory()); - return program.getSourceFile(referenceFileName); - } - } - - export function getAncestor(node: Node, kind: SyntaxKind): Node { - switch (kind) { - // special-cases that can be come first - case SyntaxKind.ClassDeclaration: - while (node) { - switch (node.kind) { - case SyntaxKind.ClassDeclaration: - return node; - case SyntaxKind.EnumDeclaration: - case SyntaxKind.InterfaceDeclaration: - case SyntaxKind.TypeAliasDeclaration: - case SyntaxKind.ModuleDeclaration: - case SyntaxKind.ImportDeclaration: - // early exit cases - declarations cannot be nested in classes - return undefined; - default: - node = node.parent; - continue; - } - } - break; - default: - while (node) { - if (node.kind === kind) { - return node; - } - node = node.parent; - } - break; - } - - return undefined; - } - const enum ParsingContext { SourceElements, // Elements in source file ModuleElements, // Elements in module declaration @@ -919,68 +319,6 @@ module ts { } }; - export interface ReferencePathMatchResult { - fileReference?: FileReference - diagnosticMessage?: DiagnosticMessage - isNoDefaultLib?: boolean - } - - export function getFileReferenceFromReferencePath(comment: string, commentRange: CommentRange): ReferencePathMatchResult { - var simpleReferenceRegEx = /^\/\/\/\s*/gim; - if (simpleReferenceRegEx.exec(comment)) { - if (isNoDefaultLibRegEx.exec(comment)) { - return { - isNoDefaultLib: true - } - } - else { - var matchResult = fullTripleSlashReferencePathRegEx.exec(comment); - if (matchResult) { - var start = commentRange.pos; - var end = commentRange.end; - return { - fileReference: { - pos: start, - end: end, - filename: matchResult[3] - }, - isNoDefaultLib: false - }; - } - else { - return { - diagnosticMessage: Diagnostics.Invalid_reference_directive_syntax, - isNoDefaultLib: false - }; - } - } - } - return undefined; - } - - export function isKeyword(token: SyntaxKind): boolean { - return SyntaxKind.FirstKeyword <= token && token <= SyntaxKind.LastKeyword; - } - - export function isTrivia(token: SyntaxKind) { - return SyntaxKind.FirstTriviaToken <= token && token <= SyntaxKind.LastTriviaToken; - } - - export function isModifier(token: SyntaxKind): boolean { - switch (token) { - case SyntaxKind.PublicKeyword: - case SyntaxKind.PrivateKeyword: - case SyntaxKind.ProtectedKeyword: - case SyntaxKind.StaticKeyword: - case SyntaxKind.ExportKeyword: - case SyntaxKind.DeclareKeyword: - case SyntaxKind.ConstKeyword: - return true; - } - return false; - } - function modifierToFlag(token: SyntaxKind): NodeFlags { switch (token) { case SyntaxKind.StaticKeyword: return NodeFlags.Static; @@ -994,6 +332,18 @@ module ts { return 0; } + function isEvalOrArgumentsIdentifier(node: Node): boolean { + return node.kind === SyntaxKind.Identifier && + (node).text && + ((node).text === "eval" || (node).text === "arguments"); + } + + /// Should be called only on prologue directives (isPrologueDirective(node) should be true) + function isUseStrictPrologueDirective(node: Node): boolean { + Debug.assert(isPrologueDirective(node)); + return ((node).expression).text === "use strict"; + } + export function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen: boolean = false): SourceFile { var token: SyntaxKind; var parsingContext: ParsingContext; diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts new file mode 100644 index 00000000000..c3e067b7e75 --- /dev/null +++ b/src/compiler/utilities.ts @@ -0,0 +1,707 @@ +/// + +module ts { + export interface ReferencePathMatchResult { + fileReference?: FileReference + diagnosticMessage?: DiagnosticMessage + isNoDefaultLib?: boolean + } + + export function getDeclarationOfKind(symbol: Symbol, kind: SyntaxKind): Declaration { + var declarations = symbol.declarations; + for (var i = 0; i < declarations.length; i++) { + var declaration = declarations[i]; + if (declaration.kind === kind) { + return declaration; + } + } + + return undefined; + } + + export interface StringSymbolWriter extends SymbolWriter { + string(): string; + } + + // Pool writers to avoid needing to allocate them for every symbol we write. + var stringWriters: StringSymbolWriter[] = []; + export function getSingleLineStringWriter(): StringSymbolWriter { + if (stringWriters.length == 0) { + var str = ""; + + var writeText: (text: string) => void = text => str += text; + return { + string: () => str, + writeKeyword: writeText, + writeOperator: writeText, + writePunctuation: writeText, + writeSpace: writeText, + writeStringLiteral: writeText, + writeParameter: writeText, + writeSymbol: writeText, + + // Completely ignore indentation for string writers. And map newlines to + // a single space. + writeLine: () => str += " ", + increaseIndent: () => { }, + decreaseIndent: () => { }, + clear: () => str = "", + trackSymbol: () => { } + }; + } + + return stringWriters.pop(); + } + + export function releaseStringWriter(writer: StringSymbolWriter) { + writer.clear() + stringWriters.push(writer); + } + + export function getFullWidth(node: Node) { + return node.end - node.pos; + } + + export function hasFlag(val: number, flag: number): boolean { + return (val & flag) !== 0; + } + + // Returns true if this node contains a parse error anywhere underneath it. + export function containsParseError(node: Node): boolean { + if (!hasFlag(node.parserContextFlags, ParserContextFlags.HasPropagatedChildContainsErrorFlag)) { + // A node is considered to contain a parse error if: + // a) the parser explicitly marked that it had an error + // b) any of it's children reported that it had an error. + var val = hasFlag(node.parserContextFlags, ParserContextFlags.ContainsError) || + forEachChild(node, containsParseError); + + // If so, mark ourselves accordingly. + if (val) { + node.parserContextFlags |= ParserContextFlags.ContainsError; + } + + // Also mark that we've propogated the child information to this node. This way we can + // always consult the bit directly on this node without needing to check its children + // again. + node.parserContextFlags |= ParserContextFlags.HasPropagatedChildContainsErrorFlag; + } + + return hasFlag(node.parserContextFlags, ParserContextFlags.ContainsError); + } + + export function getSourceFileOfNode(node: Node): SourceFile { + while (node && node.kind !== SyntaxKind.SourceFile) node = node.parent; + return node; + } + + // This is a useful function for debugging purposes. + export function nodePosToString(node: Node): string { + var file = getSourceFileOfNode(node); + var loc = file.getLineAndCharacterFromPosition(node.pos); + return file.filename + "(" + loc.line + "," + loc.character + ")"; + } + + export function getStartPosOfNode(node: Node): number { + return node.pos; + } + + export function isMissingNode(node: Node) { + return node.pos === node.end && node.kind !== SyntaxKind.EndOfFileToken; + } + + export function getTokenPosOfNode(node: Node, sourceFile?: SourceFile): number { + // With nodes that have no width (i.e. 'Missing' nodes), we actually *don't* + // want to skip trivia because this will launch us forward to the next token. + if (isMissingNode(node)) { + return node.pos; + } + + return skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); + } + + export function getSourceTextOfNodeFromSourceFile(sourceFile: SourceFile, node: Node): string { + if (isMissingNode(node)) { + return ""; + } + + var text = sourceFile.text; + return text.substring(skipTrivia(text, node.pos), node.end); + } + + export function getTextOfNodeFromSourceText(sourceText: string, node: Node): string { + if (isMissingNode(node)) { + return ""; + } + + return sourceText.substring(skipTrivia(sourceText, node.pos), node.end); + } + + export function getTextOfNode(node: Node): string { + return getSourceTextOfNodeFromSourceFile(getSourceFileOfNode(node), node); + } + + // Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__' + export function escapeIdentifier(identifier: string): string { + return identifier.length >= 2 && identifier.charCodeAt(0) === CharacterCodes._ && identifier.charCodeAt(1) === CharacterCodes._ ? "_" + identifier : identifier; + } + + // Remove extra underscore from escaped identifier + export function unescapeIdentifier(identifier: string): string { + return identifier.length >= 3 && identifier.charCodeAt(0) === CharacterCodes._ && identifier.charCodeAt(1) === CharacterCodes._ && identifier.charCodeAt(2) === CharacterCodes._ ? identifier.substr(1) : identifier; + } + + // Return display name of an identifier + // Computed property names will just be emitted as "[]", where is the source + // text of the expression in the computed property. + export function declarationNameToString(name: DeclarationName) { + return getFullWidth(name) === 0 ? "(Missing)" : getTextOfNode(name); + } + + export function createDiagnosticForNode(node: Node, message: DiagnosticMessage, arg0?: any, arg1?: any, arg2?: any): Diagnostic { + node = getErrorSpanForNode(node); + var file = getSourceFileOfNode(node); + + var start = getFullWidth(node) === 0 ? node.pos : skipTrivia(file.text, node.pos); + var length = node.end - start; + + return createFileDiagnostic(file, start, length, message, arg0, arg1, arg2); + } + + export function createDiagnosticForNodeFromMessageChain(node: Node, messageChain: DiagnosticMessageChain, newLine: string): Diagnostic { + node = getErrorSpanForNode(node); + var file = getSourceFileOfNode(node); + var start = skipTrivia(file.text, node.pos); + var length = node.end - start; + return flattenDiagnosticChain(file, start, length, messageChain, newLine); + } + + export function getErrorSpanForNode(node: Node): Node { + var errorSpan: Node; + switch (node.kind) { + // This list is a work in progress. Add missing node kinds to improve their error + // spans. + case SyntaxKind.VariableDeclaration: + case SyntaxKind.ClassDeclaration: + case SyntaxKind.InterfaceDeclaration: + case SyntaxKind.ModuleDeclaration: + case SyntaxKind.EnumDeclaration: + case SyntaxKind.EnumMember: + errorSpan = (node).name; + break; + } + + // We now have the ideal error span, but it may be a node that is optional and absent + // (e.g. the name of a function expression), in which case errorSpan will be undefined. + // Alternatively, it might be required and missing (e.g. the name of a module), in which + // case its pos will equal its end (length 0). In either of these cases, we should fall + // back to the original node that the error was issued on. + return errorSpan && errorSpan.pos < errorSpan.end ? errorSpan : node; + } + + export function isExternalModule(file: SourceFile): boolean { + return file.externalModuleIndicator !== undefined; + } + + export function isDeclarationFile(file: SourceFile): boolean { + return (file.flags & NodeFlags.DeclarationFile) !== 0; + } + + export function isConstEnumDeclaration(node: Node): boolean { + return node.kind === SyntaxKind.EnumDeclaration && isConst(node); + } + + export function isConst(node: Node): boolean { + return !!(node.flags & NodeFlags.Const); + } + + export function isLet(node: Node): boolean { + return !!(node.flags & NodeFlags.Let); + } + + export function isPrologueDirective(node: Node): boolean { + return node.kind === SyntaxKind.ExpressionStatement && (node).expression.kind === SyntaxKind.StringLiteral; + } + + export function getLeadingCommentRangesOfNode(node: Node, sourceFileOfNode?: SourceFile) { + sourceFileOfNode = sourceFileOfNode || getSourceFileOfNode(node); + + // If parameter/type parameter, the prev token trailing comments are part of this node too + if (node.kind === SyntaxKind.Parameter || node.kind === SyntaxKind.TypeParameter) { + // e.g. (/** blah */ a, /** blah */ b); + return concatenate(getTrailingCommentRanges(sourceFileOfNode.text, node.pos), + // e.g.: ( + // /** blah */ a, + // /** blah */ b); + getLeadingCommentRanges(sourceFileOfNode.text, node.pos)); + } + else { + return getLeadingCommentRanges(sourceFileOfNode.text, node.pos); + } + } + + export function getJsDocComments(node: Node, sourceFileOfNode: SourceFile) { + return filter(getLeadingCommentRangesOfNode(node, sourceFileOfNode), isJsDocComment); + + function isJsDocComment(comment: CommentRange) { + // True if the comment starts with '/**' but not if it is '/**/' + return sourceFileOfNode.text.charCodeAt(comment.pos + 1) === CharacterCodes.asterisk && + sourceFileOfNode.text.charCodeAt(comment.pos + 2) === CharacterCodes.asterisk && + sourceFileOfNode.text.charCodeAt(comment.pos + 3) !== CharacterCodes.slash; + } + } + + export var fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*/ + + + // Warning: This has the same semantics as the forEach family of functions, + // in that traversal terminates in the event that 'visitor' supplies a truthy value. + export function forEachReturnStatement(body: Block, visitor: (stmt: ReturnStatement) => T): T { + + return traverse(body); + + function traverse(node: Node): T { + switch (node.kind) { + case SyntaxKind.ReturnStatement: + return visitor(node); + case SyntaxKind.Block: + case SyntaxKind.IfStatement: + case SyntaxKind.DoStatement: + case SyntaxKind.WhileStatement: + case SyntaxKind.ForStatement: + case SyntaxKind.ForInStatement: + case SyntaxKind.WithStatement: + case SyntaxKind.SwitchStatement: + case SyntaxKind.CaseClause: + case SyntaxKind.DefaultClause: + case SyntaxKind.LabeledStatement: + case SyntaxKind.TryStatement: + case SyntaxKind.TryBlock: + case SyntaxKind.CatchClause: + case SyntaxKind.FinallyBlock: + return forEachChild(node, traverse); + } + } + } + + export function isAnyFunction(node: Node): boolean { + if (node) { + switch (node.kind) { + case SyntaxKind.FunctionExpression: + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.ArrowFunction: + case SyntaxKind.Method: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + case SyntaxKind.Constructor: + return true; + } + } + + return false; + } + + export function isFunctionBlock(node: Node) { + return node !== undefined && node.kind === SyntaxKind.Block && isAnyFunction(node.parent); + } + + export function isObjectLiteralMethod(node: Node) { + return node !== undefined && node.kind === SyntaxKind.Method && node.parent.kind === SyntaxKind.ObjectLiteralExpression; + } + + export function getContainingFunction(node: Node): FunctionLikeDeclaration { + while (true) { + node = node.parent; + if (!node || isAnyFunction(node)) { + return node; + } + } + } + + export function getThisContainer(node: Node, includeArrowFunctions: boolean): Node { + while (true) { + node = node.parent; + if (!node) { + return undefined; + } + switch (node.kind) { + case SyntaxKind.ArrowFunction: + if (!includeArrowFunctions) { + continue; + } + // Fall through + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.FunctionExpression: + case SyntaxKind.ModuleDeclaration: + case SyntaxKind.Property: + case SyntaxKind.Method: + case SyntaxKind.Constructor: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + case SyntaxKind.EnumDeclaration: + case SyntaxKind.SourceFile: + return node; + } + } + } + + export function getSuperContainer(node: Node): Node { + while (true) { + node = node.parent; + if (!node) { + return undefined; + } + switch (node.kind) { + case SyntaxKind.Property: + case SyntaxKind.Method: + case SyntaxKind.Constructor: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + return node; + } + } + } + + export function getInvokedExpression(node: CallLikeExpression): Expression { + if (node.kind === SyntaxKind.TaggedTemplateExpression) { + return (node).tag; + } + + // Will either be a CallExpression or NewExpression. + return (node).expression; + } + + export function isExpression(node: Node): boolean { + switch (node.kind) { + case SyntaxKind.ThisKeyword: + case SyntaxKind.SuperKeyword: + case SyntaxKind.NullKeyword: + case SyntaxKind.TrueKeyword: + case SyntaxKind.FalseKeyword: + case SyntaxKind.RegularExpressionLiteral: + case SyntaxKind.ArrayLiteralExpression: + case SyntaxKind.ObjectLiteralExpression: + case SyntaxKind.PropertyAccessExpression: + case SyntaxKind.ElementAccessExpression: + case SyntaxKind.CallExpression: + case SyntaxKind.NewExpression: + case SyntaxKind.TaggedTemplateExpression: + case SyntaxKind.TypeAssertionExpression: + case SyntaxKind.ParenthesizedExpression: + case SyntaxKind.FunctionExpression: + case SyntaxKind.ArrowFunction: + case SyntaxKind.VoidExpression: + case SyntaxKind.DeleteExpression: + case SyntaxKind.TypeOfExpression: + case SyntaxKind.PrefixUnaryExpression: + case SyntaxKind.PostfixUnaryExpression: + case SyntaxKind.BinaryExpression: + case SyntaxKind.ConditionalExpression: + case SyntaxKind.TemplateExpression: + case SyntaxKind.NoSubstitutionTemplateLiteral: + case SyntaxKind.OmittedExpression: + return true; + case SyntaxKind.QualifiedName: + while (node.parent.kind === SyntaxKind.QualifiedName) { + node = node.parent; + } + + return node.parent.kind === SyntaxKind.TypeQuery; + case SyntaxKind.Identifier: + if (node.parent.kind === SyntaxKind.TypeQuery) { + return true; + } + // fall through + case SyntaxKind.NumericLiteral: + case SyntaxKind.StringLiteral: + var parent = node.parent; + switch (parent.kind) { + case SyntaxKind.VariableDeclaration: + case SyntaxKind.Parameter: + case SyntaxKind.Property: + case SyntaxKind.EnumMember: + case SyntaxKind.PropertyAssignment: + return (parent).initializer === node; + case SyntaxKind.ExpressionStatement: + case SyntaxKind.IfStatement: + case SyntaxKind.DoStatement: + case SyntaxKind.WhileStatement: + case SyntaxKind.ReturnStatement: + case SyntaxKind.WithStatement: + case SyntaxKind.SwitchStatement: + case SyntaxKind.CaseClause: + case SyntaxKind.ThrowStatement: + case SyntaxKind.SwitchStatement: + return (parent).expression === node; + case SyntaxKind.ForStatement: + return (parent).initializer === node || + (parent).condition === node || + (parent).iterator === node; + case SyntaxKind.ForInStatement: + return (parent).variable === node || + (parent).expression === node; + case SyntaxKind.TypeAssertionExpression: + return node === (parent).expression; + case SyntaxKind.TemplateSpan: + return node === (parent).expression; + default: + if (isExpression(parent)) { + return true; + } + } + } + return false; + } + + export function isExternalModuleImportDeclaration(node: Node) { + return node.kind === SyntaxKind.ImportDeclaration && (node).moduleReference.kind === SyntaxKind.ExternalModuleReference; + } + + export function getExternalModuleImportDeclarationExpression(node: Node) { + Debug.assert(isExternalModuleImportDeclaration(node)); + return ((node).moduleReference).expression; + } + + export function isInternalModuleImportDeclaration(node: Node) { + return node.kind === SyntaxKind.ImportDeclaration && (node).moduleReference.kind !== SyntaxKind.ExternalModuleReference; + } + + export function hasDotDotDotToken(node: Node) { + return node && node.kind === SyntaxKind.Parameter && (node).dotDotDotToken !== undefined; + } + + export function hasQuestionToken(node: Node) { + if (node) { + switch (node.kind) { + case SyntaxKind.Parameter: + return (node).questionToken !== undefined; + case SyntaxKind.Method: + return (node).questionToken !== undefined; + case SyntaxKind.ShorthandPropertyAssignment: + case SyntaxKind.PropertyAssignment: + case SyntaxKind.Property: + return (node).questionToken !== undefined; + } + } + + return false; + } + + export function hasRestParameters(s: SignatureDeclaration): boolean { + return s.parameters.length > 0 && s.parameters[s.parameters.length - 1].dotDotDotToken !== undefined; + } + + export function isLiteralKind(kind: SyntaxKind): boolean { + return SyntaxKind.FirstLiteralToken <= kind && kind <= SyntaxKind.LastLiteralToken; + } + + export function isTextualLiteralKind(kind: SyntaxKind): boolean { + return kind === SyntaxKind.StringLiteral || kind === SyntaxKind.NoSubstitutionTemplateLiteral; + } + + export function isTemplateLiteralKind(kind: SyntaxKind): boolean { + return SyntaxKind.FirstTemplateToken <= kind && kind <= SyntaxKind.LastTemplateToken; + } + + export function isInAmbientContext(node: Node): boolean { + while (node) { + if (node.flags & (NodeFlags.Ambient | NodeFlags.DeclarationFile)) return true; + node = node.parent; + } + return false; + } + + export function isDeclaration(node: Node): boolean { + switch (node.kind) { + case SyntaxKind.TypeParameter: + case SyntaxKind.Parameter: + case SyntaxKind.VariableDeclaration: + case SyntaxKind.Property: + case SyntaxKind.PropertyAssignment: + case SyntaxKind.ShorthandPropertyAssignment: + case SyntaxKind.EnumMember: + case SyntaxKind.Method: + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + case SyntaxKind.Constructor: + case SyntaxKind.ClassDeclaration: + case SyntaxKind.InterfaceDeclaration: + case SyntaxKind.TypeAliasDeclaration: + case SyntaxKind.EnumDeclaration: + case SyntaxKind.ModuleDeclaration: + case SyntaxKind.ImportDeclaration: + return true; + } + return false; + } + + export function isStatement(n: Node): boolean { + switch (n.kind) { + case SyntaxKind.BreakStatement: + case SyntaxKind.ContinueStatement: + case SyntaxKind.DebuggerStatement: + case SyntaxKind.DoStatement: + case SyntaxKind.ExpressionStatement: + case SyntaxKind.EmptyStatement: + case SyntaxKind.ForInStatement: + case SyntaxKind.ForStatement: + case SyntaxKind.IfStatement: + case SyntaxKind.LabeledStatement: + case SyntaxKind.ReturnStatement: + case SyntaxKind.SwitchStatement: + case SyntaxKind.ThrowKeyword: + case SyntaxKind.TryStatement: + case SyntaxKind.VariableStatement: + case SyntaxKind.WhileStatement: + case SyntaxKind.WithStatement: + case SyntaxKind.ExportAssignment: + return true; + default: + return false; + } + } + + // True if the given identifier, string literal, or number literal is the name of a declaration node + export function isDeclarationOrFunctionExpressionOrCatchVariableName(name: Node): boolean { + if (name.kind !== SyntaxKind.Identifier && name.kind !== SyntaxKind.StringLiteral && name.kind !== SyntaxKind.NumericLiteral) { + return false; + } + + var parent = name.parent; + if (isDeclaration(parent) || parent.kind === SyntaxKind.FunctionExpression) { + return (parent).name === name; + } + + if (parent.kind === SyntaxKind.CatchClause) { + return (parent).name === name; + } + + return false; + } + + export function getClassBaseTypeNode(node: ClassDeclaration) { + var heritageClause = getHeritageClause(node.heritageClauses, SyntaxKind.ExtendsKeyword); + return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; + } + + export function getClassImplementedTypeNodes(node: ClassDeclaration) { + var heritageClause = getHeritageClause(node.heritageClauses, SyntaxKind.ImplementsKeyword); + return heritageClause ? heritageClause.types : undefined; + } + + export function getInterfaceBaseTypeNodes(node: InterfaceDeclaration) { + var heritageClause = getHeritageClause(node.heritageClauses, SyntaxKind.ExtendsKeyword); + return heritageClause ? heritageClause.types : undefined; + } + + export function getHeritageClause(clauses: NodeArray, kind: SyntaxKind) { + if (clauses) { + for (var i = 0, n = clauses.length; i < n; i++) { + if (clauses[i].token === kind) { + return clauses[i]; + } + } + } + + return undefined; + } + + export function tryResolveScriptReference(program: Program, sourceFile: SourceFile, reference: FileReference) { + if (!program.getCompilerOptions().noResolve) { + var referenceFileName = isRootedDiskPath(reference.filename) ? reference.filename : combinePaths(getDirectoryPath(sourceFile.filename), reference.filename); + referenceFileName = getNormalizedAbsolutePath(referenceFileName, program.getCompilerHost().getCurrentDirectory()); + return program.getSourceFile(referenceFileName); + } + } + + export function getAncestor(node: Node, kind: SyntaxKind): Node { + switch (kind) { + // special-cases that can be come first + case SyntaxKind.ClassDeclaration: + while (node) { + switch (node.kind) { + case SyntaxKind.ClassDeclaration: + return node; + case SyntaxKind.EnumDeclaration: + case SyntaxKind.InterfaceDeclaration: + case SyntaxKind.TypeAliasDeclaration: + case SyntaxKind.ModuleDeclaration: + case SyntaxKind.ImportDeclaration: + // early exit cases - declarations cannot be nested in classes + return undefined; + default: + node = node.parent; + continue; + } + } + break; + default: + while (node) { + if (node.kind === kind) { + return node; + } + node = node.parent; + } + break; + } + + return undefined; + } + + export function getFileReferenceFromReferencePath(comment: string, commentRange: CommentRange): ReferencePathMatchResult { + var simpleReferenceRegEx = /^\/\/\/\s*/gim; + if (simpleReferenceRegEx.exec(comment)) { + if (isNoDefaultLibRegEx.exec(comment)) { + return { + isNoDefaultLib: true + } + } + else { + var matchResult = fullTripleSlashReferencePathRegEx.exec(comment); + if (matchResult) { + var start = commentRange.pos; + var end = commentRange.end; + return { + fileReference: { + pos: start, + end: end, + filename: matchResult[3] + }, + isNoDefaultLib: false + }; + } + else { + return { + diagnosticMessage: Diagnostics.Invalid_reference_directive_syntax, + isNoDefaultLib: false + }; + } + } + } + return undefined; + } + + export function isKeyword(token: SyntaxKind): boolean { + return SyntaxKind.FirstKeyword <= token && token <= SyntaxKind.LastKeyword; + } + + export function isTrivia(token: SyntaxKind) { + return SyntaxKind.FirstTriviaToken <= token && token <= SyntaxKind.LastTriviaToken; + } + + export function isModifier(token: SyntaxKind): boolean { + switch (token) { + case SyntaxKind.PublicKeyword: + case SyntaxKind.PrivateKeyword: + case SyntaxKind.ProtectedKeyword: + case SyntaxKind.StaticKeyword: + case SyntaxKind.ExportKeyword: + case SyntaxKind.DeclareKeyword: + case SyntaxKind.ConstKeyword: + return true; + } + return false; + } + +} \ No newline at end of file diff --git a/src/services/services.ts b/src/services/services.ts index 76f4fece035..7ce2893fd49 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1643,6 +1643,10 @@ module ts { owners: string[]; } + export interface DisplayPartsSymbolWriter extends SymbolWriter { + displayParts(): SymbolDisplayPart[]; + } + export function displayPartsToString(displayParts: SymbolDisplayPart[]) { if (displayParts) { return map(displayParts, displayPart => displayPart.text).join(""); @@ -1651,100 +1655,6 @@ module ts { return ""; } - export interface DisplayPartsSymbolWriter extends SymbolWriter { - displayParts(): SymbolDisplayPart[]; - } - - var displayPartWriter = getDisplayPartWriter(); - function getDisplayPartWriter(): DisplayPartsSymbolWriter { - var displayParts: SymbolDisplayPart[]; - var lineStart: boolean; - var indent: number; - - resetWriter(); - return { - displayParts: () => displayParts, - writeKeyword: text => writeKind(text, SymbolDisplayPartKind.keyword), - writeOperator: text => writeKind(text, SymbolDisplayPartKind.operator), - writePunctuation: text => writeKind(text, SymbolDisplayPartKind.punctuation), - writeSpace: text => writeKind(text, SymbolDisplayPartKind.space), - writeStringLiteral: text => writeKind(text, SymbolDisplayPartKind.stringLiteral), - writeParameter: text => writeKind(text, SymbolDisplayPartKind.parameterName), - writeSymbol, - writeLine, - increaseIndent: () => { indent++; }, - decreaseIndent: () => { indent--; }, - clear: resetWriter, - trackSymbol: () => { } - }; - - function writeIndent() { - if (lineStart) { - var indentString = getIndentString(indent); - if (indentString) { - displayParts.push(displayPart(indentString, SymbolDisplayPartKind.space)); - } - lineStart = false; - } - } - - function writeKind(text: string, kind: SymbolDisplayPartKind) { - writeIndent(); - displayParts.push(displayPart(text, kind)); - } - - function writeSymbol(text: string, symbol: Symbol) { - writeIndent(); - displayParts.push(symbolPart(text, symbol)); - } - - function writeLine() { - displayParts.push(lineBreakPart()); - lineStart = true; - } - - function resetWriter() { - displayParts = [] - lineStart = true; - indent = 0; - } - } - - function displayPart(text: string, kind: SymbolDisplayPartKind, symbol?: Symbol): SymbolDisplayPart { - return { - text: text, - kind: SymbolDisplayPartKind[kind] - }; - } - - export function spacePart() { - return displayPart(" ", SymbolDisplayPartKind.space); - } - - export function keywordPart(kind: SyntaxKind) { - return displayPart(tokenToString(kind), SymbolDisplayPartKind.keyword); - } - - export function punctuationPart(kind: SyntaxKind) { - return displayPart(tokenToString(kind), SymbolDisplayPartKind.punctuation); - } - - export function operatorPart(kind: SyntaxKind) { - return displayPart(tokenToString(kind), SymbolDisplayPartKind.operator); - } - - export function textPart(text: string) { - return displayPart(text, SymbolDisplayPartKind.text); - } - - export function lineBreakPart() { - return displayPart("\n", SymbolDisplayPartKind.lineBreak); - } - - function isFirstDeclarationOfSymbolParameter(symbol: Symbol) { - return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === SyntaxKind.Parameter; - } - function isLocalVariableOrFunction(symbol: Symbol) { if (symbol.parent) { return false; // This is exported symbol @@ -1773,59 +1683,6 @@ module ts { }); } - export function symbolPart(text: string, symbol: Symbol) { - return displayPart(text, displayPartKind(symbol), symbol); - - function displayPartKind(symbol: Symbol): SymbolDisplayPartKind { - var flags = symbol.flags; - - if (flags & SymbolFlags.Variable) { - return isFirstDeclarationOfSymbolParameter(symbol) ? SymbolDisplayPartKind.parameterName : SymbolDisplayPartKind.localName; - } - else if (flags & SymbolFlags.Property) { return SymbolDisplayPartKind.propertyName; } - else if (flags & SymbolFlags.GetAccessor) { return SymbolDisplayPartKind.propertyName; } - else if (flags & SymbolFlags.SetAccessor) { return SymbolDisplayPartKind.propertyName; } - else if (flags & SymbolFlags.EnumMember) { return SymbolDisplayPartKind.enumMemberName; } - else if (flags & SymbolFlags.Function) { return SymbolDisplayPartKind.functionName; } - else if (flags & SymbolFlags.Class) { return SymbolDisplayPartKind.className; } - else if (flags & SymbolFlags.Interface) { return SymbolDisplayPartKind.interfaceName; } - else if (flags & SymbolFlags.Enum) { return SymbolDisplayPartKind.enumName; } - else if (flags & SymbolFlags.Module) { return SymbolDisplayPartKind.moduleName; } - else if (flags & SymbolFlags.Method) { return SymbolDisplayPartKind.methodName; } - else if (flags & SymbolFlags.TypeParameter) { return SymbolDisplayPartKind.typeParameterName; } - else if (flags & SymbolFlags.TypeAlias) { return SymbolDisplayPartKind.aliasName; } - else if (flags & SymbolFlags.Import) { return SymbolDisplayPartKind.aliasName; } - - - return SymbolDisplayPartKind.text; - } - } - - export function mapToDisplayParts(writeDisplayParts: (writer: DisplayPartsSymbolWriter) => void): SymbolDisplayPart[] { - writeDisplayParts(displayPartWriter); - var result = displayPartWriter.displayParts(); - displayPartWriter.clear(); - return result; - } - - export function typeToDisplayParts(typechecker: TypeChecker, type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): SymbolDisplayPart[] { - return mapToDisplayParts(writer => { - typechecker.getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags); - }); - } - - export function symbolToDisplayParts(typeChecker: TypeChecker, symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): SymbolDisplayPart[] { - return mapToDisplayParts(writer => { - typeChecker.getSymbolDisplayBuilder().buildSymbolDisplay(symbol, writer, enclosingDeclaration, meaning, flags); - }); - } - - function signatureToDisplayParts(typechecker: TypeChecker, signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags): SymbolDisplayPart[]{ - return mapToDisplayParts(writer => { - typechecker.getSymbolDisplayBuilder().buildSignatureDisplay(signature, writer, enclosingDeclaration, flags); - }); - } - export function getDefaultCompilerOptions(): CompilerOptions { // Set "ScriptTarget.Latest" target by default for language service return { @@ -1834,20 +1691,6 @@ module ts { }; } - export function compareDataObjects(dst: any, src: any): boolean { - for (var e in dst) { - if (typeof dst[e] === "object") { - if (!compareDataObjects(dst[e], src[e])) - return false; - } - else if (typeof dst[e] !== "function") { - if (dst[e] !== src[e]) - return false; - } - } - return true; - } - export class OperationCanceledException { } export class CancellationTokenObject { @@ -2204,20 +2047,6 @@ module ts { } /// Helpers - export function getNodeModifiers(node: Node): string { - var flags = node.flags; - var result: string[] = []; - - if (flags & NodeFlags.Private) result.push(ScriptElementKindModifier.privateMemberModifier); - if (flags & NodeFlags.Protected) result.push(ScriptElementKindModifier.protectedMemberModifier); - if (flags & NodeFlags.Public) result.push(ScriptElementKindModifier.publicMemberModifier); - if (flags & NodeFlags.Static) result.push(ScriptElementKindModifier.staticModifier); - if (flags & NodeFlags.Export) result.push(ScriptElementKindModifier.exportedModifier); - if (isInAmbientContext(node)) result.push(ScriptElementKindModifier.ambientModifier); - - return result.length > 0 ? result.join(',') : ScriptElementKindModifier.none; - } - function getTargetLabel(referenceNode: Node, labelName: string): Identifier { while (referenceNode) { if (referenceNode.kind === SyntaxKind.LabeledStatement && (referenceNode).label.text === labelName) { diff --git a/src/services/utilities.ts b/src/services/utilities.ts index 32551d9737b..146ea141d76 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -270,7 +270,21 @@ module ts { return n.getWidth() !== 0; } - export function getTypeArgumentOrTypeParameterList(node: Node): NodeArray { + export function getNodeModifiers(node: Node): string { + var flags = node.flags; + var result: string[] = []; + + if (flags & NodeFlags.Private) result.push(ScriptElementKindModifier.privateMemberModifier); + if (flags & NodeFlags.Protected) result.push(ScriptElementKindModifier.protectedMemberModifier); + if (flags & NodeFlags.Public) result.push(ScriptElementKindModifier.publicMemberModifier); + if (flags & NodeFlags.Static) result.push(ScriptElementKindModifier.staticModifier); + if (flags & NodeFlags.Export) result.push(ScriptElementKindModifier.exportedModifier); + if (isInAmbientContext(node)) result.push(ScriptElementKindModifier.ambientModifier); + + return result.length > 0 ? result.join(',') : ScriptElementKindModifier.none; + } + + export function getTypeArgumentOrTypeParameterList(node: Node): NodeArray { if (node.kind === SyntaxKind.TypeReference || node.kind === SyntaxKind.CallExpression) { return (node).typeArguments; } @@ -306,4 +320,166 @@ module ts { return isTemplateLiteralKind(node.kind) && (node.getStart() < position && position < node.getEnd()) || (!!node.isUnterminated && position === node.getEnd()); } + + export function compareDataObjects(dst: any, src: any): boolean { + for (var e in dst) { + if (typeof dst[e] === "object") { + if (!compareDataObjects(dst[e], src[e])) { + return false; + } + } + else if (typeof dst[e] !== "function") { + if (dst[e] !== src[e]) { + return false; + } + } + } + return true; + } +} + +// Display-part writer helpers +module ts { + export function isFirstDeclarationOfSymbolParameter(symbol: Symbol) { + return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === SyntaxKind.Parameter; + } + + var displayPartWriter = getDisplayPartWriter(); + function getDisplayPartWriter(): DisplayPartsSymbolWriter { + var displayParts: SymbolDisplayPart[]; + var lineStart: boolean; + var indent: number; + + resetWriter(); + return { + displayParts: () => displayParts, + writeKeyword: text => writeKind(text, SymbolDisplayPartKind.keyword), + writeOperator: text => writeKind(text, SymbolDisplayPartKind.operator), + writePunctuation: text => writeKind(text, SymbolDisplayPartKind.punctuation), + writeSpace: text => writeKind(text, SymbolDisplayPartKind.space), + writeStringLiteral: text => writeKind(text, SymbolDisplayPartKind.stringLiteral), + writeParameter: text => writeKind(text, SymbolDisplayPartKind.parameterName), + writeSymbol, + writeLine, + increaseIndent: () => { indent++; }, + decreaseIndent: () => { indent--; }, + clear: resetWriter, + trackSymbol: () => { } + }; + + function writeIndent() { + if (lineStart) { + var indentString = getIndentString(indent); + if (indentString) { + displayParts.push(displayPart(indentString, SymbolDisplayPartKind.space)); + } + lineStart = false; + } + } + + function writeKind(text: string, kind: SymbolDisplayPartKind) { + writeIndent(); + displayParts.push(displayPart(text, kind)); + } + + function writeSymbol(text: string, symbol: Symbol) { + writeIndent(); + displayParts.push(symbolPart(text, symbol)); + } + + function writeLine() { + displayParts.push(lineBreakPart()); + lineStart = true; + } + + function resetWriter() { + displayParts = [] + lineStart = true; + indent = 0; + } + } + + export function symbolPart(text: string, symbol: Symbol) { + return displayPart(text, displayPartKind(symbol), symbol); + + function displayPartKind(symbol: Symbol): SymbolDisplayPartKind { + var flags = symbol.flags; + + if (flags & SymbolFlags.Variable) { + return isFirstDeclarationOfSymbolParameter(symbol) ? SymbolDisplayPartKind.parameterName : SymbolDisplayPartKind.localName; + } + else if (flags & SymbolFlags.Property) { return SymbolDisplayPartKind.propertyName; } + else if (flags & SymbolFlags.GetAccessor) { return SymbolDisplayPartKind.propertyName; } + else if (flags & SymbolFlags.SetAccessor) { return SymbolDisplayPartKind.propertyName; } + else if (flags & SymbolFlags.EnumMember) { return SymbolDisplayPartKind.enumMemberName; } + else if (flags & SymbolFlags.Function) { return SymbolDisplayPartKind.functionName; } + else if (flags & SymbolFlags.Class) { return SymbolDisplayPartKind.className; } + else if (flags & SymbolFlags.Interface) { return SymbolDisplayPartKind.interfaceName; } + else if (flags & SymbolFlags.Enum) { return SymbolDisplayPartKind.enumName; } + else if (flags & SymbolFlags.Module) { return SymbolDisplayPartKind.moduleName; } + else if (flags & SymbolFlags.Method) { return SymbolDisplayPartKind.methodName; } + else if (flags & SymbolFlags.TypeParameter) { return SymbolDisplayPartKind.typeParameterName; } + else if (flags & SymbolFlags.TypeAlias) { return SymbolDisplayPartKind.aliasName; } + else if (flags & SymbolFlags.Import) { return SymbolDisplayPartKind.aliasName; } + + + return SymbolDisplayPartKind.text; + } + } + + export function displayPart(text: string, kind: SymbolDisplayPartKind, symbol?: Symbol): SymbolDisplayPart { + return { + text: text, + kind: SymbolDisplayPartKind[kind] + }; + } + + export function spacePart() { + return displayPart(" ", SymbolDisplayPartKind.space); + } + + export function keywordPart(kind: SyntaxKind) { + return displayPart(tokenToString(kind), SymbolDisplayPartKind.keyword); + } + + export function punctuationPart(kind: SyntaxKind) { + return displayPart(tokenToString(kind), SymbolDisplayPartKind.punctuation); + } + + export function operatorPart(kind: SyntaxKind) { + return displayPart(tokenToString(kind), SymbolDisplayPartKind.operator); + } + + export function textPart(text: string) { + return displayPart(text, SymbolDisplayPartKind.text); + } + + export function lineBreakPart() { + return displayPart("\n", SymbolDisplayPartKind.lineBreak); + } + + export function mapToDisplayParts(writeDisplayParts: (writer: DisplayPartsSymbolWriter) => void): SymbolDisplayPart[] { + writeDisplayParts(displayPartWriter); + var result = displayPartWriter.displayParts(); + displayPartWriter.clear(); + return result; + } + + export function typeToDisplayParts(typechecker: TypeChecker, type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): SymbolDisplayPart[] { + return mapToDisplayParts(writer => { + typechecker.getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags); + }); + } + + export function symbolToDisplayParts(typeChecker: TypeChecker, symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): SymbolDisplayPart[] { + return mapToDisplayParts(writer => { + typeChecker.getSymbolDisplayBuilder().buildSymbolDisplay(symbol, writer, enclosingDeclaration, meaning, flags); + }); + } + + export function signatureToDisplayParts(typechecker: TypeChecker, signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags): SymbolDisplayPart[] { + return mapToDisplayParts(writer => { + typechecker.getSymbolDisplayBuilder().buildSignatureDisplay(signature, writer, enclosingDeclaration, flags); + }); + } } \ No newline at end of file From 38bf383f0301a720f2d5866c8a3b0f47e765869f Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Sun, 7 Dec 2014 22:17:39 -0800 Subject: [PATCH 097/141] Add tests for public declarations --- src/harness/harness.ts | 8 +- .../reference/APISample_node_compile.js | 1840 ++++++ .../reference/APISample_node_compile.types | 5647 +++++++++++++++++ .../reference/APISample_standalone_compile.js | 1836 ++++++ .../APISample_standalone_compile.types | 5641 ++++++++++++++++ .../cases/compiler/APISample_node_compile.ts | 11 + .../compiler/APISample_standalone_compile.ts | 7 + 7 files changed, 14989 insertions(+), 1 deletion(-) create mode 100644 tests/baselines/reference/APISample_node_compile.js create mode 100644 tests/baselines/reference/APISample_node_compile.types create mode 100644 tests/baselines/reference/APISample_standalone_compile.js create mode 100644 tests/baselines/reference/APISample_standalone_compile.types create mode 100644 tests/cases/compiler/APISample_node_compile.ts create mode 100644 tests/cases/compiler/APISample_standalone_compile.ts diff --git a/src/harness/harness.ts b/src/harness/harness.ts index e813b18b457..374d08af178 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -776,9 +776,15 @@ module Harness { case 'errortruncation': options.noErrorTruncation = setting.value === 'false'; break; + case 'preserveconstenums': options.preserveConstEnums = setting.value === 'true'; break; + + case 'includebuiltfile': + inputFiles.push({ unitName: setting.value, content: IO.readFile(libFolder + setting.value)}); + break; + default: throw new Error('Unsupported compiler setting ' + setting.flag); } @@ -1164,7 +1170,7 @@ module Harness { var optionRegex = /^[\/]{2}\s*@(\w+)\s*:\s*(\S*)/gm; // multiple matches on multiple lines // List of allowed metadata names - var fileMetadataNames = ["filename", "comments", "declaration", "module", "nolib", "sourcemap", "target", "out", "outdir", "noemitonerror","noimplicitany", "noresolve", "newline", "newlines", "emitbom", "errortruncation", "usecasesensitivefilenames", "preserveconstenums"]; + var fileMetadataNames = ["filename", "comments", "declaration", "module", "nolib", "sourcemap", "target", "out", "outdir", "noemitonerror", "noimplicitany", "noresolve", "newline", "newlines", "emitbom", "errortruncation", "usecasesensitivefilenames", "preserveconstenums", "includebuiltfile"]; function extractCompilerSettings(content: string): CompilerSetting[] { diff --git a/tests/baselines/reference/APISample_node_compile.js b/tests/baselines/reference/APISample_node_compile.js new file mode 100644 index 00000000000..2329e7be57c --- /dev/null +++ b/tests/baselines/reference/APISample_node_compile.js @@ -0,0 +1,1840 @@ +//// [tests/cases/compiler/APISample_node_compile.ts] //// + +//// [APISample_node_compile.ts] + +import ts = require("typescript"); + +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); + +var program = ts.createProgram(["file1.ts"], {}, undefined); +//// [typescript.d.ts] +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + +declare module ts { + interface Map { + [index: string]: T; + } + interface TextRange { + pos: number; + end: number; + } + const enum SyntaxKind { + Unknown = 0, + EndOfFileToken = 1, + SingleLineCommentTrivia = 2, + MultiLineCommentTrivia = 3, + NewLineTrivia = 4, + WhitespaceTrivia = 5, + NumericLiteral = 6, + StringLiteral = 7, + RegularExpressionLiteral = 8, + NoSubstitutionTemplateLiteral = 9, + TemplateHead = 10, + TemplateMiddle = 11, + TemplateTail = 12, + OpenBraceToken = 13, + CloseBraceToken = 14, + OpenParenToken = 15, + CloseParenToken = 16, + OpenBracketToken = 17, + CloseBracketToken = 18, + DotToken = 19, + DotDotDotToken = 20, + SemicolonToken = 21, + CommaToken = 22, + LessThanToken = 23, + GreaterThanToken = 24, + LessThanEqualsToken = 25, + GreaterThanEqualsToken = 26, + EqualsEqualsToken = 27, + ExclamationEqualsToken = 28, + EqualsEqualsEqualsToken = 29, + ExclamationEqualsEqualsToken = 30, + EqualsGreaterThanToken = 31, + PlusToken = 32, + MinusToken = 33, + AsteriskToken = 34, + SlashToken = 35, + PercentToken = 36, + PlusPlusToken = 37, + MinusMinusToken = 38, + LessThanLessThanToken = 39, + GreaterThanGreaterThanToken = 40, + GreaterThanGreaterThanGreaterThanToken = 41, + AmpersandToken = 42, + BarToken = 43, + CaretToken = 44, + ExclamationToken = 45, + TildeToken = 46, + AmpersandAmpersandToken = 47, + BarBarToken = 48, + QuestionToken = 49, + ColonToken = 50, + EqualsToken = 51, + PlusEqualsToken = 52, + MinusEqualsToken = 53, + AsteriskEqualsToken = 54, + SlashEqualsToken = 55, + PercentEqualsToken = 56, + LessThanLessThanEqualsToken = 57, + GreaterThanGreaterThanEqualsToken = 58, + GreaterThanGreaterThanGreaterThanEqualsToken = 59, + AmpersandEqualsToken = 60, + BarEqualsToken = 61, + CaretEqualsToken = 62, + Identifier = 63, + BreakKeyword = 64, + CaseKeyword = 65, + CatchKeyword = 66, + ClassKeyword = 67, + ConstKeyword = 68, + ContinueKeyword = 69, + DebuggerKeyword = 70, + DefaultKeyword = 71, + DeleteKeyword = 72, + DoKeyword = 73, + ElseKeyword = 74, + EnumKeyword = 75, + ExportKeyword = 76, + ExtendsKeyword = 77, + FalseKeyword = 78, + FinallyKeyword = 79, + ForKeyword = 80, + FunctionKeyword = 81, + IfKeyword = 82, + ImportKeyword = 83, + InKeyword = 84, + InstanceOfKeyword = 85, + NewKeyword = 86, + NullKeyword = 87, + ReturnKeyword = 88, + SuperKeyword = 89, + SwitchKeyword = 90, + ThisKeyword = 91, + ThrowKeyword = 92, + TrueKeyword = 93, + TryKeyword = 94, + TypeOfKeyword = 95, + VarKeyword = 96, + VoidKeyword = 97, + WhileKeyword = 98, + WithKeyword = 99, + ImplementsKeyword = 100, + InterfaceKeyword = 101, + LetKeyword = 102, + PackageKeyword = 103, + PrivateKeyword = 104, + ProtectedKeyword = 105, + PublicKeyword = 106, + StaticKeyword = 107, + YieldKeyword = 108, + AnyKeyword = 109, + BooleanKeyword = 110, + ConstructorKeyword = 111, + DeclareKeyword = 112, + GetKeyword = 113, + ModuleKeyword = 114, + RequireKeyword = 115, + NumberKeyword = 116, + SetKeyword = 117, + StringKeyword = 118, + TypeKeyword = 119, + Missing = 120, + QualifiedName = 121, + ComputedPropertyName = 122, + TypeParameter = 123, + Parameter = 124, + Property = 125, + Method = 126, + Constructor = 127, + GetAccessor = 128, + SetAccessor = 129, + CallSignature = 130, + ConstructSignature = 131, + IndexSignature = 132, + TypeReference = 133, + FunctionType = 134, + ConstructorType = 135, + TypeQuery = 136, + TypeLiteral = 137, + ArrayType = 138, + TupleType = 139, + UnionType = 140, + ParenthesizedType = 141, + ArrayLiteralExpression = 142, + ObjectLiteralExpression = 143, + PropertyAccessExpression = 144, + ElementAccessExpression = 145, + CallExpression = 146, + NewExpression = 147, + TaggedTemplateExpression = 148, + TypeAssertionExpression = 149, + ParenthesizedExpression = 150, + FunctionExpression = 151, + ArrowFunction = 152, + DeleteExpression = 153, + TypeOfExpression = 154, + VoidExpression = 155, + PrefixUnaryExpression = 156, + PostfixUnaryExpression = 157, + BinaryExpression = 158, + ConditionalExpression = 159, + TemplateExpression = 160, + YieldExpression = 161, + OmittedExpression = 162, + TemplateSpan = 163, + Block = 164, + VariableStatement = 165, + EmptyStatement = 166, + ExpressionStatement = 167, + IfStatement = 168, + DoStatement = 169, + WhileStatement = 170, + ForStatement = 171, + ForInStatement = 172, + ContinueStatement = 173, + BreakStatement = 174, + ReturnStatement = 175, + WithStatement = 176, + SwitchStatement = 177, + LabeledStatement = 178, + ThrowStatement = 179, + TryStatement = 180, + TryBlock = 181, + CatchBlock = 182, + FinallyBlock = 183, + DebuggerStatement = 184, + VariableDeclaration = 185, + FunctionDeclaration = 186, + FunctionBlock = 187, + ClassDeclaration = 188, + InterfaceDeclaration = 189, + TypeAliasDeclaration = 190, + EnumDeclaration = 191, + ModuleDeclaration = 192, + ModuleBlock = 193, + ImportDeclaration = 194, + ExportAssignment = 195, + CaseClause = 196, + DefaultClause = 197, + HeritageClause = 198, + PropertyAssignment = 199, + ShorthandPropertyAssignment = 200, + EnumMember = 201, + SourceFile = 202, + Program = 203, + SyntaxList = 204, + Count = 205, + FirstAssignment = 51, + LastAssignment = 62, + FirstReservedWord = 64, + LastReservedWord = 99, + FirstKeyword = 64, + LastKeyword = 119, + FirstFutureReservedWord = 100, + LastFutureReservedWord = 108, + FirstTypeNode = 133, + LastTypeNode = 141, + FirstPunctuation = 13, + LastPunctuation = 62, + FirstToken = 1, + LastToken = 119, + FirstTriviaToken = 2, + LastTriviaToken = 5, + FirstLiteralToken = 6, + LastLiteralToken = 9, + FirstTemplateToken = 9, + LastTemplateToken = 12, + FirstOperator = 21, + LastOperator = 62, + FirstBinaryOperator = 23, + LastBinaryOperator = 62, + } + const enum NodeFlags { + Export = 1, + Ambient = 2, + QuestionMark = 4, + Rest = 8, + Public = 16, + Private = 32, + Protected = 64, + Static = 128, + MultiLine = 256, + Synthetic = 512, + DeclarationFile = 1024, + Let = 2048, + Const = 4096, + OctalLiteral = 8192, + Modifier = 243, + AccessibilityModifier = 112, + BlockScoped = 6144, + } + const enum ParserContextFlags { + StrictMode = 1, + DisallowIn = 2, + Yield = 4, + GeneratorParameter = 8, + } + interface Node extends TextRange { + kind: SyntaxKind; + flags: NodeFlags; + parserContextFlags?: ParserContextFlags; + id?: number; + parent?: Node; + symbol?: Symbol; + locals?: SymbolTable; + nextContainer?: Node; + localSymbol?: Symbol; + modifiers?: ModifiersArray; + } + interface NodeArray extends Array, TextRange { + hasTrailingComma?: boolean; + } + interface ModifiersArray extends Array { + flags: number; + } + interface Identifier extends PrimaryExpression { + text: string; + } + interface QualifiedName extends Node { + left: EntityName; + right: Identifier; + } + type EntityName = Identifier | QualifiedName; + interface ParsedSignature { + typeParameters?: NodeArray; + parameters: NodeArray; + type?: TypeNode; + } + type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; + interface Declaration extends Node { + _declarationBrand: any; + name?: DeclarationName; + } + interface ComputedPropertyName extends Node { + expression: Expression; + } + interface TypeParameterDeclaration extends Declaration { + name: Identifier; + constraint?: TypeNode; + expression?: Expression; + } + interface SignatureDeclaration extends Declaration, ParsedSignature { + } + interface VariableDeclaration extends Declaration { + name: Identifier; + type?: TypeNode; + initializer?: Expression; + } + interface PropertyDeclaration extends Declaration, ClassElement { + type?: TypeNode; + initializer?: Expression; + } + interface ShortHandPropertyDeclaration extends Declaration { + name: Identifier; + } + interface ParameterDeclaration extends VariableDeclaration { + } + /** + * Several node kinds share function-like features such as a signature, + * a name, and a body. These nodes should extend FunctionLikeDeclaration. + * Examples: + * FunctionDeclaration + * MethodDeclaration + * AccessorDeclaration + */ + interface FunctionLikeDeclaration extends SignatureDeclaration { + _functionLikeDeclarationBrand: any; + asteriskToken?: Node; + body?: Block | Expression; + } + interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { + name: Identifier; + body?: Block; + } + interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement { + body?: Block; + } + interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { + body?: Block; + } + interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement { + body?: Block; + } + interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { + _indexSignatureDeclarationBrand: any; + } + interface TypeNode extends Node { + } + interface TypeReferenceNode extends TypeNode { + typeName: EntityName; + typeArguments?: NodeArray; + } + interface TypeQueryNode extends TypeNode { + exprName: EntityName; + } + interface TypeLiteralNode extends TypeNode, Declaration { + members: NodeArray; + } + interface ArrayTypeNode extends TypeNode { + elementType: TypeNode; + } + interface TupleTypeNode extends TypeNode { + elementTypes: NodeArray; + } + interface UnionTypeNode extends TypeNode { + types: NodeArray; + } + interface ParenthesizedTypeNode extends TypeNode { + type: TypeNode; + } + interface StringLiteralTypeNode extends TypeNode { + text: string; + } + interface Expression extends Node { + _expressionBrand: any; + contextualType?: Type; + } + interface UnaryExpression extends Expression { + _unaryExpressionBrand: any; + } + interface PrefixUnaryExpression extends UnaryExpression { + operator: SyntaxKind; + operand: UnaryExpression; + } + interface PostfixUnaryExpression extends PostfixExpression { + operand: LeftHandSideExpression; + operator: SyntaxKind; + } + interface PostfixExpression extends UnaryExpression { + _postfixExpressionBrand: any; + } + interface LeftHandSideExpression extends PostfixExpression { + _leftHandSideExpressionBrand: any; + } + interface MemberExpression extends LeftHandSideExpression { + _memberExpressionBrand: any; + } + interface PrimaryExpression extends MemberExpression { + _primaryExpressionBrand: any; + } + interface DeleteExpression extends UnaryExpression { + expression: UnaryExpression; + } + interface TypeOfExpression extends UnaryExpression { + expression: UnaryExpression; + } + interface VoidExpression extends UnaryExpression { + expression: UnaryExpression; + } + interface YieldExpression extends Expression { + asteriskToken?: Node; + expression: Expression; + } + interface BinaryExpression extends Expression { + left: Expression; + operator: SyntaxKind; + right: Expression; + } + interface ConditionalExpression extends Expression { + condition: Expression; + whenTrue: Expression; + whenFalse: Expression; + } + interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { + name?: Identifier; + body: Block | Expression; + } + interface LiteralExpression extends PrimaryExpression { + text: string; + } + interface TemplateExpression extends PrimaryExpression { + head: LiteralExpression; + templateSpans: NodeArray; + } + interface TemplateSpan extends Node { + expression: Expression; + literal: LiteralExpression; + } + interface ParenthesizedExpression extends PrimaryExpression { + expression: Expression; + } + interface ArrayLiteralExpression extends PrimaryExpression { + elements: NodeArray; + } + interface ObjectLiteralExpression extends PrimaryExpression, Declaration { + properties: NodeArray; + } + interface PropertyAccessExpression extends MemberExpression { + expression: LeftHandSideExpression; + name: Identifier; + } + interface ElementAccessExpression extends MemberExpression { + expression: LeftHandSideExpression; + argumentExpression: Expression; + } + interface CallExpression extends LeftHandSideExpression { + expression: LeftHandSideExpression; + typeArguments?: NodeArray; + arguments: NodeArray; + } + interface NewExpression extends CallExpression, PrimaryExpression { + } + interface TaggedTemplateExpression extends MemberExpression { + tag: LeftHandSideExpression; + template: LiteralExpression | TemplateExpression; + } + type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression; + interface TypeAssertion extends UnaryExpression { + type: TypeNode; + expression: UnaryExpression; + } + interface Statement extends Node, ModuleElement { + _statementBrand: any; + } + interface Block extends Statement { + statements: NodeArray; + } + interface VariableStatement extends Statement { + declarations: NodeArray; + } + interface ExpressionStatement extends Statement { + expression: Expression; + } + interface IfStatement extends Statement { + expression: Expression; + thenStatement: Statement; + elseStatement?: Statement; + } + interface IterationStatement extends Statement { + statement: Statement; + } + interface DoStatement extends IterationStatement { + expression: Expression; + } + interface WhileStatement extends IterationStatement { + expression: Expression; + } + interface ForStatement extends IterationStatement { + declarations?: NodeArray; + initializer?: Expression; + condition?: Expression; + iterator?: Expression; + } + interface ForInStatement extends IterationStatement { + declarations?: NodeArray; + variable?: Expression; + expression: Expression; + } + interface BreakOrContinueStatement extends Statement { + label?: Identifier; + } + interface ReturnStatement extends Statement { + expression?: Expression; + } + interface WithStatement extends Statement { + expression: Expression; + statement: Statement; + } + interface SwitchStatement extends Statement { + expression: Expression; + clauses: NodeArray; + } + interface CaseOrDefaultClause extends Node { + expression?: Expression; + statements: NodeArray; + } + interface LabeledStatement extends Statement { + label: Identifier; + statement: Statement; + } + interface ThrowStatement extends Statement { + expression: Expression; + } + interface TryStatement extends Statement { + tryBlock: Block; + catchBlock?: CatchBlock; + finallyBlock?: Block; + } + interface CatchBlock extends Block, Declaration { + variable: Identifier; + type?: TypeNode; + } + interface ModuleElement extends Node { + _moduleElementBrand: any; + } + interface ClassDeclaration extends Declaration, ModuleElement { + name: Identifier; + typeParameters?: NodeArray; + heritageClauses?: NodeArray; + members: NodeArray; + } + interface ClassElement extends Declaration { + _classElementBrand: any; + } + interface InterfaceDeclaration extends Declaration, ModuleElement { + name: Identifier; + typeParameters?: NodeArray; + heritageClauses?: NodeArray; + members: NodeArray; + } + interface HeritageClause extends Node { + token: SyntaxKind; + types?: NodeArray; + } + interface TypeAliasDeclaration extends Declaration, ModuleElement { + name: Identifier; + type: TypeNode; + } + interface EnumMember extends Declaration { + name: DeclarationName; + initializer?: Expression; + } + interface EnumDeclaration extends Declaration, ModuleElement { + name: Identifier; + members: NodeArray; + } + interface ModuleDeclaration extends Declaration, ModuleElement { + name: Identifier | LiteralExpression; + body: ModuleBlock | ModuleDeclaration; + } + interface ModuleBlock extends Node, ModuleElement { + statements: NodeArray; + } + interface ImportDeclaration extends Declaration, ModuleElement { + name: Identifier; + entityName?: EntityName; + externalModuleName?: LiteralExpression; + } + interface ExportAssignment extends Statement, ModuleElement { + exportName: Identifier; + } + interface FileReference extends TextRange { + filename: string; + } + interface CommentRange extends TextRange { + hasTrailingNewLine?: boolean; + } + interface SourceFile extends Declaration { + statements: NodeArray; + filename: string; + text: string; + getLineAndCharacterFromPosition(position: number): LineAndCharacter; + getPositionFromLineAndCharacter(line: number, character: number): number; + getLineStarts(): number[]; + amdDependencies: string[]; + amdModuleName: string; + referencedFiles: FileReference[]; + semanticDiagnostics: Diagnostic[]; + parseDiagnostics: Diagnostic[]; + grammarDiagnostics: Diagnostic[]; + getSyntacticDiagnostics(): Diagnostic[]; + hasNoDefaultLib: boolean; + externalModuleIndicator: Node; + nodeCount: number; + identifierCount: number; + symbolCount: number; + isOpen: boolean; + version: string; + languageVersion: ScriptTarget; + identifiers: Map; + } + interface Program { + getSourceFile(filename: string): SourceFile; + getSourceFiles(): SourceFile[]; + getCompilerOptions(): CompilerOptions; + getCompilerHost(): CompilerHost; + getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; + getGlobalDiagnostics(): Diagnostic[]; + getTypeChecker(fullTypeCheckMode: boolean): TypeChecker; + getCommonSourceDirectory(): string; + } + interface SourceMapSpan { + emittedLine: number; + emittedColumn: number; + sourceLine: number; + sourceColumn: number; + nameIndex?: number; + sourceIndex: number; + } + interface SourceMapData { + sourceMapFilePath: string; + jsSourceMappingURL: string; + sourceMapFile: string; + sourceMapSourceRoot: string; + sourceMapSources: string[]; + inputSourceFileNames: string[]; + sourceMapNames?: string[]; + sourceMapMappings: string; + sourceMapDecodedMappings: SourceMapSpan[]; + } + enum EmitReturnStatus { + Succeeded = 0, + AllOutputGenerationSkipped = 1, + JSGeneratedWithSemanticErrors = 2, + DeclarationGenerationSkipped = 3, + EmitErrorsEncountered = 4, + CompilerOptionsErrors = 5, + } + interface EmitResult { + emitResultStatus: EmitReturnStatus; + diagnostics: Diagnostic[]; + sourceMaps: SourceMapData[]; + } + interface TypeChecker { + getProgram(): Program; + getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; + getDeclarationDiagnostics(sourceFile: SourceFile): Diagnostic[]; + getGlobalDiagnostics(): Diagnostic[]; + getNodeCount(): number; + getIdentifierCount(): number; + getSymbolCount(): number; + getTypeCount(): number; + checkProgram(): void; + emitFiles(targetSourceFile?: SourceFile): EmitResult; + getParentOfSymbol(symbol: Symbol): Symbol; + getNarrowedTypeOfSymbol(symbol: Symbol, node: Node): Type; + getDeclaredTypeOfSymbol(symbol: Symbol): Type; + getPropertiesOfType(type: Type): Symbol[]; + getPropertyOfType(type: Type, propertyName: string): Symbol; + getSignaturesOfType(type: Type, kind: SignatureKind): Signature[]; + getIndexTypeOfType(type: Type, kind: IndexKind): Type; + getReturnTypeOfSignature(signature: Signature): Type; + getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; + getSymbolInfo(node: Node): Symbol; + getShorthandAssignmentValueSymbol(location: Node): Symbol; + getTypeOfNode(node: Node): Type; + typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; + symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; + getSymbolDisplayBuilder(): SymbolDisplayBuilder; + getFullyQualifiedName(symbol: Symbol): string; + getAugmentedPropertiesOfType(type: Type): Symbol[]; + getRootSymbols(symbol: Symbol): Symbol[]; + getContextualType(node: Node): Type; + getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; + getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; + isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; + isUndefinedSymbol(symbol: Symbol): boolean; + isArgumentsSymbol(symbol: Symbol): boolean; + isEmitBlocked(sourceFile?: SourceFile): boolean; + getEnumMemberValue(node: EnumMember): number; + isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; + getAliasedSymbol(symbol: Symbol): Symbol; + } + interface SymbolDisplayBuilder { + buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void; + buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void; + buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + } + interface SymbolWriter { + writeKeyword(text: string): void; + writeOperator(text: string): void; + writePunctuation(text: string): void; + writeSpace(text: string): void; + writeStringLiteral(text: string): void; + writeParameter(text: string): void; + writeSymbol(text: string, symbol: Symbol): void; + writeLine(): void; + increaseIndent(): void; + decreaseIndent(): void; + clear(): void; + trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void; + } + const enum TypeFormatFlags { + None = 0, + WriteArrayAsGenericType = 1, + UseTypeOfFunction = 2, + NoTruncation = 4, + WriteArrowStyleSignature = 8, + WriteOwnNameForAnyLike = 16, + WriteTypeArgumentsOfSignature = 32, + InElementType = 64, + } + const enum SymbolFormatFlags { + None = 0, + WriteTypeParametersOrArguments = 1, + UseOnlyExternalAliasing = 2, + } + const enum SymbolAccessibility { + Accessible = 0, + NotAccessible = 1, + CannotBeNamed = 2, + } + interface SymbolVisibilityResult { + accessibility: SymbolAccessibility; + aliasesToMakeVisible?: ImportDeclaration[]; + errorSymbolName?: string; + errorNode?: Node; + } + interface SymbolAccessiblityResult extends SymbolVisibilityResult { + errorModuleName?: string; + } + interface EmitResolver { + getProgram(): Program; + getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; + getExpressionNamePrefix(node: Identifier): string; + getExportAssignmentName(node: SourceFile): string; + isReferencedImportDeclaration(node: ImportDeclaration): boolean; + isTopLevelValueImportWithEntityName(node: ImportDeclaration): boolean; + getNodeCheckFlags(node: Node): NodeCheckFlags; + getEnumMemberValue(node: EnumMember): number; + hasSemanticErrors(): boolean; + isDeclarationVisible(node: Declaration): boolean; + isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; + writeTypeAtLocation(location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; + writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; + isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; + isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; + getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number; + isEmitBlocked(sourceFile?: SourceFile): boolean; + } + const enum SymbolFlags { + FunctionScopedVariable = 1, + BlockScopedVariable = 2, + Property = 4, + EnumMember = 8, + Function = 16, + Class = 32, + Interface = 64, + ConstEnum = 128, + RegularEnum = 256, + ValueModule = 512, + NamespaceModule = 1024, + TypeLiteral = 2048, + ObjectLiteral = 4096, + Method = 8192, + Constructor = 16384, + GetAccessor = 32768, + SetAccessor = 65536, + CallSignature = 131072, + ConstructSignature = 262144, + IndexSignature = 524288, + TypeParameter = 1048576, + TypeAlias = 2097152, + ExportValue = 4194304, + ExportType = 8388608, + ExportNamespace = 16777216, + Import = 33554432, + Instantiated = 67108864, + Merged = 134217728, + Transient = 268435456, + Prototype = 536870912, + UnionProperty = 1073741824, + Enum = 384, + Variable = 3, + Value = 107455, + Type = 3152352, + Namespace = 1536, + Module = 1536, + Accessor = 98304, + Signature = 917504, + FunctionScopedVariableExcludes = 107454, + BlockScopedVariableExcludes = 107455, + ParameterExcludes = 107455, + PropertyExcludes = 107455, + EnumMemberExcludes = 107455, + FunctionExcludes = 106927, + ClassExcludes = 3258879, + InterfaceExcludes = 3152288, + RegularEnumExcludes = 3258623, + ConstEnumExcludes = 3259263, + ValueModuleExcludes = 106639, + NamespaceModuleExcludes = 0, + MethodExcludes = 99263, + GetAccessorExcludes = 41919, + SetAccessorExcludes = 74687, + TypeParameterExcludes = 2103776, + TypeAliasExcludes = 3152352, + ImportExcludes = 33554432, + ModuleMember = 35653619, + ExportHasLocal = 944, + HasLocals = 1041936, + HasExports = 1952, + HasMembers = 6240, + IsContainer = 1048560, + PropertyOrAccessor = 98308, + Export = 29360128, + } + interface Symbol { + flags: SymbolFlags; + name: string; + id?: number; + mergeId?: number; + declarations?: Declaration[]; + parent?: Symbol; + members?: SymbolTable; + exports?: SymbolTable; + exportSymbol?: Symbol; + valueDeclaration?: Declaration; + constEnumOnlyModule?: boolean; + } + interface SymbolLinks { + target?: Symbol; + type?: Type; + declaredType?: Type; + mapper?: TypeMapper; + referenced?: boolean; + exportAssignSymbol?: Symbol; + unionType?: UnionType; + } + interface TransientSymbol extends Symbol, SymbolLinks { + } + interface SymbolTable { + [index: string]: Symbol; + } + const enum NodeCheckFlags { + TypeChecked = 1, + LexicalThis = 2, + CaptureThis = 4, + EmitExtends = 8, + SuperInstance = 16, + SuperStatic = 32, + ContextChecked = 64, + EnumValuesComputed = 128, + } + interface NodeLinks { + resolvedType?: Type; + resolvedSignature?: Signature; + resolvedSymbol?: Symbol; + flags?: NodeCheckFlags; + enumMemberValue?: number; + isIllegalTypeReferenceInConstraint?: boolean; + isVisible?: boolean; + localModuleName?: string; + assignmentChecks?: Map; + } + const enum TypeFlags { + Any = 1, + String = 2, + Number = 4, + Boolean = 8, + Void = 16, + Undefined = 32, + Null = 64, + Enum = 128, + StringLiteral = 256, + TypeParameter = 512, + Class = 1024, + Interface = 2048, + Reference = 4096, + Tuple = 8192, + Union = 16384, + Anonymous = 32768, + FromSignature = 65536, + Intrinsic = 127, + StringLike = 258, + NumberLike = 132, + ObjectType = 48128, + Structured = 65025, + } + interface Type { + flags: TypeFlags; + id: number; + symbol?: Symbol; + } + interface IntrinsicType extends Type { + intrinsicName: string; + } + interface StringLiteralType extends Type { + text: string; + } + interface ObjectType extends Type { + } + interface InterfaceType extends ObjectType { + typeParameters: TypeParameter[]; + baseTypes: ObjectType[]; + declaredProperties: Symbol[]; + declaredCallSignatures: Signature[]; + declaredConstructSignatures: Signature[]; + declaredStringIndexType: Type; + declaredNumberIndexType: Type; + } + interface TypeReference extends ObjectType { + target: GenericType; + typeArguments: Type[]; + } + interface GenericType extends InterfaceType, TypeReference { + instantiations: Map; + openReferenceTargets: GenericType[]; + openReferenceChecks: Map; + } + interface TupleType extends ObjectType { + elementTypes: Type[]; + baseArrayType: TypeReference; + } + interface UnionType extends Type { + types: Type[]; + resolvedProperties: SymbolTable; + } + interface ResolvedType extends ObjectType, UnionType { + members: SymbolTable; + properties: Symbol[]; + callSignatures: Signature[]; + constructSignatures: Signature[]; + stringIndexType: Type; + numberIndexType: Type; + } + interface TypeParameter extends Type { + constraint: Type; + target?: TypeParameter; + mapper?: TypeMapper; + } + const enum SignatureKind { + Call = 0, + Construct = 1, + } + interface Signature { + declaration: SignatureDeclaration; + typeParameters: TypeParameter[]; + parameters: Symbol[]; + resolvedReturnType: Type; + minArgumentCount: number; + hasRestParameter: boolean; + hasStringLiterals: boolean; + target?: Signature; + mapper?: TypeMapper; + unionSignatures?: Signature[]; + erasedSignatureCache?: Signature; + isolatedSignatureType?: ObjectType; + } + const enum IndexKind { + String = 0, + Number = 1, + } + interface TypeMapper { + (t: Type): Type; + } + interface TypeInferences { + primary: Type[]; + secondary: Type[]; + } + interface InferenceContext { + typeParameters: TypeParameter[]; + inferUnionTypes: boolean; + inferences: TypeInferences[]; + inferredTypes: Type[]; + failedTypeParameterIndex?: number; + } + interface DiagnosticMessage { + key: string; + category: DiagnosticCategory; + code: number; + isEarly?: boolean; + } + interface DiagnosticMessageChain { + messageText: string; + category: DiagnosticCategory; + code: number; + next?: DiagnosticMessageChain; + } + interface Diagnostic { + file: SourceFile; + start: number; + length: number; + messageText: string; + category: DiagnosticCategory; + code: number; + /** + * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit + */ + isEarly?: boolean; + /** + * Parse error - error produced by parser when it scanner returns a token + * that parser does not understand in its current state + * (as opposed to grammar error when parser can interpret the token but interpretation is not legal from the grammar perespective) + */ + isParseError?: boolean; + } + enum DiagnosticCategory { + Warning = 0, + Error = 1, + Message = 2, + } + interface CompilerOptions { + charset?: string; + codepage?: number; + declaration?: boolean; + diagnostics?: boolean; + emitBOM?: boolean; + help?: boolean; + locale?: string; + mapRoot?: string; + module?: ModuleKind; + noEmitOnError?: boolean; + noErrorTruncation?: boolean; + noImplicitAny?: boolean; + noLib?: boolean; + noLibCheck?: boolean; + noResolve?: boolean; + out?: string; + outDir?: string; + removeComments?: boolean; + sourceMap?: boolean; + sourceRoot?: string; + target?: ScriptTarget; + version?: boolean; + watch?: boolean; + preserveConstEnums?: boolean; + [option: string]: string | number | boolean; + } + const enum ModuleKind { + None = 0, + CommonJS = 1, + AMD = 2, + } + interface LineAndCharacter { + line: number; + character: number; + } + const enum ScriptTarget { + ES3 = 0, + ES5 = 1, + ES6 = 2, + Latest = 2, + } + interface ParsedCommandLine { + options: CompilerOptions; + filenames: string[]; + errors: Diagnostic[]; + } + interface CommandLineOption { + name: string; + type: string | Map; + shortName?: string; + description?: DiagnosticMessage; + paramName?: DiagnosticMessage; + error?: DiagnosticMessage; + } + const enum CharacterCodes { + nullCharacter = 0, + maxAsciiCharacter = 127, + lineFeed = 10, + carriageReturn = 13, + lineSeparator = 8232, + paragraphSeparator = 8233, + nextLine = 133, + space = 32, + nonBreakingSpace = 160, + enQuad = 8192, + emQuad = 8193, + enSpace = 8194, + emSpace = 8195, + threePerEmSpace = 8196, + fourPerEmSpace = 8197, + sixPerEmSpace = 8198, + figureSpace = 8199, + punctuationSpace = 8200, + thinSpace = 8201, + hairSpace = 8202, + zeroWidthSpace = 8203, + narrowNoBreakSpace = 8239, + ideographicSpace = 12288, + mathematicalSpace = 8287, + ogham = 5760, + _ = 95, + $ = 36, + _0 = 48, + _1 = 49, + _2 = 50, + _3 = 51, + _4 = 52, + _5 = 53, + _6 = 54, + _7 = 55, + _8 = 56, + _9 = 57, + a = 97, + b = 98, + c = 99, + d = 100, + e = 101, + f = 102, + g = 103, + h = 104, + i = 105, + j = 106, + k = 107, + l = 108, + m = 109, + n = 110, + o = 111, + p = 112, + q = 113, + r = 114, + s = 115, + t = 116, + u = 117, + v = 118, + w = 119, + x = 120, + y = 121, + z = 122, + A = 65, + B = 66, + C = 67, + D = 68, + E = 69, + F = 70, + G = 71, + H = 72, + I = 73, + J = 74, + K = 75, + L = 76, + M = 77, + N = 78, + O = 79, + P = 80, + Q = 81, + R = 82, + S = 83, + T = 84, + U = 85, + V = 86, + W = 87, + X = 88, + Y = 89, + Z = 90, + ampersand = 38, + asterisk = 42, + at = 64, + backslash = 92, + backtick = 96, + bar = 124, + caret = 94, + closeBrace = 125, + closeBracket = 93, + closeParen = 41, + colon = 58, + comma = 44, + dot = 46, + doubleQuote = 34, + equals = 61, + exclamation = 33, + greaterThan = 62, + lessThan = 60, + minus = 45, + openBrace = 123, + openBracket = 91, + openParen = 40, + percent = 37, + plus = 43, + question = 63, + semicolon = 59, + singleQuote = 39, + slash = 47, + tilde = 126, + backspace = 8, + formFeed = 12, + byteOrderMark = 65279, + tab = 9, + verticalTab = 11, + } + interface CancellationToken { + isCancellationRequested(): boolean; + } + interface CompilerHost { + getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; + getDefaultLibFilename(): string; + getCancellationToken?(): CancellationToken; + writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; + getCurrentDirectory(): string; + getCanonicalFileName(fileName: string): string; + useCaseSensitiveFileNames(): boolean; + getNewLine(): string; + } +} +declare module ts { + interface ErrorCallback { + (message: DiagnosticMessage): void; + } + interface CommentCallback { + (pos: number, end: number): void; + } + interface Scanner { + getStartPos(): number; + getToken(): SyntaxKind; + getTextPos(): number; + getTokenPos(): number; + getTokenText(): string; + getTokenValue(): string; + hasPrecedingLineBreak(): boolean; + isIdentifier(): boolean; + isReservedWord(): boolean; + reScanGreaterToken(): SyntaxKind; + reScanSlashToken(): SyntaxKind; + reScanTemplateToken(): SyntaxKind; + scan(): SyntaxKind; + setText(text: string): void; + setTextPos(textPos: number): void; + tryScan(callback: () => T): T; + } + function tokenToString(t: SyntaxKind): string; + function computeLineStarts(text: string): number[]; + function getPositionFromLineAndCharacter(lineStarts: number[], line: number, character: number): number; + function getLineAndCharacterOfPosition(lineStarts: number[], position: number): { + line: number; + character: number; + }; + function positionToLineAndCharacter(text: string, pos: number): { + line: number; + character: number; + }; + function isWhiteSpace(ch: number): boolean; + function isLineBreak(ch: number): boolean; + function isOctalDigit(ch: number): boolean; + function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean): number; + function getLeadingCommentRanges(text: string, pos: number): CommentRange[]; + function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; + function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; + function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; + function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback): Scanner; +} +declare module ts { + interface ReferencePathMatchResult { + fileReference?: FileReference; + diagnostic?: DiagnosticMessage; + isNoDefaultLib?: boolean; + } + function getNodeConstructor(kind: SyntaxKind): new () => Node; + function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; + function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; + function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; +} +declare module ts { + function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; +} +declare module ts { + interface Node { + getSourceFile(): SourceFile; + getChildCount(sourceFile?: SourceFile): number; + getChildAt(index: number, sourceFile?: SourceFile): Node; + getChildren(sourceFile?: SourceFile): Node[]; + getStart(sourceFile?: SourceFile): number; + getFullStart(): number; + getEnd(): number; + getWidth(sourceFile?: SourceFile): number; + getFullWidth(): number; + getLeadingTriviaWidth(sourceFile?: SourceFile): number; + getFullText(sourceFile?: SourceFile): string; + getText(sourceFile?: SourceFile): string; + getFirstToken(sourceFile?: SourceFile): Node; + getLastToken(sourceFile?: SourceFile): Node; + } + interface Symbol { + getFlags(): SymbolFlags; + getName(): string; + getDeclarations(): Declaration[]; + getDocumentationComment(): SymbolDisplayPart[]; + } + interface Type { + getFlags(): TypeFlags; + getSymbol(): Symbol; + getProperties(): Symbol[]; + getProperty(propertyName: string): Symbol; + getApparentProperties(): Symbol[]; + getCallSignatures(): Signature[]; + getConstructSignatures(): Signature[]; + getStringIndexType(): Type; + getNumberIndexType(): Type; + } + interface Signature { + getDeclaration(): SignatureDeclaration; + getTypeParameters(): Type[]; + getParameters(): Symbol[]; + getReturnType(): Type; + getDocumentationComment(): SymbolDisplayPart[]; + } + interface SourceFile { + getScriptSnapshot(): IScriptSnapshot; + getNamedDeclarations(): Declaration[]; + update(scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; + } + /** + * Represents an immutable snapshot of a script at a specified time.Once acquired, the + * snapshot is observably immutable. i.e. the same calls with the same parameters will return + * the same values. + */ + interface IScriptSnapshot { + /** Gets a portion of the script snapshot specified by [start, end). */ + getText(start: number, end: number): string; + /** Gets the length of this script snapshot. */ + getLength(): number; + /** + * This call returns the array containing the start position of every line. + * i.e."[0, 10, 55]". TODO: consider making this optional. The language service could + * always determine this (albeit in a more expensive manner). + */ + getLineStartPositions(): number[]; + /** + * Gets the TextChangeRange that describe how the text changed between this text and + * an older version. This information is used by the incremental parser to determine + * what sections of the script need to be re-parsed. 'undefined' can be returned if the + * change range cannot be determined. However, in that case, incremental parsing will + * not happen and the entire document will be re - parsed. + */ + getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; + } + module ScriptSnapshot { + function fromString(text: string): IScriptSnapshot; + } + interface PreProcessedFileInfo { + referencedFiles: FileReference[]; + importedFiles: FileReference[]; + isLibFile: boolean; + } + interface Logger { + log(s: string): void; + } + interface LanguageServiceHost extends Logger { + getCompilationSettings(): CompilerOptions; + getScriptFileNames(): string[]; + getScriptVersion(fileName: string): string; + getScriptIsOpen(fileName: string): boolean; + getScriptSnapshot(fileName: string): IScriptSnapshot; + getLocalizedDiagnosticMessages(): any; + getCancellationToken(): CancellationToken; + getCurrentDirectory(): string; + getDefaultLibFilename(): string; + } + interface LanguageService { + cleanupSemanticCache(): void; + getSyntacticDiagnostics(fileName: string): Diagnostic[]; + getSemanticDiagnostics(fileName: string): Diagnostic[]; + getCompilerOptionsDiagnostics(): Diagnostic[]; + getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; + getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; + getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): CompletionInfo; + getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; + getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; + getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; + getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan; + getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems; + getRenameInfo(fileName: string, position: number): RenameInfo; + findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[]; + getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; + getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; + getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; + getNavigateToItems(searchValue: string): NavigateToItem[]; + getNavigationBarItems(fileName: string): NavigationBarItem[]; + getOutliningSpans(fileName: string): OutliningSpan[]; + getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; + getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; + getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number; + getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[]; + getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; + getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[]; + getEmitOutput(fileName: string): EmitOutput; + getSourceFile(filename: string): SourceFile; + dispose(): void; + } + class TextSpan { + private _start; + private _length; + /** + * Creates a TextSpan instance beginning with the position Start and having the Length + * specified with length. + */ + constructor(start: number, length: number); + toJSON(key: any): any; + start(): number; + length(): number; + end(): number; + isEmpty(): boolean; + /** + * Determines whether the position lies within the span. Returns true if the position is greater than or equal to Start and strictly less + * than End, otherwise false. + * @param position The position to check. + */ + containsPosition(position: number): boolean; + /** + * Determines whether span falls completely within this span. Returns true if the specified span falls completely within this span, otherwise false. + * @param span The span to check. + */ + containsTextSpan(span: TextSpan): boolean; + /** + * Determines whether the given span overlaps this span. Two spans are considered to overlap + * if they have positions in common and neither is empty. Empty spans do not overlap with any + * other span. Returns true if the spans overlap, false otherwise. + * @param span The span to check. + */ + overlapsWith(span: TextSpan): boolean; + /** + * Returns the overlap with the given span, or undefined if there is no overlap. + * @param span The span to check. + */ + overlap(span: TextSpan): TextSpan; + /** + * Determines whether span intersects this span. Two spans are considered to + * intersect if they have positions in common or the end of one span + * coincides with the start of the other span. Returns true if the spans intersect, false otherwise. + * @param The span to check. + */ + intersectsWithTextSpan(span: TextSpan): boolean; + intersectsWith(start: number, length: number): boolean; + /** + * Determines whether the given position intersects this span. + * A position is considered to intersect if it is between the start and + * end positions (inclusive) of this span. Returns true if the position intersects, false otherwise. + * @param position The position to check. + */ + intersectsWithPosition(position: number): boolean; + /** + * Returns the intersection with the given span, or undefined if there is no intersection. + * @param span The span to check. + */ + intersection(span: TextSpan): TextSpan; + /** + * Creates a new TextSpan from the given start and end positions + * as opposed to a position and length. + */ + static fromBounds(start: number, end: number): TextSpan; + } + class TextChangeRange { + static unchanged: TextChangeRange; + private _span; + private _newLength; + /** + * Initializes a new instance of TextChangeRange. + */ + constructor(span: TextSpan, newLength: number); + /** + * The span of text before the edit which is being changed + */ + span(): TextSpan; + /** + * Width of the span after the edit. A 0 here would represent a delete + */ + newLength(): number; + newSpan(): TextSpan; + isUnchanged(): boolean; + /** + * Called to merge all the changes that occurred across several versions of a script snapshot + * into a single change. i.e. if a user keeps making successive edits to a script we will + * have a text change from V1 to V2, V2 to V3, ..., Vn. + * + * This function will then merge those changes into a single change range valid between V1 and + * Vn. + */ + static collapseChangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; + } + interface ClassifiedSpan { + textSpan: TextSpan; + classificationType: string; + } + interface NavigationBarItem { + text: string; + kind: string; + kindModifiers: string; + spans: TextSpan[]; + childItems: NavigationBarItem[]; + indent: number; + bolded: boolean; + grayed: boolean; + } + interface TodoCommentDescriptor { + text: string; + priority: number; + } + interface TodoComment { + descriptor: TodoCommentDescriptor; + message: string; + position: number; + } + class TextChange { + span: TextSpan; + newText: string; + } + interface RenameLocation { + textSpan: TextSpan; + fileName: string; + } + interface ReferenceEntry { + textSpan: TextSpan; + fileName: string; + isWriteAccess: boolean; + } + interface NavigateToItem { + name: string; + kind: string; + kindModifiers: string; + matchKind: string; + fileName: string; + textSpan: TextSpan; + containerName: string; + containerKind: string; + } + interface EditorOptions { + IndentSize: number; + TabSize: number; + NewLineCharacter: string; + ConvertTabsToSpaces: boolean; + } + interface FormatCodeOptions extends EditorOptions { + InsertSpaceAfterCommaDelimiter: boolean; + InsertSpaceAfterSemicolonInForStatements: boolean; + InsertSpaceBeforeAndAfterBinaryOperators: boolean; + InsertSpaceAfterKeywordsInControlFlowStatements: boolean; + InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; + InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; + PlaceOpenBraceOnNewLineForFunctions: boolean; + PlaceOpenBraceOnNewLineForControlBlocks: boolean; + } + interface DefinitionInfo { + fileName: string; + textSpan: TextSpan; + kind: string; + name: string; + containerKind: string; + containerName: string; + } + enum SymbolDisplayPartKind { + aliasName = 0, + className = 1, + enumName = 2, + fieldName = 3, + interfaceName = 4, + keyword = 5, + lineBreak = 6, + numericLiteral = 7, + stringLiteral = 8, + localName = 9, + methodName = 10, + moduleName = 11, + operator = 12, + parameterName = 13, + propertyName = 14, + punctuation = 15, + space = 16, + text = 17, + typeParameterName = 18, + enumMemberName = 19, + functionName = 20, + regularExpressionLiteral = 21, + } + interface SymbolDisplayPart { + text: string; + kind: string; + } + interface QuickInfo { + kind: string; + kindModifiers: string; + textSpan: TextSpan; + displayParts: SymbolDisplayPart[]; + documentation: SymbolDisplayPart[]; + } + interface RenameInfo { + canRename: boolean; + localizedErrorMessage: string; + displayName: string; + fullDisplayName: string; + kind: string; + kindModifiers: string; + triggerSpan: TextSpan; + } + interface SignatureHelpParameter { + name: string; + documentation: SymbolDisplayPart[]; + displayParts: SymbolDisplayPart[]; + isOptional: boolean; + } + /** + * Represents a single signature to show in signature help. + * The id is used for subsequent calls into the language service to ask questions about the + * signature help item in the context of any documents that have been updated. i.e. after + * an edit has happened, while signature help is still active, the host can ask important + * questions like 'what parameter is the user currently contained within?'. + */ + interface SignatureHelpItem { + isVariadic: boolean; + prefixDisplayParts: SymbolDisplayPart[]; + suffixDisplayParts: SymbolDisplayPart[]; + separatorDisplayParts: SymbolDisplayPart[]; + parameters: SignatureHelpParameter[]; + documentation: SymbolDisplayPart[]; + } + /** + * Represents a set of signature help items, and the preferred item that should be selected. + */ + interface SignatureHelpItems { + items: SignatureHelpItem[]; + applicableSpan: TextSpan; + selectedItemIndex: number; + argumentIndex: number; + argumentCount: number; + } + interface CompletionInfo { + isMemberCompletion: boolean; + entries: CompletionEntry[]; + } + interface CompletionEntry { + name: string; + kind: string; + kindModifiers: string; + } + interface CompletionEntryDetails { + name: string; + kind: string; + kindModifiers: string; + displayParts: SymbolDisplayPart[]; + documentation: SymbolDisplayPart[]; + } + interface OutliningSpan { + /** The span of the document to actually collapse. */ + textSpan: TextSpan; + /** The span of the document to display when the user hovers over the collapsed span. */ + hintSpan: TextSpan; + /** The text to display in the editor for the collapsed region. */ + bannerText: string; + /** + * Whether or not this region should be automatically collapsed when + * the 'Collapse to Definitions' command is invoked. + */ + autoCollapse: boolean; + } + interface EmitOutput { + outputFiles: OutputFile[]; + emitOutputStatus: EmitReturnStatus; + } + const enum OutputFileType { + JavaScript = 0, + SourceMap = 1, + Declaration = 2, + } + interface OutputFile { + name: string; + writeByteOrderMark: boolean; + text: string; + } + const enum EndOfLineState { + Start = 0, + InMultiLineCommentTrivia = 1, + InSingleQuoteStringLiteral = 2, + InDoubleQuoteStringLiteral = 3, + } + enum TokenClass { + Punctuation = 0, + Keyword = 1, + Operator = 2, + Comment = 3, + Whitespace = 4, + Identifier = 5, + NumberLiteral = 6, + StringLiteral = 7, + RegExpLiteral = 8, + } + interface ClassificationResult { + finalLexState: EndOfLineState; + entries: ClassificationInfo[]; + } + interface ClassificationInfo { + length: number; + classification: TokenClass; + } + interface Classifier { + getClassificationsForLine(text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean): ClassificationResult; + } + interface DocumentRegistry { + acquireDocument(filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean): SourceFile; + updateDocument(sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; + releaseDocument(filename: string, compilationSettings: CompilerOptions): void; + } + class ScriptElementKind { + static unknown: string; + static keyword: string; + static scriptElement: string; + static moduleElement: string; + static classElement: string; + static interfaceElement: string; + static typeElement: string; + static enumElement: string; + static variableElement: string; + static localVariableElement: string; + static functionElement: string; + static localFunctionElement: string; + static memberFunctionElement: string; + static memberGetAccessorElement: string; + static memberSetAccessorElement: string; + static memberVariableElement: string; + static constructorImplementationElement: string; + static callSignatureElement: string; + static indexSignatureElement: string; + static constructSignatureElement: string; + static parameterElement: string; + static typeParameterElement: string; + static primitiveType: string; + static label: string; + static alias: string; + static constElement: string; + static letElement: string; + } + class ScriptElementKindModifier { + static none: string; + static publicMemberModifier: string; + static privateMemberModifier: string; + static protectedMemberModifier: string; + static exportedModifier: string; + static ambientModifier: string; + static staticModifier: string; + } + class ClassificationTypeNames { + static comment: string; + static identifier: string; + static keyword: string; + static numericLiteral: string; + static operator: string; + static stringLiteral: string; + static whiteSpace: string; + static text: string; + static punctuation: string; + static className: string; + static enumName: string; + static interfaceName: string; + static moduleName: string; + static typeParameterName: string; + } + function displayPartsToString(displayParts: SymbolDisplayPart[]): string; + interface DisplayPartsSymbolWriter extends SymbolWriter { + displayParts(): SymbolDisplayPart[]; + } + function getDefaultCompilerOptions(): CompilerOptions; + class OperationCanceledException { + } + class CancellationTokenObject { + private cancellationToken; + static None: CancellationTokenObject; + constructor(cancellationToken: CancellationToken); + isCancellationRequested(): boolean; + throwIfCancellationRequested(): void; + } + function createDocumentRegistry(): DocumentRegistry; + function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; + function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry): LanguageService; + function createClassifier(host: Logger): Classifier; +} + +export = ts; + +//// [APISample_node_compile.js] +var ts = require("typescript"); +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", 2 /* Latest */, "0.0"); +var program = ts.createProgram(["file1.ts"], {}, undefined); diff --git a/tests/baselines/reference/APISample_node_compile.types b/tests/baselines/reference/APISample_node_compile.types new file mode 100644 index 00000000000..15aa4b13a2e --- /dev/null +++ b/tests/baselines/reference/APISample_node_compile.types @@ -0,0 +1,5647 @@ +=== tests/cases/compiler/APISample_node_compile.ts === + +import ts = require("typescript"); +>ts : typeof ts + +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); +>sourceFile : ts.SourceFile +>ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0") : ts.SourceFile +>ts.createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, version: string, isOpen?: boolean) => ts.SourceFile +>ts : typeof ts +>createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, version: string, isOpen?: boolean) => ts.SourceFile +>ts.ScriptTarget.Latest : ts.ScriptTarget +>ts.ScriptTarget : typeof ts.ScriptTarget +>ts : typeof ts +>ScriptTarget : typeof ts.ScriptTarget +>Latest : ts.ScriptTarget + +var program = ts.createProgram(["file1.ts"], {}, undefined); +>program : ts.Program +>ts.createProgram(["file1.ts"], {}, undefined) : ts.Program +>ts.createProgram : (rootNames: string[], options: ts.CompilerOptions, host: ts.CompilerHost) => ts.Program +>ts : typeof ts +>createProgram : (rootNames: string[], options: ts.CompilerOptions, host: ts.CompilerHost) => ts.Program +>["file1.ts"] : string[] +>{} : { [x: string]: undefined; } +>undefined : undefined + +=== typescript.d.ts === +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + +declare module ts { +>ts : typeof ts + + interface Map { +>Map : Map +>T : T + + [index: string]: T; +>index : string +>T : T + } + interface TextRange { +>TextRange : TextRange + + pos: number; +>pos : number + + end: number; +>end : number + } + const enum SyntaxKind { +>SyntaxKind : SyntaxKind + + Unknown = 0, +>Unknown : SyntaxKind + + EndOfFileToken = 1, +>EndOfFileToken : SyntaxKind + + SingleLineCommentTrivia = 2, +>SingleLineCommentTrivia : SyntaxKind + + MultiLineCommentTrivia = 3, +>MultiLineCommentTrivia : SyntaxKind + + NewLineTrivia = 4, +>NewLineTrivia : SyntaxKind + + WhitespaceTrivia = 5, +>WhitespaceTrivia : SyntaxKind + + NumericLiteral = 6, +>NumericLiteral : SyntaxKind + + StringLiteral = 7, +>StringLiteral : SyntaxKind + + RegularExpressionLiteral = 8, +>RegularExpressionLiteral : SyntaxKind + + NoSubstitutionTemplateLiteral = 9, +>NoSubstitutionTemplateLiteral : SyntaxKind + + TemplateHead = 10, +>TemplateHead : SyntaxKind + + TemplateMiddle = 11, +>TemplateMiddle : SyntaxKind + + TemplateTail = 12, +>TemplateTail : SyntaxKind + + OpenBraceToken = 13, +>OpenBraceToken : SyntaxKind + + CloseBraceToken = 14, +>CloseBraceToken : SyntaxKind + + OpenParenToken = 15, +>OpenParenToken : SyntaxKind + + CloseParenToken = 16, +>CloseParenToken : SyntaxKind + + OpenBracketToken = 17, +>OpenBracketToken : SyntaxKind + + CloseBracketToken = 18, +>CloseBracketToken : SyntaxKind + + DotToken = 19, +>DotToken : SyntaxKind + + DotDotDotToken = 20, +>DotDotDotToken : SyntaxKind + + SemicolonToken = 21, +>SemicolonToken : SyntaxKind + + CommaToken = 22, +>CommaToken : SyntaxKind + + LessThanToken = 23, +>LessThanToken : SyntaxKind + + GreaterThanToken = 24, +>GreaterThanToken : SyntaxKind + + LessThanEqualsToken = 25, +>LessThanEqualsToken : SyntaxKind + + GreaterThanEqualsToken = 26, +>GreaterThanEqualsToken : SyntaxKind + + EqualsEqualsToken = 27, +>EqualsEqualsToken : SyntaxKind + + ExclamationEqualsToken = 28, +>ExclamationEqualsToken : SyntaxKind + + EqualsEqualsEqualsToken = 29, +>EqualsEqualsEqualsToken : SyntaxKind + + ExclamationEqualsEqualsToken = 30, +>ExclamationEqualsEqualsToken : SyntaxKind + + EqualsGreaterThanToken = 31, +>EqualsGreaterThanToken : SyntaxKind + + PlusToken = 32, +>PlusToken : SyntaxKind + + MinusToken = 33, +>MinusToken : SyntaxKind + + AsteriskToken = 34, +>AsteriskToken : SyntaxKind + + SlashToken = 35, +>SlashToken : SyntaxKind + + PercentToken = 36, +>PercentToken : SyntaxKind + + PlusPlusToken = 37, +>PlusPlusToken : SyntaxKind + + MinusMinusToken = 38, +>MinusMinusToken : SyntaxKind + + LessThanLessThanToken = 39, +>LessThanLessThanToken : SyntaxKind + + GreaterThanGreaterThanToken = 40, +>GreaterThanGreaterThanToken : SyntaxKind + + GreaterThanGreaterThanGreaterThanToken = 41, +>GreaterThanGreaterThanGreaterThanToken : SyntaxKind + + AmpersandToken = 42, +>AmpersandToken : SyntaxKind + + BarToken = 43, +>BarToken : SyntaxKind + + CaretToken = 44, +>CaretToken : SyntaxKind + + ExclamationToken = 45, +>ExclamationToken : SyntaxKind + + TildeToken = 46, +>TildeToken : SyntaxKind + + AmpersandAmpersandToken = 47, +>AmpersandAmpersandToken : SyntaxKind + + BarBarToken = 48, +>BarBarToken : SyntaxKind + + QuestionToken = 49, +>QuestionToken : SyntaxKind + + ColonToken = 50, +>ColonToken : SyntaxKind + + EqualsToken = 51, +>EqualsToken : SyntaxKind + + PlusEqualsToken = 52, +>PlusEqualsToken : SyntaxKind + + MinusEqualsToken = 53, +>MinusEqualsToken : SyntaxKind + + AsteriskEqualsToken = 54, +>AsteriskEqualsToken : SyntaxKind + + SlashEqualsToken = 55, +>SlashEqualsToken : SyntaxKind + + PercentEqualsToken = 56, +>PercentEqualsToken : SyntaxKind + + LessThanLessThanEqualsToken = 57, +>LessThanLessThanEqualsToken : SyntaxKind + + GreaterThanGreaterThanEqualsToken = 58, +>GreaterThanGreaterThanEqualsToken : SyntaxKind + + GreaterThanGreaterThanGreaterThanEqualsToken = 59, +>GreaterThanGreaterThanGreaterThanEqualsToken : SyntaxKind + + AmpersandEqualsToken = 60, +>AmpersandEqualsToken : SyntaxKind + + BarEqualsToken = 61, +>BarEqualsToken : SyntaxKind + + CaretEqualsToken = 62, +>CaretEqualsToken : SyntaxKind + + Identifier = 63, +>Identifier : SyntaxKind + + BreakKeyword = 64, +>BreakKeyword : SyntaxKind + + CaseKeyword = 65, +>CaseKeyword : SyntaxKind + + CatchKeyword = 66, +>CatchKeyword : SyntaxKind + + ClassKeyword = 67, +>ClassKeyword : SyntaxKind + + ConstKeyword = 68, +>ConstKeyword : SyntaxKind + + ContinueKeyword = 69, +>ContinueKeyword : SyntaxKind + + DebuggerKeyword = 70, +>DebuggerKeyword : SyntaxKind + + DefaultKeyword = 71, +>DefaultKeyword : SyntaxKind + + DeleteKeyword = 72, +>DeleteKeyword : SyntaxKind + + DoKeyword = 73, +>DoKeyword : SyntaxKind + + ElseKeyword = 74, +>ElseKeyword : SyntaxKind + + EnumKeyword = 75, +>EnumKeyword : SyntaxKind + + ExportKeyword = 76, +>ExportKeyword : SyntaxKind + + ExtendsKeyword = 77, +>ExtendsKeyword : SyntaxKind + + FalseKeyword = 78, +>FalseKeyword : SyntaxKind + + FinallyKeyword = 79, +>FinallyKeyword : SyntaxKind + + ForKeyword = 80, +>ForKeyword : SyntaxKind + + FunctionKeyword = 81, +>FunctionKeyword : SyntaxKind + + IfKeyword = 82, +>IfKeyword : SyntaxKind + + ImportKeyword = 83, +>ImportKeyword : SyntaxKind + + InKeyword = 84, +>InKeyword : SyntaxKind + + InstanceOfKeyword = 85, +>InstanceOfKeyword : SyntaxKind + + NewKeyword = 86, +>NewKeyword : SyntaxKind + + NullKeyword = 87, +>NullKeyword : SyntaxKind + + ReturnKeyword = 88, +>ReturnKeyword : SyntaxKind + + SuperKeyword = 89, +>SuperKeyword : SyntaxKind + + SwitchKeyword = 90, +>SwitchKeyword : SyntaxKind + + ThisKeyword = 91, +>ThisKeyword : SyntaxKind + + ThrowKeyword = 92, +>ThrowKeyword : SyntaxKind + + TrueKeyword = 93, +>TrueKeyword : SyntaxKind + + TryKeyword = 94, +>TryKeyword : SyntaxKind + + TypeOfKeyword = 95, +>TypeOfKeyword : SyntaxKind + + VarKeyword = 96, +>VarKeyword : SyntaxKind + + VoidKeyword = 97, +>VoidKeyword : SyntaxKind + + WhileKeyword = 98, +>WhileKeyword : SyntaxKind + + WithKeyword = 99, +>WithKeyword : SyntaxKind + + ImplementsKeyword = 100, +>ImplementsKeyword : SyntaxKind + + InterfaceKeyword = 101, +>InterfaceKeyword : SyntaxKind + + LetKeyword = 102, +>LetKeyword : SyntaxKind + + PackageKeyword = 103, +>PackageKeyword : SyntaxKind + + PrivateKeyword = 104, +>PrivateKeyword : SyntaxKind + + ProtectedKeyword = 105, +>ProtectedKeyword : SyntaxKind + + PublicKeyword = 106, +>PublicKeyword : SyntaxKind + + StaticKeyword = 107, +>StaticKeyword : SyntaxKind + + YieldKeyword = 108, +>YieldKeyword : SyntaxKind + + AnyKeyword = 109, +>AnyKeyword : SyntaxKind + + BooleanKeyword = 110, +>BooleanKeyword : SyntaxKind + + ConstructorKeyword = 111, +>ConstructorKeyword : SyntaxKind + + DeclareKeyword = 112, +>DeclareKeyword : SyntaxKind + + GetKeyword = 113, +>GetKeyword : SyntaxKind + + ModuleKeyword = 114, +>ModuleKeyword : SyntaxKind + + RequireKeyword = 115, +>RequireKeyword : SyntaxKind + + NumberKeyword = 116, +>NumberKeyword : SyntaxKind + + SetKeyword = 117, +>SetKeyword : SyntaxKind + + StringKeyword = 118, +>StringKeyword : SyntaxKind + + TypeKeyword = 119, +>TypeKeyword : SyntaxKind + + Missing = 120, +>Missing : SyntaxKind + + QualifiedName = 121, +>QualifiedName : SyntaxKind + + ComputedPropertyName = 122, +>ComputedPropertyName : SyntaxKind + + TypeParameter = 123, +>TypeParameter : SyntaxKind + + Parameter = 124, +>Parameter : SyntaxKind + + Property = 125, +>Property : SyntaxKind + + Method = 126, +>Method : SyntaxKind + + Constructor = 127, +>Constructor : SyntaxKind + + GetAccessor = 128, +>GetAccessor : SyntaxKind + + SetAccessor = 129, +>SetAccessor : SyntaxKind + + CallSignature = 130, +>CallSignature : SyntaxKind + + ConstructSignature = 131, +>ConstructSignature : SyntaxKind + + IndexSignature = 132, +>IndexSignature : SyntaxKind + + TypeReference = 133, +>TypeReference : SyntaxKind + + FunctionType = 134, +>FunctionType : SyntaxKind + + ConstructorType = 135, +>ConstructorType : SyntaxKind + + TypeQuery = 136, +>TypeQuery : SyntaxKind + + TypeLiteral = 137, +>TypeLiteral : SyntaxKind + + ArrayType = 138, +>ArrayType : SyntaxKind + + TupleType = 139, +>TupleType : SyntaxKind + + UnionType = 140, +>UnionType : SyntaxKind + + ParenthesizedType = 141, +>ParenthesizedType : SyntaxKind + + ArrayLiteralExpression = 142, +>ArrayLiteralExpression : SyntaxKind + + ObjectLiteralExpression = 143, +>ObjectLiteralExpression : SyntaxKind + + PropertyAccessExpression = 144, +>PropertyAccessExpression : SyntaxKind + + ElementAccessExpression = 145, +>ElementAccessExpression : SyntaxKind + + CallExpression = 146, +>CallExpression : SyntaxKind + + NewExpression = 147, +>NewExpression : SyntaxKind + + TaggedTemplateExpression = 148, +>TaggedTemplateExpression : SyntaxKind + + TypeAssertionExpression = 149, +>TypeAssertionExpression : SyntaxKind + + ParenthesizedExpression = 150, +>ParenthesizedExpression : SyntaxKind + + FunctionExpression = 151, +>FunctionExpression : SyntaxKind + + ArrowFunction = 152, +>ArrowFunction : SyntaxKind + + DeleteExpression = 153, +>DeleteExpression : SyntaxKind + + TypeOfExpression = 154, +>TypeOfExpression : SyntaxKind + + VoidExpression = 155, +>VoidExpression : SyntaxKind + + PrefixUnaryExpression = 156, +>PrefixUnaryExpression : SyntaxKind + + PostfixUnaryExpression = 157, +>PostfixUnaryExpression : SyntaxKind + + BinaryExpression = 158, +>BinaryExpression : SyntaxKind + + ConditionalExpression = 159, +>ConditionalExpression : SyntaxKind + + TemplateExpression = 160, +>TemplateExpression : SyntaxKind + + YieldExpression = 161, +>YieldExpression : SyntaxKind + + OmittedExpression = 162, +>OmittedExpression : SyntaxKind + + TemplateSpan = 163, +>TemplateSpan : SyntaxKind + + Block = 164, +>Block : SyntaxKind + + VariableStatement = 165, +>VariableStatement : SyntaxKind + + EmptyStatement = 166, +>EmptyStatement : SyntaxKind + + ExpressionStatement = 167, +>ExpressionStatement : SyntaxKind + + IfStatement = 168, +>IfStatement : SyntaxKind + + DoStatement = 169, +>DoStatement : SyntaxKind + + WhileStatement = 170, +>WhileStatement : SyntaxKind + + ForStatement = 171, +>ForStatement : SyntaxKind + + ForInStatement = 172, +>ForInStatement : SyntaxKind + + ContinueStatement = 173, +>ContinueStatement : SyntaxKind + + BreakStatement = 174, +>BreakStatement : SyntaxKind + + ReturnStatement = 175, +>ReturnStatement : SyntaxKind + + WithStatement = 176, +>WithStatement : SyntaxKind + + SwitchStatement = 177, +>SwitchStatement : SyntaxKind + + LabeledStatement = 178, +>LabeledStatement : SyntaxKind + + ThrowStatement = 179, +>ThrowStatement : SyntaxKind + + TryStatement = 180, +>TryStatement : SyntaxKind + + TryBlock = 181, +>TryBlock : SyntaxKind + + CatchBlock = 182, +>CatchBlock : SyntaxKind + + FinallyBlock = 183, +>FinallyBlock : SyntaxKind + + DebuggerStatement = 184, +>DebuggerStatement : SyntaxKind + + VariableDeclaration = 185, +>VariableDeclaration : SyntaxKind + + FunctionDeclaration = 186, +>FunctionDeclaration : SyntaxKind + + FunctionBlock = 187, +>FunctionBlock : SyntaxKind + + ClassDeclaration = 188, +>ClassDeclaration : SyntaxKind + + InterfaceDeclaration = 189, +>InterfaceDeclaration : SyntaxKind + + TypeAliasDeclaration = 190, +>TypeAliasDeclaration : SyntaxKind + + EnumDeclaration = 191, +>EnumDeclaration : SyntaxKind + + ModuleDeclaration = 192, +>ModuleDeclaration : SyntaxKind + + ModuleBlock = 193, +>ModuleBlock : SyntaxKind + + ImportDeclaration = 194, +>ImportDeclaration : SyntaxKind + + ExportAssignment = 195, +>ExportAssignment : SyntaxKind + + CaseClause = 196, +>CaseClause : SyntaxKind + + DefaultClause = 197, +>DefaultClause : SyntaxKind + + HeritageClause = 198, +>HeritageClause : SyntaxKind + + PropertyAssignment = 199, +>PropertyAssignment : SyntaxKind + + ShorthandPropertyAssignment = 200, +>ShorthandPropertyAssignment : SyntaxKind + + EnumMember = 201, +>EnumMember : SyntaxKind + + SourceFile = 202, +>SourceFile : SyntaxKind + + Program = 203, +>Program : SyntaxKind + + SyntaxList = 204, +>SyntaxList : SyntaxKind + + Count = 205, +>Count : SyntaxKind + + FirstAssignment = 51, +>FirstAssignment : SyntaxKind + + LastAssignment = 62, +>LastAssignment : SyntaxKind + + FirstReservedWord = 64, +>FirstReservedWord : SyntaxKind + + LastReservedWord = 99, +>LastReservedWord : SyntaxKind + + FirstKeyword = 64, +>FirstKeyword : SyntaxKind + + LastKeyword = 119, +>LastKeyword : SyntaxKind + + FirstFutureReservedWord = 100, +>FirstFutureReservedWord : SyntaxKind + + LastFutureReservedWord = 108, +>LastFutureReservedWord : SyntaxKind + + FirstTypeNode = 133, +>FirstTypeNode : SyntaxKind + + LastTypeNode = 141, +>LastTypeNode : SyntaxKind + + FirstPunctuation = 13, +>FirstPunctuation : SyntaxKind + + LastPunctuation = 62, +>LastPunctuation : SyntaxKind + + FirstToken = 1, +>FirstToken : SyntaxKind + + LastToken = 119, +>LastToken : SyntaxKind + + FirstTriviaToken = 2, +>FirstTriviaToken : SyntaxKind + + LastTriviaToken = 5, +>LastTriviaToken : SyntaxKind + + FirstLiteralToken = 6, +>FirstLiteralToken : SyntaxKind + + LastLiteralToken = 9, +>LastLiteralToken : SyntaxKind + + FirstTemplateToken = 9, +>FirstTemplateToken : SyntaxKind + + LastTemplateToken = 12, +>LastTemplateToken : SyntaxKind + + FirstOperator = 21, +>FirstOperator : SyntaxKind + + LastOperator = 62, +>LastOperator : SyntaxKind + + FirstBinaryOperator = 23, +>FirstBinaryOperator : SyntaxKind + + LastBinaryOperator = 62, +>LastBinaryOperator : SyntaxKind + } + const enum NodeFlags { +>NodeFlags : NodeFlags + + Export = 1, +>Export : NodeFlags + + Ambient = 2, +>Ambient : NodeFlags + + QuestionMark = 4, +>QuestionMark : NodeFlags + + Rest = 8, +>Rest : NodeFlags + + Public = 16, +>Public : NodeFlags + + Private = 32, +>Private : NodeFlags + + Protected = 64, +>Protected : NodeFlags + + Static = 128, +>Static : NodeFlags + + MultiLine = 256, +>MultiLine : NodeFlags + + Synthetic = 512, +>Synthetic : NodeFlags + + DeclarationFile = 1024, +>DeclarationFile : NodeFlags + + Let = 2048, +>Let : NodeFlags + + Const = 4096, +>Const : NodeFlags + + OctalLiteral = 8192, +>OctalLiteral : NodeFlags + + Modifier = 243, +>Modifier : NodeFlags + + AccessibilityModifier = 112, +>AccessibilityModifier : NodeFlags + + BlockScoped = 6144, +>BlockScoped : NodeFlags + } + const enum ParserContextFlags { +>ParserContextFlags : ParserContextFlags + + StrictMode = 1, +>StrictMode : ParserContextFlags + + DisallowIn = 2, +>DisallowIn : ParserContextFlags + + Yield = 4, +>Yield : ParserContextFlags + + GeneratorParameter = 8, +>GeneratorParameter : ParserContextFlags + } + interface Node extends TextRange { +>Node : Node +>TextRange : TextRange + + kind: SyntaxKind; +>kind : SyntaxKind +>SyntaxKind : SyntaxKind + + flags: NodeFlags; +>flags : NodeFlags +>NodeFlags : NodeFlags + + parserContextFlags?: ParserContextFlags; +>parserContextFlags : ParserContextFlags +>ParserContextFlags : ParserContextFlags + + id?: number; +>id : number + + parent?: Node; +>parent : Node +>Node : Node + + symbol?: Symbol; +>symbol : Symbol +>Symbol : Symbol + + locals?: SymbolTable; +>locals : SymbolTable +>SymbolTable : SymbolTable + + nextContainer?: Node; +>nextContainer : Node +>Node : Node + + localSymbol?: Symbol; +>localSymbol : Symbol +>Symbol : Symbol + + modifiers?: ModifiersArray; +>modifiers : ModifiersArray +>ModifiersArray : ModifiersArray + } + interface NodeArray extends Array, TextRange { +>NodeArray : NodeArray +>T : T +>Array : T[] +>T : T +>TextRange : TextRange + + hasTrailingComma?: boolean; +>hasTrailingComma : boolean + } + interface ModifiersArray extends Array { +>ModifiersArray : ModifiersArray +>Array : T[] +>Node : Node + + flags: number; +>flags : number + } + interface Identifier extends PrimaryExpression { +>Identifier : Identifier +>PrimaryExpression : PrimaryExpression + + text: string; +>text : string + } + interface QualifiedName extends Node { +>QualifiedName : QualifiedName +>Node : Node + + left: EntityName; +>left : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName + + right: Identifier; +>right : Identifier +>Identifier : Identifier + } + type EntityName = Identifier | QualifiedName; +>EntityName : Identifier | QualifiedName +>Identifier : Identifier +>QualifiedName : QualifiedName + + interface ParsedSignature { +>ParsedSignature : ParsedSignature + + typeParameters?: NodeArray; +>typeParameters : NodeArray +>NodeArray : NodeArray +>TypeParameterDeclaration : TypeParameterDeclaration + + parameters: NodeArray; +>parameters : NodeArray +>NodeArray : NodeArray +>ParameterDeclaration : ParameterDeclaration + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + } + type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName +>Identifier : Identifier +>LiteralExpression : LiteralExpression +>ComputedPropertyName : ComputedPropertyName + + interface Declaration extends Node { +>Declaration : Declaration +>Node : Node + + _declarationBrand: any; +>_declarationBrand : any + + name?: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName + } + interface ComputedPropertyName extends Node { +>ComputedPropertyName : ComputedPropertyName +>Node : Node + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface TypeParameterDeclaration extends Declaration { +>TypeParameterDeclaration : TypeParameterDeclaration +>Declaration : Declaration + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + constraint?: TypeNode; +>constraint : TypeNode +>TypeNode : TypeNode + + expression?: Expression; +>expression : Expression +>Expression : Expression + } + interface SignatureDeclaration extends Declaration, ParsedSignature { +>SignatureDeclaration : SignatureDeclaration +>Declaration : Declaration +>ParsedSignature : ParsedSignature + } + interface VariableDeclaration extends Declaration { +>VariableDeclaration : VariableDeclaration +>Declaration : Declaration + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + interface PropertyDeclaration extends Declaration, ClassElement { +>PropertyDeclaration : PropertyDeclaration +>Declaration : Declaration +>ClassElement : ClassElement + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + interface ShortHandPropertyDeclaration extends Declaration { +>ShortHandPropertyDeclaration : ShortHandPropertyDeclaration +>Declaration : Declaration + + name: Identifier; +>name : Identifier +>Identifier : Identifier + } + interface ParameterDeclaration extends VariableDeclaration { +>ParameterDeclaration : ParameterDeclaration +>VariableDeclaration : VariableDeclaration + } + /** + * Several node kinds share function-like features such as a signature, + * a name, and a body. These nodes should extend FunctionLikeDeclaration. + * Examples: + * FunctionDeclaration + * MethodDeclaration + * AccessorDeclaration + */ + interface FunctionLikeDeclaration extends SignatureDeclaration { +>FunctionLikeDeclaration : FunctionLikeDeclaration +>SignatureDeclaration : SignatureDeclaration + + _functionLikeDeclarationBrand: any; +>_functionLikeDeclarationBrand : any + + asteriskToken?: Node; +>asteriskToken : Node +>Node : Node + + body?: Block | Expression; +>body : Expression | Block +>Block : Block +>Expression : Expression + } + interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { +>FunctionDeclaration : FunctionDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>Statement : Statement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + body?: Block; +>body : Block +>Block : Block + } + interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement { +>MethodDeclaration : MethodDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>ClassElement : ClassElement + + body?: Block; +>body : Block +>Block : Block + } + interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { +>ConstructorDeclaration : ConstructorDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>ClassElement : ClassElement + + body?: Block; +>body : Block +>Block : Block + } + interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement { +>AccessorDeclaration : AccessorDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>ClassElement : ClassElement + + body?: Block; +>body : Block +>Block : Block + } + interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { +>IndexSignatureDeclaration : IndexSignatureDeclaration +>SignatureDeclaration : SignatureDeclaration +>ClassElement : ClassElement + + _indexSignatureDeclarationBrand: any; +>_indexSignatureDeclarationBrand : any + } + interface TypeNode extends Node { +>TypeNode : TypeNode +>Node : Node + } + interface TypeReferenceNode extends TypeNode { +>TypeReferenceNode : TypeReferenceNode +>TypeNode : TypeNode + + typeName: EntityName; +>typeName : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName + + typeArguments?: NodeArray; +>typeArguments : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + } + interface TypeQueryNode extends TypeNode { +>TypeQueryNode : TypeQueryNode +>TypeNode : TypeNode + + exprName: EntityName; +>exprName : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName + } + interface TypeLiteralNode extends TypeNode, Declaration { +>TypeLiteralNode : TypeLiteralNode +>TypeNode : TypeNode +>Declaration : Declaration + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>Node : Node + } + interface ArrayTypeNode extends TypeNode { +>ArrayTypeNode : ArrayTypeNode +>TypeNode : TypeNode + + elementType: TypeNode; +>elementType : TypeNode +>TypeNode : TypeNode + } + interface TupleTypeNode extends TypeNode { +>TupleTypeNode : TupleTypeNode +>TypeNode : TypeNode + + elementTypes: NodeArray; +>elementTypes : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + } + interface UnionTypeNode extends TypeNode { +>UnionTypeNode : UnionTypeNode +>TypeNode : TypeNode + + types: NodeArray; +>types : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + } + interface ParenthesizedTypeNode extends TypeNode { +>ParenthesizedTypeNode : ParenthesizedTypeNode +>TypeNode : TypeNode + + type: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + } + interface StringLiteralTypeNode extends TypeNode { +>StringLiteralTypeNode : StringLiteralTypeNode +>TypeNode : TypeNode + + text: string; +>text : string + } + interface Expression extends Node { +>Expression : Expression +>Node : Node + + _expressionBrand: any; +>_expressionBrand : any + + contextualType?: Type; +>contextualType : Type +>Type : Type + } + interface UnaryExpression extends Expression { +>UnaryExpression : UnaryExpression +>Expression : Expression + + _unaryExpressionBrand: any; +>_unaryExpressionBrand : any + } + interface PrefixUnaryExpression extends UnaryExpression { +>PrefixUnaryExpression : PrefixUnaryExpression +>UnaryExpression : UnaryExpression + + operator: SyntaxKind; +>operator : SyntaxKind +>SyntaxKind : SyntaxKind + + operand: UnaryExpression; +>operand : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface PostfixUnaryExpression extends PostfixExpression { +>PostfixUnaryExpression : PostfixUnaryExpression +>PostfixExpression : PostfixExpression + + operand: LeftHandSideExpression; +>operand : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + operator: SyntaxKind; +>operator : SyntaxKind +>SyntaxKind : SyntaxKind + } + interface PostfixExpression extends UnaryExpression { +>PostfixExpression : PostfixExpression +>UnaryExpression : UnaryExpression + + _postfixExpressionBrand: any; +>_postfixExpressionBrand : any + } + interface LeftHandSideExpression extends PostfixExpression { +>LeftHandSideExpression : LeftHandSideExpression +>PostfixExpression : PostfixExpression + + _leftHandSideExpressionBrand: any; +>_leftHandSideExpressionBrand : any + } + interface MemberExpression extends LeftHandSideExpression { +>MemberExpression : MemberExpression +>LeftHandSideExpression : LeftHandSideExpression + + _memberExpressionBrand: any; +>_memberExpressionBrand : any + } + interface PrimaryExpression extends MemberExpression { +>PrimaryExpression : PrimaryExpression +>MemberExpression : MemberExpression + + _primaryExpressionBrand: any; +>_primaryExpressionBrand : any + } + interface DeleteExpression extends UnaryExpression { +>DeleteExpression : DeleteExpression +>UnaryExpression : UnaryExpression + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface TypeOfExpression extends UnaryExpression { +>TypeOfExpression : TypeOfExpression +>UnaryExpression : UnaryExpression + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface VoidExpression extends UnaryExpression { +>VoidExpression : VoidExpression +>UnaryExpression : UnaryExpression + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface YieldExpression extends Expression { +>YieldExpression : YieldExpression +>Expression : Expression + + asteriskToken?: Node; +>asteriskToken : Node +>Node : Node + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface BinaryExpression extends Expression { +>BinaryExpression : BinaryExpression +>Expression : Expression + + left: Expression; +>left : Expression +>Expression : Expression + + operator: SyntaxKind; +>operator : SyntaxKind +>SyntaxKind : SyntaxKind + + right: Expression; +>right : Expression +>Expression : Expression + } + interface ConditionalExpression extends Expression { +>ConditionalExpression : ConditionalExpression +>Expression : Expression + + condition: Expression; +>condition : Expression +>Expression : Expression + + whenTrue: Expression; +>whenTrue : Expression +>Expression : Expression + + whenFalse: Expression; +>whenFalse : Expression +>Expression : Expression + } + interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { +>FunctionExpression : FunctionExpression +>PrimaryExpression : PrimaryExpression +>FunctionLikeDeclaration : FunctionLikeDeclaration + + name?: Identifier; +>name : Identifier +>Identifier : Identifier + + body: Block | Expression; +>body : Expression | Block +>Block : Block +>Expression : Expression + } + interface LiteralExpression extends PrimaryExpression { +>LiteralExpression : LiteralExpression +>PrimaryExpression : PrimaryExpression + + text: string; +>text : string + } + interface TemplateExpression extends PrimaryExpression { +>TemplateExpression : TemplateExpression +>PrimaryExpression : PrimaryExpression + + head: LiteralExpression; +>head : LiteralExpression +>LiteralExpression : LiteralExpression + + templateSpans: NodeArray; +>templateSpans : NodeArray +>NodeArray : NodeArray +>TemplateSpan : TemplateSpan + } + interface TemplateSpan extends Node { +>TemplateSpan : TemplateSpan +>Node : Node + + expression: Expression; +>expression : Expression +>Expression : Expression + + literal: LiteralExpression; +>literal : LiteralExpression +>LiteralExpression : LiteralExpression + } + interface ParenthesizedExpression extends PrimaryExpression { +>ParenthesizedExpression : ParenthesizedExpression +>PrimaryExpression : PrimaryExpression + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface ArrayLiteralExpression extends PrimaryExpression { +>ArrayLiteralExpression : ArrayLiteralExpression +>PrimaryExpression : PrimaryExpression + + elements: NodeArray; +>elements : NodeArray +>NodeArray : NodeArray +>Expression : Expression + } + interface ObjectLiteralExpression extends PrimaryExpression, Declaration { +>ObjectLiteralExpression : ObjectLiteralExpression +>PrimaryExpression : PrimaryExpression +>Declaration : Declaration + + properties: NodeArray; +>properties : NodeArray +>NodeArray : NodeArray +>Declaration : Declaration + } + interface PropertyAccessExpression extends MemberExpression { +>PropertyAccessExpression : PropertyAccessExpression +>MemberExpression : MemberExpression + + expression: LeftHandSideExpression; +>expression : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + name: Identifier; +>name : Identifier +>Identifier : Identifier + } + interface ElementAccessExpression extends MemberExpression { +>ElementAccessExpression : ElementAccessExpression +>MemberExpression : MemberExpression + + expression: LeftHandSideExpression; +>expression : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + argumentExpression: Expression; +>argumentExpression : Expression +>Expression : Expression + } + interface CallExpression extends LeftHandSideExpression { +>CallExpression : CallExpression +>LeftHandSideExpression : LeftHandSideExpression + + expression: LeftHandSideExpression; +>expression : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + typeArguments?: NodeArray; +>typeArguments : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + + arguments: NodeArray; +>arguments : NodeArray +>NodeArray : NodeArray +>Expression : Expression + } + interface NewExpression extends CallExpression, PrimaryExpression { +>NewExpression : NewExpression +>CallExpression : CallExpression +>PrimaryExpression : PrimaryExpression + } + interface TaggedTemplateExpression extends MemberExpression { +>TaggedTemplateExpression : TaggedTemplateExpression +>MemberExpression : MemberExpression + + tag: LeftHandSideExpression; +>tag : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + template: LiteralExpression | TemplateExpression; +>template : LiteralExpression | TemplateExpression +>LiteralExpression : LiteralExpression +>TemplateExpression : TemplateExpression + } + type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression; +>CallLikeExpression : CallExpression | NewExpression | TaggedTemplateExpression +>CallExpression : CallExpression +>NewExpression : NewExpression +>TaggedTemplateExpression : TaggedTemplateExpression + + interface TypeAssertion extends UnaryExpression { +>TypeAssertion : TypeAssertion +>UnaryExpression : UnaryExpression + + type: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface Statement extends Node, ModuleElement { +>Statement : Statement +>Node : Node +>ModuleElement : ModuleElement + + _statementBrand: any; +>_statementBrand : any + } + interface Block extends Statement { +>Block : Block +>Statement : Statement + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>Statement : Statement + } + interface VariableStatement extends Statement { +>VariableStatement : VariableStatement +>Statement : Statement + + declarations: NodeArray; +>declarations : NodeArray +>NodeArray : NodeArray +>VariableDeclaration : VariableDeclaration + } + interface ExpressionStatement extends Statement { +>ExpressionStatement : ExpressionStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface IfStatement extends Statement { +>IfStatement : IfStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + + thenStatement: Statement; +>thenStatement : Statement +>Statement : Statement + + elseStatement?: Statement; +>elseStatement : Statement +>Statement : Statement + } + interface IterationStatement extends Statement { +>IterationStatement : IterationStatement +>Statement : Statement + + statement: Statement; +>statement : Statement +>Statement : Statement + } + interface DoStatement extends IterationStatement { +>DoStatement : DoStatement +>IterationStatement : IterationStatement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface WhileStatement extends IterationStatement { +>WhileStatement : WhileStatement +>IterationStatement : IterationStatement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface ForStatement extends IterationStatement { +>ForStatement : ForStatement +>IterationStatement : IterationStatement + + declarations?: NodeArray; +>declarations : NodeArray +>NodeArray : NodeArray +>VariableDeclaration : VariableDeclaration + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + + condition?: Expression; +>condition : Expression +>Expression : Expression + + iterator?: Expression; +>iterator : Expression +>Expression : Expression + } + interface ForInStatement extends IterationStatement { +>ForInStatement : ForInStatement +>IterationStatement : IterationStatement + + declarations?: NodeArray; +>declarations : NodeArray +>NodeArray : NodeArray +>VariableDeclaration : VariableDeclaration + + variable?: Expression; +>variable : Expression +>Expression : Expression + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface BreakOrContinueStatement extends Statement { +>BreakOrContinueStatement : BreakOrContinueStatement +>Statement : Statement + + label?: Identifier; +>label : Identifier +>Identifier : Identifier + } + interface ReturnStatement extends Statement { +>ReturnStatement : ReturnStatement +>Statement : Statement + + expression?: Expression; +>expression : Expression +>Expression : Expression + } + interface WithStatement extends Statement { +>WithStatement : WithStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + + statement: Statement; +>statement : Statement +>Statement : Statement + } + interface SwitchStatement extends Statement { +>SwitchStatement : SwitchStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + + clauses: NodeArray; +>clauses : NodeArray +>NodeArray : NodeArray +>CaseOrDefaultClause : CaseOrDefaultClause + } + interface CaseOrDefaultClause extends Node { +>CaseOrDefaultClause : CaseOrDefaultClause +>Node : Node + + expression?: Expression; +>expression : Expression +>Expression : Expression + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>Statement : Statement + } + interface LabeledStatement extends Statement { +>LabeledStatement : LabeledStatement +>Statement : Statement + + label: Identifier; +>label : Identifier +>Identifier : Identifier + + statement: Statement; +>statement : Statement +>Statement : Statement + } + interface ThrowStatement extends Statement { +>ThrowStatement : ThrowStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface TryStatement extends Statement { +>TryStatement : TryStatement +>Statement : Statement + + tryBlock: Block; +>tryBlock : Block +>Block : Block + + catchBlock?: CatchBlock; +>catchBlock : CatchBlock +>CatchBlock : CatchBlock + + finallyBlock?: Block; +>finallyBlock : Block +>Block : Block + } + interface CatchBlock extends Block, Declaration { +>CatchBlock : CatchBlock +>Block : Block +>Declaration : Declaration + + variable: Identifier; +>variable : Identifier +>Identifier : Identifier + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + } + interface ModuleElement extends Node { +>ModuleElement : ModuleElement +>Node : Node + + _moduleElementBrand: any; +>_moduleElementBrand : any + } + interface ClassDeclaration extends Declaration, ModuleElement { +>ClassDeclaration : ClassDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + typeParameters?: NodeArray; +>typeParameters : NodeArray +>NodeArray : NodeArray +>TypeParameterDeclaration : TypeParameterDeclaration + + heritageClauses?: NodeArray; +>heritageClauses : NodeArray +>NodeArray : NodeArray +>HeritageClause : HeritageClause + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>ClassElement : ClassElement + } + interface ClassElement extends Declaration { +>ClassElement : ClassElement +>Declaration : Declaration + + _classElementBrand: any; +>_classElementBrand : any + } + interface InterfaceDeclaration extends Declaration, ModuleElement { +>InterfaceDeclaration : InterfaceDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + typeParameters?: NodeArray; +>typeParameters : NodeArray +>NodeArray : NodeArray +>TypeParameterDeclaration : TypeParameterDeclaration + + heritageClauses?: NodeArray; +>heritageClauses : NodeArray +>NodeArray : NodeArray +>HeritageClause : HeritageClause + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>Declaration : Declaration + } + interface HeritageClause extends Node { +>HeritageClause : HeritageClause +>Node : Node + + token: SyntaxKind; +>token : SyntaxKind +>SyntaxKind : SyntaxKind + + types?: NodeArray; +>types : NodeArray +>NodeArray : NodeArray +>TypeReferenceNode : TypeReferenceNode + } + interface TypeAliasDeclaration extends Declaration, ModuleElement { +>TypeAliasDeclaration : TypeAliasDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + type: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + } + interface EnumMember extends Declaration { +>EnumMember : EnumMember +>Declaration : Declaration + + name: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + interface EnumDeclaration extends Declaration, ModuleElement { +>EnumDeclaration : EnumDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>EnumMember : EnumMember + } + interface ModuleDeclaration extends Declaration, ModuleElement { +>ModuleDeclaration : ModuleDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier | LiteralExpression; +>name : Identifier | LiteralExpression +>Identifier : Identifier +>LiteralExpression : LiteralExpression + + body: ModuleBlock | ModuleDeclaration; +>body : ModuleDeclaration | ModuleBlock +>ModuleBlock : ModuleBlock +>ModuleDeclaration : ModuleDeclaration + } + interface ModuleBlock extends Node, ModuleElement { +>ModuleBlock : ModuleBlock +>Node : Node +>ModuleElement : ModuleElement + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>ModuleElement : ModuleElement + } + interface ImportDeclaration extends Declaration, ModuleElement { +>ImportDeclaration : ImportDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + entityName?: EntityName; +>entityName : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName + + externalModuleName?: LiteralExpression; +>externalModuleName : LiteralExpression +>LiteralExpression : LiteralExpression + } + interface ExportAssignment extends Statement, ModuleElement { +>ExportAssignment : ExportAssignment +>Statement : Statement +>ModuleElement : ModuleElement + + exportName: Identifier; +>exportName : Identifier +>Identifier : Identifier + } + interface FileReference extends TextRange { +>FileReference : FileReference +>TextRange : TextRange + + filename: string; +>filename : string + } + interface CommentRange extends TextRange { +>CommentRange : CommentRange +>TextRange : TextRange + + hasTrailingNewLine?: boolean; +>hasTrailingNewLine : boolean + } + interface SourceFile extends Declaration { +>SourceFile : SourceFile +>Declaration : Declaration + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>ModuleElement : ModuleElement + + filename: string; +>filename : string + + text: string; +>text : string + + getLineAndCharacterFromPosition(position: number): LineAndCharacter; +>getLineAndCharacterFromPosition : (position: number) => LineAndCharacter +>position : number +>LineAndCharacter : LineAndCharacter + + getPositionFromLineAndCharacter(line: number, character: number): number; +>getPositionFromLineAndCharacter : (line: number, character: number) => number +>line : number +>character : number + + getLineStarts(): number[]; +>getLineStarts : () => number[] + + amdDependencies: string[]; +>amdDependencies : string[] + + amdModuleName: string; +>amdModuleName : string + + referencedFiles: FileReference[]; +>referencedFiles : FileReference[] +>FileReference : FileReference + + semanticDiagnostics: Diagnostic[]; +>semanticDiagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + parseDiagnostics: Diagnostic[]; +>parseDiagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + grammarDiagnostics: Diagnostic[]; +>grammarDiagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + getSyntacticDiagnostics(): Diagnostic[]; +>getSyntacticDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + hasNoDefaultLib: boolean; +>hasNoDefaultLib : boolean + + externalModuleIndicator: Node; +>externalModuleIndicator : Node +>Node : Node + + nodeCount: number; +>nodeCount : number + + identifierCount: number; +>identifierCount : number + + symbolCount: number; +>symbolCount : number + + isOpen: boolean; +>isOpen : boolean + + version: string; +>version : string + + languageVersion: ScriptTarget; +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget + + identifiers: Map; +>identifiers : Map +>Map : Map + } + interface Program { +>Program : Program + + getSourceFile(filename: string): SourceFile; +>getSourceFile : (filename: string) => SourceFile +>filename : string +>SourceFile : SourceFile + + getSourceFiles(): SourceFile[]; +>getSourceFiles : () => SourceFile[] +>SourceFile : SourceFile + + getCompilerOptions(): CompilerOptions; +>getCompilerOptions : () => CompilerOptions +>CompilerOptions : CompilerOptions + + getCompilerHost(): CompilerHost; +>getCompilerHost : () => CompilerHost +>CompilerHost : CompilerHost + + getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; +>getDiagnostics : (sourceFile?: SourceFile) => Diagnostic[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Diagnostic : Diagnostic + + getGlobalDiagnostics(): Diagnostic[]; +>getGlobalDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + getTypeChecker(fullTypeCheckMode: boolean): TypeChecker; +>getTypeChecker : (fullTypeCheckMode: boolean) => TypeChecker +>fullTypeCheckMode : boolean +>TypeChecker : TypeChecker + + getCommonSourceDirectory(): string; +>getCommonSourceDirectory : () => string + } + interface SourceMapSpan { +>SourceMapSpan : SourceMapSpan + + emittedLine: number; +>emittedLine : number + + emittedColumn: number; +>emittedColumn : number + + sourceLine: number; +>sourceLine : number + + sourceColumn: number; +>sourceColumn : number + + nameIndex?: number; +>nameIndex : number + + sourceIndex: number; +>sourceIndex : number + } + interface SourceMapData { +>SourceMapData : SourceMapData + + sourceMapFilePath: string; +>sourceMapFilePath : string + + jsSourceMappingURL: string; +>jsSourceMappingURL : string + + sourceMapFile: string; +>sourceMapFile : string + + sourceMapSourceRoot: string; +>sourceMapSourceRoot : string + + sourceMapSources: string[]; +>sourceMapSources : string[] + + inputSourceFileNames: string[]; +>inputSourceFileNames : string[] + + sourceMapNames?: string[]; +>sourceMapNames : string[] + + sourceMapMappings: string; +>sourceMapMappings : string + + sourceMapDecodedMappings: SourceMapSpan[]; +>sourceMapDecodedMappings : SourceMapSpan[] +>SourceMapSpan : SourceMapSpan + } + enum EmitReturnStatus { +>EmitReturnStatus : EmitReturnStatus + + Succeeded = 0, +>Succeeded : EmitReturnStatus + + AllOutputGenerationSkipped = 1, +>AllOutputGenerationSkipped : EmitReturnStatus + + JSGeneratedWithSemanticErrors = 2, +>JSGeneratedWithSemanticErrors : EmitReturnStatus + + DeclarationGenerationSkipped = 3, +>DeclarationGenerationSkipped : EmitReturnStatus + + EmitErrorsEncountered = 4, +>EmitErrorsEncountered : EmitReturnStatus + + CompilerOptionsErrors = 5, +>CompilerOptionsErrors : EmitReturnStatus + } + interface EmitResult { +>EmitResult : EmitResult + + emitResultStatus: EmitReturnStatus; +>emitResultStatus : EmitReturnStatus +>EmitReturnStatus : EmitReturnStatus + + diagnostics: Diagnostic[]; +>diagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + sourceMaps: SourceMapData[]; +>sourceMaps : SourceMapData[] +>SourceMapData : SourceMapData + } + interface TypeChecker { +>TypeChecker : TypeChecker + + getProgram(): Program; +>getProgram : () => Program +>Program : Program + + getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; +>getDiagnostics : (sourceFile?: SourceFile) => Diagnostic[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Diagnostic : Diagnostic + + getDeclarationDiagnostics(sourceFile: SourceFile): Diagnostic[]; +>getDeclarationDiagnostics : (sourceFile: SourceFile) => Diagnostic[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Diagnostic : Diagnostic + + getGlobalDiagnostics(): Diagnostic[]; +>getGlobalDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + getNodeCount(): number; +>getNodeCount : () => number + + getIdentifierCount(): number; +>getIdentifierCount : () => number + + getSymbolCount(): number; +>getSymbolCount : () => number + + getTypeCount(): number; +>getTypeCount : () => number + + checkProgram(): void; +>checkProgram : () => void + + emitFiles(targetSourceFile?: SourceFile): EmitResult; +>emitFiles : (targetSourceFile?: SourceFile) => EmitResult +>targetSourceFile : SourceFile +>SourceFile : SourceFile +>EmitResult : EmitResult + + getParentOfSymbol(symbol: Symbol): Symbol; +>getParentOfSymbol : (symbol: Symbol) => Symbol +>symbol : Symbol +>Symbol : Symbol +>Symbol : Symbol + + getNarrowedTypeOfSymbol(symbol: Symbol, node: Node): Type; +>getNarrowedTypeOfSymbol : (symbol: Symbol, node: Node) => Type +>symbol : Symbol +>Symbol : Symbol +>node : Node +>Node : Node +>Type : Type + + getDeclaredTypeOfSymbol(symbol: Symbol): Type; +>getDeclaredTypeOfSymbol : (symbol: Symbol) => Type +>symbol : Symbol +>Symbol : Symbol +>Type : Type + + getPropertiesOfType(type: Type): Symbol[]; +>getPropertiesOfType : (type: Type) => Symbol[] +>type : Type +>Type : Type +>Symbol : Symbol + + getPropertyOfType(type: Type, propertyName: string): Symbol; +>getPropertyOfType : (type: Type, propertyName: string) => Symbol +>type : Type +>Type : Type +>propertyName : string +>Symbol : Symbol + + getSignaturesOfType(type: Type, kind: SignatureKind): Signature[]; +>getSignaturesOfType : (type: Type, kind: SignatureKind) => Signature[] +>type : Type +>Type : Type +>kind : SignatureKind +>SignatureKind : SignatureKind +>Signature : Signature + + getIndexTypeOfType(type: Type, kind: IndexKind): Type; +>getIndexTypeOfType : (type: Type, kind: IndexKind) => Type +>type : Type +>Type : Type +>kind : IndexKind +>IndexKind : IndexKind +>Type : Type + + getReturnTypeOfSignature(signature: Signature): Type; +>getReturnTypeOfSignature : (signature: Signature) => Type +>signature : Signature +>Signature : Signature +>Type : Type + + getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; +>getSymbolsInScope : (location: Node, meaning: SymbolFlags) => Symbol[] +>location : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags +>Symbol : Symbol + + getSymbolInfo(node: Node): Symbol; +>getSymbolInfo : (node: Node) => Symbol +>node : Node +>Node : Node +>Symbol : Symbol + + getShorthandAssignmentValueSymbol(location: Node): Symbol; +>getShorthandAssignmentValueSymbol : (location: Node) => Symbol +>location : Node +>Node : Node +>Symbol : Symbol + + getTypeOfNode(node: Node): Type; +>getTypeOfNode : (node: Node) => Type +>node : Node +>Node : Node +>Type : Type + + typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; +>typeToString : (type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => string +>type : Type +>Type : Type +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; +>symbolToString : (symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) => string +>symbol : Symbol +>Symbol : Symbol +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags + + getSymbolDisplayBuilder(): SymbolDisplayBuilder; +>getSymbolDisplayBuilder : () => SymbolDisplayBuilder +>SymbolDisplayBuilder : SymbolDisplayBuilder + + getFullyQualifiedName(symbol: Symbol): string; +>getFullyQualifiedName : (symbol: Symbol) => string +>symbol : Symbol +>Symbol : Symbol + + getAugmentedPropertiesOfType(type: Type): Symbol[]; +>getAugmentedPropertiesOfType : (type: Type) => Symbol[] +>type : Type +>Type : Type +>Symbol : Symbol + + getRootSymbols(symbol: Symbol): Symbol[]; +>getRootSymbols : (symbol: Symbol) => Symbol[] +>symbol : Symbol +>Symbol : Symbol +>Symbol : Symbol + + getContextualType(node: Node): Type; +>getContextualType : (node: Node) => Type +>node : Node +>Node : Node +>Type : Type + + getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; +>getResolvedSignature : (node: CallExpression | NewExpression | TaggedTemplateExpression, candidatesOutArray?: Signature[]) => Signature +>node : CallExpression | NewExpression | TaggedTemplateExpression +>CallLikeExpression : CallExpression | NewExpression | TaggedTemplateExpression +>candidatesOutArray : Signature[] +>Signature : Signature +>Signature : Signature + + getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; +>getSignatureFromDeclaration : (declaration: SignatureDeclaration) => Signature +>declaration : SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration +>Signature : Signature + + isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; +>isImplementationOfOverload : (node: FunctionLikeDeclaration) => boolean +>node : FunctionLikeDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration + + isUndefinedSymbol(symbol: Symbol): boolean; +>isUndefinedSymbol : (symbol: Symbol) => boolean +>symbol : Symbol +>Symbol : Symbol + + isArgumentsSymbol(symbol: Symbol): boolean; +>isArgumentsSymbol : (symbol: Symbol) => boolean +>symbol : Symbol +>Symbol : Symbol + + isEmitBlocked(sourceFile?: SourceFile): boolean; +>isEmitBlocked : (sourceFile?: SourceFile) => boolean +>sourceFile : SourceFile +>SourceFile : SourceFile + + getEnumMemberValue(node: EnumMember): number; +>getEnumMemberValue : (node: EnumMember) => number +>node : EnumMember +>EnumMember : EnumMember + + isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; +>isValidPropertyAccess : (node: QualifiedName | PropertyAccessExpression, propertyName: string) => boolean +>node : QualifiedName | PropertyAccessExpression +>PropertyAccessExpression : PropertyAccessExpression +>QualifiedName : QualifiedName +>propertyName : string + + getAliasedSymbol(symbol: Symbol): Symbol; +>getAliasedSymbol : (symbol: Symbol) => Symbol +>symbol : Symbol +>Symbol : Symbol +>Symbol : Symbol + } + interface SymbolDisplayBuilder { +>SymbolDisplayBuilder : SymbolDisplayBuilder + + buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildTypeDisplay : (type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>type : Type +>Type : Type +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void; +>buildSymbolDisplay : (symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags) => void +>symbol : Symbol +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags +>flags : SymbolFormatFlags +>SymbolFormatFlags : SymbolFormatFlags + + buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildSignatureDisplay : (signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>signatures : Signature +>Signature : Signature +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildParameterDisplay : (parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>parameter : Symbol +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildTypeParameterDisplay : (tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>tp : TypeParameter +>TypeParameter : TypeParameter +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void; +>buildTypeParameterDisplayFromSymbol : (symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags) => void +>symbol : Symbol +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaraiton : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildDisplayForParametersAndDelimiters : (parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>parameters : Symbol[] +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildDisplayForTypeParametersAndDelimiters : (typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>typeParameters : TypeParameter[] +>TypeParameter : TypeParameter +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildReturnTypeDisplay : (signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>signature : Signature +>Signature : Signature +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + } + interface SymbolWriter { +>SymbolWriter : SymbolWriter + + writeKeyword(text: string): void; +>writeKeyword : (text: string) => void +>text : string + + writeOperator(text: string): void; +>writeOperator : (text: string) => void +>text : string + + writePunctuation(text: string): void; +>writePunctuation : (text: string) => void +>text : string + + writeSpace(text: string): void; +>writeSpace : (text: string) => void +>text : string + + writeStringLiteral(text: string): void; +>writeStringLiteral : (text: string) => void +>text : string + + writeParameter(text: string): void; +>writeParameter : (text: string) => void +>text : string + + writeSymbol(text: string, symbol: Symbol): void; +>writeSymbol : (text: string, symbol: Symbol) => void +>text : string +>symbol : Symbol +>Symbol : Symbol + + writeLine(): void; +>writeLine : () => void + + increaseIndent(): void; +>increaseIndent : () => void + + decreaseIndent(): void; +>decreaseIndent : () => void + + clear(): void; +>clear : () => void + + trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void; +>trackSymbol : (symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) => void +>symbol : Symbol +>Symbol : Symbol +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags + } + const enum TypeFormatFlags { +>TypeFormatFlags : TypeFormatFlags + + None = 0, +>None : TypeFormatFlags + + WriteArrayAsGenericType = 1, +>WriteArrayAsGenericType : TypeFormatFlags + + UseTypeOfFunction = 2, +>UseTypeOfFunction : TypeFormatFlags + + NoTruncation = 4, +>NoTruncation : TypeFormatFlags + + WriteArrowStyleSignature = 8, +>WriteArrowStyleSignature : TypeFormatFlags + + WriteOwnNameForAnyLike = 16, +>WriteOwnNameForAnyLike : TypeFormatFlags + + WriteTypeArgumentsOfSignature = 32, +>WriteTypeArgumentsOfSignature : TypeFormatFlags + + InElementType = 64, +>InElementType : TypeFormatFlags + } + const enum SymbolFormatFlags { +>SymbolFormatFlags : SymbolFormatFlags + + None = 0, +>None : SymbolFormatFlags + + WriteTypeParametersOrArguments = 1, +>WriteTypeParametersOrArguments : SymbolFormatFlags + + UseOnlyExternalAliasing = 2, +>UseOnlyExternalAliasing : SymbolFormatFlags + } + const enum SymbolAccessibility { +>SymbolAccessibility : SymbolAccessibility + + Accessible = 0, +>Accessible : SymbolAccessibility + + NotAccessible = 1, +>NotAccessible : SymbolAccessibility + + CannotBeNamed = 2, +>CannotBeNamed : SymbolAccessibility + } + interface SymbolVisibilityResult { +>SymbolVisibilityResult : SymbolVisibilityResult + + accessibility: SymbolAccessibility; +>accessibility : SymbolAccessibility +>SymbolAccessibility : SymbolAccessibility + + aliasesToMakeVisible?: ImportDeclaration[]; +>aliasesToMakeVisible : ImportDeclaration[] +>ImportDeclaration : ImportDeclaration + + errorSymbolName?: string; +>errorSymbolName : string + + errorNode?: Node; +>errorNode : Node +>Node : Node + } + interface SymbolAccessiblityResult extends SymbolVisibilityResult { +>SymbolAccessiblityResult : SymbolAccessiblityResult +>SymbolVisibilityResult : SymbolVisibilityResult + + errorModuleName?: string; +>errorModuleName : string + } + interface EmitResolver { +>EmitResolver : EmitResolver + + getProgram(): Program; +>getProgram : () => Program +>Program : Program + + getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; +>getLocalNameOfContainer : (container: EnumDeclaration | ModuleDeclaration) => string +>container : EnumDeclaration | ModuleDeclaration +>ModuleDeclaration : ModuleDeclaration +>EnumDeclaration : EnumDeclaration + + getExpressionNamePrefix(node: Identifier): string; +>getExpressionNamePrefix : (node: Identifier) => string +>node : Identifier +>Identifier : Identifier + + getExportAssignmentName(node: SourceFile): string; +>getExportAssignmentName : (node: SourceFile) => string +>node : SourceFile +>SourceFile : SourceFile + + isReferencedImportDeclaration(node: ImportDeclaration): boolean; +>isReferencedImportDeclaration : (node: ImportDeclaration) => boolean +>node : ImportDeclaration +>ImportDeclaration : ImportDeclaration + + isTopLevelValueImportWithEntityName(node: ImportDeclaration): boolean; +>isTopLevelValueImportWithEntityName : (node: ImportDeclaration) => boolean +>node : ImportDeclaration +>ImportDeclaration : ImportDeclaration + + getNodeCheckFlags(node: Node): NodeCheckFlags; +>getNodeCheckFlags : (node: Node) => NodeCheckFlags +>node : Node +>Node : Node +>NodeCheckFlags : NodeCheckFlags + + getEnumMemberValue(node: EnumMember): number; +>getEnumMemberValue : (node: EnumMember) => number +>node : EnumMember +>EnumMember : EnumMember + + hasSemanticErrors(): boolean; +>hasSemanticErrors : () => boolean + + isDeclarationVisible(node: Declaration): boolean; +>isDeclarationVisible : (node: Declaration) => boolean +>node : Declaration +>Declaration : Declaration + + isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; +>isImplementationOfOverload : (node: FunctionLikeDeclaration) => boolean +>node : FunctionLikeDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration + + writeTypeAtLocation(location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; +>writeTypeAtLocation : (location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void +>location : Node +>Node : Node +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags +>writer : SymbolWriter +>SymbolWriter : SymbolWriter + + writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; +>writeReturnTypeOfSignatureDeclaration : (signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void +>signatureDeclaration : SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags +>writer : SymbolWriter +>SymbolWriter : SymbolWriter + + isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; +>isSymbolAccessible : (symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags) => SymbolAccessiblityResult +>symbol : Symbol +>Symbol : Symbol +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags +>SymbolAccessiblityResult : SymbolAccessiblityResult + + isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; +>isEntityNameVisible : (entityName: Identifier | QualifiedName, enclosingDeclaration: Node) => SymbolVisibilityResult +>entityName : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName +>enclosingDeclaration : Node +>Node : Node +>SymbolVisibilityResult : SymbolVisibilityResult + + getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number; +>getConstantValue : (node: PropertyAccessExpression | ElementAccessExpression) => number +>node : PropertyAccessExpression | ElementAccessExpression +>PropertyAccessExpression : PropertyAccessExpression +>ElementAccessExpression : ElementAccessExpression + + isEmitBlocked(sourceFile?: SourceFile): boolean; +>isEmitBlocked : (sourceFile?: SourceFile) => boolean +>sourceFile : SourceFile +>SourceFile : SourceFile + } + const enum SymbolFlags { +>SymbolFlags : SymbolFlags + + FunctionScopedVariable = 1, +>FunctionScopedVariable : SymbolFlags + + BlockScopedVariable = 2, +>BlockScopedVariable : SymbolFlags + + Property = 4, +>Property : SymbolFlags + + EnumMember = 8, +>EnumMember : SymbolFlags + + Function = 16, +>Function : SymbolFlags + + Class = 32, +>Class : SymbolFlags + + Interface = 64, +>Interface : SymbolFlags + + ConstEnum = 128, +>ConstEnum : SymbolFlags + + RegularEnum = 256, +>RegularEnum : SymbolFlags + + ValueModule = 512, +>ValueModule : SymbolFlags + + NamespaceModule = 1024, +>NamespaceModule : SymbolFlags + + TypeLiteral = 2048, +>TypeLiteral : SymbolFlags + + ObjectLiteral = 4096, +>ObjectLiteral : SymbolFlags + + Method = 8192, +>Method : SymbolFlags + + Constructor = 16384, +>Constructor : SymbolFlags + + GetAccessor = 32768, +>GetAccessor : SymbolFlags + + SetAccessor = 65536, +>SetAccessor : SymbolFlags + + CallSignature = 131072, +>CallSignature : SymbolFlags + + ConstructSignature = 262144, +>ConstructSignature : SymbolFlags + + IndexSignature = 524288, +>IndexSignature : SymbolFlags + + TypeParameter = 1048576, +>TypeParameter : SymbolFlags + + TypeAlias = 2097152, +>TypeAlias : SymbolFlags + + ExportValue = 4194304, +>ExportValue : SymbolFlags + + ExportType = 8388608, +>ExportType : SymbolFlags + + ExportNamespace = 16777216, +>ExportNamespace : SymbolFlags + + Import = 33554432, +>Import : SymbolFlags + + Instantiated = 67108864, +>Instantiated : SymbolFlags + + Merged = 134217728, +>Merged : SymbolFlags + + Transient = 268435456, +>Transient : SymbolFlags + + Prototype = 536870912, +>Prototype : SymbolFlags + + UnionProperty = 1073741824, +>UnionProperty : SymbolFlags + + Enum = 384, +>Enum : SymbolFlags + + Variable = 3, +>Variable : SymbolFlags + + Value = 107455, +>Value : SymbolFlags + + Type = 3152352, +>Type : SymbolFlags + + Namespace = 1536, +>Namespace : SymbolFlags + + Module = 1536, +>Module : SymbolFlags + + Accessor = 98304, +>Accessor : SymbolFlags + + Signature = 917504, +>Signature : SymbolFlags + + FunctionScopedVariableExcludes = 107454, +>FunctionScopedVariableExcludes : SymbolFlags + + BlockScopedVariableExcludes = 107455, +>BlockScopedVariableExcludes : SymbolFlags + + ParameterExcludes = 107455, +>ParameterExcludes : SymbolFlags + + PropertyExcludes = 107455, +>PropertyExcludes : SymbolFlags + + EnumMemberExcludes = 107455, +>EnumMemberExcludes : SymbolFlags + + FunctionExcludes = 106927, +>FunctionExcludes : SymbolFlags + + ClassExcludes = 3258879, +>ClassExcludes : SymbolFlags + + InterfaceExcludes = 3152288, +>InterfaceExcludes : SymbolFlags + + RegularEnumExcludes = 3258623, +>RegularEnumExcludes : SymbolFlags + + ConstEnumExcludes = 3259263, +>ConstEnumExcludes : SymbolFlags + + ValueModuleExcludes = 106639, +>ValueModuleExcludes : SymbolFlags + + NamespaceModuleExcludes = 0, +>NamespaceModuleExcludes : SymbolFlags + + MethodExcludes = 99263, +>MethodExcludes : SymbolFlags + + GetAccessorExcludes = 41919, +>GetAccessorExcludes : SymbolFlags + + SetAccessorExcludes = 74687, +>SetAccessorExcludes : SymbolFlags + + TypeParameterExcludes = 2103776, +>TypeParameterExcludes : SymbolFlags + + TypeAliasExcludes = 3152352, +>TypeAliasExcludes : SymbolFlags + + ImportExcludes = 33554432, +>ImportExcludes : SymbolFlags + + ModuleMember = 35653619, +>ModuleMember : SymbolFlags + + ExportHasLocal = 944, +>ExportHasLocal : SymbolFlags + + HasLocals = 1041936, +>HasLocals : SymbolFlags + + HasExports = 1952, +>HasExports : SymbolFlags + + HasMembers = 6240, +>HasMembers : SymbolFlags + + IsContainer = 1048560, +>IsContainer : SymbolFlags + + PropertyOrAccessor = 98308, +>PropertyOrAccessor : SymbolFlags + + Export = 29360128, +>Export : SymbolFlags + } + interface Symbol { +>Symbol : Symbol + + flags: SymbolFlags; +>flags : SymbolFlags +>SymbolFlags : SymbolFlags + + name: string; +>name : string + + id?: number; +>id : number + + mergeId?: number; +>mergeId : number + + declarations?: Declaration[]; +>declarations : Declaration[] +>Declaration : Declaration + + parent?: Symbol; +>parent : Symbol +>Symbol : Symbol + + members?: SymbolTable; +>members : SymbolTable +>SymbolTable : SymbolTable + + exports?: SymbolTable; +>exports : SymbolTable +>SymbolTable : SymbolTable + + exportSymbol?: Symbol; +>exportSymbol : Symbol +>Symbol : Symbol + + valueDeclaration?: Declaration; +>valueDeclaration : Declaration +>Declaration : Declaration + + constEnumOnlyModule?: boolean; +>constEnumOnlyModule : boolean + } + interface SymbolLinks { +>SymbolLinks : SymbolLinks + + target?: Symbol; +>target : Symbol +>Symbol : Symbol + + type?: Type; +>type : Type +>Type : Type + + declaredType?: Type; +>declaredType : Type +>Type : Type + + mapper?: TypeMapper; +>mapper : TypeMapper +>TypeMapper : TypeMapper + + referenced?: boolean; +>referenced : boolean + + exportAssignSymbol?: Symbol; +>exportAssignSymbol : Symbol +>Symbol : Symbol + + unionType?: UnionType; +>unionType : UnionType +>UnionType : UnionType + } + interface TransientSymbol extends Symbol, SymbolLinks { +>TransientSymbol : TransientSymbol +>Symbol : Symbol +>SymbolLinks : SymbolLinks + } + interface SymbolTable { +>SymbolTable : SymbolTable + + [index: string]: Symbol; +>index : string +>Symbol : Symbol + } + const enum NodeCheckFlags { +>NodeCheckFlags : NodeCheckFlags + + TypeChecked = 1, +>TypeChecked : NodeCheckFlags + + LexicalThis = 2, +>LexicalThis : NodeCheckFlags + + CaptureThis = 4, +>CaptureThis : NodeCheckFlags + + EmitExtends = 8, +>EmitExtends : NodeCheckFlags + + SuperInstance = 16, +>SuperInstance : NodeCheckFlags + + SuperStatic = 32, +>SuperStatic : NodeCheckFlags + + ContextChecked = 64, +>ContextChecked : NodeCheckFlags + + EnumValuesComputed = 128, +>EnumValuesComputed : NodeCheckFlags + } + interface NodeLinks { +>NodeLinks : NodeLinks + + resolvedType?: Type; +>resolvedType : Type +>Type : Type + + resolvedSignature?: Signature; +>resolvedSignature : Signature +>Signature : Signature + + resolvedSymbol?: Symbol; +>resolvedSymbol : Symbol +>Symbol : Symbol + + flags?: NodeCheckFlags; +>flags : NodeCheckFlags +>NodeCheckFlags : NodeCheckFlags + + enumMemberValue?: number; +>enumMemberValue : number + + isIllegalTypeReferenceInConstraint?: boolean; +>isIllegalTypeReferenceInConstraint : boolean + + isVisible?: boolean; +>isVisible : boolean + + localModuleName?: string; +>localModuleName : string + + assignmentChecks?: Map; +>assignmentChecks : Map +>Map : Map + } + const enum TypeFlags { +>TypeFlags : TypeFlags + + Any = 1, +>Any : TypeFlags + + String = 2, +>String : TypeFlags + + Number = 4, +>Number : TypeFlags + + Boolean = 8, +>Boolean : TypeFlags + + Void = 16, +>Void : TypeFlags + + Undefined = 32, +>Undefined : TypeFlags + + Null = 64, +>Null : TypeFlags + + Enum = 128, +>Enum : TypeFlags + + StringLiteral = 256, +>StringLiteral : TypeFlags + + TypeParameter = 512, +>TypeParameter : TypeFlags + + Class = 1024, +>Class : TypeFlags + + Interface = 2048, +>Interface : TypeFlags + + Reference = 4096, +>Reference : TypeFlags + + Tuple = 8192, +>Tuple : TypeFlags + + Union = 16384, +>Union : TypeFlags + + Anonymous = 32768, +>Anonymous : TypeFlags + + FromSignature = 65536, +>FromSignature : TypeFlags + + Intrinsic = 127, +>Intrinsic : TypeFlags + + StringLike = 258, +>StringLike : TypeFlags + + NumberLike = 132, +>NumberLike : TypeFlags + + ObjectType = 48128, +>ObjectType : TypeFlags + + Structured = 65025, +>Structured : TypeFlags + } + interface Type { +>Type : Type + + flags: TypeFlags; +>flags : TypeFlags +>TypeFlags : TypeFlags + + id: number; +>id : number + + symbol?: Symbol; +>symbol : Symbol +>Symbol : Symbol + } + interface IntrinsicType extends Type { +>IntrinsicType : IntrinsicType +>Type : Type + + intrinsicName: string; +>intrinsicName : string + } + interface StringLiteralType extends Type { +>StringLiteralType : StringLiteralType +>Type : Type + + text: string; +>text : string + } + interface ObjectType extends Type { +>ObjectType : ObjectType +>Type : Type + } + interface InterfaceType extends ObjectType { +>InterfaceType : InterfaceType +>ObjectType : ObjectType + + typeParameters: TypeParameter[]; +>typeParameters : TypeParameter[] +>TypeParameter : TypeParameter + + baseTypes: ObjectType[]; +>baseTypes : ObjectType[] +>ObjectType : ObjectType + + declaredProperties: Symbol[]; +>declaredProperties : Symbol[] +>Symbol : Symbol + + declaredCallSignatures: Signature[]; +>declaredCallSignatures : Signature[] +>Signature : Signature + + declaredConstructSignatures: Signature[]; +>declaredConstructSignatures : Signature[] +>Signature : Signature + + declaredStringIndexType: Type; +>declaredStringIndexType : Type +>Type : Type + + declaredNumberIndexType: Type; +>declaredNumberIndexType : Type +>Type : Type + } + interface TypeReference extends ObjectType { +>TypeReference : TypeReference +>ObjectType : ObjectType + + target: GenericType; +>target : GenericType +>GenericType : GenericType + + typeArguments: Type[]; +>typeArguments : Type[] +>Type : Type + } + interface GenericType extends InterfaceType, TypeReference { +>GenericType : GenericType +>InterfaceType : InterfaceType +>TypeReference : TypeReference + + instantiations: Map; +>instantiations : Map +>Map : Map +>TypeReference : TypeReference + + openReferenceTargets: GenericType[]; +>openReferenceTargets : GenericType[] +>GenericType : GenericType + + openReferenceChecks: Map; +>openReferenceChecks : Map +>Map : Map + } + interface TupleType extends ObjectType { +>TupleType : TupleType +>ObjectType : ObjectType + + elementTypes: Type[]; +>elementTypes : Type[] +>Type : Type + + baseArrayType: TypeReference; +>baseArrayType : TypeReference +>TypeReference : TypeReference + } + interface UnionType extends Type { +>UnionType : UnionType +>Type : Type + + types: Type[]; +>types : Type[] +>Type : Type + + resolvedProperties: SymbolTable; +>resolvedProperties : SymbolTable +>SymbolTable : SymbolTable + } + interface ResolvedType extends ObjectType, UnionType { +>ResolvedType : ResolvedType +>ObjectType : ObjectType +>UnionType : UnionType + + members: SymbolTable; +>members : SymbolTable +>SymbolTable : SymbolTable + + properties: Symbol[]; +>properties : Symbol[] +>Symbol : Symbol + + callSignatures: Signature[]; +>callSignatures : Signature[] +>Signature : Signature + + constructSignatures: Signature[]; +>constructSignatures : Signature[] +>Signature : Signature + + stringIndexType: Type; +>stringIndexType : Type +>Type : Type + + numberIndexType: Type; +>numberIndexType : Type +>Type : Type + } + interface TypeParameter extends Type { +>TypeParameter : TypeParameter +>Type : Type + + constraint: Type; +>constraint : Type +>Type : Type + + target?: TypeParameter; +>target : TypeParameter +>TypeParameter : TypeParameter + + mapper?: TypeMapper; +>mapper : TypeMapper +>TypeMapper : TypeMapper + } + const enum SignatureKind { +>SignatureKind : SignatureKind + + Call = 0, +>Call : SignatureKind + + Construct = 1, +>Construct : SignatureKind + } + interface Signature { +>Signature : Signature + + declaration: SignatureDeclaration; +>declaration : SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration + + typeParameters: TypeParameter[]; +>typeParameters : TypeParameter[] +>TypeParameter : TypeParameter + + parameters: Symbol[]; +>parameters : Symbol[] +>Symbol : Symbol + + resolvedReturnType: Type; +>resolvedReturnType : Type +>Type : Type + + minArgumentCount: number; +>minArgumentCount : number + + hasRestParameter: boolean; +>hasRestParameter : boolean + + hasStringLiterals: boolean; +>hasStringLiterals : boolean + + target?: Signature; +>target : Signature +>Signature : Signature + + mapper?: TypeMapper; +>mapper : TypeMapper +>TypeMapper : TypeMapper + + unionSignatures?: Signature[]; +>unionSignatures : Signature[] +>Signature : Signature + + erasedSignatureCache?: Signature; +>erasedSignatureCache : Signature +>Signature : Signature + + isolatedSignatureType?: ObjectType; +>isolatedSignatureType : ObjectType +>ObjectType : ObjectType + } + const enum IndexKind { +>IndexKind : IndexKind + + String = 0, +>String : IndexKind + + Number = 1, +>Number : IndexKind + } + interface TypeMapper { +>TypeMapper : TypeMapper + + (t: Type): Type; +>t : Type +>Type : Type +>Type : Type + } + interface TypeInferences { +>TypeInferences : TypeInferences + + primary: Type[]; +>primary : Type[] +>Type : Type + + secondary: Type[]; +>secondary : Type[] +>Type : Type + } + interface InferenceContext { +>InferenceContext : InferenceContext + + typeParameters: TypeParameter[]; +>typeParameters : TypeParameter[] +>TypeParameter : TypeParameter + + inferUnionTypes: boolean; +>inferUnionTypes : boolean + + inferences: TypeInferences[]; +>inferences : TypeInferences[] +>TypeInferences : TypeInferences + + inferredTypes: Type[]; +>inferredTypes : Type[] +>Type : Type + + failedTypeParameterIndex?: number; +>failedTypeParameterIndex : number + } + interface DiagnosticMessage { +>DiagnosticMessage : DiagnosticMessage + + key: string; +>key : string + + category: DiagnosticCategory; +>category : DiagnosticCategory +>DiagnosticCategory : DiagnosticCategory + + code: number; +>code : number + + isEarly?: boolean; +>isEarly : boolean + } + interface DiagnosticMessageChain { +>DiagnosticMessageChain : DiagnosticMessageChain + + messageText: string; +>messageText : string + + category: DiagnosticCategory; +>category : DiagnosticCategory +>DiagnosticCategory : DiagnosticCategory + + code: number; +>code : number + + next?: DiagnosticMessageChain; +>next : DiagnosticMessageChain +>DiagnosticMessageChain : DiagnosticMessageChain + } + interface Diagnostic { +>Diagnostic : Diagnostic + + file: SourceFile; +>file : SourceFile +>SourceFile : SourceFile + + start: number; +>start : number + + length: number; +>length : number + + messageText: string; +>messageText : string + + category: DiagnosticCategory; +>category : DiagnosticCategory +>DiagnosticCategory : DiagnosticCategory + + code: number; +>code : number + + /** + * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit + */ + isEarly?: boolean; +>isEarly : boolean + + /** + * Parse error - error produced by parser when it scanner returns a token + * that parser does not understand in its current state + * (as opposed to grammar error when parser can interpret the token but interpretation is not legal from the grammar perespective) + */ + isParseError?: boolean; +>isParseError : boolean + } + enum DiagnosticCategory { +>DiagnosticCategory : DiagnosticCategory + + Warning = 0, +>Warning : DiagnosticCategory + + Error = 1, +>Error : DiagnosticCategory + + Message = 2, +>Message : DiagnosticCategory + } + interface CompilerOptions { +>CompilerOptions : CompilerOptions + + charset?: string; +>charset : string + + codepage?: number; +>codepage : number + + declaration?: boolean; +>declaration : boolean + + diagnostics?: boolean; +>diagnostics : boolean + + emitBOM?: boolean; +>emitBOM : boolean + + help?: boolean; +>help : boolean + + locale?: string; +>locale : string + + mapRoot?: string; +>mapRoot : string + + module?: ModuleKind; +>module : ModuleKind +>ModuleKind : ModuleKind + + noEmitOnError?: boolean; +>noEmitOnError : boolean + + noErrorTruncation?: boolean; +>noErrorTruncation : boolean + + noImplicitAny?: boolean; +>noImplicitAny : boolean + + noLib?: boolean; +>noLib : boolean + + noLibCheck?: boolean; +>noLibCheck : boolean + + noResolve?: boolean; +>noResolve : boolean + + out?: string; +>out : string + + outDir?: string; +>outDir : string + + removeComments?: boolean; +>removeComments : boolean + + sourceMap?: boolean; +>sourceMap : boolean + + sourceRoot?: string; +>sourceRoot : string + + target?: ScriptTarget; +>target : ScriptTarget +>ScriptTarget : ScriptTarget + + version?: boolean; +>version : boolean + + watch?: boolean; +>watch : boolean + + preserveConstEnums?: boolean; +>preserveConstEnums : boolean + + [option: string]: string | number | boolean; +>option : string + } + const enum ModuleKind { +>ModuleKind : ModuleKind + + None = 0, +>None : ModuleKind + + CommonJS = 1, +>CommonJS : ModuleKind + + AMD = 2, +>AMD : ModuleKind + } + interface LineAndCharacter { +>LineAndCharacter : LineAndCharacter + + line: number; +>line : number + + character: number; +>character : number + } + const enum ScriptTarget { +>ScriptTarget : ScriptTarget + + ES3 = 0, +>ES3 : ScriptTarget + + ES5 = 1, +>ES5 : ScriptTarget + + ES6 = 2, +>ES6 : ScriptTarget + + Latest = 2, +>Latest : ScriptTarget + } + interface ParsedCommandLine { +>ParsedCommandLine : ParsedCommandLine + + options: CompilerOptions; +>options : CompilerOptions +>CompilerOptions : CompilerOptions + + filenames: string[]; +>filenames : string[] + + errors: Diagnostic[]; +>errors : Diagnostic[] +>Diagnostic : Diagnostic + } + interface CommandLineOption { +>CommandLineOption : CommandLineOption + + name: string; +>name : string + + type: string | Map; +>type : string | Map +>Map : Map + + shortName?: string; +>shortName : string + + description?: DiagnosticMessage; +>description : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + + paramName?: DiagnosticMessage; +>paramName : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + + error?: DiagnosticMessage; +>error : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + } + const enum CharacterCodes { +>CharacterCodes : CharacterCodes + + nullCharacter = 0, +>nullCharacter : CharacterCodes + + maxAsciiCharacter = 127, +>maxAsciiCharacter : CharacterCodes + + lineFeed = 10, +>lineFeed : CharacterCodes + + carriageReturn = 13, +>carriageReturn : CharacterCodes + + lineSeparator = 8232, +>lineSeparator : CharacterCodes + + paragraphSeparator = 8233, +>paragraphSeparator : CharacterCodes + + nextLine = 133, +>nextLine : CharacterCodes + + space = 32, +>space : CharacterCodes + + nonBreakingSpace = 160, +>nonBreakingSpace : CharacterCodes + + enQuad = 8192, +>enQuad : CharacterCodes + + emQuad = 8193, +>emQuad : CharacterCodes + + enSpace = 8194, +>enSpace : CharacterCodes + + emSpace = 8195, +>emSpace : CharacterCodes + + threePerEmSpace = 8196, +>threePerEmSpace : CharacterCodes + + fourPerEmSpace = 8197, +>fourPerEmSpace : CharacterCodes + + sixPerEmSpace = 8198, +>sixPerEmSpace : CharacterCodes + + figureSpace = 8199, +>figureSpace : CharacterCodes + + punctuationSpace = 8200, +>punctuationSpace : CharacterCodes + + thinSpace = 8201, +>thinSpace : CharacterCodes + + hairSpace = 8202, +>hairSpace : CharacterCodes + + zeroWidthSpace = 8203, +>zeroWidthSpace : CharacterCodes + + narrowNoBreakSpace = 8239, +>narrowNoBreakSpace : CharacterCodes + + ideographicSpace = 12288, +>ideographicSpace : CharacterCodes + + mathematicalSpace = 8287, +>mathematicalSpace : CharacterCodes + + ogham = 5760, +>ogham : CharacterCodes + + _ = 95, +>_ : CharacterCodes + + $ = 36, +>$ : CharacterCodes + + _0 = 48, +>_0 : CharacterCodes + + _1 = 49, +>_1 : CharacterCodes + + _2 = 50, +>_2 : CharacterCodes + + _3 = 51, +>_3 : CharacterCodes + + _4 = 52, +>_4 : CharacterCodes + + _5 = 53, +>_5 : CharacterCodes + + _6 = 54, +>_6 : CharacterCodes + + _7 = 55, +>_7 : CharacterCodes + + _8 = 56, +>_8 : CharacterCodes + + _9 = 57, +>_9 : CharacterCodes + + a = 97, +>a : CharacterCodes + + b = 98, +>b : CharacterCodes + + c = 99, +>c : CharacterCodes + + d = 100, +>d : CharacterCodes + + e = 101, +>e : CharacterCodes + + f = 102, +>f : CharacterCodes + + g = 103, +>g : CharacterCodes + + h = 104, +>h : CharacterCodes + + i = 105, +>i : CharacterCodes + + j = 106, +>j : CharacterCodes + + k = 107, +>k : CharacterCodes + + l = 108, +>l : CharacterCodes + + m = 109, +>m : CharacterCodes + + n = 110, +>n : CharacterCodes + + o = 111, +>o : CharacterCodes + + p = 112, +>p : CharacterCodes + + q = 113, +>q : CharacterCodes + + r = 114, +>r : CharacterCodes + + s = 115, +>s : CharacterCodes + + t = 116, +>t : CharacterCodes + + u = 117, +>u : CharacterCodes + + v = 118, +>v : CharacterCodes + + w = 119, +>w : CharacterCodes + + x = 120, +>x : CharacterCodes + + y = 121, +>y : CharacterCodes + + z = 122, +>z : CharacterCodes + + A = 65, +>A : CharacterCodes + + B = 66, +>B : CharacterCodes + + C = 67, +>C : CharacterCodes + + D = 68, +>D : CharacterCodes + + E = 69, +>E : CharacterCodes + + F = 70, +>F : CharacterCodes + + G = 71, +>G : CharacterCodes + + H = 72, +>H : CharacterCodes + + I = 73, +>I : CharacterCodes + + J = 74, +>J : CharacterCodes + + K = 75, +>K : CharacterCodes + + L = 76, +>L : CharacterCodes + + M = 77, +>M : CharacterCodes + + N = 78, +>N : CharacterCodes + + O = 79, +>O : CharacterCodes + + P = 80, +>P : CharacterCodes + + Q = 81, +>Q : CharacterCodes + + R = 82, +>R : CharacterCodes + + S = 83, +>S : CharacterCodes + + T = 84, +>T : CharacterCodes + + U = 85, +>U : CharacterCodes + + V = 86, +>V : CharacterCodes + + W = 87, +>W : CharacterCodes + + X = 88, +>X : CharacterCodes + + Y = 89, +>Y : CharacterCodes + + Z = 90, +>Z : CharacterCodes + + ampersand = 38, +>ampersand : CharacterCodes + + asterisk = 42, +>asterisk : CharacterCodes + + at = 64, +>at : CharacterCodes + + backslash = 92, +>backslash : CharacterCodes + + backtick = 96, +>backtick : CharacterCodes + + bar = 124, +>bar : CharacterCodes + + caret = 94, +>caret : CharacterCodes + + closeBrace = 125, +>closeBrace : CharacterCodes + + closeBracket = 93, +>closeBracket : CharacterCodes + + closeParen = 41, +>closeParen : CharacterCodes + + colon = 58, +>colon : CharacterCodes + + comma = 44, +>comma : CharacterCodes + + dot = 46, +>dot : CharacterCodes + + doubleQuote = 34, +>doubleQuote : CharacterCodes + + equals = 61, +>equals : CharacterCodes + + exclamation = 33, +>exclamation : CharacterCodes + + greaterThan = 62, +>greaterThan : CharacterCodes + + lessThan = 60, +>lessThan : CharacterCodes + + minus = 45, +>minus : CharacterCodes + + openBrace = 123, +>openBrace : CharacterCodes + + openBracket = 91, +>openBracket : CharacterCodes + + openParen = 40, +>openParen : CharacterCodes + + percent = 37, +>percent : CharacterCodes + + plus = 43, +>plus : CharacterCodes + + question = 63, +>question : CharacterCodes + + semicolon = 59, +>semicolon : CharacterCodes + + singleQuote = 39, +>singleQuote : CharacterCodes + + slash = 47, +>slash : CharacterCodes + + tilde = 126, +>tilde : CharacterCodes + + backspace = 8, +>backspace : CharacterCodes + + formFeed = 12, +>formFeed : CharacterCodes + + byteOrderMark = 65279, +>byteOrderMark : CharacterCodes + + tab = 9, +>tab : CharacterCodes + + verticalTab = 11, +>verticalTab : CharacterCodes + } + interface CancellationToken { +>CancellationToken : CancellationToken + + isCancellationRequested(): boolean; +>isCancellationRequested : () => boolean + } + interface CompilerHost { +>CompilerHost : CompilerHost + + getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; +>getSourceFile : (filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void) => SourceFile +>filename : string +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget +>onError : (message: string) => void +>message : string +>SourceFile : SourceFile + + getDefaultLibFilename(): string; +>getDefaultLibFilename : () => string + + getCancellationToken?(): CancellationToken; +>getCancellationToken : () => CancellationToken +>CancellationToken : CancellationToken + + writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; +>writeFile : (filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void) => void +>filename : string +>data : string +>writeByteOrderMark : boolean +>onError : (message: string) => void +>message : string + + getCurrentDirectory(): string; +>getCurrentDirectory : () => string + + getCanonicalFileName(fileName: string): string; +>getCanonicalFileName : (fileName: string) => string +>fileName : string + + useCaseSensitiveFileNames(): boolean; +>useCaseSensitiveFileNames : () => boolean + + getNewLine(): string; +>getNewLine : () => string + } +} +declare module ts { +>ts : typeof ts + + interface ErrorCallback { +>ErrorCallback : ErrorCallback + + (message: DiagnosticMessage): void; +>message : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + } + interface CommentCallback { +>CommentCallback : CommentCallback + + (pos: number, end: number): void; +>pos : number +>end : number + } + interface Scanner { +>Scanner : Scanner + + getStartPos(): number; +>getStartPos : () => number + + getToken(): SyntaxKind; +>getToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + getTextPos(): number; +>getTextPos : () => number + + getTokenPos(): number; +>getTokenPos : () => number + + getTokenText(): string; +>getTokenText : () => string + + getTokenValue(): string; +>getTokenValue : () => string + + hasPrecedingLineBreak(): boolean; +>hasPrecedingLineBreak : () => boolean + + isIdentifier(): boolean; +>isIdentifier : () => boolean + + isReservedWord(): boolean; +>isReservedWord : () => boolean + + reScanGreaterToken(): SyntaxKind; +>reScanGreaterToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + reScanSlashToken(): SyntaxKind; +>reScanSlashToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + reScanTemplateToken(): SyntaxKind; +>reScanTemplateToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + scan(): SyntaxKind; +>scan : () => SyntaxKind +>SyntaxKind : SyntaxKind + + setText(text: string): void; +>setText : (text: string) => void +>text : string + + setTextPos(textPos: number): void; +>setTextPos : (textPos: number) => void +>textPos : number + + tryScan(callback: () => T): T; +>tryScan : (callback: () => T) => T +>T : T +>callback : () => T +>T : T +>T : T + } + function tokenToString(t: SyntaxKind): string; +>tokenToString : (t: SyntaxKind) => string +>t : SyntaxKind +>SyntaxKind : SyntaxKind + + function computeLineStarts(text: string): number[]; +>computeLineStarts : (text: string) => number[] +>text : string + + function getPositionFromLineAndCharacter(lineStarts: number[], line: number, character: number): number; +>getPositionFromLineAndCharacter : (lineStarts: number[], line: number, character: number) => number +>lineStarts : number[] +>line : number +>character : number + + function getLineAndCharacterOfPosition(lineStarts: number[], position: number): { +>getLineAndCharacterOfPosition : (lineStarts: number[], position: number) => { line: number; character: number; } +>lineStarts : number[] +>position : number + + line: number; +>line : number + + character: number; +>character : number + + }; + function positionToLineAndCharacter(text: string, pos: number): { +>positionToLineAndCharacter : (text: string, pos: number) => { line: number; character: number; } +>text : string +>pos : number + + line: number; +>line : number + + character: number; +>character : number + + }; + function isWhiteSpace(ch: number): boolean; +>isWhiteSpace : (ch: number) => boolean +>ch : number + + function isLineBreak(ch: number): boolean; +>isLineBreak : (ch: number) => boolean +>ch : number + + function isOctalDigit(ch: number): boolean; +>isOctalDigit : (ch: number) => boolean +>ch : number + + function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean): number; +>skipTrivia : (text: string, pos: number, stopAfterLineBreak?: boolean) => number +>text : string +>pos : number +>stopAfterLineBreak : boolean + + function getLeadingCommentRanges(text: string, pos: number): CommentRange[]; +>getLeadingCommentRanges : (text: string, pos: number) => CommentRange[] +>text : string +>pos : number +>CommentRange : CommentRange + + function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; +>getTrailingCommentRanges : (text: string, pos: number) => CommentRange[] +>text : string +>pos : number +>CommentRange : CommentRange + + function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; +>isIdentifierStart : (ch: number, languageVersion: ScriptTarget) => boolean +>ch : number +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget + + function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; +>isIdentifierPart : (ch: number, languageVersion: ScriptTarget) => boolean +>ch : number +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget + + function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback): Scanner; +>createScanner : (languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback) => Scanner +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget +>skipTrivia : boolean +>text : string +>onError : ErrorCallback +>ErrorCallback : ErrorCallback +>onComment : CommentCallback +>CommentCallback : CommentCallback +>Scanner : Scanner +} +declare module ts { +>ts : typeof ts + + interface ReferencePathMatchResult { +>ReferencePathMatchResult : ReferencePathMatchResult + + fileReference?: FileReference; +>fileReference : FileReference +>FileReference : FileReference + + diagnostic?: DiagnosticMessage; +>diagnostic : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + + isNoDefaultLib?: boolean; +>isNoDefaultLib : boolean + } + function getNodeConstructor(kind: SyntaxKind): new () => Node; +>getNodeConstructor : (kind: SyntaxKind) => new () => Node +>kind : SyntaxKind +>SyntaxKind : SyntaxKind +>Node : Node + + function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; +>forEachChild : (node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T) => T +>T : T +>node : Node +>Node : Node +>cbNode : (node: Node) => T +>node : Node +>Node : Node +>T : T +>cbNodes : (nodes: Node[]) => T +>nodes : Node[] +>Node : Node +>T : T +>T : T + + function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; +>createSourceFile : (filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean) => SourceFile +>filename : string +>sourceText : string +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget +>version : string +>isOpen : boolean +>SourceFile : SourceFile + + function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; +>createProgram : (rootNames: string[], options: CompilerOptions, host: CompilerHost) => Program +>rootNames : string[] +>options : CompilerOptions +>CompilerOptions : CompilerOptions +>host : CompilerHost +>CompilerHost : CompilerHost +>Program : Program +} +declare module ts { +>ts : typeof ts + + function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; +>createTypeChecker : (program: Program, fullTypeCheck: boolean) => TypeChecker +>program : Program +>Program : Program +>fullTypeCheck : boolean +>TypeChecker : TypeChecker +} +declare module ts { +>ts : typeof ts + + interface Node { +>Node : Node + + getSourceFile(): SourceFile; +>getSourceFile : () => SourceFile +>SourceFile : SourceFile + + getChildCount(sourceFile?: SourceFile): number; +>getChildCount : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getChildAt(index: number, sourceFile?: SourceFile): Node; +>getChildAt : (index: number, sourceFile?: SourceFile) => Node +>index : number +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + + getChildren(sourceFile?: SourceFile): Node[]; +>getChildren : (sourceFile?: SourceFile) => Node[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + + getStart(sourceFile?: SourceFile): number; +>getStart : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFullStart(): number; +>getFullStart : () => number + + getEnd(): number; +>getEnd : () => number + + getWidth(sourceFile?: SourceFile): number; +>getWidth : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFullWidth(): number; +>getFullWidth : () => number + + getLeadingTriviaWidth(sourceFile?: SourceFile): number; +>getLeadingTriviaWidth : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFullText(sourceFile?: SourceFile): string; +>getFullText : (sourceFile?: SourceFile) => string +>sourceFile : SourceFile +>SourceFile : SourceFile + + getText(sourceFile?: SourceFile): string; +>getText : (sourceFile?: SourceFile) => string +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFirstToken(sourceFile?: SourceFile): Node; +>getFirstToken : (sourceFile?: SourceFile) => Node +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + + getLastToken(sourceFile?: SourceFile): Node; +>getLastToken : (sourceFile?: SourceFile) => Node +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + } + interface Symbol { +>Symbol : Symbol + + getFlags(): SymbolFlags; +>getFlags : () => SymbolFlags +>SymbolFlags : SymbolFlags + + getName(): string; +>getName : () => string + + getDeclarations(): Declaration[]; +>getDeclarations : () => Declaration[] +>Declaration : Declaration + + getDocumentationComment(): SymbolDisplayPart[]; +>getDocumentationComment : () => SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface Type { +>Type : Type + + getFlags(): TypeFlags; +>getFlags : () => TypeFlags +>TypeFlags : TypeFlags + + getSymbol(): Symbol; +>getSymbol : () => Symbol +>Symbol : Symbol + + getProperties(): Symbol[]; +>getProperties : () => Symbol[] +>Symbol : Symbol + + getProperty(propertyName: string): Symbol; +>getProperty : (propertyName: string) => Symbol +>propertyName : string +>Symbol : Symbol + + getApparentProperties(): Symbol[]; +>getApparentProperties : () => Symbol[] +>Symbol : Symbol + + getCallSignatures(): Signature[]; +>getCallSignatures : () => Signature[] +>Signature : Signature + + getConstructSignatures(): Signature[]; +>getConstructSignatures : () => Signature[] +>Signature : Signature + + getStringIndexType(): Type; +>getStringIndexType : () => Type +>Type : Type + + getNumberIndexType(): Type; +>getNumberIndexType : () => Type +>Type : Type + } + interface Signature { +>Signature : Signature + + getDeclaration(): SignatureDeclaration; +>getDeclaration : () => SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration + + getTypeParameters(): Type[]; +>getTypeParameters : () => Type[] +>Type : Type + + getParameters(): Symbol[]; +>getParameters : () => Symbol[] +>Symbol : Symbol + + getReturnType(): Type; +>getReturnType : () => Type +>Type : Type + + getDocumentationComment(): SymbolDisplayPart[]; +>getDocumentationComment : () => SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface SourceFile { +>SourceFile : SourceFile + + getScriptSnapshot(): IScriptSnapshot; +>getScriptSnapshot : () => IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot + + getNamedDeclarations(): Declaration[]; +>getNamedDeclarations : () => Declaration[] +>Declaration : Declaration + + update(scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; +>update : (scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange) => SourceFile +>scriptSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>version : string +>isOpen : boolean +>textChangeRange : TextChangeRange +>TextChangeRange : TextChangeRange +>SourceFile : SourceFile + } + /** + * Represents an immutable snapshot of a script at a specified time.Once acquired, the + * snapshot is observably immutable. i.e. the same calls with the same parameters will return + * the same values. + */ + interface IScriptSnapshot { +>IScriptSnapshot : IScriptSnapshot + + /** Gets a portion of the script snapshot specified by [start, end). */ + getText(start: number, end: number): string; +>getText : (start: number, end: number) => string +>start : number +>end : number + + /** Gets the length of this script snapshot. */ + getLength(): number; +>getLength : () => number + + /** + * This call returns the array containing the start position of every line. + * i.e."[0, 10, 55]". TODO: consider making this optional. The language service could + * always determine this (albeit in a more expensive manner). + */ + getLineStartPositions(): number[]; +>getLineStartPositions : () => number[] + + /** + * Gets the TextChangeRange that describe how the text changed between this text and + * an older version. This information is used by the incremental parser to determine + * what sections of the script need to be re-parsed. 'undefined' can be returned if the + * change range cannot be determined. However, in that case, incremental parsing will + * not happen and the entire document will be re - parsed. + */ + getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; +>getChangeRange : (oldSnapshot: IScriptSnapshot) => TextChangeRange +>oldSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>TextChangeRange : TextChangeRange + } + module ScriptSnapshot { +>ScriptSnapshot : typeof ScriptSnapshot + + function fromString(text: string): IScriptSnapshot; +>fromString : (text: string) => IScriptSnapshot +>text : string +>IScriptSnapshot : IScriptSnapshot + } + interface PreProcessedFileInfo { +>PreProcessedFileInfo : PreProcessedFileInfo + + referencedFiles: FileReference[]; +>referencedFiles : FileReference[] +>FileReference : FileReference + + importedFiles: FileReference[]; +>importedFiles : FileReference[] +>FileReference : FileReference + + isLibFile: boolean; +>isLibFile : boolean + } + interface Logger { +>Logger : Logger + + log(s: string): void; +>log : (s: string) => void +>s : string + } + interface LanguageServiceHost extends Logger { +>LanguageServiceHost : LanguageServiceHost +>Logger : Logger + + getCompilationSettings(): CompilerOptions; +>getCompilationSettings : () => CompilerOptions +>CompilerOptions : CompilerOptions + + getScriptFileNames(): string[]; +>getScriptFileNames : () => string[] + + getScriptVersion(fileName: string): string; +>getScriptVersion : (fileName: string) => string +>fileName : string + + getScriptIsOpen(fileName: string): boolean; +>getScriptIsOpen : (fileName: string) => boolean +>fileName : string + + getScriptSnapshot(fileName: string): IScriptSnapshot; +>getScriptSnapshot : (fileName: string) => IScriptSnapshot +>fileName : string +>IScriptSnapshot : IScriptSnapshot + + getLocalizedDiagnosticMessages(): any; +>getLocalizedDiagnosticMessages : () => any + + getCancellationToken(): CancellationToken; +>getCancellationToken : () => CancellationToken +>CancellationToken : CancellationToken + + getCurrentDirectory(): string; +>getCurrentDirectory : () => string + + getDefaultLibFilename(): string; +>getDefaultLibFilename : () => string + } + interface LanguageService { +>LanguageService : LanguageService + + cleanupSemanticCache(): void; +>cleanupSemanticCache : () => void + + getSyntacticDiagnostics(fileName: string): Diagnostic[]; +>getSyntacticDiagnostics : (fileName: string) => Diagnostic[] +>fileName : string +>Diagnostic : Diagnostic + + getSemanticDiagnostics(fileName: string): Diagnostic[]; +>getSemanticDiagnostics : (fileName: string) => Diagnostic[] +>fileName : string +>Diagnostic : Diagnostic + + getCompilerOptionsDiagnostics(): Diagnostic[]; +>getCompilerOptionsDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; +>getSyntacticClassifications : (fileName: string, span: TextSpan) => ClassifiedSpan[] +>fileName : string +>span : TextSpan +>TextSpan : TextSpan +>ClassifiedSpan : ClassifiedSpan + + getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; +>getSemanticClassifications : (fileName: string, span: TextSpan) => ClassifiedSpan[] +>fileName : string +>span : TextSpan +>TextSpan : TextSpan +>ClassifiedSpan : ClassifiedSpan + + getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): CompletionInfo; +>getCompletionsAtPosition : (fileName: string, position: number, isMemberCompletion: boolean) => CompletionInfo +>fileName : string +>position : number +>isMemberCompletion : boolean +>CompletionInfo : CompletionInfo + + getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; +>getCompletionEntryDetails : (fileName: string, position: number, entryName: string) => CompletionEntryDetails +>fileName : string +>position : number +>entryName : string +>CompletionEntryDetails : CompletionEntryDetails + + getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; +>getQuickInfoAtPosition : (fileName: string, position: number) => QuickInfo +>fileName : string +>position : number +>QuickInfo : QuickInfo + + getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; +>getNameOrDottedNameSpan : (fileName: string, startPos: number, endPos: number) => TextSpan +>fileName : string +>startPos : number +>endPos : number +>TextSpan : TextSpan + + getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan; +>getBreakpointStatementAtPosition : (fileName: string, position: number) => TextSpan +>fileName : string +>position : number +>TextSpan : TextSpan + + getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems; +>getSignatureHelpItems : (fileName: string, position: number) => SignatureHelpItems +>fileName : string +>position : number +>SignatureHelpItems : SignatureHelpItems + + getRenameInfo(fileName: string, position: number): RenameInfo; +>getRenameInfo : (fileName: string, position: number) => RenameInfo +>fileName : string +>position : number +>RenameInfo : RenameInfo + + findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[]; +>findRenameLocations : (fileName: string, position: number, findInStrings: boolean, findInComments: boolean) => RenameLocation[] +>fileName : string +>position : number +>findInStrings : boolean +>findInComments : boolean +>RenameLocation : RenameLocation + + getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; +>getDefinitionAtPosition : (fileName: string, position: number) => DefinitionInfo[] +>fileName : string +>position : number +>DefinitionInfo : DefinitionInfo + + getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; +>getReferencesAtPosition : (fileName: string, position: number) => ReferenceEntry[] +>fileName : string +>position : number +>ReferenceEntry : ReferenceEntry + + getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; +>getOccurrencesAtPosition : (fileName: string, position: number) => ReferenceEntry[] +>fileName : string +>position : number +>ReferenceEntry : ReferenceEntry + + getNavigateToItems(searchValue: string): NavigateToItem[]; +>getNavigateToItems : (searchValue: string) => NavigateToItem[] +>searchValue : string +>NavigateToItem : NavigateToItem + + getNavigationBarItems(fileName: string): NavigationBarItem[]; +>getNavigationBarItems : (fileName: string) => NavigationBarItem[] +>fileName : string +>NavigationBarItem : NavigationBarItem + + getOutliningSpans(fileName: string): OutliningSpan[]; +>getOutliningSpans : (fileName: string) => OutliningSpan[] +>fileName : string +>OutliningSpan : OutliningSpan + + getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; +>getTodoComments : (fileName: string, descriptors: TodoCommentDescriptor[]) => TodoComment[] +>fileName : string +>descriptors : TodoCommentDescriptor[] +>TodoCommentDescriptor : TodoCommentDescriptor +>TodoComment : TodoComment + + getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; +>getBraceMatchingAtPosition : (fileName: string, position: number) => TextSpan[] +>fileName : string +>position : number +>TextSpan : TextSpan + + getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number; +>getIndentationAtPosition : (fileName: string, position: number, options: EditorOptions) => number +>fileName : string +>position : number +>options : EditorOptions +>EditorOptions : EditorOptions + + getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[]; +>getFormattingEditsForRange : (fileName: string, start: number, end: number, options: FormatCodeOptions) => TextChange[] +>fileName : string +>start : number +>end : number +>options : FormatCodeOptions +>FormatCodeOptions : FormatCodeOptions +>TextChange : TextChange + + getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; +>getFormattingEditsForDocument : (fileName: string, options: FormatCodeOptions) => TextChange[] +>fileName : string +>options : FormatCodeOptions +>FormatCodeOptions : FormatCodeOptions +>TextChange : TextChange + + getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[]; +>getFormattingEditsAfterKeystroke : (fileName: string, position: number, key: string, options: FormatCodeOptions) => TextChange[] +>fileName : string +>position : number +>key : string +>options : FormatCodeOptions +>FormatCodeOptions : FormatCodeOptions +>TextChange : TextChange + + getEmitOutput(fileName: string): EmitOutput; +>getEmitOutput : (fileName: string) => EmitOutput +>fileName : string +>EmitOutput : EmitOutput + + getSourceFile(filename: string): SourceFile; +>getSourceFile : (filename: string) => SourceFile +>filename : string +>SourceFile : SourceFile + + dispose(): void; +>dispose : () => void + } + class TextSpan { +>TextSpan : TextSpan + + private _start; +>_start : any + + private _length; +>_length : any + + /** + * Creates a TextSpan instance beginning with the position Start and having the Length + * specified with length. + */ + constructor(start: number, length: number); +>start : number +>length : number + + toJSON(key: any): any; +>toJSON : (key: any) => any +>key : any + + start(): number; +>start : () => number + + length(): number; +>length : () => number + + end(): number; +>end : () => number + + isEmpty(): boolean; +>isEmpty : () => boolean + + /** + * Determines whether the position lies within the span. Returns true if the position is greater than or equal to Start and strictly less + * than End, otherwise false. + * @param position The position to check. + */ + containsPosition(position: number): boolean; +>containsPosition : (position: number) => boolean +>position : number + + /** + * Determines whether span falls completely within this span. Returns true if the specified span falls completely within this span, otherwise false. + * @param span The span to check. + */ + containsTextSpan(span: TextSpan): boolean; +>containsTextSpan : (span: TextSpan) => boolean +>span : TextSpan +>TextSpan : TextSpan + + /** + * Determines whether the given span overlaps this span. Two spans are considered to overlap + * if they have positions in common and neither is empty. Empty spans do not overlap with any + * other span. Returns true if the spans overlap, false otherwise. + * @param span The span to check. + */ + overlapsWith(span: TextSpan): boolean; +>overlapsWith : (span: TextSpan) => boolean +>span : TextSpan +>TextSpan : TextSpan + + /** + * Returns the overlap with the given span, or undefined if there is no overlap. + * @param span The span to check. + */ + overlap(span: TextSpan): TextSpan; +>overlap : (span: TextSpan) => TextSpan +>span : TextSpan +>TextSpan : TextSpan +>TextSpan : TextSpan + + /** + * Determines whether span intersects this span. Two spans are considered to + * intersect if they have positions in common or the end of one span + * coincides with the start of the other span. Returns true if the spans intersect, false otherwise. + * @param The span to check. + */ + intersectsWithTextSpan(span: TextSpan): boolean; +>intersectsWithTextSpan : (span: TextSpan) => boolean +>span : TextSpan +>TextSpan : TextSpan + + intersectsWith(start: number, length: number): boolean; +>intersectsWith : (start: number, length: number) => boolean +>start : number +>length : number + + /** + * Determines whether the given position intersects this span. + * A position is considered to intersect if it is between the start and + * end positions (inclusive) of this span. Returns true if the position intersects, false otherwise. + * @param position The position to check. + */ + intersectsWithPosition(position: number): boolean; +>intersectsWithPosition : (position: number) => boolean +>position : number + + /** + * Returns the intersection with the given span, or undefined if there is no intersection. + * @param span The span to check. + */ + intersection(span: TextSpan): TextSpan; +>intersection : (span: TextSpan) => TextSpan +>span : TextSpan +>TextSpan : TextSpan +>TextSpan : TextSpan + + /** + * Creates a new TextSpan from the given start and end positions + * as opposed to a position and length. + */ + static fromBounds(start: number, end: number): TextSpan; +>fromBounds : (start: number, end: number) => TextSpan +>start : number +>end : number +>TextSpan : TextSpan + } + class TextChangeRange { +>TextChangeRange : TextChangeRange + + static unchanged: TextChangeRange; +>unchanged : TextChangeRange +>TextChangeRange : TextChangeRange + + private _span; +>_span : any + + private _newLength; +>_newLength : any + + /** + * Initializes a new instance of TextChangeRange. + */ + constructor(span: TextSpan, newLength: number); +>span : TextSpan +>TextSpan : TextSpan +>newLength : number + + /** + * The span of text before the edit which is being changed + */ + span(): TextSpan; +>span : () => TextSpan +>TextSpan : TextSpan + + /** + * Width of the span after the edit. A 0 here would represent a delete + */ + newLength(): number; +>newLength : () => number + + newSpan(): TextSpan; +>newSpan : () => TextSpan +>TextSpan : TextSpan + + isUnchanged(): boolean; +>isUnchanged : () => boolean + + /** + * Called to merge all the changes that occurred across several versions of a script snapshot + * into a single change. i.e. if a user keeps making successive edits to a script we will + * have a text change from V1 to V2, V2 to V3, ..., Vn. + * + * This function will then merge those changes into a single change range valid between V1 and + * Vn. + */ + static collapseChangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; +>collapseChangesAcrossMultipleVersions : (changes: TextChangeRange[]) => TextChangeRange +>changes : TextChangeRange[] +>TextChangeRange : TextChangeRange +>TextChangeRange : TextChangeRange + } + interface ClassifiedSpan { +>ClassifiedSpan : ClassifiedSpan + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + classificationType: string; +>classificationType : string + } + interface NavigationBarItem { +>NavigationBarItem : NavigationBarItem + + text: string; +>text : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + spans: TextSpan[]; +>spans : TextSpan[] +>TextSpan : TextSpan + + childItems: NavigationBarItem[]; +>childItems : NavigationBarItem[] +>NavigationBarItem : NavigationBarItem + + indent: number; +>indent : number + + bolded: boolean; +>bolded : boolean + + grayed: boolean; +>grayed : boolean + } + interface TodoCommentDescriptor { +>TodoCommentDescriptor : TodoCommentDescriptor + + text: string; +>text : string + + priority: number; +>priority : number + } + interface TodoComment { +>TodoComment : TodoComment + + descriptor: TodoCommentDescriptor; +>descriptor : TodoCommentDescriptor +>TodoCommentDescriptor : TodoCommentDescriptor + + message: string; +>message : string + + position: number; +>position : number + } + class TextChange { +>TextChange : TextChange + + span: TextSpan; +>span : TextSpan +>TextSpan : TextSpan + + newText: string; +>newText : string + } + interface RenameLocation { +>RenameLocation : RenameLocation + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + fileName: string; +>fileName : string + } + interface ReferenceEntry { +>ReferenceEntry : ReferenceEntry + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + fileName: string; +>fileName : string + + isWriteAccess: boolean; +>isWriteAccess : boolean + } + interface NavigateToItem { +>NavigateToItem : NavigateToItem + + name: string; +>name : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + matchKind: string; +>matchKind : string + + fileName: string; +>fileName : string + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + containerName: string; +>containerName : string + + containerKind: string; +>containerKind : string + } + interface EditorOptions { +>EditorOptions : EditorOptions + + IndentSize: number; +>IndentSize : number + + TabSize: number; +>TabSize : number + + NewLineCharacter: string; +>NewLineCharacter : string + + ConvertTabsToSpaces: boolean; +>ConvertTabsToSpaces : boolean + } + interface FormatCodeOptions extends EditorOptions { +>FormatCodeOptions : FormatCodeOptions +>EditorOptions : EditorOptions + + InsertSpaceAfterCommaDelimiter: boolean; +>InsertSpaceAfterCommaDelimiter : boolean + + InsertSpaceAfterSemicolonInForStatements: boolean; +>InsertSpaceAfterSemicolonInForStatements : boolean + + InsertSpaceBeforeAndAfterBinaryOperators: boolean; +>InsertSpaceBeforeAndAfterBinaryOperators : boolean + + InsertSpaceAfterKeywordsInControlFlowStatements: boolean; +>InsertSpaceAfterKeywordsInControlFlowStatements : boolean + + InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; +>InsertSpaceAfterFunctionKeywordForAnonymousFunctions : boolean + + InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; +>InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis : boolean + + PlaceOpenBraceOnNewLineForFunctions: boolean; +>PlaceOpenBraceOnNewLineForFunctions : boolean + + PlaceOpenBraceOnNewLineForControlBlocks: boolean; +>PlaceOpenBraceOnNewLineForControlBlocks : boolean + } + interface DefinitionInfo { +>DefinitionInfo : DefinitionInfo + + fileName: string; +>fileName : string + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + kind: string; +>kind : string + + name: string; +>name : string + + containerKind: string; +>containerKind : string + + containerName: string; +>containerName : string + } + enum SymbolDisplayPartKind { +>SymbolDisplayPartKind : SymbolDisplayPartKind + + aliasName = 0, +>aliasName : SymbolDisplayPartKind + + className = 1, +>className : SymbolDisplayPartKind + + enumName = 2, +>enumName : SymbolDisplayPartKind + + fieldName = 3, +>fieldName : SymbolDisplayPartKind + + interfaceName = 4, +>interfaceName : SymbolDisplayPartKind + + keyword = 5, +>keyword : SymbolDisplayPartKind + + lineBreak = 6, +>lineBreak : SymbolDisplayPartKind + + numericLiteral = 7, +>numericLiteral : SymbolDisplayPartKind + + stringLiteral = 8, +>stringLiteral : SymbolDisplayPartKind + + localName = 9, +>localName : SymbolDisplayPartKind + + methodName = 10, +>methodName : SymbolDisplayPartKind + + moduleName = 11, +>moduleName : SymbolDisplayPartKind + + operator = 12, +>operator : SymbolDisplayPartKind + + parameterName = 13, +>parameterName : SymbolDisplayPartKind + + propertyName = 14, +>propertyName : SymbolDisplayPartKind + + punctuation = 15, +>punctuation : SymbolDisplayPartKind + + space = 16, +>space : SymbolDisplayPartKind + + text = 17, +>text : SymbolDisplayPartKind + + typeParameterName = 18, +>typeParameterName : SymbolDisplayPartKind + + enumMemberName = 19, +>enumMemberName : SymbolDisplayPartKind + + functionName = 20, +>functionName : SymbolDisplayPartKind + + regularExpressionLiteral = 21, +>regularExpressionLiteral : SymbolDisplayPartKind + } + interface SymbolDisplayPart { +>SymbolDisplayPart : SymbolDisplayPart + + text: string; +>text : string + + kind: string; +>kind : string + } + interface QuickInfo { +>QuickInfo : QuickInfo + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + displayParts: SymbolDisplayPart[]; +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface RenameInfo { +>RenameInfo : RenameInfo + + canRename: boolean; +>canRename : boolean + + localizedErrorMessage: string; +>localizedErrorMessage : string + + displayName: string; +>displayName : string + + fullDisplayName: string; +>fullDisplayName : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + triggerSpan: TextSpan; +>triggerSpan : TextSpan +>TextSpan : TextSpan + } + interface SignatureHelpParameter { +>SignatureHelpParameter : SignatureHelpParameter + + name: string; +>name : string + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + displayParts: SymbolDisplayPart[]; +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + isOptional: boolean; +>isOptional : boolean + } + /** + * Represents a single signature to show in signature help. + * The id is used for subsequent calls into the language service to ask questions about the + * signature help item in the context of any documents that have been updated. i.e. after + * an edit has happened, while signature help is still active, the host can ask important + * questions like 'what parameter is the user currently contained within?'. + */ + interface SignatureHelpItem { +>SignatureHelpItem : SignatureHelpItem + + isVariadic: boolean; +>isVariadic : boolean + + prefixDisplayParts: SymbolDisplayPart[]; +>prefixDisplayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + suffixDisplayParts: SymbolDisplayPart[]; +>suffixDisplayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + separatorDisplayParts: SymbolDisplayPart[]; +>separatorDisplayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + parameters: SignatureHelpParameter[]; +>parameters : SignatureHelpParameter[] +>SignatureHelpParameter : SignatureHelpParameter + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + /** + * Represents a set of signature help items, and the preferred item that should be selected. + */ + interface SignatureHelpItems { +>SignatureHelpItems : SignatureHelpItems + + items: SignatureHelpItem[]; +>items : SignatureHelpItem[] +>SignatureHelpItem : SignatureHelpItem + + applicableSpan: TextSpan; +>applicableSpan : TextSpan +>TextSpan : TextSpan + + selectedItemIndex: number; +>selectedItemIndex : number + + argumentIndex: number; +>argumentIndex : number + + argumentCount: number; +>argumentCount : number + } + interface CompletionInfo { +>CompletionInfo : CompletionInfo + + isMemberCompletion: boolean; +>isMemberCompletion : boolean + + entries: CompletionEntry[]; +>entries : CompletionEntry[] +>CompletionEntry : CompletionEntry + } + interface CompletionEntry { +>CompletionEntry : CompletionEntry + + name: string; +>name : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + } + interface CompletionEntryDetails { +>CompletionEntryDetails : CompletionEntryDetails + + name: string; +>name : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + displayParts: SymbolDisplayPart[]; +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface OutliningSpan { +>OutliningSpan : OutliningSpan + + /** The span of the document to actually collapse. */ + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + /** The span of the document to display when the user hovers over the collapsed span. */ + hintSpan: TextSpan; +>hintSpan : TextSpan +>TextSpan : TextSpan + + /** The text to display in the editor for the collapsed region. */ + bannerText: string; +>bannerText : string + + /** + * Whether or not this region should be automatically collapsed when + * the 'Collapse to Definitions' command is invoked. + */ + autoCollapse: boolean; +>autoCollapse : boolean + } + interface EmitOutput { +>EmitOutput : EmitOutput + + outputFiles: OutputFile[]; +>outputFiles : OutputFile[] +>OutputFile : OutputFile + + emitOutputStatus: EmitReturnStatus; +>emitOutputStatus : EmitReturnStatus +>EmitReturnStatus : EmitReturnStatus + } + const enum OutputFileType { +>OutputFileType : OutputFileType + + JavaScript = 0, +>JavaScript : OutputFileType + + SourceMap = 1, +>SourceMap : OutputFileType + + Declaration = 2, +>Declaration : OutputFileType + } + interface OutputFile { +>OutputFile : OutputFile + + name: string; +>name : string + + writeByteOrderMark: boolean; +>writeByteOrderMark : boolean + + text: string; +>text : string + } + const enum EndOfLineState { +>EndOfLineState : EndOfLineState + + Start = 0, +>Start : EndOfLineState + + InMultiLineCommentTrivia = 1, +>InMultiLineCommentTrivia : EndOfLineState + + InSingleQuoteStringLiteral = 2, +>InSingleQuoteStringLiteral : EndOfLineState + + InDoubleQuoteStringLiteral = 3, +>InDoubleQuoteStringLiteral : EndOfLineState + } + enum TokenClass { +>TokenClass : TokenClass + + Punctuation = 0, +>Punctuation : TokenClass + + Keyword = 1, +>Keyword : TokenClass + + Operator = 2, +>Operator : TokenClass + + Comment = 3, +>Comment : TokenClass + + Whitespace = 4, +>Whitespace : TokenClass + + Identifier = 5, +>Identifier : TokenClass + + NumberLiteral = 6, +>NumberLiteral : TokenClass + + StringLiteral = 7, +>StringLiteral : TokenClass + + RegExpLiteral = 8, +>RegExpLiteral : TokenClass + } + interface ClassificationResult { +>ClassificationResult : ClassificationResult + + finalLexState: EndOfLineState; +>finalLexState : EndOfLineState +>EndOfLineState : EndOfLineState + + entries: ClassificationInfo[]; +>entries : ClassificationInfo[] +>ClassificationInfo : ClassificationInfo + } + interface ClassificationInfo { +>ClassificationInfo : ClassificationInfo + + length: number; +>length : number + + classification: TokenClass; +>classification : TokenClass +>TokenClass : TokenClass + } + interface Classifier { +>Classifier : Classifier + + getClassificationsForLine(text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean): ClassificationResult; +>getClassificationsForLine : (text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean) => ClassificationResult +>text : string +>lexState : EndOfLineState +>EndOfLineState : EndOfLineState +>classifyKeywordsInGenerics : boolean +>ClassificationResult : ClassificationResult + } + interface DocumentRegistry { +>DocumentRegistry : DocumentRegistry + + acquireDocument(filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean): SourceFile; +>acquireDocument : (filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean) => SourceFile +>filename : string +>compilationSettings : CompilerOptions +>CompilerOptions : CompilerOptions +>scriptSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>version : string +>isOpen : boolean +>SourceFile : SourceFile + + updateDocument(sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; +>updateDocument : (sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange) => SourceFile +>sourceFile : SourceFile +>SourceFile : SourceFile +>filename : string +>compilationSettings : CompilerOptions +>CompilerOptions : CompilerOptions +>scriptSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>version : string +>isOpen : boolean +>textChangeRange : TextChangeRange +>TextChangeRange : TextChangeRange +>SourceFile : SourceFile + + releaseDocument(filename: string, compilationSettings: CompilerOptions): void; +>releaseDocument : (filename: string, compilationSettings: CompilerOptions) => void +>filename : string +>compilationSettings : CompilerOptions +>CompilerOptions : CompilerOptions + } + class ScriptElementKind { +>ScriptElementKind : ScriptElementKind + + static unknown: string; +>unknown : string + + static keyword: string; +>keyword : string + + static scriptElement: string; +>scriptElement : string + + static moduleElement: string; +>moduleElement : string + + static classElement: string; +>classElement : string + + static interfaceElement: string; +>interfaceElement : string + + static typeElement: string; +>typeElement : string + + static enumElement: string; +>enumElement : string + + static variableElement: string; +>variableElement : string + + static localVariableElement: string; +>localVariableElement : string + + static functionElement: string; +>functionElement : string + + static localFunctionElement: string; +>localFunctionElement : string + + static memberFunctionElement: string; +>memberFunctionElement : string + + static memberGetAccessorElement: string; +>memberGetAccessorElement : string + + static memberSetAccessorElement: string; +>memberSetAccessorElement : string + + static memberVariableElement: string; +>memberVariableElement : string + + static constructorImplementationElement: string; +>constructorImplementationElement : string + + static callSignatureElement: string; +>callSignatureElement : string + + static indexSignatureElement: string; +>indexSignatureElement : string + + static constructSignatureElement: string; +>constructSignatureElement : string + + static parameterElement: string; +>parameterElement : string + + static typeParameterElement: string; +>typeParameterElement : string + + static primitiveType: string; +>primitiveType : string + + static label: string; +>label : string + + static alias: string; +>alias : string + + static constElement: string; +>constElement : string + + static letElement: string; +>letElement : string + } + class ScriptElementKindModifier { +>ScriptElementKindModifier : ScriptElementKindModifier + + static none: string; +>none : string + + static publicMemberModifier: string; +>publicMemberModifier : string + + static privateMemberModifier: string; +>privateMemberModifier : string + + static protectedMemberModifier: string; +>protectedMemberModifier : string + + static exportedModifier: string; +>exportedModifier : string + + static ambientModifier: string; +>ambientModifier : string + + static staticModifier: string; +>staticModifier : string + } + class ClassificationTypeNames { +>ClassificationTypeNames : ClassificationTypeNames + + static comment: string; +>comment : string + + static identifier: string; +>identifier : string + + static keyword: string; +>keyword : string + + static numericLiteral: string; +>numericLiteral : string + + static operator: string; +>operator : string + + static stringLiteral: string; +>stringLiteral : string + + static whiteSpace: string; +>whiteSpace : string + + static text: string; +>text : string + + static punctuation: string; +>punctuation : string + + static className: string; +>className : string + + static enumName: string; +>enumName : string + + static interfaceName: string; +>interfaceName : string + + static moduleName: string; +>moduleName : string + + static typeParameterName: string; +>typeParameterName : string + } + function displayPartsToString(displayParts: SymbolDisplayPart[]): string; +>displayPartsToString : (displayParts: SymbolDisplayPart[]) => string +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + interface DisplayPartsSymbolWriter extends SymbolWriter { +>DisplayPartsSymbolWriter : DisplayPartsSymbolWriter +>SymbolWriter : SymbolWriter + + displayParts(): SymbolDisplayPart[]; +>displayParts : () => SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + function getDefaultCompilerOptions(): CompilerOptions; +>getDefaultCompilerOptions : () => CompilerOptions +>CompilerOptions : CompilerOptions + + class OperationCanceledException { +>OperationCanceledException : OperationCanceledException + } + class CancellationTokenObject { +>CancellationTokenObject : CancellationTokenObject + + private cancellationToken; +>cancellationToken : any + + static None: CancellationTokenObject; +>None : CancellationTokenObject +>CancellationTokenObject : CancellationTokenObject + + constructor(cancellationToken: CancellationToken); +>cancellationToken : CancellationToken +>CancellationToken : CancellationToken + + isCancellationRequested(): boolean; +>isCancellationRequested : () => boolean + + throwIfCancellationRequested(): void; +>throwIfCancellationRequested : () => void + } + function createDocumentRegistry(): DocumentRegistry; +>createDocumentRegistry : () => DocumentRegistry +>DocumentRegistry : DocumentRegistry + + function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; +>preProcessFile : (sourceText: string, readImportFiles?: boolean) => PreProcessedFileInfo +>sourceText : string +>readImportFiles : boolean +>PreProcessedFileInfo : PreProcessedFileInfo + + function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry): LanguageService; +>createLanguageService : (host: LanguageServiceHost, documentRegistry: DocumentRegistry) => LanguageService +>host : LanguageServiceHost +>LanguageServiceHost : LanguageServiceHost +>documentRegistry : DocumentRegistry +>DocumentRegistry : DocumentRegistry +>LanguageService : LanguageService + + function createClassifier(host: Logger): Classifier; +>createClassifier : (host: Logger) => Classifier +>host : Logger +>Logger : Logger +>Classifier : Classifier +} + +export = ts; +>ts : typeof ts + diff --git a/tests/baselines/reference/APISample_standalone_compile.js b/tests/baselines/reference/APISample_standalone_compile.js new file mode 100644 index 00000000000..e1f55f8a4c2 --- /dev/null +++ b/tests/baselines/reference/APISample_standalone_compile.js @@ -0,0 +1,1836 @@ +//// [tests/cases/compiler/APISample_standalone_compile.ts] //// + +//// [APISample_standalone_compile.ts] + +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); + +var program = ts.createProgram(["file1.ts"], {}, undefined); +//// [typescriptServices.d.ts] +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + +declare module ts { + interface Map { + [index: string]: T; + } + interface TextRange { + pos: number; + end: number; + } + const enum SyntaxKind { + Unknown = 0, + EndOfFileToken = 1, + SingleLineCommentTrivia = 2, + MultiLineCommentTrivia = 3, + NewLineTrivia = 4, + WhitespaceTrivia = 5, + NumericLiteral = 6, + StringLiteral = 7, + RegularExpressionLiteral = 8, + NoSubstitutionTemplateLiteral = 9, + TemplateHead = 10, + TemplateMiddle = 11, + TemplateTail = 12, + OpenBraceToken = 13, + CloseBraceToken = 14, + OpenParenToken = 15, + CloseParenToken = 16, + OpenBracketToken = 17, + CloseBracketToken = 18, + DotToken = 19, + DotDotDotToken = 20, + SemicolonToken = 21, + CommaToken = 22, + LessThanToken = 23, + GreaterThanToken = 24, + LessThanEqualsToken = 25, + GreaterThanEqualsToken = 26, + EqualsEqualsToken = 27, + ExclamationEqualsToken = 28, + EqualsEqualsEqualsToken = 29, + ExclamationEqualsEqualsToken = 30, + EqualsGreaterThanToken = 31, + PlusToken = 32, + MinusToken = 33, + AsteriskToken = 34, + SlashToken = 35, + PercentToken = 36, + PlusPlusToken = 37, + MinusMinusToken = 38, + LessThanLessThanToken = 39, + GreaterThanGreaterThanToken = 40, + GreaterThanGreaterThanGreaterThanToken = 41, + AmpersandToken = 42, + BarToken = 43, + CaretToken = 44, + ExclamationToken = 45, + TildeToken = 46, + AmpersandAmpersandToken = 47, + BarBarToken = 48, + QuestionToken = 49, + ColonToken = 50, + EqualsToken = 51, + PlusEqualsToken = 52, + MinusEqualsToken = 53, + AsteriskEqualsToken = 54, + SlashEqualsToken = 55, + PercentEqualsToken = 56, + LessThanLessThanEqualsToken = 57, + GreaterThanGreaterThanEqualsToken = 58, + GreaterThanGreaterThanGreaterThanEqualsToken = 59, + AmpersandEqualsToken = 60, + BarEqualsToken = 61, + CaretEqualsToken = 62, + Identifier = 63, + BreakKeyword = 64, + CaseKeyword = 65, + CatchKeyword = 66, + ClassKeyword = 67, + ConstKeyword = 68, + ContinueKeyword = 69, + DebuggerKeyword = 70, + DefaultKeyword = 71, + DeleteKeyword = 72, + DoKeyword = 73, + ElseKeyword = 74, + EnumKeyword = 75, + ExportKeyword = 76, + ExtendsKeyword = 77, + FalseKeyword = 78, + FinallyKeyword = 79, + ForKeyword = 80, + FunctionKeyword = 81, + IfKeyword = 82, + ImportKeyword = 83, + InKeyword = 84, + InstanceOfKeyword = 85, + NewKeyword = 86, + NullKeyword = 87, + ReturnKeyword = 88, + SuperKeyword = 89, + SwitchKeyword = 90, + ThisKeyword = 91, + ThrowKeyword = 92, + TrueKeyword = 93, + TryKeyword = 94, + TypeOfKeyword = 95, + VarKeyword = 96, + VoidKeyword = 97, + WhileKeyword = 98, + WithKeyword = 99, + ImplementsKeyword = 100, + InterfaceKeyword = 101, + LetKeyword = 102, + PackageKeyword = 103, + PrivateKeyword = 104, + ProtectedKeyword = 105, + PublicKeyword = 106, + StaticKeyword = 107, + YieldKeyword = 108, + AnyKeyword = 109, + BooleanKeyword = 110, + ConstructorKeyword = 111, + DeclareKeyword = 112, + GetKeyword = 113, + ModuleKeyword = 114, + RequireKeyword = 115, + NumberKeyword = 116, + SetKeyword = 117, + StringKeyword = 118, + TypeKeyword = 119, + Missing = 120, + QualifiedName = 121, + ComputedPropertyName = 122, + TypeParameter = 123, + Parameter = 124, + Property = 125, + Method = 126, + Constructor = 127, + GetAccessor = 128, + SetAccessor = 129, + CallSignature = 130, + ConstructSignature = 131, + IndexSignature = 132, + TypeReference = 133, + FunctionType = 134, + ConstructorType = 135, + TypeQuery = 136, + TypeLiteral = 137, + ArrayType = 138, + TupleType = 139, + UnionType = 140, + ParenthesizedType = 141, + ArrayLiteralExpression = 142, + ObjectLiteralExpression = 143, + PropertyAccessExpression = 144, + ElementAccessExpression = 145, + CallExpression = 146, + NewExpression = 147, + TaggedTemplateExpression = 148, + TypeAssertionExpression = 149, + ParenthesizedExpression = 150, + FunctionExpression = 151, + ArrowFunction = 152, + DeleteExpression = 153, + TypeOfExpression = 154, + VoidExpression = 155, + PrefixUnaryExpression = 156, + PostfixUnaryExpression = 157, + BinaryExpression = 158, + ConditionalExpression = 159, + TemplateExpression = 160, + YieldExpression = 161, + OmittedExpression = 162, + TemplateSpan = 163, + Block = 164, + VariableStatement = 165, + EmptyStatement = 166, + ExpressionStatement = 167, + IfStatement = 168, + DoStatement = 169, + WhileStatement = 170, + ForStatement = 171, + ForInStatement = 172, + ContinueStatement = 173, + BreakStatement = 174, + ReturnStatement = 175, + WithStatement = 176, + SwitchStatement = 177, + LabeledStatement = 178, + ThrowStatement = 179, + TryStatement = 180, + TryBlock = 181, + CatchBlock = 182, + FinallyBlock = 183, + DebuggerStatement = 184, + VariableDeclaration = 185, + FunctionDeclaration = 186, + FunctionBlock = 187, + ClassDeclaration = 188, + InterfaceDeclaration = 189, + TypeAliasDeclaration = 190, + EnumDeclaration = 191, + ModuleDeclaration = 192, + ModuleBlock = 193, + ImportDeclaration = 194, + ExportAssignment = 195, + CaseClause = 196, + DefaultClause = 197, + HeritageClause = 198, + PropertyAssignment = 199, + ShorthandPropertyAssignment = 200, + EnumMember = 201, + SourceFile = 202, + Program = 203, + SyntaxList = 204, + Count = 205, + FirstAssignment = 51, + LastAssignment = 62, + FirstReservedWord = 64, + LastReservedWord = 99, + FirstKeyword = 64, + LastKeyword = 119, + FirstFutureReservedWord = 100, + LastFutureReservedWord = 108, + FirstTypeNode = 133, + LastTypeNode = 141, + FirstPunctuation = 13, + LastPunctuation = 62, + FirstToken = 1, + LastToken = 119, + FirstTriviaToken = 2, + LastTriviaToken = 5, + FirstLiteralToken = 6, + LastLiteralToken = 9, + FirstTemplateToken = 9, + LastTemplateToken = 12, + FirstOperator = 21, + LastOperator = 62, + FirstBinaryOperator = 23, + LastBinaryOperator = 62, + } + const enum NodeFlags { + Export = 1, + Ambient = 2, + QuestionMark = 4, + Rest = 8, + Public = 16, + Private = 32, + Protected = 64, + Static = 128, + MultiLine = 256, + Synthetic = 512, + DeclarationFile = 1024, + Let = 2048, + Const = 4096, + OctalLiteral = 8192, + Modifier = 243, + AccessibilityModifier = 112, + BlockScoped = 6144, + } + const enum ParserContextFlags { + StrictMode = 1, + DisallowIn = 2, + Yield = 4, + GeneratorParameter = 8, + } + interface Node extends TextRange { + kind: SyntaxKind; + flags: NodeFlags; + parserContextFlags?: ParserContextFlags; + id?: number; + parent?: Node; + symbol?: Symbol; + locals?: SymbolTable; + nextContainer?: Node; + localSymbol?: Symbol; + modifiers?: ModifiersArray; + } + interface NodeArray extends Array, TextRange { + hasTrailingComma?: boolean; + } + interface ModifiersArray extends Array { + flags: number; + } + interface Identifier extends PrimaryExpression { + text: string; + } + interface QualifiedName extends Node { + left: EntityName; + right: Identifier; + } + type EntityName = Identifier | QualifiedName; + interface ParsedSignature { + typeParameters?: NodeArray; + parameters: NodeArray; + type?: TypeNode; + } + type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; + interface Declaration extends Node { + _declarationBrand: any; + name?: DeclarationName; + } + interface ComputedPropertyName extends Node { + expression: Expression; + } + interface TypeParameterDeclaration extends Declaration { + name: Identifier; + constraint?: TypeNode; + expression?: Expression; + } + interface SignatureDeclaration extends Declaration, ParsedSignature { + } + interface VariableDeclaration extends Declaration { + name: Identifier; + type?: TypeNode; + initializer?: Expression; + } + interface PropertyDeclaration extends Declaration, ClassElement { + type?: TypeNode; + initializer?: Expression; + } + interface ShortHandPropertyDeclaration extends Declaration { + name: Identifier; + } + interface ParameterDeclaration extends VariableDeclaration { + } + /** + * Several node kinds share function-like features such as a signature, + * a name, and a body. These nodes should extend FunctionLikeDeclaration. + * Examples: + * FunctionDeclaration + * MethodDeclaration + * AccessorDeclaration + */ + interface FunctionLikeDeclaration extends SignatureDeclaration { + _functionLikeDeclarationBrand: any; + asteriskToken?: Node; + body?: Block | Expression; + } + interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { + name: Identifier; + body?: Block; + } + interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement { + body?: Block; + } + interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { + body?: Block; + } + interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement { + body?: Block; + } + interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { + _indexSignatureDeclarationBrand: any; + } + interface TypeNode extends Node { + } + interface TypeReferenceNode extends TypeNode { + typeName: EntityName; + typeArguments?: NodeArray; + } + interface TypeQueryNode extends TypeNode { + exprName: EntityName; + } + interface TypeLiteralNode extends TypeNode, Declaration { + members: NodeArray; + } + interface ArrayTypeNode extends TypeNode { + elementType: TypeNode; + } + interface TupleTypeNode extends TypeNode { + elementTypes: NodeArray; + } + interface UnionTypeNode extends TypeNode { + types: NodeArray; + } + interface ParenthesizedTypeNode extends TypeNode { + type: TypeNode; + } + interface StringLiteralTypeNode extends TypeNode { + text: string; + } + interface Expression extends Node { + _expressionBrand: any; + contextualType?: Type; + } + interface UnaryExpression extends Expression { + _unaryExpressionBrand: any; + } + interface PrefixUnaryExpression extends UnaryExpression { + operator: SyntaxKind; + operand: UnaryExpression; + } + interface PostfixUnaryExpression extends PostfixExpression { + operand: LeftHandSideExpression; + operator: SyntaxKind; + } + interface PostfixExpression extends UnaryExpression { + _postfixExpressionBrand: any; + } + interface LeftHandSideExpression extends PostfixExpression { + _leftHandSideExpressionBrand: any; + } + interface MemberExpression extends LeftHandSideExpression { + _memberExpressionBrand: any; + } + interface PrimaryExpression extends MemberExpression { + _primaryExpressionBrand: any; + } + interface DeleteExpression extends UnaryExpression { + expression: UnaryExpression; + } + interface TypeOfExpression extends UnaryExpression { + expression: UnaryExpression; + } + interface VoidExpression extends UnaryExpression { + expression: UnaryExpression; + } + interface YieldExpression extends Expression { + asteriskToken?: Node; + expression: Expression; + } + interface BinaryExpression extends Expression { + left: Expression; + operator: SyntaxKind; + right: Expression; + } + interface ConditionalExpression extends Expression { + condition: Expression; + whenTrue: Expression; + whenFalse: Expression; + } + interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { + name?: Identifier; + body: Block | Expression; + } + interface LiteralExpression extends PrimaryExpression { + text: string; + } + interface TemplateExpression extends PrimaryExpression { + head: LiteralExpression; + templateSpans: NodeArray; + } + interface TemplateSpan extends Node { + expression: Expression; + literal: LiteralExpression; + } + interface ParenthesizedExpression extends PrimaryExpression { + expression: Expression; + } + interface ArrayLiteralExpression extends PrimaryExpression { + elements: NodeArray; + } + interface ObjectLiteralExpression extends PrimaryExpression, Declaration { + properties: NodeArray; + } + interface PropertyAccessExpression extends MemberExpression { + expression: LeftHandSideExpression; + name: Identifier; + } + interface ElementAccessExpression extends MemberExpression { + expression: LeftHandSideExpression; + argumentExpression: Expression; + } + interface CallExpression extends LeftHandSideExpression { + expression: LeftHandSideExpression; + typeArguments?: NodeArray; + arguments: NodeArray; + } + interface NewExpression extends CallExpression, PrimaryExpression { + } + interface TaggedTemplateExpression extends MemberExpression { + tag: LeftHandSideExpression; + template: LiteralExpression | TemplateExpression; + } + type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression; + interface TypeAssertion extends UnaryExpression { + type: TypeNode; + expression: UnaryExpression; + } + interface Statement extends Node, ModuleElement { + _statementBrand: any; + } + interface Block extends Statement { + statements: NodeArray; + } + interface VariableStatement extends Statement { + declarations: NodeArray; + } + interface ExpressionStatement extends Statement { + expression: Expression; + } + interface IfStatement extends Statement { + expression: Expression; + thenStatement: Statement; + elseStatement?: Statement; + } + interface IterationStatement extends Statement { + statement: Statement; + } + interface DoStatement extends IterationStatement { + expression: Expression; + } + interface WhileStatement extends IterationStatement { + expression: Expression; + } + interface ForStatement extends IterationStatement { + declarations?: NodeArray; + initializer?: Expression; + condition?: Expression; + iterator?: Expression; + } + interface ForInStatement extends IterationStatement { + declarations?: NodeArray; + variable?: Expression; + expression: Expression; + } + interface BreakOrContinueStatement extends Statement { + label?: Identifier; + } + interface ReturnStatement extends Statement { + expression?: Expression; + } + interface WithStatement extends Statement { + expression: Expression; + statement: Statement; + } + interface SwitchStatement extends Statement { + expression: Expression; + clauses: NodeArray; + } + interface CaseOrDefaultClause extends Node { + expression?: Expression; + statements: NodeArray; + } + interface LabeledStatement extends Statement { + label: Identifier; + statement: Statement; + } + interface ThrowStatement extends Statement { + expression: Expression; + } + interface TryStatement extends Statement { + tryBlock: Block; + catchBlock?: CatchBlock; + finallyBlock?: Block; + } + interface CatchBlock extends Block, Declaration { + variable: Identifier; + type?: TypeNode; + } + interface ModuleElement extends Node { + _moduleElementBrand: any; + } + interface ClassDeclaration extends Declaration, ModuleElement { + name: Identifier; + typeParameters?: NodeArray; + heritageClauses?: NodeArray; + members: NodeArray; + } + interface ClassElement extends Declaration { + _classElementBrand: any; + } + interface InterfaceDeclaration extends Declaration, ModuleElement { + name: Identifier; + typeParameters?: NodeArray; + heritageClauses?: NodeArray; + members: NodeArray; + } + interface HeritageClause extends Node { + token: SyntaxKind; + types?: NodeArray; + } + interface TypeAliasDeclaration extends Declaration, ModuleElement { + name: Identifier; + type: TypeNode; + } + interface EnumMember extends Declaration { + name: DeclarationName; + initializer?: Expression; + } + interface EnumDeclaration extends Declaration, ModuleElement { + name: Identifier; + members: NodeArray; + } + interface ModuleDeclaration extends Declaration, ModuleElement { + name: Identifier | LiteralExpression; + body: ModuleBlock | ModuleDeclaration; + } + interface ModuleBlock extends Node, ModuleElement { + statements: NodeArray; + } + interface ImportDeclaration extends Declaration, ModuleElement { + name: Identifier; + entityName?: EntityName; + externalModuleName?: LiteralExpression; + } + interface ExportAssignment extends Statement, ModuleElement { + exportName: Identifier; + } + interface FileReference extends TextRange { + filename: string; + } + interface CommentRange extends TextRange { + hasTrailingNewLine?: boolean; + } + interface SourceFile extends Declaration { + statements: NodeArray; + filename: string; + text: string; + getLineAndCharacterFromPosition(position: number): LineAndCharacter; + getPositionFromLineAndCharacter(line: number, character: number): number; + getLineStarts(): number[]; + amdDependencies: string[]; + amdModuleName: string; + referencedFiles: FileReference[]; + semanticDiagnostics: Diagnostic[]; + parseDiagnostics: Diagnostic[]; + grammarDiagnostics: Diagnostic[]; + getSyntacticDiagnostics(): Diagnostic[]; + hasNoDefaultLib: boolean; + externalModuleIndicator: Node; + nodeCount: number; + identifierCount: number; + symbolCount: number; + isOpen: boolean; + version: string; + languageVersion: ScriptTarget; + identifiers: Map; + } + interface Program { + getSourceFile(filename: string): SourceFile; + getSourceFiles(): SourceFile[]; + getCompilerOptions(): CompilerOptions; + getCompilerHost(): CompilerHost; + getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; + getGlobalDiagnostics(): Diagnostic[]; + getTypeChecker(fullTypeCheckMode: boolean): TypeChecker; + getCommonSourceDirectory(): string; + } + interface SourceMapSpan { + emittedLine: number; + emittedColumn: number; + sourceLine: number; + sourceColumn: number; + nameIndex?: number; + sourceIndex: number; + } + interface SourceMapData { + sourceMapFilePath: string; + jsSourceMappingURL: string; + sourceMapFile: string; + sourceMapSourceRoot: string; + sourceMapSources: string[]; + inputSourceFileNames: string[]; + sourceMapNames?: string[]; + sourceMapMappings: string; + sourceMapDecodedMappings: SourceMapSpan[]; + } + enum EmitReturnStatus { + Succeeded = 0, + AllOutputGenerationSkipped = 1, + JSGeneratedWithSemanticErrors = 2, + DeclarationGenerationSkipped = 3, + EmitErrorsEncountered = 4, + CompilerOptionsErrors = 5, + } + interface EmitResult { + emitResultStatus: EmitReturnStatus; + diagnostics: Diagnostic[]; + sourceMaps: SourceMapData[]; + } + interface TypeChecker { + getProgram(): Program; + getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; + getDeclarationDiagnostics(sourceFile: SourceFile): Diagnostic[]; + getGlobalDiagnostics(): Diagnostic[]; + getNodeCount(): number; + getIdentifierCount(): number; + getSymbolCount(): number; + getTypeCount(): number; + checkProgram(): void; + emitFiles(targetSourceFile?: SourceFile): EmitResult; + getParentOfSymbol(symbol: Symbol): Symbol; + getNarrowedTypeOfSymbol(symbol: Symbol, node: Node): Type; + getDeclaredTypeOfSymbol(symbol: Symbol): Type; + getPropertiesOfType(type: Type): Symbol[]; + getPropertyOfType(type: Type, propertyName: string): Symbol; + getSignaturesOfType(type: Type, kind: SignatureKind): Signature[]; + getIndexTypeOfType(type: Type, kind: IndexKind): Type; + getReturnTypeOfSignature(signature: Signature): Type; + getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; + getSymbolInfo(node: Node): Symbol; + getShorthandAssignmentValueSymbol(location: Node): Symbol; + getTypeOfNode(node: Node): Type; + typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; + symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; + getSymbolDisplayBuilder(): SymbolDisplayBuilder; + getFullyQualifiedName(symbol: Symbol): string; + getAugmentedPropertiesOfType(type: Type): Symbol[]; + getRootSymbols(symbol: Symbol): Symbol[]; + getContextualType(node: Node): Type; + getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; + getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; + isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; + isUndefinedSymbol(symbol: Symbol): boolean; + isArgumentsSymbol(symbol: Symbol): boolean; + isEmitBlocked(sourceFile?: SourceFile): boolean; + getEnumMemberValue(node: EnumMember): number; + isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; + getAliasedSymbol(symbol: Symbol): Symbol; + } + interface SymbolDisplayBuilder { + buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void; + buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void; + buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + } + interface SymbolWriter { + writeKeyword(text: string): void; + writeOperator(text: string): void; + writePunctuation(text: string): void; + writeSpace(text: string): void; + writeStringLiteral(text: string): void; + writeParameter(text: string): void; + writeSymbol(text: string, symbol: Symbol): void; + writeLine(): void; + increaseIndent(): void; + decreaseIndent(): void; + clear(): void; + trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void; + } + const enum TypeFormatFlags { + None = 0, + WriteArrayAsGenericType = 1, + UseTypeOfFunction = 2, + NoTruncation = 4, + WriteArrowStyleSignature = 8, + WriteOwnNameForAnyLike = 16, + WriteTypeArgumentsOfSignature = 32, + InElementType = 64, + } + const enum SymbolFormatFlags { + None = 0, + WriteTypeParametersOrArguments = 1, + UseOnlyExternalAliasing = 2, + } + const enum SymbolAccessibility { + Accessible = 0, + NotAccessible = 1, + CannotBeNamed = 2, + } + interface SymbolVisibilityResult { + accessibility: SymbolAccessibility; + aliasesToMakeVisible?: ImportDeclaration[]; + errorSymbolName?: string; + errorNode?: Node; + } + interface SymbolAccessiblityResult extends SymbolVisibilityResult { + errorModuleName?: string; + } + interface EmitResolver { + getProgram(): Program; + getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; + getExpressionNamePrefix(node: Identifier): string; + getExportAssignmentName(node: SourceFile): string; + isReferencedImportDeclaration(node: ImportDeclaration): boolean; + isTopLevelValueImportWithEntityName(node: ImportDeclaration): boolean; + getNodeCheckFlags(node: Node): NodeCheckFlags; + getEnumMemberValue(node: EnumMember): number; + hasSemanticErrors(): boolean; + isDeclarationVisible(node: Declaration): boolean; + isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; + writeTypeAtLocation(location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; + writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; + isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; + isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; + getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number; + isEmitBlocked(sourceFile?: SourceFile): boolean; + } + const enum SymbolFlags { + FunctionScopedVariable = 1, + BlockScopedVariable = 2, + Property = 4, + EnumMember = 8, + Function = 16, + Class = 32, + Interface = 64, + ConstEnum = 128, + RegularEnum = 256, + ValueModule = 512, + NamespaceModule = 1024, + TypeLiteral = 2048, + ObjectLiteral = 4096, + Method = 8192, + Constructor = 16384, + GetAccessor = 32768, + SetAccessor = 65536, + CallSignature = 131072, + ConstructSignature = 262144, + IndexSignature = 524288, + TypeParameter = 1048576, + TypeAlias = 2097152, + ExportValue = 4194304, + ExportType = 8388608, + ExportNamespace = 16777216, + Import = 33554432, + Instantiated = 67108864, + Merged = 134217728, + Transient = 268435456, + Prototype = 536870912, + UnionProperty = 1073741824, + Enum = 384, + Variable = 3, + Value = 107455, + Type = 3152352, + Namespace = 1536, + Module = 1536, + Accessor = 98304, + Signature = 917504, + FunctionScopedVariableExcludes = 107454, + BlockScopedVariableExcludes = 107455, + ParameterExcludes = 107455, + PropertyExcludes = 107455, + EnumMemberExcludes = 107455, + FunctionExcludes = 106927, + ClassExcludes = 3258879, + InterfaceExcludes = 3152288, + RegularEnumExcludes = 3258623, + ConstEnumExcludes = 3259263, + ValueModuleExcludes = 106639, + NamespaceModuleExcludes = 0, + MethodExcludes = 99263, + GetAccessorExcludes = 41919, + SetAccessorExcludes = 74687, + TypeParameterExcludes = 2103776, + TypeAliasExcludes = 3152352, + ImportExcludes = 33554432, + ModuleMember = 35653619, + ExportHasLocal = 944, + HasLocals = 1041936, + HasExports = 1952, + HasMembers = 6240, + IsContainer = 1048560, + PropertyOrAccessor = 98308, + Export = 29360128, + } + interface Symbol { + flags: SymbolFlags; + name: string; + id?: number; + mergeId?: number; + declarations?: Declaration[]; + parent?: Symbol; + members?: SymbolTable; + exports?: SymbolTable; + exportSymbol?: Symbol; + valueDeclaration?: Declaration; + constEnumOnlyModule?: boolean; + } + interface SymbolLinks { + target?: Symbol; + type?: Type; + declaredType?: Type; + mapper?: TypeMapper; + referenced?: boolean; + exportAssignSymbol?: Symbol; + unionType?: UnionType; + } + interface TransientSymbol extends Symbol, SymbolLinks { + } + interface SymbolTable { + [index: string]: Symbol; + } + const enum NodeCheckFlags { + TypeChecked = 1, + LexicalThis = 2, + CaptureThis = 4, + EmitExtends = 8, + SuperInstance = 16, + SuperStatic = 32, + ContextChecked = 64, + EnumValuesComputed = 128, + } + interface NodeLinks { + resolvedType?: Type; + resolvedSignature?: Signature; + resolvedSymbol?: Symbol; + flags?: NodeCheckFlags; + enumMemberValue?: number; + isIllegalTypeReferenceInConstraint?: boolean; + isVisible?: boolean; + localModuleName?: string; + assignmentChecks?: Map; + } + const enum TypeFlags { + Any = 1, + String = 2, + Number = 4, + Boolean = 8, + Void = 16, + Undefined = 32, + Null = 64, + Enum = 128, + StringLiteral = 256, + TypeParameter = 512, + Class = 1024, + Interface = 2048, + Reference = 4096, + Tuple = 8192, + Union = 16384, + Anonymous = 32768, + FromSignature = 65536, + Intrinsic = 127, + StringLike = 258, + NumberLike = 132, + ObjectType = 48128, + Structured = 65025, + } + interface Type { + flags: TypeFlags; + id: number; + symbol?: Symbol; + } + interface IntrinsicType extends Type { + intrinsicName: string; + } + interface StringLiteralType extends Type { + text: string; + } + interface ObjectType extends Type { + } + interface InterfaceType extends ObjectType { + typeParameters: TypeParameter[]; + baseTypes: ObjectType[]; + declaredProperties: Symbol[]; + declaredCallSignatures: Signature[]; + declaredConstructSignatures: Signature[]; + declaredStringIndexType: Type; + declaredNumberIndexType: Type; + } + interface TypeReference extends ObjectType { + target: GenericType; + typeArguments: Type[]; + } + interface GenericType extends InterfaceType, TypeReference { + instantiations: Map; + openReferenceTargets: GenericType[]; + openReferenceChecks: Map; + } + interface TupleType extends ObjectType { + elementTypes: Type[]; + baseArrayType: TypeReference; + } + interface UnionType extends Type { + types: Type[]; + resolvedProperties: SymbolTable; + } + interface ResolvedType extends ObjectType, UnionType { + members: SymbolTable; + properties: Symbol[]; + callSignatures: Signature[]; + constructSignatures: Signature[]; + stringIndexType: Type; + numberIndexType: Type; + } + interface TypeParameter extends Type { + constraint: Type; + target?: TypeParameter; + mapper?: TypeMapper; + } + const enum SignatureKind { + Call = 0, + Construct = 1, + } + interface Signature { + declaration: SignatureDeclaration; + typeParameters: TypeParameter[]; + parameters: Symbol[]; + resolvedReturnType: Type; + minArgumentCount: number; + hasRestParameter: boolean; + hasStringLiterals: boolean; + target?: Signature; + mapper?: TypeMapper; + unionSignatures?: Signature[]; + erasedSignatureCache?: Signature; + isolatedSignatureType?: ObjectType; + } + const enum IndexKind { + String = 0, + Number = 1, + } + interface TypeMapper { + (t: Type): Type; + } + interface TypeInferences { + primary: Type[]; + secondary: Type[]; + } + interface InferenceContext { + typeParameters: TypeParameter[]; + inferUnionTypes: boolean; + inferences: TypeInferences[]; + inferredTypes: Type[]; + failedTypeParameterIndex?: number; + } + interface DiagnosticMessage { + key: string; + category: DiagnosticCategory; + code: number; + isEarly?: boolean; + } + interface DiagnosticMessageChain { + messageText: string; + category: DiagnosticCategory; + code: number; + next?: DiagnosticMessageChain; + } + interface Diagnostic { + file: SourceFile; + start: number; + length: number; + messageText: string; + category: DiagnosticCategory; + code: number; + /** + * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit + */ + isEarly?: boolean; + /** + * Parse error - error produced by parser when it scanner returns a token + * that parser does not understand in its current state + * (as opposed to grammar error when parser can interpret the token but interpretation is not legal from the grammar perespective) + */ + isParseError?: boolean; + } + enum DiagnosticCategory { + Warning = 0, + Error = 1, + Message = 2, + } + interface CompilerOptions { + charset?: string; + codepage?: number; + declaration?: boolean; + diagnostics?: boolean; + emitBOM?: boolean; + help?: boolean; + locale?: string; + mapRoot?: string; + module?: ModuleKind; + noEmitOnError?: boolean; + noErrorTruncation?: boolean; + noImplicitAny?: boolean; + noLib?: boolean; + noLibCheck?: boolean; + noResolve?: boolean; + out?: string; + outDir?: string; + removeComments?: boolean; + sourceMap?: boolean; + sourceRoot?: string; + target?: ScriptTarget; + version?: boolean; + watch?: boolean; + preserveConstEnums?: boolean; + [option: string]: string | number | boolean; + } + const enum ModuleKind { + None = 0, + CommonJS = 1, + AMD = 2, + } + interface LineAndCharacter { + line: number; + character: number; + } + const enum ScriptTarget { + ES3 = 0, + ES5 = 1, + ES6 = 2, + Latest = 2, + } + interface ParsedCommandLine { + options: CompilerOptions; + filenames: string[]; + errors: Diagnostic[]; + } + interface CommandLineOption { + name: string; + type: string | Map; + shortName?: string; + description?: DiagnosticMessage; + paramName?: DiagnosticMessage; + error?: DiagnosticMessage; + } + const enum CharacterCodes { + nullCharacter = 0, + maxAsciiCharacter = 127, + lineFeed = 10, + carriageReturn = 13, + lineSeparator = 8232, + paragraphSeparator = 8233, + nextLine = 133, + space = 32, + nonBreakingSpace = 160, + enQuad = 8192, + emQuad = 8193, + enSpace = 8194, + emSpace = 8195, + threePerEmSpace = 8196, + fourPerEmSpace = 8197, + sixPerEmSpace = 8198, + figureSpace = 8199, + punctuationSpace = 8200, + thinSpace = 8201, + hairSpace = 8202, + zeroWidthSpace = 8203, + narrowNoBreakSpace = 8239, + ideographicSpace = 12288, + mathematicalSpace = 8287, + ogham = 5760, + _ = 95, + $ = 36, + _0 = 48, + _1 = 49, + _2 = 50, + _3 = 51, + _4 = 52, + _5 = 53, + _6 = 54, + _7 = 55, + _8 = 56, + _9 = 57, + a = 97, + b = 98, + c = 99, + d = 100, + e = 101, + f = 102, + g = 103, + h = 104, + i = 105, + j = 106, + k = 107, + l = 108, + m = 109, + n = 110, + o = 111, + p = 112, + q = 113, + r = 114, + s = 115, + t = 116, + u = 117, + v = 118, + w = 119, + x = 120, + y = 121, + z = 122, + A = 65, + B = 66, + C = 67, + D = 68, + E = 69, + F = 70, + G = 71, + H = 72, + I = 73, + J = 74, + K = 75, + L = 76, + M = 77, + N = 78, + O = 79, + P = 80, + Q = 81, + R = 82, + S = 83, + T = 84, + U = 85, + V = 86, + W = 87, + X = 88, + Y = 89, + Z = 90, + ampersand = 38, + asterisk = 42, + at = 64, + backslash = 92, + backtick = 96, + bar = 124, + caret = 94, + closeBrace = 125, + closeBracket = 93, + closeParen = 41, + colon = 58, + comma = 44, + dot = 46, + doubleQuote = 34, + equals = 61, + exclamation = 33, + greaterThan = 62, + lessThan = 60, + minus = 45, + openBrace = 123, + openBracket = 91, + openParen = 40, + percent = 37, + plus = 43, + question = 63, + semicolon = 59, + singleQuote = 39, + slash = 47, + tilde = 126, + backspace = 8, + formFeed = 12, + byteOrderMark = 65279, + tab = 9, + verticalTab = 11, + } + interface CancellationToken { + isCancellationRequested(): boolean; + } + interface CompilerHost { + getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; + getDefaultLibFilename(): string; + getCancellationToken?(): CancellationToken; + writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; + getCurrentDirectory(): string; + getCanonicalFileName(fileName: string): string; + useCaseSensitiveFileNames(): boolean; + getNewLine(): string; + } +} +declare module ts { + interface ErrorCallback { + (message: DiagnosticMessage): void; + } + interface CommentCallback { + (pos: number, end: number): void; + } + interface Scanner { + getStartPos(): number; + getToken(): SyntaxKind; + getTextPos(): number; + getTokenPos(): number; + getTokenText(): string; + getTokenValue(): string; + hasPrecedingLineBreak(): boolean; + isIdentifier(): boolean; + isReservedWord(): boolean; + reScanGreaterToken(): SyntaxKind; + reScanSlashToken(): SyntaxKind; + reScanTemplateToken(): SyntaxKind; + scan(): SyntaxKind; + setText(text: string): void; + setTextPos(textPos: number): void; + tryScan(callback: () => T): T; + } + function tokenToString(t: SyntaxKind): string; + function computeLineStarts(text: string): number[]; + function getPositionFromLineAndCharacter(lineStarts: number[], line: number, character: number): number; + function getLineAndCharacterOfPosition(lineStarts: number[], position: number): { + line: number; + character: number; + }; + function positionToLineAndCharacter(text: string, pos: number): { + line: number; + character: number; + }; + function isWhiteSpace(ch: number): boolean; + function isLineBreak(ch: number): boolean; + function isOctalDigit(ch: number): boolean; + function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean): number; + function getLeadingCommentRanges(text: string, pos: number): CommentRange[]; + function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; + function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; + function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; + function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback): Scanner; +} +declare module ts { + interface ReferencePathMatchResult { + fileReference?: FileReference; + diagnostic?: DiagnosticMessage; + isNoDefaultLib?: boolean; + } + function getNodeConstructor(kind: SyntaxKind): new () => Node; + function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; + function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; + function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; +} +declare module ts { + function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; +} +declare module ts { + interface Node { + getSourceFile(): SourceFile; + getChildCount(sourceFile?: SourceFile): number; + getChildAt(index: number, sourceFile?: SourceFile): Node; + getChildren(sourceFile?: SourceFile): Node[]; + getStart(sourceFile?: SourceFile): number; + getFullStart(): number; + getEnd(): number; + getWidth(sourceFile?: SourceFile): number; + getFullWidth(): number; + getLeadingTriviaWidth(sourceFile?: SourceFile): number; + getFullText(sourceFile?: SourceFile): string; + getText(sourceFile?: SourceFile): string; + getFirstToken(sourceFile?: SourceFile): Node; + getLastToken(sourceFile?: SourceFile): Node; + } + interface Symbol { + getFlags(): SymbolFlags; + getName(): string; + getDeclarations(): Declaration[]; + getDocumentationComment(): SymbolDisplayPart[]; + } + interface Type { + getFlags(): TypeFlags; + getSymbol(): Symbol; + getProperties(): Symbol[]; + getProperty(propertyName: string): Symbol; + getApparentProperties(): Symbol[]; + getCallSignatures(): Signature[]; + getConstructSignatures(): Signature[]; + getStringIndexType(): Type; + getNumberIndexType(): Type; + } + interface Signature { + getDeclaration(): SignatureDeclaration; + getTypeParameters(): Type[]; + getParameters(): Symbol[]; + getReturnType(): Type; + getDocumentationComment(): SymbolDisplayPart[]; + } + interface SourceFile { + getScriptSnapshot(): IScriptSnapshot; + getNamedDeclarations(): Declaration[]; + update(scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; + } + /** + * Represents an immutable snapshot of a script at a specified time.Once acquired, the + * snapshot is observably immutable. i.e. the same calls with the same parameters will return + * the same values. + */ + interface IScriptSnapshot { + /** Gets a portion of the script snapshot specified by [start, end). */ + getText(start: number, end: number): string; + /** Gets the length of this script snapshot. */ + getLength(): number; + /** + * This call returns the array containing the start position of every line. + * i.e."[0, 10, 55]". TODO: consider making this optional. The language service could + * always determine this (albeit in a more expensive manner). + */ + getLineStartPositions(): number[]; + /** + * Gets the TextChangeRange that describe how the text changed between this text and + * an older version. This information is used by the incremental parser to determine + * what sections of the script need to be re-parsed. 'undefined' can be returned if the + * change range cannot be determined. However, in that case, incremental parsing will + * not happen and the entire document will be re - parsed. + */ + getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; + } + module ScriptSnapshot { + function fromString(text: string): IScriptSnapshot; + } + interface PreProcessedFileInfo { + referencedFiles: FileReference[]; + importedFiles: FileReference[]; + isLibFile: boolean; + } + interface Logger { + log(s: string): void; + } + interface LanguageServiceHost extends Logger { + getCompilationSettings(): CompilerOptions; + getScriptFileNames(): string[]; + getScriptVersion(fileName: string): string; + getScriptIsOpen(fileName: string): boolean; + getScriptSnapshot(fileName: string): IScriptSnapshot; + getLocalizedDiagnosticMessages(): any; + getCancellationToken(): CancellationToken; + getCurrentDirectory(): string; + getDefaultLibFilename(): string; + } + interface LanguageService { + cleanupSemanticCache(): void; + getSyntacticDiagnostics(fileName: string): Diagnostic[]; + getSemanticDiagnostics(fileName: string): Diagnostic[]; + getCompilerOptionsDiagnostics(): Diagnostic[]; + getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; + getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; + getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): CompletionInfo; + getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; + getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; + getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; + getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan; + getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems; + getRenameInfo(fileName: string, position: number): RenameInfo; + findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[]; + getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; + getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; + getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; + getNavigateToItems(searchValue: string): NavigateToItem[]; + getNavigationBarItems(fileName: string): NavigationBarItem[]; + getOutliningSpans(fileName: string): OutliningSpan[]; + getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; + getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; + getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number; + getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[]; + getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; + getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[]; + getEmitOutput(fileName: string): EmitOutput; + getSourceFile(filename: string): SourceFile; + dispose(): void; + } + class TextSpan { + private _start; + private _length; + /** + * Creates a TextSpan instance beginning with the position Start and having the Length + * specified with length. + */ + constructor(start: number, length: number); + toJSON(key: any): any; + start(): number; + length(): number; + end(): number; + isEmpty(): boolean; + /** + * Determines whether the position lies within the span. Returns true if the position is greater than or equal to Start and strictly less + * than End, otherwise false. + * @param position The position to check. + */ + containsPosition(position: number): boolean; + /** + * Determines whether span falls completely within this span. Returns true if the specified span falls completely within this span, otherwise false. + * @param span The span to check. + */ + containsTextSpan(span: TextSpan): boolean; + /** + * Determines whether the given span overlaps this span. Two spans are considered to overlap + * if they have positions in common and neither is empty. Empty spans do not overlap with any + * other span. Returns true if the spans overlap, false otherwise. + * @param span The span to check. + */ + overlapsWith(span: TextSpan): boolean; + /** + * Returns the overlap with the given span, or undefined if there is no overlap. + * @param span The span to check. + */ + overlap(span: TextSpan): TextSpan; + /** + * Determines whether span intersects this span. Two spans are considered to + * intersect if they have positions in common or the end of one span + * coincides with the start of the other span. Returns true if the spans intersect, false otherwise. + * @param The span to check. + */ + intersectsWithTextSpan(span: TextSpan): boolean; + intersectsWith(start: number, length: number): boolean; + /** + * Determines whether the given position intersects this span. + * A position is considered to intersect if it is between the start and + * end positions (inclusive) of this span. Returns true if the position intersects, false otherwise. + * @param position The position to check. + */ + intersectsWithPosition(position: number): boolean; + /** + * Returns the intersection with the given span, or undefined if there is no intersection. + * @param span The span to check. + */ + intersection(span: TextSpan): TextSpan; + /** + * Creates a new TextSpan from the given start and end positions + * as opposed to a position and length. + */ + static fromBounds(start: number, end: number): TextSpan; + } + class TextChangeRange { + static unchanged: TextChangeRange; + private _span; + private _newLength; + /** + * Initializes a new instance of TextChangeRange. + */ + constructor(span: TextSpan, newLength: number); + /** + * The span of text before the edit which is being changed + */ + span(): TextSpan; + /** + * Width of the span after the edit. A 0 here would represent a delete + */ + newLength(): number; + newSpan(): TextSpan; + isUnchanged(): boolean; + /** + * Called to merge all the changes that occurred across several versions of a script snapshot + * into a single change. i.e. if a user keeps making successive edits to a script we will + * have a text change from V1 to V2, V2 to V3, ..., Vn. + * + * This function will then merge those changes into a single change range valid between V1 and + * Vn. + */ + static collapseChangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; + } + interface ClassifiedSpan { + textSpan: TextSpan; + classificationType: string; + } + interface NavigationBarItem { + text: string; + kind: string; + kindModifiers: string; + spans: TextSpan[]; + childItems: NavigationBarItem[]; + indent: number; + bolded: boolean; + grayed: boolean; + } + interface TodoCommentDescriptor { + text: string; + priority: number; + } + interface TodoComment { + descriptor: TodoCommentDescriptor; + message: string; + position: number; + } + class TextChange { + span: TextSpan; + newText: string; + } + interface RenameLocation { + textSpan: TextSpan; + fileName: string; + } + interface ReferenceEntry { + textSpan: TextSpan; + fileName: string; + isWriteAccess: boolean; + } + interface NavigateToItem { + name: string; + kind: string; + kindModifiers: string; + matchKind: string; + fileName: string; + textSpan: TextSpan; + containerName: string; + containerKind: string; + } + interface EditorOptions { + IndentSize: number; + TabSize: number; + NewLineCharacter: string; + ConvertTabsToSpaces: boolean; + } + interface FormatCodeOptions extends EditorOptions { + InsertSpaceAfterCommaDelimiter: boolean; + InsertSpaceAfterSemicolonInForStatements: boolean; + InsertSpaceBeforeAndAfterBinaryOperators: boolean; + InsertSpaceAfterKeywordsInControlFlowStatements: boolean; + InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; + InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; + PlaceOpenBraceOnNewLineForFunctions: boolean; + PlaceOpenBraceOnNewLineForControlBlocks: boolean; + } + interface DefinitionInfo { + fileName: string; + textSpan: TextSpan; + kind: string; + name: string; + containerKind: string; + containerName: string; + } + enum SymbolDisplayPartKind { + aliasName = 0, + className = 1, + enumName = 2, + fieldName = 3, + interfaceName = 4, + keyword = 5, + lineBreak = 6, + numericLiteral = 7, + stringLiteral = 8, + localName = 9, + methodName = 10, + moduleName = 11, + operator = 12, + parameterName = 13, + propertyName = 14, + punctuation = 15, + space = 16, + text = 17, + typeParameterName = 18, + enumMemberName = 19, + functionName = 20, + regularExpressionLiteral = 21, + } + interface SymbolDisplayPart { + text: string; + kind: string; + } + interface QuickInfo { + kind: string; + kindModifiers: string; + textSpan: TextSpan; + displayParts: SymbolDisplayPart[]; + documentation: SymbolDisplayPart[]; + } + interface RenameInfo { + canRename: boolean; + localizedErrorMessage: string; + displayName: string; + fullDisplayName: string; + kind: string; + kindModifiers: string; + triggerSpan: TextSpan; + } + interface SignatureHelpParameter { + name: string; + documentation: SymbolDisplayPart[]; + displayParts: SymbolDisplayPart[]; + isOptional: boolean; + } + /** + * Represents a single signature to show in signature help. + * The id is used for subsequent calls into the language service to ask questions about the + * signature help item in the context of any documents that have been updated. i.e. after + * an edit has happened, while signature help is still active, the host can ask important + * questions like 'what parameter is the user currently contained within?'. + */ + interface SignatureHelpItem { + isVariadic: boolean; + prefixDisplayParts: SymbolDisplayPart[]; + suffixDisplayParts: SymbolDisplayPart[]; + separatorDisplayParts: SymbolDisplayPart[]; + parameters: SignatureHelpParameter[]; + documentation: SymbolDisplayPart[]; + } + /** + * Represents a set of signature help items, and the preferred item that should be selected. + */ + interface SignatureHelpItems { + items: SignatureHelpItem[]; + applicableSpan: TextSpan; + selectedItemIndex: number; + argumentIndex: number; + argumentCount: number; + } + interface CompletionInfo { + isMemberCompletion: boolean; + entries: CompletionEntry[]; + } + interface CompletionEntry { + name: string; + kind: string; + kindModifiers: string; + } + interface CompletionEntryDetails { + name: string; + kind: string; + kindModifiers: string; + displayParts: SymbolDisplayPart[]; + documentation: SymbolDisplayPart[]; + } + interface OutliningSpan { + /** The span of the document to actually collapse. */ + textSpan: TextSpan; + /** The span of the document to display when the user hovers over the collapsed span. */ + hintSpan: TextSpan; + /** The text to display in the editor for the collapsed region. */ + bannerText: string; + /** + * Whether or not this region should be automatically collapsed when + * the 'Collapse to Definitions' command is invoked. + */ + autoCollapse: boolean; + } + interface EmitOutput { + outputFiles: OutputFile[]; + emitOutputStatus: EmitReturnStatus; + } + const enum OutputFileType { + JavaScript = 0, + SourceMap = 1, + Declaration = 2, + } + interface OutputFile { + name: string; + writeByteOrderMark: boolean; + text: string; + } + const enum EndOfLineState { + Start = 0, + InMultiLineCommentTrivia = 1, + InSingleQuoteStringLiteral = 2, + InDoubleQuoteStringLiteral = 3, + } + enum TokenClass { + Punctuation = 0, + Keyword = 1, + Operator = 2, + Comment = 3, + Whitespace = 4, + Identifier = 5, + NumberLiteral = 6, + StringLiteral = 7, + RegExpLiteral = 8, + } + interface ClassificationResult { + finalLexState: EndOfLineState; + entries: ClassificationInfo[]; + } + interface ClassificationInfo { + length: number; + classification: TokenClass; + } + interface Classifier { + getClassificationsForLine(text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean): ClassificationResult; + } + interface DocumentRegistry { + acquireDocument(filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean): SourceFile; + updateDocument(sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; + releaseDocument(filename: string, compilationSettings: CompilerOptions): void; + } + class ScriptElementKind { + static unknown: string; + static keyword: string; + static scriptElement: string; + static moduleElement: string; + static classElement: string; + static interfaceElement: string; + static typeElement: string; + static enumElement: string; + static variableElement: string; + static localVariableElement: string; + static functionElement: string; + static localFunctionElement: string; + static memberFunctionElement: string; + static memberGetAccessorElement: string; + static memberSetAccessorElement: string; + static memberVariableElement: string; + static constructorImplementationElement: string; + static callSignatureElement: string; + static indexSignatureElement: string; + static constructSignatureElement: string; + static parameterElement: string; + static typeParameterElement: string; + static primitiveType: string; + static label: string; + static alias: string; + static constElement: string; + static letElement: string; + } + class ScriptElementKindModifier { + static none: string; + static publicMemberModifier: string; + static privateMemberModifier: string; + static protectedMemberModifier: string; + static exportedModifier: string; + static ambientModifier: string; + static staticModifier: string; + } + class ClassificationTypeNames { + static comment: string; + static identifier: string; + static keyword: string; + static numericLiteral: string; + static operator: string; + static stringLiteral: string; + static whiteSpace: string; + static text: string; + static punctuation: string; + static className: string; + static enumName: string; + static interfaceName: string; + static moduleName: string; + static typeParameterName: string; + } + function displayPartsToString(displayParts: SymbolDisplayPart[]): string; + interface DisplayPartsSymbolWriter extends SymbolWriter { + displayParts(): SymbolDisplayPart[]; + } + function getDefaultCompilerOptions(): CompilerOptions; + class OperationCanceledException { + } + class CancellationTokenObject { + private cancellationToken; + static None: CancellationTokenObject; + constructor(cancellationToken: CancellationToken); + isCancellationRequested(): boolean; + throwIfCancellationRequested(): void; + } + function createDocumentRegistry(): DocumentRegistry; + function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; + function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry): LanguageService; + function createClassifier(host: Logger): Classifier; +} + + +//// [APISample_standalone_compile.js] +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", 2 /* Latest */, "0.0"); +var program = ts.createProgram(["file1.ts"], {}, undefined); diff --git a/tests/baselines/reference/APISample_standalone_compile.types b/tests/baselines/reference/APISample_standalone_compile.types new file mode 100644 index 00000000000..ebde76e4aa4 --- /dev/null +++ b/tests/baselines/reference/APISample_standalone_compile.types @@ -0,0 +1,5641 @@ +=== tests/cases/compiler/APISample_standalone_compile.ts === + +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); +>sourceFile : ts.SourceFile +>ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0") : ts.SourceFile +>ts.createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, version: string, isOpen?: boolean) => ts.SourceFile +>ts : typeof ts +>createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, version: string, isOpen?: boolean) => ts.SourceFile +>ts.ScriptTarget.Latest : ts.ScriptTarget +>ts.ScriptTarget : typeof ts.ScriptTarget +>ts : typeof ts +>ScriptTarget : typeof ts.ScriptTarget +>Latest : ts.ScriptTarget + +var program = ts.createProgram(["file1.ts"], {}, undefined); +>program : ts.Program +>ts.createProgram(["file1.ts"], {}, undefined) : ts.Program +>ts.createProgram : (rootNames: string[], options: ts.CompilerOptions, host: ts.CompilerHost) => ts.Program +>ts : typeof ts +>createProgram : (rootNames: string[], options: ts.CompilerOptions, host: ts.CompilerHost) => ts.Program +>["file1.ts"] : string[] +>{} : { [x: string]: undefined; } +>undefined : undefined + +=== typescriptServices.d.ts === +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + +declare module ts { +>ts : typeof ts + + interface Map { +>Map : Map +>T : T + + [index: string]: T; +>index : string +>T : T + } + interface TextRange { +>TextRange : TextRange + + pos: number; +>pos : number + + end: number; +>end : number + } + const enum SyntaxKind { +>SyntaxKind : SyntaxKind + + Unknown = 0, +>Unknown : SyntaxKind + + EndOfFileToken = 1, +>EndOfFileToken : SyntaxKind + + SingleLineCommentTrivia = 2, +>SingleLineCommentTrivia : SyntaxKind + + MultiLineCommentTrivia = 3, +>MultiLineCommentTrivia : SyntaxKind + + NewLineTrivia = 4, +>NewLineTrivia : SyntaxKind + + WhitespaceTrivia = 5, +>WhitespaceTrivia : SyntaxKind + + NumericLiteral = 6, +>NumericLiteral : SyntaxKind + + StringLiteral = 7, +>StringLiteral : SyntaxKind + + RegularExpressionLiteral = 8, +>RegularExpressionLiteral : SyntaxKind + + NoSubstitutionTemplateLiteral = 9, +>NoSubstitutionTemplateLiteral : SyntaxKind + + TemplateHead = 10, +>TemplateHead : SyntaxKind + + TemplateMiddle = 11, +>TemplateMiddle : SyntaxKind + + TemplateTail = 12, +>TemplateTail : SyntaxKind + + OpenBraceToken = 13, +>OpenBraceToken : SyntaxKind + + CloseBraceToken = 14, +>CloseBraceToken : SyntaxKind + + OpenParenToken = 15, +>OpenParenToken : SyntaxKind + + CloseParenToken = 16, +>CloseParenToken : SyntaxKind + + OpenBracketToken = 17, +>OpenBracketToken : SyntaxKind + + CloseBracketToken = 18, +>CloseBracketToken : SyntaxKind + + DotToken = 19, +>DotToken : SyntaxKind + + DotDotDotToken = 20, +>DotDotDotToken : SyntaxKind + + SemicolonToken = 21, +>SemicolonToken : SyntaxKind + + CommaToken = 22, +>CommaToken : SyntaxKind + + LessThanToken = 23, +>LessThanToken : SyntaxKind + + GreaterThanToken = 24, +>GreaterThanToken : SyntaxKind + + LessThanEqualsToken = 25, +>LessThanEqualsToken : SyntaxKind + + GreaterThanEqualsToken = 26, +>GreaterThanEqualsToken : SyntaxKind + + EqualsEqualsToken = 27, +>EqualsEqualsToken : SyntaxKind + + ExclamationEqualsToken = 28, +>ExclamationEqualsToken : SyntaxKind + + EqualsEqualsEqualsToken = 29, +>EqualsEqualsEqualsToken : SyntaxKind + + ExclamationEqualsEqualsToken = 30, +>ExclamationEqualsEqualsToken : SyntaxKind + + EqualsGreaterThanToken = 31, +>EqualsGreaterThanToken : SyntaxKind + + PlusToken = 32, +>PlusToken : SyntaxKind + + MinusToken = 33, +>MinusToken : SyntaxKind + + AsteriskToken = 34, +>AsteriskToken : SyntaxKind + + SlashToken = 35, +>SlashToken : SyntaxKind + + PercentToken = 36, +>PercentToken : SyntaxKind + + PlusPlusToken = 37, +>PlusPlusToken : SyntaxKind + + MinusMinusToken = 38, +>MinusMinusToken : SyntaxKind + + LessThanLessThanToken = 39, +>LessThanLessThanToken : SyntaxKind + + GreaterThanGreaterThanToken = 40, +>GreaterThanGreaterThanToken : SyntaxKind + + GreaterThanGreaterThanGreaterThanToken = 41, +>GreaterThanGreaterThanGreaterThanToken : SyntaxKind + + AmpersandToken = 42, +>AmpersandToken : SyntaxKind + + BarToken = 43, +>BarToken : SyntaxKind + + CaretToken = 44, +>CaretToken : SyntaxKind + + ExclamationToken = 45, +>ExclamationToken : SyntaxKind + + TildeToken = 46, +>TildeToken : SyntaxKind + + AmpersandAmpersandToken = 47, +>AmpersandAmpersandToken : SyntaxKind + + BarBarToken = 48, +>BarBarToken : SyntaxKind + + QuestionToken = 49, +>QuestionToken : SyntaxKind + + ColonToken = 50, +>ColonToken : SyntaxKind + + EqualsToken = 51, +>EqualsToken : SyntaxKind + + PlusEqualsToken = 52, +>PlusEqualsToken : SyntaxKind + + MinusEqualsToken = 53, +>MinusEqualsToken : SyntaxKind + + AsteriskEqualsToken = 54, +>AsteriskEqualsToken : SyntaxKind + + SlashEqualsToken = 55, +>SlashEqualsToken : SyntaxKind + + PercentEqualsToken = 56, +>PercentEqualsToken : SyntaxKind + + LessThanLessThanEqualsToken = 57, +>LessThanLessThanEqualsToken : SyntaxKind + + GreaterThanGreaterThanEqualsToken = 58, +>GreaterThanGreaterThanEqualsToken : SyntaxKind + + GreaterThanGreaterThanGreaterThanEqualsToken = 59, +>GreaterThanGreaterThanGreaterThanEqualsToken : SyntaxKind + + AmpersandEqualsToken = 60, +>AmpersandEqualsToken : SyntaxKind + + BarEqualsToken = 61, +>BarEqualsToken : SyntaxKind + + CaretEqualsToken = 62, +>CaretEqualsToken : SyntaxKind + + Identifier = 63, +>Identifier : SyntaxKind + + BreakKeyword = 64, +>BreakKeyword : SyntaxKind + + CaseKeyword = 65, +>CaseKeyword : SyntaxKind + + CatchKeyword = 66, +>CatchKeyword : SyntaxKind + + ClassKeyword = 67, +>ClassKeyword : SyntaxKind + + ConstKeyword = 68, +>ConstKeyword : SyntaxKind + + ContinueKeyword = 69, +>ContinueKeyword : SyntaxKind + + DebuggerKeyword = 70, +>DebuggerKeyword : SyntaxKind + + DefaultKeyword = 71, +>DefaultKeyword : SyntaxKind + + DeleteKeyword = 72, +>DeleteKeyword : SyntaxKind + + DoKeyword = 73, +>DoKeyword : SyntaxKind + + ElseKeyword = 74, +>ElseKeyword : SyntaxKind + + EnumKeyword = 75, +>EnumKeyword : SyntaxKind + + ExportKeyword = 76, +>ExportKeyword : SyntaxKind + + ExtendsKeyword = 77, +>ExtendsKeyword : SyntaxKind + + FalseKeyword = 78, +>FalseKeyword : SyntaxKind + + FinallyKeyword = 79, +>FinallyKeyword : SyntaxKind + + ForKeyword = 80, +>ForKeyword : SyntaxKind + + FunctionKeyword = 81, +>FunctionKeyword : SyntaxKind + + IfKeyword = 82, +>IfKeyword : SyntaxKind + + ImportKeyword = 83, +>ImportKeyword : SyntaxKind + + InKeyword = 84, +>InKeyword : SyntaxKind + + InstanceOfKeyword = 85, +>InstanceOfKeyword : SyntaxKind + + NewKeyword = 86, +>NewKeyword : SyntaxKind + + NullKeyword = 87, +>NullKeyword : SyntaxKind + + ReturnKeyword = 88, +>ReturnKeyword : SyntaxKind + + SuperKeyword = 89, +>SuperKeyword : SyntaxKind + + SwitchKeyword = 90, +>SwitchKeyword : SyntaxKind + + ThisKeyword = 91, +>ThisKeyword : SyntaxKind + + ThrowKeyword = 92, +>ThrowKeyword : SyntaxKind + + TrueKeyword = 93, +>TrueKeyword : SyntaxKind + + TryKeyword = 94, +>TryKeyword : SyntaxKind + + TypeOfKeyword = 95, +>TypeOfKeyword : SyntaxKind + + VarKeyword = 96, +>VarKeyword : SyntaxKind + + VoidKeyword = 97, +>VoidKeyword : SyntaxKind + + WhileKeyword = 98, +>WhileKeyword : SyntaxKind + + WithKeyword = 99, +>WithKeyword : SyntaxKind + + ImplementsKeyword = 100, +>ImplementsKeyword : SyntaxKind + + InterfaceKeyword = 101, +>InterfaceKeyword : SyntaxKind + + LetKeyword = 102, +>LetKeyword : SyntaxKind + + PackageKeyword = 103, +>PackageKeyword : SyntaxKind + + PrivateKeyword = 104, +>PrivateKeyword : SyntaxKind + + ProtectedKeyword = 105, +>ProtectedKeyword : SyntaxKind + + PublicKeyword = 106, +>PublicKeyword : SyntaxKind + + StaticKeyword = 107, +>StaticKeyword : SyntaxKind + + YieldKeyword = 108, +>YieldKeyword : SyntaxKind + + AnyKeyword = 109, +>AnyKeyword : SyntaxKind + + BooleanKeyword = 110, +>BooleanKeyword : SyntaxKind + + ConstructorKeyword = 111, +>ConstructorKeyword : SyntaxKind + + DeclareKeyword = 112, +>DeclareKeyword : SyntaxKind + + GetKeyword = 113, +>GetKeyword : SyntaxKind + + ModuleKeyword = 114, +>ModuleKeyword : SyntaxKind + + RequireKeyword = 115, +>RequireKeyword : SyntaxKind + + NumberKeyword = 116, +>NumberKeyword : SyntaxKind + + SetKeyword = 117, +>SetKeyword : SyntaxKind + + StringKeyword = 118, +>StringKeyword : SyntaxKind + + TypeKeyword = 119, +>TypeKeyword : SyntaxKind + + Missing = 120, +>Missing : SyntaxKind + + QualifiedName = 121, +>QualifiedName : SyntaxKind + + ComputedPropertyName = 122, +>ComputedPropertyName : SyntaxKind + + TypeParameter = 123, +>TypeParameter : SyntaxKind + + Parameter = 124, +>Parameter : SyntaxKind + + Property = 125, +>Property : SyntaxKind + + Method = 126, +>Method : SyntaxKind + + Constructor = 127, +>Constructor : SyntaxKind + + GetAccessor = 128, +>GetAccessor : SyntaxKind + + SetAccessor = 129, +>SetAccessor : SyntaxKind + + CallSignature = 130, +>CallSignature : SyntaxKind + + ConstructSignature = 131, +>ConstructSignature : SyntaxKind + + IndexSignature = 132, +>IndexSignature : SyntaxKind + + TypeReference = 133, +>TypeReference : SyntaxKind + + FunctionType = 134, +>FunctionType : SyntaxKind + + ConstructorType = 135, +>ConstructorType : SyntaxKind + + TypeQuery = 136, +>TypeQuery : SyntaxKind + + TypeLiteral = 137, +>TypeLiteral : SyntaxKind + + ArrayType = 138, +>ArrayType : SyntaxKind + + TupleType = 139, +>TupleType : SyntaxKind + + UnionType = 140, +>UnionType : SyntaxKind + + ParenthesizedType = 141, +>ParenthesizedType : SyntaxKind + + ArrayLiteralExpression = 142, +>ArrayLiteralExpression : SyntaxKind + + ObjectLiteralExpression = 143, +>ObjectLiteralExpression : SyntaxKind + + PropertyAccessExpression = 144, +>PropertyAccessExpression : SyntaxKind + + ElementAccessExpression = 145, +>ElementAccessExpression : SyntaxKind + + CallExpression = 146, +>CallExpression : SyntaxKind + + NewExpression = 147, +>NewExpression : SyntaxKind + + TaggedTemplateExpression = 148, +>TaggedTemplateExpression : SyntaxKind + + TypeAssertionExpression = 149, +>TypeAssertionExpression : SyntaxKind + + ParenthesizedExpression = 150, +>ParenthesizedExpression : SyntaxKind + + FunctionExpression = 151, +>FunctionExpression : SyntaxKind + + ArrowFunction = 152, +>ArrowFunction : SyntaxKind + + DeleteExpression = 153, +>DeleteExpression : SyntaxKind + + TypeOfExpression = 154, +>TypeOfExpression : SyntaxKind + + VoidExpression = 155, +>VoidExpression : SyntaxKind + + PrefixUnaryExpression = 156, +>PrefixUnaryExpression : SyntaxKind + + PostfixUnaryExpression = 157, +>PostfixUnaryExpression : SyntaxKind + + BinaryExpression = 158, +>BinaryExpression : SyntaxKind + + ConditionalExpression = 159, +>ConditionalExpression : SyntaxKind + + TemplateExpression = 160, +>TemplateExpression : SyntaxKind + + YieldExpression = 161, +>YieldExpression : SyntaxKind + + OmittedExpression = 162, +>OmittedExpression : SyntaxKind + + TemplateSpan = 163, +>TemplateSpan : SyntaxKind + + Block = 164, +>Block : SyntaxKind + + VariableStatement = 165, +>VariableStatement : SyntaxKind + + EmptyStatement = 166, +>EmptyStatement : SyntaxKind + + ExpressionStatement = 167, +>ExpressionStatement : SyntaxKind + + IfStatement = 168, +>IfStatement : SyntaxKind + + DoStatement = 169, +>DoStatement : SyntaxKind + + WhileStatement = 170, +>WhileStatement : SyntaxKind + + ForStatement = 171, +>ForStatement : SyntaxKind + + ForInStatement = 172, +>ForInStatement : SyntaxKind + + ContinueStatement = 173, +>ContinueStatement : SyntaxKind + + BreakStatement = 174, +>BreakStatement : SyntaxKind + + ReturnStatement = 175, +>ReturnStatement : SyntaxKind + + WithStatement = 176, +>WithStatement : SyntaxKind + + SwitchStatement = 177, +>SwitchStatement : SyntaxKind + + LabeledStatement = 178, +>LabeledStatement : SyntaxKind + + ThrowStatement = 179, +>ThrowStatement : SyntaxKind + + TryStatement = 180, +>TryStatement : SyntaxKind + + TryBlock = 181, +>TryBlock : SyntaxKind + + CatchBlock = 182, +>CatchBlock : SyntaxKind + + FinallyBlock = 183, +>FinallyBlock : SyntaxKind + + DebuggerStatement = 184, +>DebuggerStatement : SyntaxKind + + VariableDeclaration = 185, +>VariableDeclaration : SyntaxKind + + FunctionDeclaration = 186, +>FunctionDeclaration : SyntaxKind + + FunctionBlock = 187, +>FunctionBlock : SyntaxKind + + ClassDeclaration = 188, +>ClassDeclaration : SyntaxKind + + InterfaceDeclaration = 189, +>InterfaceDeclaration : SyntaxKind + + TypeAliasDeclaration = 190, +>TypeAliasDeclaration : SyntaxKind + + EnumDeclaration = 191, +>EnumDeclaration : SyntaxKind + + ModuleDeclaration = 192, +>ModuleDeclaration : SyntaxKind + + ModuleBlock = 193, +>ModuleBlock : SyntaxKind + + ImportDeclaration = 194, +>ImportDeclaration : SyntaxKind + + ExportAssignment = 195, +>ExportAssignment : SyntaxKind + + CaseClause = 196, +>CaseClause : SyntaxKind + + DefaultClause = 197, +>DefaultClause : SyntaxKind + + HeritageClause = 198, +>HeritageClause : SyntaxKind + + PropertyAssignment = 199, +>PropertyAssignment : SyntaxKind + + ShorthandPropertyAssignment = 200, +>ShorthandPropertyAssignment : SyntaxKind + + EnumMember = 201, +>EnumMember : SyntaxKind + + SourceFile = 202, +>SourceFile : SyntaxKind + + Program = 203, +>Program : SyntaxKind + + SyntaxList = 204, +>SyntaxList : SyntaxKind + + Count = 205, +>Count : SyntaxKind + + FirstAssignment = 51, +>FirstAssignment : SyntaxKind + + LastAssignment = 62, +>LastAssignment : SyntaxKind + + FirstReservedWord = 64, +>FirstReservedWord : SyntaxKind + + LastReservedWord = 99, +>LastReservedWord : SyntaxKind + + FirstKeyword = 64, +>FirstKeyword : SyntaxKind + + LastKeyword = 119, +>LastKeyword : SyntaxKind + + FirstFutureReservedWord = 100, +>FirstFutureReservedWord : SyntaxKind + + LastFutureReservedWord = 108, +>LastFutureReservedWord : SyntaxKind + + FirstTypeNode = 133, +>FirstTypeNode : SyntaxKind + + LastTypeNode = 141, +>LastTypeNode : SyntaxKind + + FirstPunctuation = 13, +>FirstPunctuation : SyntaxKind + + LastPunctuation = 62, +>LastPunctuation : SyntaxKind + + FirstToken = 1, +>FirstToken : SyntaxKind + + LastToken = 119, +>LastToken : SyntaxKind + + FirstTriviaToken = 2, +>FirstTriviaToken : SyntaxKind + + LastTriviaToken = 5, +>LastTriviaToken : SyntaxKind + + FirstLiteralToken = 6, +>FirstLiteralToken : SyntaxKind + + LastLiteralToken = 9, +>LastLiteralToken : SyntaxKind + + FirstTemplateToken = 9, +>FirstTemplateToken : SyntaxKind + + LastTemplateToken = 12, +>LastTemplateToken : SyntaxKind + + FirstOperator = 21, +>FirstOperator : SyntaxKind + + LastOperator = 62, +>LastOperator : SyntaxKind + + FirstBinaryOperator = 23, +>FirstBinaryOperator : SyntaxKind + + LastBinaryOperator = 62, +>LastBinaryOperator : SyntaxKind + } + const enum NodeFlags { +>NodeFlags : NodeFlags + + Export = 1, +>Export : NodeFlags + + Ambient = 2, +>Ambient : NodeFlags + + QuestionMark = 4, +>QuestionMark : NodeFlags + + Rest = 8, +>Rest : NodeFlags + + Public = 16, +>Public : NodeFlags + + Private = 32, +>Private : NodeFlags + + Protected = 64, +>Protected : NodeFlags + + Static = 128, +>Static : NodeFlags + + MultiLine = 256, +>MultiLine : NodeFlags + + Synthetic = 512, +>Synthetic : NodeFlags + + DeclarationFile = 1024, +>DeclarationFile : NodeFlags + + Let = 2048, +>Let : NodeFlags + + Const = 4096, +>Const : NodeFlags + + OctalLiteral = 8192, +>OctalLiteral : NodeFlags + + Modifier = 243, +>Modifier : NodeFlags + + AccessibilityModifier = 112, +>AccessibilityModifier : NodeFlags + + BlockScoped = 6144, +>BlockScoped : NodeFlags + } + const enum ParserContextFlags { +>ParserContextFlags : ParserContextFlags + + StrictMode = 1, +>StrictMode : ParserContextFlags + + DisallowIn = 2, +>DisallowIn : ParserContextFlags + + Yield = 4, +>Yield : ParserContextFlags + + GeneratorParameter = 8, +>GeneratorParameter : ParserContextFlags + } + interface Node extends TextRange { +>Node : Node +>TextRange : TextRange + + kind: SyntaxKind; +>kind : SyntaxKind +>SyntaxKind : SyntaxKind + + flags: NodeFlags; +>flags : NodeFlags +>NodeFlags : NodeFlags + + parserContextFlags?: ParserContextFlags; +>parserContextFlags : ParserContextFlags +>ParserContextFlags : ParserContextFlags + + id?: number; +>id : number + + parent?: Node; +>parent : Node +>Node : Node + + symbol?: Symbol; +>symbol : Symbol +>Symbol : Symbol + + locals?: SymbolTable; +>locals : SymbolTable +>SymbolTable : SymbolTable + + nextContainer?: Node; +>nextContainer : Node +>Node : Node + + localSymbol?: Symbol; +>localSymbol : Symbol +>Symbol : Symbol + + modifiers?: ModifiersArray; +>modifiers : ModifiersArray +>ModifiersArray : ModifiersArray + } + interface NodeArray extends Array, TextRange { +>NodeArray : NodeArray +>T : T +>Array : T[] +>T : T +>TextRange : TextRange + + hasTrailingComma?: boolean; +>hasTrailingComma : boolean + } + interface ModifiersArray extends Array { +>ModifiersArray : ModifiersArray +>Array : T[] +>Node : Node + + flags: number; +>flags : number + } + interface Identifier extends PrimaryExpression { +>Identifier : Identifier +>PrimaryExpression : PrimaryExpression + + text: string; +>text : string + } + interface QualifiedName extends Node { +>QualifiedName : QualifiedName +>Node : Node + + left: EntityName; +>left : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName + + right: Identifier; +>right : Identifier +>Identifier : Identifier + } + type EntityName = Identifier | QualifiedName; +>EntityName : Identifier | QualifiedName +>Identifier : Identifier +>QualifiedName : QualifiedName + + interface ParsedSignature { +>ParsedSignature : ParsedSignature + + typeParameters?: NodeArray; +>typeParameters : NodeArray +>NodeArray : NodeArray +>TypeParameterDeclaration : TypeParameterDeclaration + + parameters: NodeArray; +>parameters : NodeArray +>NodeArray : NodeArray +>ParameterDeclaration : ParameterDeclaration + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + } + type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName +>Identifier : Identifier +>LiteralExpression : LiteralExpression +>ComputedPropertyName : ComputedPropertyName + + interface Declaration extends Node { +>Declaration : Declaration +>Node : Node + + _declarationBrand: any; +>_declarationBrand : any + + name?: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName + } + interface ComputedPropertyName extends Node { +>ComputedPropertyName : ComputedPropertyName +>Node : Node + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface TypeParameterDeclaration extends Declaration { +>TypeParameterDeclaration : TypeParameterDeclaration +>Declaration : Declaration + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + constraint?: TypeNode; +>constraint : TypeNode +>TypeNode : TypeNode + + expression?: Expression; +>expression : Expression +>Expression : Expression + } + interface SignatureDeclaration extends Declaration, ParsedSignature { +>SignatureDeclaration : SignatureDeclaration +>Declaration : Declaration +>ParsedSignature : ParsedSignature + } + interface VariableDeclaration extends Declaration { +>VariableDeclaration : VariableDeclaration +>Declaration : Declaration + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + interface PropertyDeclaration extends Declaration, ClassElement { +>PropertyDeclaration : PropertyDeclaration +>Declaration : Declaration +>ClassElement : ClassElement + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + interface ShortHandPropertyDeclaration extends Declaration { +>ShortHandPropertyDeclaration : ShortHandPropertyDeclaration +>Declaration : Declaration + + name: Identifier; +>name : Identifier +>Identifier : Identifier + } + interface ParameterDeclaration extends VariableDeclaration { +>ParameterDeclaration : ParameterDeclaration +>VariableDeclaration : VariableDeclaration + } + /** + * Several node kinds share function-like features such as a signature, + * a name, and a body. These nodes should extend FunctionLikeDeclaration. + * Examples: + * FunctionDeclaration + * MethodDeclaration + * AccessorDeclaration + */ + interface FunctionLikeDeclaration extends SignatureDeclaration { +>FunctionLikeDeclaration : FunctionLikeDeclaration +>SignatureDeclaration : SignatureDeclaration + + _functionLikeDeclarationBrand: any; +>_functionLikeDeclarationBrand : any + + asteriskToken?: Node; +>asteriskToken : Node +>Node : Node + + body?: Block | Expression; +>body : Expression | Block +>Block : Block +>Expression : Expression + } + interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { +>FunctionDeclaration : FunctionDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>Statement : Statement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + body?: Block; +>body : Block +>Block : Block + } + interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement { +>MethodDeclaration : MethodDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>ClassElement : ClassElement + + body?: Block; +>body : Block +>Block : Block + } + interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { +>ConstructorDeclaration : ConstructorDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>ClassElement : ClassElement + + body?: Block; +>body : Block +>Block : Block + } + interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement { +>AccessorDeclaration : AccessorDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>ClassElement : ClassElement + + body?: Block; +>body : Block +>Block : Block + } + interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { +>IndexSignatureDeclaration : IndexSignatureDeclaration +>SignatureDeclaration : SignatureDeclaration +>ClassElement : ClassElement + + _indexSignatureDeclarationBrand: any; +>_indexSignatureDeclarationBrand : any + } + interface TypeNode extends Node { +>TypeNode : TypeNode +>Node : Node + } + interface TypeReferenceNode extends TypeNode { +>TypeReferenceNode : TypeReferenceNode +>TypeNode : TypeNode + + typeName: EntityName; +>typeName : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName + + typeArguments?: NodeArray; +>typeArguments : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + } + interface TypeQueryNode extends TypeNode { +>TypeQueryNode : TypeQueryNode +>TypeNode : TypeNode + + exprName: EntityName; +>exprName : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName + } + interface TypeLiteralNode extends TypeNode, Declaration { +>TypeLiteralNode : TypeLiteralNode +>TypeNode : TypeNode +>Declaration : Declaration + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>Node : Node + } + interface ArrayTypeNode extends TypeNode { +>ArrayTypeNode : ArrayTypeNode +>TypeNode : TypeNode + + elementType: TypeNode; +>elementType : TypeNode +>TypeNode : TypeNode + } + interface TupleTypeNode extends TypeNode { +>TupleTypeNode : TupleTypeNode +>TypeNode : TypeNode + + elementTypes: NodeArray; +>elementTypes : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + } + interface UnionTypeNode extends TypeNode { +>UnionTypeNode : UnionTypeNode +>TypeNode : TypeNode + + types: NodeArray; +>types : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + } + interface ParenthesizedTypeNode extends TypeNode { +>ParenthesizedTypeNode : ParenthesizedTypeNode +>TypeNode : TypeNode + + type: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + } + interface StringLiteralTypeNode extends TypeNode { +>StringLiteralTypeNode : StringLiteralTypeNode +>TypeNode : TypeNode + + text: string; +>text : string + } + interface Expression extends Node { +>Expression : Expression +>Node : Node + + _expressionBrand: any; +>_expressionBrand : any + + contextualType?: Type; +>contextualType : Type +>Type : Type + } + interface UnaryExpression extends Expression { +>UnaryExpression : UnaryExpression +>Expression : Expression + + _unaryExpressionBrand: any; +>_unaryExpressionBrand : any + } + interface PrefixUnaryExpression extends UnaryExpression { +>PrefixUnaryExpression : PrefixUnaryExpression +>UnaryExpression : UnaryExpression + + operator: SyntaxKind; +>operator : SyntaxKind +>SyntaxKind : SyntaxKind + + operand: UnaryExpression; +>operand : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface PostfixUnaryExpression extends PostfixExpression { +>PostfixUnaryExpression : PostfixUnaryExpression +>PostfixExpression : PostfixExpression + + operand: LeftHandSideExpression; +>operand : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + operator: SyntaxKind; +>operator : SyntaxKind +>SyntaxKind : SyntaxKind + } + interface PostfixExpression extends UnaryExpression { +>PostfixExpression : PostfixExpression +>UnaryExpression : UnaryExpression + + _postfixExpressionBrand: any; +>_postfixExpressionBrand : any + } + interface LeftHandSideExpression extends PostfixExpression { +>LeftHandSideExpression : LeftHandSideExpression +>PostfixExpression : PostfixExpression + + _leftHandSideExpressionBrand: any; +>_leftHandSideExpressionBrand : any + } + interface MemberExpression extends LeftHandSideExpression { +>MemberExpression : MemberExpression +>LeftHandSideExpression : LeftHandSideExpression + + _memberExpressionBrand: any; +>_memberExpressionBrand : any + } + interface PrimaryExpression extends MemberExpression { +>PrimaryExpression : PrimaryExpression +>MemberExpression : MemberExpression + + _primaryExpressionBrand: any; +>_primaryExpressionBrand : any + } + interface DeleteExpression extends UnaryExpression { +>DeleteExpression : DeleteExpression +>UnaryExpression : UnaryExpression + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface TypeOfExpression extends UnaryExpression { +>TypeOfExpression : TypeOfExpression +>UnaryExpression : UnaryExpression + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface VoidExpression extends UnaryExpression { +>VoidExpression : VoidExpression +>UnaryExpression : UnaryExpression + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface YieldExpression extends Expression { +>YieldExpression : YieldExpression +>Expression : Expression + + asteriskToken?: Node; +>asteriskToken : Node +>Node : Node + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface BinaryExpression extends Expression { +>BinaryExpression : BinaryExpression +>Expression : Expression + + left: Expression; +>left : Expression +>Expression : Expression + + operator: SyntaxKind; +>operator : SyntaxKind +>SyntaxKind : SyntaxKind + + right: Expression; +>right : Expression +>Expression : Expression + } + interface ConditionalExpression extends Expression { +>ConditionalExpression : ConditionalExpression +>Expression : Expression + + condition: Expression; +>condition : Expression +>Expression : Expression + + whenTrue: Expression; +>whenTrue : Expression +>Expression : Expression + + whenFalse: Expression; +>whenFalse : Expression +>Expression : Expression + } + interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { +>FunctionExpression : FunctionExpression +>PrimaryExpression : PrimaryExpression +>FunctionLikeDeclaration : FunctionLikeDeclaration + + name?: Identifier; +>name : Identifier +>Identifier : Identifier + + body: Block | Expression; +>body : Expression | Block +>Block : Block +>Expression : Expression + } + interface LiteralExpression extends PrimaryExpression { +>LiteralExpression : LiteralExpression +>PrimaryExpression : PrimaryExpression + + text: string; +>text : string + } + interface TemplateExpression extends PrimaryExpression { +>TemplateExpression : TemplateExpression +>PrimaryExpression : PrimaryExpression + + head: LiteralExpression; +>head : LiteralExpression +>LiteralExpression : LiteralExpression + + templateSpans: NodeArray; +>templateSpans : NodeArray +>NodeArray : NodeArray +>TemplateSpan : TemplateSpan + } + interface TemplateSpan extends Node { +>TemplateSpan : TemplateSpan +>Node : Node + + expression: Expression; +>expression : Expression +>Expression : Expression + + literal: LiteralExpression; +>literal : LiteralExpression +>LiteralExpression : LiteralExpression + } + interface ParenthesizedExpression extends PrimaryExpression { +>ParenthesizedExpression : ParenthesizedExpression +>PrimaryExpression : PrimaryExpression + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface ArrayLiteralExpression extends PrimaryExpression { +>ArrayLiteralExpression : ArrayLiteralExpression +>PrimaryExpression : PrimaryExpression + + elements: NodeArray; +>elements : NodeArray +>NodeArray : NodeArray +>Expression : Expression + } + interface ObjectLiteralExpression extends PrimaryExpression, Declaration { +>ObjectLiteralExpression : ObjectLiteralExpression +>PrimaryExpression : PrimaryExpression +>Declaration : Declaration + + properties: NodeArray; +>properties : NodeArray +>NodeArray : NodeArray +>Declaration : Declaration + } + interface PropertyAccessExpression extends MemberExpression { +>PropertyAccessExpression : PropertyAccessExpression +>MemberExpression : MemberExpression + + expression: LeftHandSideExpression; +>expression : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + name: Identifier; +>name : Identifier +>Identifier : Identifier + } + interface ElementAccessExpression extends MemberExpression { +>ElementAccessExpression : ElementAccessExpression +>MemberExpression : MemberExpression + + expression: LeftHandSideExpression; +>expression : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + argumentExpression: Expression; +>argumentExpression : Expression +>Expression : Expression + } + interface CallExpression extends LeftHandSideExpression { +>CallExpression : CallExpression +>LeftHandSideExpression : LeftHandSideExpression + + expression: LeftHandSideExpression; +>expression : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + typeArguments?: NodeArray; +>typeArguments : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + + arguments: NodeArray; +>arguments : NodeArray +>NodeArray : NodeArray +>Expression : Expression + } + interface NewExpression extends CallExpression, PrimaryExpression { +>NewExpression : NewExpression +>CallExpression : CallExpression +>PrimaryExpression : PrimaryExpression + } + interface TaggedTemplateExpression extends MemberExpression { +>TaggedTemplateExpression : TaggedTemplateExpression +>MemberExpression : MemberExpression + + tag: LeftHandSideExpression; +>tag : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + template: LiteralExpression | TemplateExpression; +>template : LiteralExpression | TemplateExpression +>LiteralExpression : LiteralExpression +>TemplateExpression : TemplateExpression + } + type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression; +>CallLikeExpression : CallExpression | NewExpression | TaggedTemplateExpression +>CallExpression : CallExpression +>NewExpression : NewExpression +>TaggedTemplateExpression : TaggedTemplateExpression + + interface TypeAssertion extends UnaryExpression { +>TypeAssertion : TypeAssertion +>UnaryExpression : UnaryExpression + + type: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface Statement extends Node, ModuleElement { +>Statement : Statement +>Node : Node +>ModuleElement : ModuleElement + + _statementBrand: any; +>_statementBrand : any + } + interface Block extends Statement { +>Block : Block +>Statement : Statement + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>Statement : Statement + } + interface VariableStatement extends Statement { +>VariableStatement : VariableStatement +>Statement : Statement + + declarations: NodeArray; +>declarations : NodeArray +>NodeArray : NodeArray +>VariableDeclaration : VariableDeclaration + } + interface ExpressionStatement extends Statement { +>ExpressionStatement : ExpressionStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface IfStatement extends Statement { +>IfStatement : IfStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + + thenStatement: Statement; +>thenStatement : Statement +>Statement : Statement + + elseStatement?: Statement; +>elseStatement : Statement +>Statement : Statement + } + interface IterationStatement extends Statement { +>IterationStatement : IterationStatement +>Statement : Statement + + statement: Statement; +>statement : Statement +>Statement : Statement + } + interface DoStatement extends IterationStatement { +>DoStatement : DoStatement +>IterationStatement : IterationStatement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface WhileStatement extends IterationStatement { +>WhileStatement : WhileStatement +>IterationStatement : IterationStatement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface ForStatement extends IterationStatement { +>ForStatement : ForStatement +>IterationStatement : IterationStatement + + declarations?: NodeArray; +>declarations : NodeArray +>NodeArray : NodeArray +>VariableDeclaration : VariableDeclaration + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + + condition?: Expression; +>condition : Expression +>Expression : Expression + + iterator?: Expression; +>iterator : Expression +>Expression : Expression + } + interface ForInStatement extends IterationStatement { +>ForInStatement : ForInStatement +>IterationStatement : IterationStatement + + declarations?: NodeArray; +>declarations : NodeArray +>NodeArray : NodeArray +>VariableDeclaration : VariableDeclaration + + variable?: Expression; +>variable : Expression +>Expression : Expression + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface BreakOrContinueStatement extends Statement { +>BreakOrContinueStatement : BreakOrContinueStatement +>Statement : Statement + + label?: Identifier; +>label : Identifier +>Identifier : Identifier + } + interface ReturnStatement extends Statement { +>ReturnStatement : ReturnStatement +>Statement : Statement + + expression?: Expression; +>expression : Expression +>Expression : Expression + } + interface WithStatement extends Statement { +>WithStatement : WithStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + + statement: Statement; +>statement : Statement +>Statement : Statement + } + interface SwitchStatement extends Statement { +>SwitchStatement : SwitchStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + + clauses: NodeArray; +>clauses : NodeArray +>NodeArray : NodeArray +>CaseOrDefaultClause : CaseOrDefaultClause + } + interface CaseOrDefaultClause extends Node { +>CaseOrDefaultClause : CaseOrDefaultClause +>Node : Node + + expression?: Expression; +>expression : Expression +>Expression : Expression + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>Statement : Statement + } + interface LabeledStatement extends Statement { +>LabeledStatement : LabeledStatement +>Statement : Statement + + label: Identifier; +>label : Identifier +>Identifier : Identifier + + statement: Statement; +>statement : Statement +>Statement : Statement + } + interface ThrowStatement extends Statement { +>ThrowStatement : ThrowStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface TryStatement extends Statement { +>TryStatement : TryStatement +>Statement : Statement + + tryBlock: Block; +>tryBlock : Block +>Block : Block + + catchBlock?: CatchBlock; +>catchBlock : CatchBlock +>CatchBlock : CatchBlock + + finallyBlock?: Block; +>finallyBlock : Block +>Block : Block + } + interface CatchBlock extends Block, Declaration { +>CatchBlock : CatchBlock +>Block : Block +>Declaration : Declaration + + variable: Identifier; +>variable : Identifier +>Identifier : Identifier + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + } + interface ModuleElement extends Node { +>ModuleElement : ModuleElement +>Node : Node + + _moduleElementBrand: any; +>_moduleElementBrand : any + } + interface ClassDeclaration extends Declaration, ModuleElement { +>ClassDeclaration : ClassDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + typeParameters?: NodeArray; +>typeParameters : NodeArray +>NodeArray : NodeArray +>TypeParameterDeclaration : TypeParameterDeclaration + + heritageClauses?: NodeArray; +>heritageClauses : NodeArray +>NodeArray : NodeArray +>HeritageClause : HeritageClause + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>ClassElement : ClassElement + } + interface ClassElement extends Declaration { +>ClassElement : ClassElement +>Declaration : Declaration + + _classElementBrand: any; +>_classElementBrand : any + } + interface InterfaceDeclaration extends Declaration, ModuleElement { +>InterfaceDeclaration : InterfaceDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + typeParameters?: NodeArray; +>typeParameters : NodeArray +>NodeArray : NodeArray +>TypeParameterDeclaration : TypeParameterDeclaration + + heritageClauses?: NodeArray; +>heritageClauses : NodeArray +>NodeArray : NodeArray +>HeritageClause : HeritageClause + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>Declaration : Declaration + } + interface HeritageClause extends Node { +>HeritageClause : HeritageClause +>Node : Node + + token: SyntaxKind; +>token : SyntaxKind +>SyntaxKind : SyntaxKind + + types?: NodeArray; +>types : NodeArray +>NodeArray : NodeArray +>TypeReferenceNode : TypeReferenceNode + } + interface TypeAliasDeclaration extends Declaration, ModuleElement { +>TypeAliasDeclaration : TypeAliasDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + type: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + } + interface EnumMember extends Declaration { +>EnumMember : EnumMember +>Declaration : Declaration + + name: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + interface EnumDeclaration extends Declaration, ModuleElement { +>EnumDeclaration : EnumDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>EnumMember : EnumMember + } + interface ModuleDeclaration extends Declaration, ModuleElement { +>ModuleDeclaration : ModuleDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier | LiteralExpression; +>name : Identifier | LiteralExpression +>Identifier : Identifier +>LiteralExpression : LiteralExpression + + body: ModuleBlock | ModuleDeclaration; +>body : ModuleDeclaration | ModuleBlock +>ModuleBlock : ModuleBlock +>ModuleDeclaration : ModuleDeclaration + } + interface ModuleBlock extends Node, ModuleElement { +>ModuleBlock : ModuleBlock +>Node : Node +>ModuleElement : ModuleElement + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>ModuleElement : ModuleElement + } + interface ImportDeclaration extends Declaration, ModuleElement { +>ImportDeclaration : ImportDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + entityName?: EntityName; +>entityName : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName + + externalModuleName?: LiteralExpression; +>externalModuleName : LiteralExpression +>LiteralExpression : LiteralExpression + } + interface ExportAssignment extends Statement, ModuleElement { +>ExportAssignment : ExportAssignment +>Statement : Statement +>ModuleElement : ModuleElement + + exportName: Identifier; +>exportName : Identifier +>Identifier : Identifier + } + interface FileReference extends TextRange { +>FileReference : FileReference +>TextRange : TextRange + + filename: string; +>filename : string + } + interface CommentRange extends TextRange { +>CommentRange : CommentRange +>TextRange : TextRange + + hasTrailingNewLine?: boolean; +>hasTrailingNewLine : boolean + } + interface SourceFile extends Declaration { +>SourceFile : SourceFile +>Declaration : Declaration + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>ModuleElement : ModuleElement + + filename: string; +>filename : string + + text: string; +>text : string + + getLineAndCharacterFromPosition(position: number): LineAndCharacter; +>getLineAndCharacterFromPosition : (position: number) => LineAndCharacter +>position : number +>LineAndCharacter : LineAndCharacter + + getPositionFromLineAndCharacter(line: number, character: number): number; +>getPositionFromLineAndCharacter : (line: number, character: number) => number +>line : number +>character : number + + getLineStarts(): number[]; +>getLineStarts : () => number[] + + amdDependencies: string[]; +>amdDependencies : string[] + + amdModuleName: string; +>amdModuleName : string + + referencedFiles: FileReference[]; +>referencedFiles : FileReference[] +>FileReference : FileReference + + semanticDiagnostics: Diagnostic[]; +>semanticDiagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + parseDiagnostics: Diagnostic[]; +>parseDiagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + grammarDiagnostics: Diagnostic[]; +>grammarDiagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + getSyntacticDiagnostics(): Diagnostic[]; +>getSyntacticDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + hasNoDefaultLib: boolean; +>hasNoDefaultLib : boolean + + externalModuleIndicator: Node; +>externalModuleIndicator : Node +>Node : Node + + nodeCount: number; +>nodeCount : number + + identifierCount: number; +>identifierCount : number + + symbolCount: number; +>symbolCount : number + + isOpen: boolean; +>isOpen : boolean + + version: string; +>version : string + + languageVersion: ScriptTarget; +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget + + identifiers: Map; +>identifiers : Map +>Map : Map + } + interface Program { +>Program : Program + + getSourceFile(filename: string): SourceFile; +>getSourceFile : (filename: string) => SourceFile +>filename : string +>SourceFile : SourceFile + + getSourceFiles(): SourceFile[]; +>getSourceFiles : () => SourceFile[] +>SourceFile : SourceFile + + getCompilerOptions(): CompilerOptions; +>getCompilerOptions : () => CompilerOptions +>CompilerOptions : CompilerOptions + + getCompilerHost(): CompilerHost; +>getCompilerHost : () => CompilerHost +>CompilerHost : CompilerHost + + getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; +>getDiagnostics : (sourceFile?: SourceFile) => Diagnostic[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Diagnostic : Diagnostic + + getGlobalDiagnostics(): Diagnostic[]; +>getGlobalDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + getTypeChecker(fullTypeCheckMode: boolean): TypeChecker; +>getTypeChecker : (fullTypeCheckMode: boolean) => TypeChecker +>fullTypeCheckMode : boolean +>TypeChecker : TypeChecker + + getCommonSourceDirectory(): string; +>getCommonSourceDirectory : () => string + } + interface SourceMapSpan { +>SourceMapSpan : SourceMapSpan + + emittedLine: number; +>emittedLine : number + + emittedColumn: number; +>emittedColumn : number + + sourceLine: number; +>sourceLine : number + + sourceColumn: number; +>sourceColumn : number + + nameIndex?: number; +>nameIndex : number + + sourceIndex: number; +>sourceIndex : number + } + interface SourceMapData { +>SourceMapData : SourceMapData + + sourceMapFilePath: string; +>sourceMapFilePath : string + + jsSourceMappingURL: string; +>jsSourceMappingURL : string + + sourceMapFile: string; +>sourceMapFile : string + + sourceMapSourceRoot: string; +>sourceMapSourceRoot : string + + sourceMapSources: string[]; +>sourceMapSources : string[] + + inputSourceFileNames: string[]; +>inputSourceFileNames : string[] + + sourceMapNames?: string[]; +>sourceMapNames : string[] + + sourceMapMappings: string; +>sourceMapMappings : string + + sourceMapDecodedMappings: SourceMapSpan[]; +>sourceMapDecodedMappings : SourceMapSpan[] +>SourceMapSpan : SourceMapSpan + } + enum EmitReturnStatus { +>EmitReturnStatus : EmitReturnStatus + + Succeeded = 0, +>Succeeded : EmitReturnStatus + + AllOutputGenerationSkipped = 1, +>AllOutputGenerationSkipped : EmitReturnStatus + + JSGeneratedWithSemanticErrors = 2, +>JSGeneratedWithSemanticErrors : EmitReturnStatus + + DeclarationGenerationSkipped = 3, +>DeclarationGenerationSkipped : EmitReturnStatus + + EmitErrorsEncountered = 4, +>EmitErrorsEncountered : EmitReturnStatus + + CompilerOptionsErrors = 5, +>CompilerOptionsErrors : EmitReturnStatus + } + interface EmitResult { +>EmitResult : EmitResult + + emitResultStatus: EmitReturnStatus; +>emitResultStatus : EmitReturnStatus +>EmitReturnStatus : EmitReturnStatus + + diagnostics: Diagnostic[]; +>diagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + sourceMaps: SourceMapData[]; +>sourceMaps : SourceMapData[] +>SourceMapData : SourceMapData + } + interface TypeChecker { +>TypeChecker : TypeChecker + + getProgram(): Program; +>getProgram : () => Program +>Program : Program + + getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; +>getDiagnostics : (sourceFile?: SourceFile) => Diagnostic[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Diagnostic : Diagnostic + + getDeclarationDiagnostics(sourceFile: SourceFile): Diagnostic[]; +>getDeclarationDiagnostics : (sourceFile: SourceFile) => Diagnostic[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Diagnostic : Diagnostic + + getGlobalDiagnostics(): Diagnostic[]; +>getGlobalDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + getNodeCount(): number; +>getNodeCount : () => number + + getIdentifierCount(): number; +>getIdentifierCount : () => number + + getSymbolCount(): number; +>getSymbolCount : () => number + + getTypeCount(): number; +>getTypeCount : () => number + + checkProgram(): void; +>checkProgram : () => void + + emitFiles(targetSourceFile?: SourceFile): EmitResult; +>emitFiles : (targetSourceFile?: SourceFile) => EmitResult +>targetSourceFile : SourceFile +>SourceFile : SourceFile +>EmitResult : EmitResult + + getParentOfSymbol(symbol: Symbol): Symbol; +>getParentOfSymbol : (symbol: Symbol) => Symbol +>symbol : Symbol +>Symbol : Symbol +>Symbol : Symbol + + getNarrowedTypeOfSymbol(symbol: Symbol, node: Node): Type; +>getNarrowedTypeOfSymbol : (symbol: Symbol, node: Node) => Type +>symbol : Symbol +>Symbol : Symbol +>node : Node +>Node : Node +>Type : Type + + getDeclaredTypeOfSymbol(symbol: Symbol): Type; +>getDeclaredTypeOfSymbol : (symbol: Symbol) => Type +>symbol : Symbol +>Symbol : Symbol +>Type : Type + + getPropertiesOfType(type: Type): Symbol[]; +>getPropertiesOfType : (type: Type) => Symbol[] +>type : Type +>Type : Type +>Symbol : Symbol + + getPropertyOfType(type: Type, propertyName: string): Symbol; +>getPropertyOfType : (type: Type, propertyName: string) => Symbol +>type : Type +>Type : Type +>propertyName : string +>Symbol : Symbol + + getSignaturesOfType(type: Type, kind: SignatureKind): Signature[]; +>getSignaturesOfType : (type: Type, kind: SignatureKind) => Signature[] +>type : Type +>Type : Type +>kind : SignatureKind +>SignatureKind : SignatureKind +>Signature : Signature + + getIndexTypeOfType(type: Type, kind: IndexKind): Type; +>getIndexTypeOfType : (type: Type, kind: IndexKind) => Type +>type : Type +>Type : Type +>kind : IndexKind +>IndexKind : IndexKind +>Type : Type + + getReturnTypeOfSignature(signature: Signature): Type; +>getReturnTypeOfSignature : (signature: Signature) => Type +>signature : Signature +>Signature : Signature +>Type : Type + + getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; +>getSymbolsInScope : (location: Node, meaning: SymbolFlags) => Symbol[] +>location : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags +>Symbol : Symbol + + getSymbolInfo(node: Node): Symbol; +>getSymbolInfo : (node: Node) => Symbol +>node : Node +>Node : Node +>Symbol : Symbol + + getShorthandAssignmentValueSymbol(location: Node): Symbol; +>getShorthandAssignmentValueSymbol : (location: Node) => Symbol +>location : Node +>Node : Node +>Symbol : Symbol + + getTypeOfNode(node: Node): Type; +>getTypeOfNode : (node: Node) => Type +>node : Node +>Node : Node +>Type : Type + + typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; +>typeToString : (type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => string +>type : Type +>Type : Type +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; +>symbolToString : (symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) => string +>symbol : Symbol +>Symbol : Symbol +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags + + getSymbolDisplayBuilder(): SymbolDisplayBuilder; +>getSymbolDisplayBuilder : () => SymbolDisplayBuilder +>SymbolDisplayBuilder : SymbolDisplayBuilder + + getFullyQualifiedName(symbol: Symbol): string; +>getFullyQualifiedName : (symbol: Symbol) => string +>symbol : Symbol +>Symbol : Symbol + + getAugmentedPropertiesOfType(type: Type): Symbol[]; +>getAugmentedPropertiesOfType : (type: Type) => Symbol[] +>type : Type +>Type : Type +>Symbol : Symbol + + getRootSymbols(symbol: Symbol): Symbol[]; +>getRootSymbols : (symbol: Symbol) => Symbol[] +>symbol : Symbol +>Symbol : Symbol +>Symbol : Symbol + + getContextualType(node: Node): Type; +>getContextualType : (node: Node) => Type +>node : Node +>Node : Node +>Type : Type + + getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; +>getResolvedSignature : (node: CallExpression | NewExpression | TaggedTemplateExpression, candidatesOutArray?: Signature[]) => Signature +>node : CallExpression | NewExpression | TaggedTemplateExpression +>CallLikeExpression : CallExpression | NewExpression | TaggedTemplateExpression +>candidatesOutArray : Signature[] +>Signature : Signature +>Signature : Signature + + getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; +>getSignatureFromDeclaration : (declaration: SignatureDeclaration) => Signature +>declaration : SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration +>Signature : Signature + + isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; +>isImplementationOfOverload : (node: FunctionLikeDeclaration) => boolean +>node : FunctionLikeDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration + + isUndefinedSymbol(symbol: Symbol): boolean; +>isUndefinedSymbol : (symbol: Symbol) => boolean +>symbol : Symbol +>Symbol : Symbol + + isArgumentsSymbol(symbol: Symbol): boolean; +>isArgumentsSymbol : (symbol: Symbol) => boolean +>symbol : Symbol +>Symbol : Symbol + + isEmitBlocked(sourceFile?: SourceFile): boolean; +>isEmitBlocked : (sourceFile?: SourceFile) => boolean +>sourceFile : SourceFile +>SourceFile : SourceFile + + getEnumMemberValue(node: EnumMember): number; +>getEnumMemberValue : (node: EnumMember) => number +>node : EnumMember +>EnumMember : EnumMember + + isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; +>isValidPropertyAccess : (node: QualifiedName | PropertyAccessExpression, propertyName: string) => boolean +>node : QualifiedName | PropertyAccessExpression +>PropertyAccessExpression : PropertyAccessExpression +>QualifiedName : QualifiedName +>propertyName : string + + getAliasedSymbol(symbol: Symbol): Symbol; +>getAliasedSymbol : (symbol: Symbol) => Symbol +>symbol : Symbol +>Symbol : Symbol +>Symbol : Symbol + } + interface SymbolDisplayBuilder { +>SymbolDisplayBuilder : SymbolDisplayBuilder + + buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildTypeDisplay : (type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>type : Type +>Type : Type +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void; +>buildSymbolDisplay : (symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags) => void +>symbol : Symbol +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags +>flags : SymbolFormatFlags +>SymbolFormatFlags : SymbolFormatFlags + + buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildSignatureDisplay : (signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>signatures : Signature +>Signature : Signature +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildParameterDisplay : (parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>parameter : Symbol +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildTypeParameterDisplay : (tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>tp : TypeParameter +>TypeParameter : TypeParameter +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void; +>buildTypeParameterDisplayFromSymbol : (symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags) => void +>symbol : Symbol +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaraiton : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildDisplayForParametersAndDelimiters : (parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>parameters : Symbol[] +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildDisplayForTypeParametersAndDelimiters : (typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>typeParameters : TypeParameter[] +>TypeParameter : TypeParameter +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildReturnTypeDisplay : (signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>signature : Signature +>Signature : Signature +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + } + interface SymbolWriter { +>SymbolWriter : SymbolWriter + + writeKeyword(text: string): void; +>writeKeyword : (text: string) => void +>text : string + + writeOperator(text: string): void; +>writeOperator : (text: string) => void +>text : string + + writePunctuation(text: string): void; +>writePunctuation : (text: string) => void +>text : string + + writeSpace(text: string): void; +>writeSpace : (text: string) => void +>text : string + + writeStringLiteral(text: string): void; +>writeStringLiteral : (text: string) => void +>text : string + + writeParameter(text: string): void; +>writeParameter : (text: string) => void +>text : string + + writeSymbol(text: string, symbol: Symbol): void; +>writeSymbol : (text: string, symbol: Symbol) => void +>text : string +>symbol : Symbol +>Symbol : Symbol + + writeLine(): void; +>writeLine : () => void + + increaseIndent(): void; +>increaseIndent : () => void + + decreaseIndent(): void; +>decreaseIndent : () => void + + clear(): void; +>clear : () => void + + trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void; +>trackSymbol : (symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) => void +>symbol : Symbol +>Symbol : Symbol +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags + } + const enum TypeFormatFlags { +>TypeFormatFlags : TypeFormatFlags + + None = 0, +>None : TypeFormatFlags + + WriteArrayAsGenericType = 1, +>WriteArrayAsGenericType : TypeFormatFlags + + UseTypeOfFunction = 2, +>UseTypeOfFunction : TypeFormatFlags + + NoTruncation = 4, +>NoTruncation : TypeFormatFlags + + WriteArrowStyleSignature = 8, +>WriteArrowStyleSignature : TypeFormatFlags + + WriteOwnNameForAnyLike = 16, +>WriteOwnNameForAnyLike : TypeFormatFlags + + WriteTypeArgumentsOfSignature = 32, +>WriteTypeArgumentsOfSignature : TypeFormatFlags + + InElementType = 64, +>InElementType : TypeFormatFlags + } + const enum SymbolFormatFlags { +>SymbolFormatFlags : SymbolFormatFlags + + None = 0, +>None : SymbolFormatFlags + + WriteTypeParametersOrArguments = 1, +>WriteTypeParametersOrArguments : SymbolFormatFlags + + UseOnlyExternalAliasing = 2, +>UseOnlyExternalAliasing : SymbolFormatFlags + } + const enum SymbolAccessibility { +>SymbolAccessibility : SymbolAccessibility + + Accessible = 0, +>Accessible : SymbolAccessibility + + NotAccessible = 1, +>NotAccessible : SymbolAccessibility + + CannotBeNamed = 2, +>CannotBeNamed : SymbolAccessibility + } + interface SymbolVisibilityResult { +>SymbolVisibilityResult : SymbolVisibilityResult + + accessibility: SymbolAccessibility; +>accessibility : SymbolAccessibility +>SymbolAccessibility : SymbolAccessibility + + aliasesToMakeVisible?: ImportDeclaration[]; +>aliasesToMakeVisible : ImportDeclaration[] +>ImportDeclaration : ImportDeclaration + + errorSymbolName?: string; +>errorSymbolName : string + + errorNode?: Node; +>errorNode : Node +>Node : Node + } + interface SymbolAccessiblityResult extends SymbolVisibilityResult { +>SymbolAccessiblityResult : SymbolAccessiblityResult +>SymbolVisibilityResult : SymbolVisibilityResult + + errorModuleName?: string; +>errorModuleName : string + } + interface EmitResolver { +>EmitResolver : EmitResolver + + getProgram(): Program; +>getProgram : () => Program +>Program : Program + + getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; +>getLocalNameOfContainer : (container: EnumDeclaration | ModuleDeclaration) => string +>container : EnumDeclaration | ModuleDeclaration +>ModuleDeclaration : ModuleDeclaration +>EnumDeclaration : EnumDeclaration + + getExpressionNamePrefix(node: Identifier): string; +>getExpressionNamePrefix : (node: Identifier) => string +>node : Identifier +>Identifier : Identifier + + getExportAssignmentName(node: SourceFile): string; +>getExportAssignmentName : (node: SourceFile) => string +>node : SourceFile +>SourceFile : SourceFile + + isReferencedImportDeclaration(node: ImportDeclaration): boolean; +>isReferencedImportDeclaration : (node: ImportDeclaration) => boolean +>node : ImportDeclaration +>ImportDeclaration : ImportDeclaration + + isTopLevelValueImportWithEntityName(node: ImportDeclaration): boolean; +>isTopLevelValueImportWithEntityName : (node: ImportDeclaration) => boolean +>node : ImportDeclaration +>ImportDeclaration : ImportDeclaration + + getNodeCheckFlags(node: Node): NodeCheckFlags; +>getNodeCheckFlags : (node: Node) => NodeCheckFlags +>node : Node +>Node : Node +>NodeCheckFlags : NodeCheckFlags + + getEnumMemberValue(node: EnumMember): number; +>getEnumMemberValue : (node: EnumMember) => number +>node : EnumMember +>EnumMember : EnumMember + + hasSemanticErrors(): boolean; +>hasSemanticErrors : () => boolean + + isDeclarationVisible(node: Declaration): boolean; +>isDeclarationVisible : (node: Declaration) => boolean +>node : Declaration +>Declaration : Declaration + + isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; +>isImplementationOfOverload : (node: FunctionLikeDeclaration) => boolean +>node : FunctionLikeDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration + + writeTypeAtLocation(location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; +>writeTypeAtLocation : (location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void +>location : Node +>Node : Node +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags +>writer : SymbolWriter +>SymbolWriter : SymbolWriter + + writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; +>writeReturnTypeOfSignatureDeclaration : (signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void +>signatureDeclaration : SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags +>writer : SymbolWriter +>SymbolWriter : SymbolWriter + + isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; +>isSymbolAccessible : (symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags) => SymbolAccessiblityResult +>symbol : Symbol +>Symbol : Symbol +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags +>SymbolAccessiblityResult : SymbolAccessiblityResult + + isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; +>isEntityNameVisible : (entityName: Identifier | QualifiedName, enclosingDeclaration: Node) => SymbolVisibilityResult +>entityName : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName +>enclosingDeclaration : Node +>Node : Node +>SymbolVisibilityResult : SymbolVisibilityResult + + getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number; +>getConstantValue : (node: PropertyAccessExpression | ElementAccessExpression) => number +>node : PropertyAccessExpression | ElementAccessExpression +>PropertyAccessExpression : PropertyAccessExpression +>ElementAccessExpression : ElementAccessExpression + + isEmitBlocked(sourceFile?: SourceFile): boolean; +>isEmitBlocked : (sourceFile?: SourceFile) => boolean +>sourceFile : SourceFile +>SourceFile : SourceFile + } + const enum SymbolFlags { +>SymbolFlags : SymbolFlags + + FunctionScopedVariable = 1, +>FunctionScopedVariable : SymbolFlags + + BlockScopedVariable = 2, +>BlockScopedVariable : SymbolFlags + + Property = 4, +>Property : SymbolFlags + + EnumMember = 8, +>EnumMember : SymbolFlags + + Function = 16, +>Function : SymbolFlags + + Class = 32, +>Class : SymbolFlags + + Interface = 64, +>Interface : SymbolFlags + + ConstEnum = 128, +>ConstEnum : SymbolFlags + + RegularEnum = 256, +>RegularEnum : SymbolFlags + + ValueModule = 512, +>ValueModule : SymbolFlags + + NamespaceModule = 1024, +>NamespaceModule : SymbolFlags + + TypeLiteral = 2048, +>TypeLiteral : SymbolFlags + + ObjectLiteral = 4096, +>ObjectLiteral : SymbolFlags + + Method = 8192, +>Method : SymbolFlags + + Constructor = 16384, +>Constructor : SymbolFlags + + GetAccessor = 32768, +>GetAccessor : SymbolFlags + + SetAccessor = 65536, +>SetAccessor : SymbolFlags + + CallSignature = 131072, +>CallSignature : SymbolFlags + + ConstructSignature = 262144, +>ConstructSignature : SymbolFlags + + IndexSignature = 524288, +>IndexSignature : SymbolFlags + + TypeParameter = 1048576, +>TypeParameter : SymbolFlags + + TypeAlias = 2097152, +>TypeAlias : SymbolFlags + + ExportValue = 4194304, +>ExportValue : SymbolFlags + + ExportType = 8388608, +>ExportType : SymbolFlags + + ExportNamespace = 16777216, +>ExportNamespace : SymbolFlags + + Import = 33554432, +>Import : SymbolFlags + + Instantiated = 67108864, +>Instantiated : SymbolFlags + + Merged = 134217728, +>Merged : SymbolFlags + + Transient = 268435456, +>Transient : SymbolFlags + + Prototype = 536870912, +>Prototype : SymbolFlags + + UnionProperty = 1073741824, +>UnionProperty : SymbolFlags + + Enum = 384, +>Enum : SymbolFlags + + Variable = 3, +>Variable : SymbolFlags + + Value = 107455, +>Value : SymbolFlags + + Type = 3152352, +>Type : SymbolFlags + + Namespace = 1536, +>Namespace : SymbolFlags + + Module = 1536, +>Module : SymbolFlags + + Accessor = 98304, +>Accessor : SymbolFlags + + Signature = 917504, +>Signature : SymbolFlags + + FunctionScopedVariableExcludes = 107454, +>FunctionScopedVariableExcludes : SymbolFlags + + BlockScopedVariableExcludes = 107455, +>BlockScopedVariableExcludes : SymbolFlags + + ParameterExcludes = 107455, +>ParameterExcludes : SymbolFlags + + PropertyExcludes = 107455, +>PropertyExcludes : SymbolFlags + + EnumMemberExcludes = 107455, +>EnumMemberExcludes : SymbolFlags + + FunctionExcludes = 106927, +>FunctionExcludes : SymbolFlags + + ClassExcludes = 3258879, +>ClassExcludes : SymbolFlags + + InterfaceExcludes = 3152288, +>InterfaceExcludes : SymbolFlags + + RegularEnumExcludes = 3258623, +>RegularEnumExcludes : SymbolFlags + + ConstEnumExcludes = 3259263, +>ConstEnumExcludes : SymbolFlags + + ValueModuleExcludes = 106639, +>ValueModuleExcludes : SymbolFlags + + NamespaceModuleExcludes = 0, +>NamespaceModuleExcludes : SymbolFlags + + MethodExcludes = 99263, +>MethodExcludes : SymbolFlags + + GetAccessorExcludes = 41919, +>GetAccessorExcludes : SymbolFlags + + SetAccessorExcludes = 74687, +>SetAccessorExcludes : SymbolFlags + + TypeParameterExcludes = 2103776, +>TypeParameterExcludes : SymbolFlags + + TypeAliasExcludes = 3152352, +>TypeAliasExcludes : SymbolFlags + + ImportExcludes = 33554432, +>ImportExcludes : SymbolFlags + + ModuleMember = 35653619, +>ModuleMember : SymbolFlags + + ExportHasLocal = 944, +>ExportHasLocal : SymbolFlags + + HasLocals = 1041936, +>HasLocals : SymbolFlags + + HasExports = 1952, +>HasExports : SymbolFlags + + HasMembers = 6240, +>HasMembers : SymbolFlags + + IsContainer = 1048560, +>IsContainer : SymbolFlags + + PropertyOrAccessor = 98308, +>PropertyOrAccessor : SymbolFlags + + Export = 29360128, +>Export : SymbolFlags + } + interface Symbol { +>Symbol : Symbol + + flags: SymbolFlags; +>flags : SymbolFlags +>SymbolFlags : SymbolFlags + + name: string; +>name : string + + id?: number; +>id : number + + mergeId?: number; +>mergeId : number + + declarations?: Declaration[]; +>declarations : Declaration[] +>Declaration : Declaration + + parent?: Symbol; +>parent : Symbol +>Symbol : Symbol + + members?: SymbolTable; +>members : SymbolTable +>SymbolTable : SymbolTable + + exports?: SymbolTable; +>exports : SymbolTable +>SymbolTable : SymbolTable + + exportSymbol?: Symbol; +>exportSymbol : Symbol +>Symbol : Symbol + + valueDeclaration?: Declaration; +>valueDeclaration : Declaration +>Declaration : Declaration + + constEnumOnlyModule?: boolean; +>constEnumOnlyModule : boolean + } + interface SymbolLinks { +>SymbolLinks : SymbolLinks + + target?: Symbol; +>target : Symbol +>Symbol : Symbol + + type?: Type; +>type : Type +>Type : Type + + declaredType?: Type; +>declaredType : Type +>Type : Type + + mapper?: TypeMapper; +>mapper : TypeMapper +>TypeMapper : TypeMapper + + referenced?: boolean; +>referenced : boolean + + exportAssignSymbol?: Symbol; +>exportAssignSymbol : Symbol +>Symbol : Symbol + + unionType?: UnionType; +>unionType : UnionType +>UnionType : UnionType + } + interface TransientSymbol extends Symbol, SymbolLinks { +>TransientSymbol : TransientSymbol +>Symbol : Symbol +>SymbolLinks : SymbolLinks + } + interface SymbolTable { +>SymbolTable : SymbolTable + + [index: string]: Symbol; +>index : string +>Symbol : Symbol + } + const enum NodeCheckFlags { +>NodeCheckFlags : NodeCheckFlags + + TypeChecked = 1, +>TypeChecked : NodeCheckFlags + + LexicalThis = 2, +>LexicalThis : NodeCheckFlags + + CaptureThis = 4, +>CaptureThis : NodeCheckFlags + + EmitExtends = 8, +>EmitExtends : NodeCheckFlags + + SuperInstance = 16, +>SuperInstance : NodeCheckFlags + + SuperStatic = 32, +>SuperStatic : NodeCheckFlags + + ContextChecked = 64, +>ContextChecked : NodeCheckFlags + + EnumValuesComputed = 128, +>EnumValuesComputed : NodeCheckFlags + } + interface NodeLinks { +>NodeLinks : NodeLinks + + resolvedType?: Type; +>resolvedType : Type +>Type : Type + + resolvedSignature?: Signature; +>resolvedSignature : Signature +>Signature : Signature + + resolvedSymbol?: Symbol; +>resolvedSymbol : Symbol +>Symbol : Symbol + + flags?: NodeCheckFlags; +>flags : NodeCheckFlags +>NodeCheckFlags : NodeCheckFlags + + enumMemberValue?: number; +>enumMemberValue : number + + isIllegalTypeReferenceInConstraint?: boolean; +>isIllegalTypeReferenceInConstraint : boolean + + isVisible?: boolean; +>isVisible : boolean + + localModuleName?: string; +>localModuleName : string + + assignmentChecks?: Map; +>assignmentChecks : Map +>Map : Map + } + const enum TypeFlags { +>TypeFlags : TypeFlags + + Any = 1, +>Any : TypeFlags + + String = 2, +>String : TypeFlags + + Number = 4, +>Number : TypeFlags + + Boolean = 8, +>Boolean : TypeFlags + + Void = 16, +>Void : TypeFlags + + Undefined = 32, +>Undefined : TypeFlags + + Null = 64, +>Null : TypeFlags + + Enum = 128, +>Enum : TypeFlags + + StringLiteral = 256, +>StringLiteral : TypeFlags + + TypeParameter = 512, +>TypeParameter : TypeFlags + + Class = 1024, +>Class : TypeFlags + + Interface = 2048, +>Interface : TypeFlags + + Reference = 4096, +>Reference : TypeFlags + + Tuple = 8192, +>Tuple : TypeFlags + + Union = 16384, +>Union : TypeFlags + + Anonymous = 32768, +>Anonymous : TypeFlags + + FromSignature = 65536, +>FromSignature : TypeFlags + + Intrinsic = 127, +>Intrinsic : TypeFlags + + StringLike = 258, +>StringLike : TypeFlags + + NumberLike = 132, +>NumberLike : TypeFlags + + ObjectType = 48128, +>ObjectType : TypeFlags + + Structured = 65025, +>Structured : TypeFlags + } + interface Type { +>Type : Type + + flags: TypeFlags; +>flags : TypeFlags +>TypeFlags : TypeFlags + + id: number; +>id : number + + symbol?: Symbol; +>symbol : Symbol +>Symbol : Symbol + } + interface IntrinsicType extends Type { +>IntrinsicType : IntrinsicType +>Type : Type + + intrinsicName: string; +>intrinsicName : string + } + interface StringLiteralType extends Type { +>StringLiteralType : StringLiteralType +>Type : Type + + text: string; +>text : string + } + interface ObjectType extends Type { +>ObjectType : ObjectType +>Type : Type + } + interface InterfaceType extends ObjectType { +>InterfaceType : InterfaceType +>ObjectType : ObjectType + + typeParameters: TypeParameter[]; +>typeParameters : TypeParameter[] +>TypeParameter : TypeParameter + + baseTypes: ObjectType[]; +>baseTypes : ObjectType[] +>ObjectType : ObjectType + + declaredProperties: Symbol[]; +>declaredProperties : Symbol[] +>Symbol : Symbol + + declaredCallSignatures: Signature[]; +>declaredCallSignatures : Signature[] +>Signature : Signature + + declaredConstructSignatures: Signature[]; +>declaredConstructSignatures : Signature[] +>Signature : Signature + + declaredStringIndexType: Type; +>declaredStringIndexType : Type +>Type : Type + + declaredNumberIndexType: Type; +>declaredNumberIndexType : Type +>Type : Type + } + interface TypeReference extends ObjectType { +>TypeReference : TypeReference +>ObjectType : ObjectType + + target: GenericType; +>target : GenericType +>GenericType : GenericType + + typeArguments: Type[]; +>typeArguments : Type[] +>Type : Type + } + interface GenericType extends InterfaceType, TypeReference { +>GenericType : GenericType +>InterfaceType : InterfaceType +>TypeReference : TypeReference + + instantiations: Map; +>instantiations : Map +>Map : Map +>TypeReference : TypeReference + + openReferenceTargets: GenericType[]; +>openReferenceTargets : GenericType[] +>GenericType : GenericType + + openReferenceChecks: Map; +>openReferenceChecks : Map +>Map : Map + } + interface TupleType extends ObjectType { +>TupleType : TupleType +>ObjectType : ObjectType + + elementTypes: Type[]; +>elementTypes : Type[] +>Type : Type + + baseArrayType: TypeReference; +>baseArrayType : TypeReference +>TypeReference : TypeReference + } + interface UnionType extends Type { +>UnionType : UnionType +>Type : Type + + types: Type[]; +>types : Type[] +>Type : Type + + resolvedProperties: SymbolTable; +>resolvedProperties : SymbolTable +>SymbolTable : SymbolTable + } + interface ResolvedType extends ObjectType, UnionType { +>ResolvedType : ResolvedType +>ObjectType : ObjectType +>UnionType : UnionType + + members: SymbolTable; +>members : SymbolTable +>SymbolTable : SymbolTable + + properties: Symbol[]; +>properties : Symbol[] +>Symbol : Symbol + + callSignatures: Signature[]; +>callSignatures : Signature[] +>Signature : Signature + + constructSignatures: Signature[]; +>constructSignatures : Signature[] +>Signature : Signature + + stringIndexType: Type; +>stringIndexType : Type +>Type : Type + + numberIndexType: Type; +>numberIndexType : Type +>Type : Type + } + interface TypeParameter extends Type { +>TypeParameter : TypeParameter +>Type : Type + + constraint: Type; +>constraint : Type +>Type : Type + + target?: TypeParameter; +>target : TypeParameter +>TypeParameter : TypeParameter + + mapper?: TypeMapper; +>mapper : TypeMapper +>TypeMapper : TypeMapper + } + const enum SignatureKind { +>SignatureKind : SignatureKind + + Call = 0, +>Call : SignatureKind + + Construct = 1, +>Construct : SignatureKind + } + interface Signature { +>Signature : Signature + + declaration: SignatureDeclaration; +>declaration : SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration + + typeParameters: TypeParameter[]; +>typeParameters : TypeParameter[] +>TypeParameter : TypeParameter + + parameters: Symbol[]; +>parameters : Symbol[] +>Symbol : Symbol + + resolvedReturnType: Type; +>resolvedReturnType : Type +>Type : Type + + minArgumentCount: number; +>minArgumentCount : number + + hasRestParameter: boolean; +>hasRestParameter : boolean + + hasStringLiterals: boolean; +>hasStringLiterals : boolean + + target?: Signature; +>target : Signature +>Signature : Signature + + mapper?: TypeMapper; +>mapper : TypeMapper +>TypeMapper : TypeMapper + + unionSignatures?: Signature[]; +>unionSignatures : Signature[] +>Signature : Signature + + erasedSignatureCache?: Signature; +>erasedSignatureCache : Signature +>Signature : Signature + + isolatedSignatureType?: ObjectType; +>isolatedSignatureType : ObjectType +>ObjectType : ObjectType + } + const enum IndexKind { +>IndexKind : IndexKind + + String = 0, +>String : IndexKind + + Number = 1, +>Number : IndexKind + } + interface TypeMapper { +>TypeMapper : TypeMapper + + (t: Type): Type; +>t : Type +>Type : Type +>Type : Type + } + interface TypeInferences { +>TypeInferences : TypeInferences + + primary: Type[]; +>primary : Type[] +>Type : Type + + secondary: Type[]; +>secondary : Type[] +>Type : Type + } + interface InferenceContext { +>InferenceContext : InferenceContext + + typeParameters: TypeParameter[]; +>typeParameters : TypeParameter[] +>TypeParameter : TypeParameter + + inferUnionTypes: boolean; +>inferUnionTypes : boolean + + inferences: TypeInferences[]; +>inferences : TypeInferences[] +>TypeInferences : TypeInferences + + inferredTypes: Type[]; +>inferredTypes : Type[] +>Type : Type + + failedTypeParameterIndex?: number; +>failedTypeParameterIndex : number + } + interface DiagnosticMessage { +>DiagnosticMessage : DiagnosticMessage + + key: string; +>key : string + + category: DiagnosticCategory; +>category : DiagnosticCategory +>DiagnosticCategory : DiagnosticCategory + + code: number; +>code : number + + isEarly?: boolean; +>isEarly : boolean + } + interface DiagnosticMessageChain { +>DiagnosticMessageChain : DiagnosticMessageChain + + messageText: string; +>messageText : string + + category: DiagnosticCategory; +>category : DiagnosticCategory +>DiagnosticCategory : DiagnosticCategory + + code: number; +>code : number + + next?: DiagnosticMessageChain; +>next : DiagnosticMessageChain +>DiagnosticMessageChain : DiagnosticMessageChain + } + interface Diagnostic { +>Diagnostic : Diagnostic + + file: SourceFile; +>file : SourceFile +>SourceFile : SourceFile + + start: number; +>start : number + + length: number; +>length : number + + messageText: string; +>messageText : string + + category: DiagnosticCategory; +>category : DiagnosticCategory +>DiagnosticCategory : DiagnosticCategory + + code: number; +>code : number + + /** + * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit + */ + isEarly?: boolean; +>isEarly : boolean + + /** + * Parse error - error produced by parser when it scanner returns a token + * that parser does not understand in its current state + * (as opposed to grammar error when parser can interpret the token but interpretation is not legal from the grammar perespective) + */ + isParseError?: boolean; +>isParseError : boolean + } + enum DiagnosticCategory { +>DiagnosticCategory : DiagnosticCategory + + Warning = 0, +>Warning : DiagnosticCategory + + Error = 1, +>Error : DiagnosticCategory + + Message = 2, +>Message : DiagnosticCategory + } + interface CompilerOptions { +>CompilerOptions : CompilerOptions + + charset?: string; +>charset : string + + codepage?: number; +>codepage : number + + declaration?: boolean; +>declaration : boolean + + diagnostics?: boolean; +>diagnostics : boolean + + emitBOM?: boolean; +>emitBOM : boolean + + help?: boolean; +>help : boolean + + locale?: string; +>locale : string + + mapRoot?: string; +>mapRoot : string + + module?: ModuleKind; +>module : ModuleKind +>ModuleKind : ModuleKind + + noEmitOnError?: boolean; +>noEmitOnError : boolean + + noErrorTruncation?: boolean; +>noErrorTruncation : boolean + + noImplicitAny?: boolean; +>noImplicitAny : boolean + + noLib?: boolean; +>noLib : boolean + + noLibCheck?: boolean; +>noLibCheck : boolean + + noResolve?: boolean; +>noResolve : boolean + + out?: string; +>out : string + + outDir?: string; +>outDir : string + + removeComments?: boolean; +>removeComments : boolean + + sourceMap?: boolean; +>sourceMap : boolean + + sourceRoot?: string; +>sourceRoot : string + + target?: ScriptTarget; +>target : ScriptTarget +>ScriptTarget : ScriptTarget + + version?: boolean; +>version : boolean + + watch?: boolean; +>watch : boolean + + preserveConstEnums?: boolean; +>preserveConstEnums : boolean + + [option: string]: string | number | boolean; +>option : string + } + const enum ModuleKind { +>ModuleKind : ModuleKind + + None = 0, +>None : ModuleKind + + CommonJS = 1, +>CommonJS : ModuleKind + + AMD = 2, +>AMD : ModuleKind + } + interface LineAndCharacter { +>LineAndCharacter : LineAndCharacter + + line: number; +>line : number + + character: number; +>character : number + } + const enum ScriptTarget { +>ScriptTarget : ScriptTarget + + ES3 = 0, +>ES3 : ScriptTarget + + ES5 = 1, +>ES5 : ScriptTarget + + ES6 = 2, +>ES6 : ScriptTarget + + Latest = 2, +>Latest : ScriptTarget + } + interface ParsedCommandLine { +>ParsedCommandLine : ParsedCommandLine + + options: CompilerOptions; +>options : CompilerOptions +>CompilerOptions : CompilerOptions + + filenames: string[]; +>filenames : string[] + + errors: Diagnostic[]; +>errors : Diagnostic[] +>Diagnostic : Diagnostic + } + interface CommandLineOption { +>CommandLineOption : CommandLineOption + + name: string; +>name : string + + type: string | Map; +>type : string | Map +>Map : Map + + shortName?: string; +>shortName : string + + description?: DiagnosticMessage; +>description : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + + paramName?: DiagnosticMessage; +>paramName : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + + error?: DiagnosticMessage; +>error : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + } + const enum CharacterCodes { +>CharacterCodes : CharacterCodes + + nullCharacter = 0, +>nullCharacter : CharacterCodes + + maxAsciiCharacter = 127, +>maxAsciiCharacter : CharacterCodes + + lineFeed = 10, +>lineFeed : CharacterCodes + + carriageReturn = 13, +>carriageReturn : CharacterCodes + + lineSeparator = 8232, +>lineSeparator : CharacterCodes + + paragraphSeparator = 8233, +>paragraphSeparator : CharacterCodes + + nextLine = 133, +>nextLine : CharacterCodes + + space = 32, +>space : CharacterCodes + + nonBreakingSpace = 160, +>nonBreakingSpace : CharacterCodes + + enQuad = 8192, +>enQuad : CharacterCodes + + emQuad = 8193, +>emQuad : CharacterCodes + + enSpace = 8194, +>enSpace : CharacterCodes + + emSpace = 8195, +>emSpace : CharacterCodes + + threePerEmSpace = 8196, +>threePerEmSpace : CharacterCodes + + fourPerEmSpace = 8197, +>fourPerEmSpace : CharacterCodes + + sixPerEmSpace = 8198, +>sixPerEmSpace : CharacterCodes + + figureSpace = 8199, +>figureSpace : CharacterCodes + + punctuationSpace = 8200, +>punctuationSpace : CharacterCodes + + thinSpace = 8201, +>thinSpace : CharacterCodes + + hairSpace = 8202, +>hairSpace : CharacterCodes + + zeroWidthSpace = 8203, +>zeroWidthSpace : CharacterCodes + + narrowNoBreakSpace = 8239, +>narrowNoBreakSpace : CharacterCodes + + ideographicSpace = 12288, +>ideographicSpace : CharacterCodes + + mathematicalSpace = 8287, +>mathematicalSpace : CharacterCodes + + ogham = 5760, +>ogham : CharacterCodes + + _ = 95, +>_ : CharacterCodes + + $ = 36, +>$ : CharacterCodes + + _0 = 48, +>_0 : CharacterCodes + + _1 = 49, +>_1 : CharacterCodes + + _2 = 50, +>_2 : CharacterCodes + + _3 = 51, +>_3 : CharacterCodes + + _4 = 52, +>_4 : CharacterCodes + + _5 = 53, +>_5 : CharacterCodes + + _6 = 54, +>_6 : CharacterCodes + + _7 = 55, +>_7 : CharacterCodes + + _8 = 56, +>_8 : CharacterCodes + + _9 = 57, +>_9 : CharacterCodes + + a = 97, +>a : CharacterCodes + + b = 98, +>b : CharacterCodes + + c = 99, +>c : CharacterCodes + + d = 100, +>d : CharacterCodes + + e = 101, +>e : CharacterCodes + + f = 102, +>f : CharacterCodes + + g = 103, +>g : CharacterCodes + + h = 104, +>h : CharacterCodes + + i = 105, +>i : CharacterCodes + + j = 106, +>j : CharacterCodes + + k = 107, +>k : CharacterCodes + + l = 108, +>l : CharacterCodes + + m = 109, +>m : CharacterCodes + + n = 110, +>n : CharacterCodes + + o = 111, +>o : CharacterCodes + + p = 112, +>p : CharacterCodes + + q = 113, +>q : CharacterCodes + + r = 114, +>r : CharacterCodes + + s = 115, +>s : CharacterCodes + + t = 116, +>t : CharacterCodes + + u = 117, +>u : CharacterCodes + + v = 118, +>v : CharacterCodes + + w = 119, +>w : CharacterCodes + + x = 120, +>x : CharacterCodes + + y = 121, +>y : CharacterCodes + + z = 122, +>z : CharacterCodes + + A = 65, +>A : CharacterCodes + + B = 66, +>B : CharacterCodes + + C = 67, +>C : CharacterCodes + + D = 68, +>D : CharacterCodes + + E = 69, +>E : CharacterCodes + + F = 70, +>F : CharacterCodes + + G = 71, +>G : CharacterCodes + + H = 72, +>H : CharacterCodes + + I = 73, +>I : CharacterCodes + + J = 74, +>J : CharacterCodes + + K = 75, +>K : CharacterCodes + + L = 76, +>L : CharacterCodes + + M = 77, +>M : CharacterCodes + + N = 78, +>N : CharacterCodes + + O = 79, +>O : CharacterCodes + + P = 80, +>P : CharacterCodes + + Q = 81, +>Q : CharacterCodes + + R = 82, +>R : CharacterCodes + + S = 83, +>S : CharacterCodes + + T = 84, +>T : CharacterCodes + + U = 85, +>U : CharacterCodes + + V = 86, +>V : CharacterCodes + + W = 87, +>W : CharacterCodes + + X = 88, +>X : CharacterCodes + + Y = 89, +>Y : CharacterCodes + + Z = 90, +>Z : CharacterCodes + + ampersand = 38, +>ampersand : CharacterCodes + + asterisk = 42, +>asterisk : CharacterCodes + + at = 64, +>at : CharacterCodes + + backslash = 92, +>backslash : CharacterCodes + + backtick = 96, +>backtick : CharacterCodes + + bar = 124, +>bar : CharacterCodes + + caret = 94, +>caret : CharacterCodes + + closeBrace = 125, +>closeBrace : CharacterCodes + + closeBracket = 93, +>closeBracket : CharacterCodes + + closeParen = 41, +>closeParen : CharacterCodes + + colon = 58, +>colon : CharacterCodes + + comma = 44, +>comma : CharacterCodes + + dot = 46, +>dot : CharacterCodes + + doubleQuote = 34, +>doubleQuote : CharacterCodes + + equals = 61, +>equals : CharacterCodes + + exclamation = 33, +>exclamation : CharacterCodes + + greaterThan = 62, +>greaterThan : CharacterCodes + + lessThan = 60, +>lessThan : CharacterCodes + + minus = 45, +>minus : CharacterCodes + + openBrace = 123, +>openBrace : CharacterCodes + + openBracket = 91, +>openBracket : CharacterCodes + + openParen = 40, +>openParen : CharacterCodes + + percent = 37, +>percent : CharacterCodes + + plus = 43, +>plus : CharacterCodes + + question = 63, +>question : CharacterCodes + + semicolon = 59, +>semicolon : CharacterCodes + + singleQuote = 39, +>singleQuote : CharacterCodes + + slash = 47, +>slash : CharacterCodes + + tilde = 126, +>tilde : CharacterCodes + + backspace = 8, +>backspace : CharacterCodes + + formFeed = 12, +>formFeed : CharacterCodes + + byteOrderMark = 65279, +>byteOrderMark : CharacterCodes + + tab = 9, +>tab : CharacterCodes + + verticalTab = 11, +>verticalTab : CharacterCodes + } + interface CancellationToken { +>CancellationToken : CancellationToken + + isCancellationRequested(): boolean; +>isCancellationRequested : () => boolean + } + interface CompilerHost { +>CompilerHost : CompilerHost + + getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; +>getSourceFile : (filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void) => SourceFile +>filename : string +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget +>onError : (message: string) => void +>message : string +>SourceFile : SourceFile + + getDefaultLibFilename(): string; +>getDefaultLibFilename : () => string + + getCancellationToken?(): CancellationToken; +>getCancellationToken : () => CancellationToken +>CancellationToken : CancellationToken + + writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; +>writeFile : (filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void) => void +>filename : string +>data : string +>writeByteOrderMark : boolean +>onError : (message: string) => void +>message : string + + getCurrentDirectory(): string; +>getCurrentDirectory : () => string + + getCanonicalFileName(fileName: string): string; +>getCanonicalFileName : (fileName: string) => string +>fileName : string + + useCaseSensitiveFileNames(): boolean; +>useCaseSensitiveFileNames : () => boolean + + getNewLine(): string; +>getNewLine : () => string + } +} +declare module ts { +>ts : typeof ts + + interface ErrorCallback { +>ErrorCallback : ErrorCallback + + (message: DiagnosticMessage): void; +>message : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + } + interface CommentCallback { +>CommentCallback : CommentCallback + + (pos: number, end: number): void; +>pos : number +>end : number + } + interface Scanner { +>Scanner : Scanner + + getStartPos(): number; +>getStartPos : () => number + + getToken(): SyntaxKind; +>getToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + getTextPos(): number; +>getTextPos : () => number + + getTokenPos(): number; +>getTokenPos : () => number + + getTokenText(): string; +>getTokenText : () => string + + getTokenValue(): string; +>getTokenValue : () => string + + hasPrecedingLineBreak(): boolean; +>hasPrecedingLineBreak : () => boolean + + isIdentifier(): boolean; +>isIdentifier : () => boolean + + isReservedWord(): boolean; +>isReservedWord : () => boolean + + reScanGreaterToken(): SyntaxKind; +>reScanGreaterToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + reScanSlashToken(): SyntaxKind; +>reScanSlashToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + reScanTemplateToken(): SyntaxKind; +>reScanTemplateToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + scan(): SyntaxKind; +>scan : () => SyntaxKind +>SyntaxKind : SyntaxKind + + setText(text: string): void; +>setText : (text: string) => void +>text : string + + setTextPos(textPos: number): void; +>setTextPos : (textPos: number) => void +>textPos : number + + tryScan(callback: () => T): T; +>tryScan : (callback: () => T) => T +>T : T +>callback : () => T +>T : T +>T : T + } + function tokenToString(t: SyntaxKind): string; +>tokenToString : (t: SyntaxKind) => string +>t : SyntaxKind +>SyntaxKind : SyntaxKind + + function computeLineStarts(text: string): number[]; +>computeLineStarts : (text: string) => number[] +>text : string + + function getPositionFromLineAndCharacter(lineStarts: number[], line: number, character: number): number; +>getPositionFromLineAndCharacter : (lineStarts: number[], line: number, character: number) => number +>lineStarts : number[] +>line : number +>character : number + + function getLineAndCharacterOfPosition(lineStarts: number[], position: number): { +>getLineAndCharacterOfPosition : (lineStarts: number[], position: number) => { line: number; character: number; } +>lineStarts : number[] +>position : number + + line: number; +>line : number + + character: number; +>character : number + + }; + function positionToLineAndCharacter(text: string, pos: number): { +>positionToLineAndCharacter : (text: string, pos: number) => { line: number; character: number; } +>text : string +>pos : number + + line: number; +>line : number + + character: number; +>character : number + + }; + function isWhiteSpace(ch: number): boolean; +>isWhiteSpace : (ch: number) => boolean +>ch : number + + function isLineBreak(ch: number): boolean; +>isLineBreak : (ch: number) => boolean +>ch : number + + function isOctalDigit(ch: number): boolean; +>isOctalDigit : (ch: number) => boolean +>ch : number + + function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean): number; +>skipTrivia : (text: string, pos: number, stopAfterLineBreak?: boolean) => number +>text : string +>pos : number +>stopAfterLineBreak : boolean + + function getLeadingCommentRanges(text: string, pos: number): CommentRange[]; +>getLeadingCommentRanges : (text: string, pos: number) => CommentRange[] +>text : string +>pos : number +>CommentRange : CommentRange + + function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; +>getTrailingCommentRanges : (text: string, pos: number) => CommentRange[] +>text : string +>pos : number +>CommentRange : CommentRange + + function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; +>isIdentifierStart : (ch: number, languageVersion: ScriptTarget) => boolean +>ch : number +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget + + function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; +>isIdentifierPart : (ch: number, languageVersion: ScriptTarget) => boolean +>ch : number +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget + + function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback): Scanner; +>createScanner : (languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback) => Scanner +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget +>skipTrivia : boolean +>text : string +>onError : ErrorCallback +>ErrorCallback : ErrorCallback +>onComment : CommentCallback +>CommentCallback : CommentCallback +>Scanner : Scanner +} +declare module ts { +>ts : typeof ts + + interface ReferencePathMatchResult { +>ReferencePathMatchResult : ReferencePathMatchResult + + fileReference?: FileReference; +>fileReference : FileReference +>FileReference : FileReference + + diagnostic?: DiagnosticMessage; +>diagnostic : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + + isNoDefaultLib?: boolean; +>isNoDefaultLib : boolean + } + function getNodeConstructor(kind: SyntaxKind): new () => Node; +>getNodeConstructor : (kind: SyntaxKind) => new () => Node +>kind : SyntaxKind +>SyntaxKind : SyntaxKind +>Node : Node + + function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; +>forEachChild : (node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T) => T +>T : T +>node : Node +>Node : Node +>cbNode : (node: Node) => T +>node : Node +>Node : Node +>T : T +>cbNodes : (nodes: Node[]) => T +>nodes : Node[] +>Node : Node +>T : T +>T : T + + function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; +>createSourceFile : (filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean) => SourceFile +>filename : string +>sourceText : string +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget +>version : string +>isOpen : boolean +>SourceFile : SourceFile + + function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; +>createProgram : (rootNames: string[], options: CompilerOptions, host: CompilerHost) => Program +>rootNames : string[] +>options : CompilerOptions +>CompilerOptions : CompilerOptions +>host : CompilerHost +>CompilerHost : CompilerHost +>Program : Program +} +declare module ts { +>ts : typeof ts + + function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; +>createTypeChecker : (program: Program, fullTypeCheck: boolean) => TypeChecker +>program : Program +>Program : Program +>fullTypeCheck : boolean +>TypeChecker : TypeChecker +} +declare module ts { +>ts : typeof ts + + interface Node { +>Node : Node + + getSourceFile(): SourceFile; +>getSourceFile : () => SourceFile +>SourceFile : SourceFile + + getChildCount(sourceFile?: SourceFile): number; +>getChildCount : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getChildAt(index: number, sourceFile?: SourceFile): Node; +>getChildAt : (index: number, sourceFile?: SourceFile) => Node +>index : number +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + + getChildren(sourceFile?: SourceFile): Node[]; +>getChildren : (sourceFile?: SourceFile) => Node[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + + getStart(sourceFile?: SourceFile): number; +>getStart : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFullStart(): number; +>getFullStart : () => number + + getEnd(): number; +>getEnd : () => number + + getWidth(sourceFile?: SourceFile): number; +>getWidth : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFullWidth(): number; +>getFullWidth : () => number + + getLeadingTriviaWidth(sourceFile?: SourceFile): number; +>getLeadingTriviaWidth : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFullText(sourceFile?: SourceFile): string; +>getFullText : (sourceFile?: SourceFile) => string +>sourceFile : SourceFile +>SourceFile : SourceFile + + getText(sourceFile?: SourceFile): string; +>getText : (sourceFile?: SourceFile) => string +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFirstToken(sourceFile?: SourceFile): Node; +>getFirstToken : (sourceFile?: SourceFile) => Node +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + + getLastToken(sourceFile?: SourceFile): Node; +>getLastToken : (sourceFile?: SourceFile) => Node +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + } + interface Symbol { +>Symbol : Symbol + + getFlags(): SymbolFlags; +>getFlags : () => SymbolFlags +>SymbolFlags : SymbolFlags + + getName(): string; +>getName : () => string + + getDeclarations(): Declaration[]; +>getDeclarations : () => Declaration[] +>Declaration : Declaration + + getDocumentationComment(): SymbolDisplayPart[]; +>getDocumentationComment : () => SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface Type { +>Type : Type + + getFlags(): TypeFlags; +>getFlags : () => TypeFlags +>TypeFlags : TypeFlags + + getSymbol(): Symbol; +>getSymbol : () => Symbol +>Symbol : Symbol + + getProperties(): Symbol[]; +>getProperties : () => Symbol[] +>Symbol : Symbol + + getProperty(propertyName: string): Symbol; +>getProperty : (propertyName: string) => Symbol +>propertyName : string +>Symbol : Symbol + + getApparentProperties(): Symbol[]; +>getApparentProperties : () => Symbol[] +>Symbol : Symbol + + getCallSignatures(): Signature[]; +>getCallSignatures : () => Signature[] +>Signature : Signature + + getConstructSignatures(): Signature[]; +>getConstructSignatures : () => Signature[] +>Signature : Signature + + getStringIndexType(): Type; +>getStringIndexType : () => Type +>Type : Type + + getNumberIndexType(): Type; +>getNumberIndexType : () => Type +>Type : Type + } + interface Signature { +>Signature : Signature + + getDeclaration(): SignatureDeclaration; +>getDeclaration : () => SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration + + getTypeParameters(): Type[]; +>getTypeParameters : () => Type[] +>Type : Type + + getParameters(): Symbol[]; +>getParameters : () => Symbol[] +>Symbol : Symbol + + getReturnType(): Type; +>getReturnType : () => Type +>Type : Type + + getDocumentationComment(): SymbolDisplayPart[]; +>getDocumentationComment : () => SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface SourceFile { +>SourceFile : SourceFile + + getScriptSnapshot(): IScriptSnapshot; +>getScriptSnapshot : () => IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot + + getNamedDeclarations(): Declaration[]; +>getNamedDeclarations : () => Declaration[] +>Declaration : Declaration + + update(scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; +>update : (scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange) => SourceFile +>scriptSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>version : string +>isOpen : boolean +>textChangeRange : TextChangeRange +>TextChangeRange : TextChangeRange +>SourceFile : SourceFile + } + /** + * Represents an immutable snapshot of a script at a specified time.Once acquired, the + * snapshot is observably immutable. i.e. the same calls with the same parameters will return + * the same values. + */ + interface IScriptSnapshot { +>IScriptSnapshot : IScriptSnapshot + + /** Gets a portion of the script snapshot specified by [start, end). */ + getText(start: number, end: number): string; +>getText : (start: number, end: number) => string +>start : number +>end : number + + /** Gets the length of this script snapshot. */ + getLength(): number; +>getLength : () => number + + /** + * This call returns the array containing the start position of every line. + * i.e."[0, 10, 55]". TODO: consider making this optional. The language service could + * always determine this (albeit in a more expensive manner). + */ + getLineStartPositions(): number[]; +>getLineStartPositions : () => number[] + + /** + * Gets the TextChangeRange that describe how the text changed between this text and + * an older version. This information is used by the incremental parser to determine + * what sections of the script need to be re-parsed. 'undefined' can be returned if the + * change range cannot be determined. However, in that case, incremental parsing will + * not happen and the entire document will be re - parsed. + */ + getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; +>getChangeRange : (oldSnapshot: IScriptSnapshot) => TextChangeRange +>oldSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>TextChangeRange : TextChangeRange + } + module ScriptSnapshot { +>ScriptSnapshot : typeof ScriptSnapshot + + function fromString(text: string): IScriptSnapshot; +>fromString : (text: string) => IScriptSnapshot +>text : string +>IScriptSnapshot : IScriptSnapshot + } + interface PreProcessedFileInfo { +>PreProcessedFileInfo : PreProcessedFileInfo + + referencedFiles: FileReference[]; +>referencedFiles : FileReference[] +>FileReference : FileReference + + importedFiles: FileReference[]; +>importedFiles : FileReference[] +>FileReference : FileReference + + isLibFile: boolean; +>isLibFile : boolean + } + interface Logger { +>Logger : Logger + + log(s: string): void; +>log : (s: string) => void +>s : string + } + interface LanguageServiceHost extends Logger { +>LanguageServiceHost : LanguageServiceHost +>Logger : Logger + + getCompilationSettings(): CompilerOptions; +>getCompilationSettings : () => CompilerOptions +>CompilerOptions : CompilerOptions + + getScriptFileNames(): string[]; +>getScriptFileNames : () => string[] + + getScriptVersion(fileName: string): string; +>getScriptVersion : (fileName: string) => string +>fileName : string + + getScriptIsOpen(fileName: string): boolean; +>getScriptIsOpen : (fileName: string) => boolean +>fileName : string + + getScriptSnapshot(fileName: string): IScriptSnapshot; +>getScriptSnapshot : (fileName: string) => IScriptSnapshot +>fileName : string +>IScriptSnapshot : IScriptSnapshot + + getLocalizedDiagnosticMessages(): any; +>getLocalizedDiagnosticMessages : () => any + + getCancellationToken(): CancellationToken; +>getCancellationToken : () => CancellationToken +>CancellationToken : CancellationToken + + getCurrentDirectory(): string; +>getCurrentDirectory : () => string + + getDefaultLibFilename(): string; +>getDefaultLibFilename : () => string + } + interface LanguageService { +>LanguageService : LanguageService + + cleanupSemanticCache(): void; +>cleanupSemanticCache : () => void + + getSyntacticDiagnostics(fileName: string): Diagnostic[]; +>getSyntacticDiagnostics : (fileName: string) => Diagnostic[] +>fileName : string +>Diagnostic : Diagnostic + + getSemanticDiagnostics(fileName: string): Diagnostic[]; +>getSemanticDiagnostics : (fileName: string) => Diagnostic[] +>fileName : string +>Diagnostic : Diagnostic + + getCompilerOptionsDiagnostics(): Diagnostic[]; +>getCompilerOptionsDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; +>getSyntacticClassifications : (fileName: string, span: TextSpan) => ClassifiedSpan[] +>fileName : string +>span : TextSpan +>TextSpan : TextSpan +>ClassifiedSpan : ClassifiedSpan + + getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; +>getSemanticClassifications : (fileName: string, span: TextSpan) => ClassifiedSpan[] +>fileName : string +>span : TextSpan +>TextSpan : TextSpan +>ClassifiedSpan : ClassifiedSpan + + getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): CompletionInfo; +>getCompletionsAtPosition : (fileName: string, position: number, isMemberCompletion: boolean) => CompletionInfo +>fileName : string +>position : number +>isMemberCompletion : boolean +>CompletionInfo : CompletionInfo + + getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; +>getCompletionEntryDetails : (fileName: string, position: number, entryName: string) => CompletionEntryDetails +>fileName : string +>position : number +>entryName : string +>CompletionEntryDetails : CompletionEntryDetails + + getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; +>getQuickInfoAtPosition : (fileName: string, position: number) => QuickInfo +>fileName : string +>position : number +>QuickInfo : QuickInfo + + getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; +>getNameOrDottedNameSpan : (fileName: string, startPos: number, endPos: number) => TextSpan +>fileName : string +>startPos : number +>endPos : number +>TextSpan : TextSpan + + getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan; +>getBreakpointStatementAtPosition : (fileName: string, position: number) => TextSpan +>fileName : string +>position : number +>TextSpan : TextSpan + + getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems; +>getSignatureHelpItems : (fileName: string, position: number) => SignatureHelpItems +>fileName : string +>position : number +>SignatureHelpItems : SignatureHelpItems + + getRenameInfo(fileName: string, position: number): RenameInfo; +>getRenameInfo : (fileName: string, position: number) => RenameInfo +>fileName : string +>position : number +>RenameInfo : RenameInfo + + findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[]; +>findRenameLocations : (fileName: string, position: number, findInStrings: boolean, findInComments: boolean) => RenameLocation[] +>fileName : string +>position : number +>findInStrings : boolean +>findInComments : boolean +>RenameLocation : RenameLocation + + getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; +>getDefinitionAtPosition : (fileName: string, position: number) => DefinitionInfo[] +>fileName : string +>position : number +>DefinitionInfo : DefinitionInfo + + getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; +>getReferencesAtPosition : (fileName: string, position: number) => ReferenceEntry[] +>fileName : string +>position : number +>ReferenceEntry : ReferenceEntry + + getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; +>getOccurrencesAtPosition : (fileName: string, position: number) => ReferenceEntry[] +>fileName : string +>position : number +>ReferenceEntry : ReferenceEntry + + getNavigateToItems(searchValue: string): NavigateToItem[]; +>getNavigateToItems : (searchValue: string) => NavigateToItem[] +>searchValue : string +>NavigateToItem : NavigateToItem + + getNavigationBarItems(fileName: string): NavigationBarItem[]; +>getNavigationBarItems : (fileName: string) => NavigationBarItem[] +>fileName : string +>NavigationBarItem : NavigationBarItem + + getOutliningSpans(fileName: string): OutliningSpan[]; +>getOutliningSpans : (fileName: string) => OutliningSpan[] +>fileName : string +>OutliningSpan : OutliningSpan + + getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; +>getTodoComments : (fileName: string, descriptors: TodoCommentDescriptor[]) => TodoComment[] +>fileName : string +>descriptors : TodoCommentDescriptor[] +>TodoCommentDescriptor : TodoCommentDescriptor +>TodoComment : TodoComment + + getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; +>getBraceMatchingAtPosition : (fileName: string, position: number) => TextSpan[] +>fileName : string +>position : number +>TextSpan : TextSpan + + getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number; +>getIndentationAtPosition : (fileName: string, position: number, options: EditorOptions) => number +>fileName : string +>position : number +>options : EditorOptions +>EditorOptions : EditorOptions + + getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[]; +>getFormattingEditsForRange : (fileName: string, start: number, end: number, options: FormatCodeOptions) => TextChange[] +>fileName : string +>start : number +>end : number +>options : FormatCodeOptions +>FormatCodeOptions : FormatCodeOptions +>TextChange : TextChange + + getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; +>getFormattingEditsForDocument : (fileName: string, options: FormatCodeOptions) => TextChange[] +>fileName : string +>options : FormatCodeOptions +>FormatCodeOptions : FormatCodeOptions +>TextChange : TextChange + + getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[]; +>getFormattingEditsAfterKeystroke : (fileName: string, position: number, key: string, options: FormatCodeOptions) => TextChange[] +>fileName : string +>position : number +>key : string +>options : FormatCodeOptions +>FormatCodeOptions : FormatCodeOptions +>TextChange : TextChange + + getEmitOutput(fileName: string): EmitOutput; +>getEmitOutput : (fileName: string) => EmitOutput +>fileName : string +>EmitOutput : EmitOutput + + getSourceFile(filename: string): SourceFile; +>getSourceFile : (filename: string) => SourceFile +>filename : string +>SourceFile : SourceFile + + dispose(): void; +>dispose : () => void + } + class TextSpan { +>TextSpan : TextSpan + + private _start; +>_start : any + + private _length; +>_length : any + + /** + * Creates a TextSpan instance beginning with the position Start and having the Length + * specified with length. + */ + constructor(start: number, length: number); +>start : number +>length : number + + toJSON(key: any): any; +>toJSON : (key: any) => any +>key : any + + start(): number; +>start : () => number + + length(): number; +>length : () => number + + end(): number; +>end : () => number + + isEmpty(): boolean; +>isEmpty : () => boolean + + /** + * Determines whether the position lies within the span. Returns true if the position is greater than or equal to Start and strictly less + * than End, otherwise false. + * @param position The position to check. + */ + containsPosition(position: number): boolean; +>containsPosition : (position: number) => boolean +>position : number + + /** + * Determines whether span falls completely within this span. Returns true if the specified span falls completely within this span, otherwise false. + * @param span The span to check. + */ + containsTextSpan(span: TextSpan): boolean; +>containsTextSpan : (span: TextSpan) => boolean +>span : TextSpan +>TextSpan : TextSpan + + /** + * Determines whether the given span overlaps this span. Two spans are considered to overlap + * if they have positions in common and neither is empty. Empty spans do not overlap with any + * other span. Returns true if the spans overlap, false otherwise. + * @param span The span to check. + */ + overlapsWith(span: TextSpan): boolean; +>overlapsWith : (span: TextSpan) => boolean +>span : TextSpan +>TextSpan : TextSpan + + /** + * Returns the overlap with the given span, or undefined if there is no overlap. + * @param span The span to check. + */ + overlap(span: TextSpan): TextSpan; +>overlap : (span: TextSpan) => TextSpan +>span : TextSpan +>TextSpan : TextSpan +>TextSpan : TextSpan + + /** + * Determines whether span intersects this span. Two spans are considered to + * intersect if they have positions in common or the end of one span + * coincides with the start of the other span. Returns true if the spans intersect, false otherwise. + * @param The span to check. + */ + intersectsWithTextSpan(span: TextSpan): boolean; +>intersectsWithTextSpan : (span: TextSpan) => boolean +>span : TextSpan +>TextSpan : TextSpan + + intersectsWith(start: number, length: number): boolean; +>intersectsWith : (start: number, length: number) => boolean +>start : number +>length : number + + /** + * Determines whether the given position intersects this span. + * A position is considered to intersect if it is between the start and + * end positions (inclusive) of this span. Returns true if the position intersects, false otherwise. + * @param position The position to check. + */ + intersectsWithPosition(position: number): boolean; +>intersectsWithPosition : (position: number) => boolean +>position : number + + /** + * Returns the intersection with the given span, or undefined if there is no intersection. + * @param span The span to check. + */ + intersection(span: TextSpan): TextSpan; +>intersection : (span: TextSpan) => TextSpan +>span : TextSpan +>TextSpan : TextSpan +>TextSpan : TextSpan + + /** + * Creates a new TextSpan from the given start and end positions + * as opposed to a position and length. + */ + static fromBounds(start: number, end: number): TextSpan; +>fromBounds : (start: number, end: number) => TextSpan +>start : number +>end : number +>TextSpan : TextSpan + } + class TextChangeRange { +>TextChangeRange : TextChangeRange + + static unchanged: TextChangeRange; +>unchanged : TextChangeRange +>TextChangeRange : TextChangeRange + + private _span; +>_span : any + + private _newLength; +>_newLength : any + + /** + * Initializes a new instance of TextChangeRange. + */ + constructor(span: TextSpan, newLength: number); +>span : TextSpan +>TextSpan : TextSpan +>newLength : number + + /** + * The span of text before the edit which is being changed + */ + span(): TextSpan; +>span : () => TextSpan +>TextSpan : TextSpan + + /** + * Width of the span after the edit. A 0 here would represent a delete + */ + newLength(): number; +>newLength : () => number + + newSpan(): TextSpan; +>newSpan : () => TextSpan +>TextSpan : TextSpan + + isUnchanged(): boolean; +>isUnchanged : () => boolean + + /** + * Called to merge all the changes that occurred across several versions of a script snapshot + * into a single change. i.e. if a user keeps making successive edits to a script we will + * have a text change from V1 to V2, V2 to V3, ..., Vn. + * + * This function will then merge those changes into a single change range valid between V1 and + * Vn. + */ + static collapseChangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; +>collapseChangesAcrossMultipleVersions : (changes: TextChangeRange[]) => TextChangeRange +>changes : TextChangeRange[] +>TextChangeRange : TextChangeRange +>TextChangeRange : TextChangeRange + } + interface ClassifiedSpan { +>ClassifiedSpan : ClassifiedSpan + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + classificationType: string; +>classificationType : string + } + interface NavigationBarItem { +>NavigationBarItem : NavigationBarItem + + text: string; +>text : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + spans: TextSpan[]; +>spans : TextSpan[] +>TextSpan : TextSpan + + childItems: NavigationBarItem[]; +>childItems : NavigationBarItem[] +>NavigationBarItem : NavigationBarItem + + indent: number; +>indent : number + + bolded: boolean; +>bolded : boolean + + grayed: boolean; +>grayed : boolean + } + interface TodoCommentDescriptor { +>TodoCommentDescriptor : TodoCommentDescriptor + + text: string; +>text : string + + priority: number; +>priority : number + } + interface TodoComment { +>TodoComment : TodoComment + + descriptor: TodoCommentDescriptor; +>descriptor : TodoCommentDescriptor +>TodoCommentDescriptor : TodoCommentDescriptor + + message: string; +>message : string + + position: number; +>position : number + } + class TextChange { +>TextChange : TextChange + + span: TextSpan; +>span : TextSpan +>TextSpan : TextSpan + + newText: string; +>newText : string + } + interface RenameLocation { +>RenameLocation : RenameLocation + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + fileName: string; +>fileName : string + } + interface ReferenceEntry { +>ReferenceEntry : ReferenceEntry + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + fileName: string; +>fileName : string + + isWriteAccess: boolean; +>isWriteAccess : boolean + } + interface NavigateToItem { +>NavigateToItem : NavigateToItem + + name: string; +>name : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + matchKind: string; +>matchKind : string + + fileName: string; +>fileName : string + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + containerName: string; +>containerName : string + + containerKind: string; +>containerKind : string + } + interface EditorOptions { +>EditorOptions : EditorOptions + + IndentSize: number; +>IndentSize : number + + TabSize: number; +>TabSize : number + + NewLineCharacter: string; +>NewLineCharacter : string + + ConvertTabsToSpaces: boolean; +>ConvertTabsToSpaces : boolean + } + interface FormatCodeOptions extends EditorOptions { +>FormatCodeOptions : FormatCodeOptions +>EditorOptions : EditorOptions + + InsertSpaceAfterCommaDelimiter: boolean; +>InsertSpaceAfterCommaDelimiter : boolean + + InsertSpaceAfterSemicolonInForStatements: boolean; +>InsertSpaceAfterSemicolonInForStatements : boolean + + InsertSpaceBeforeAndAfterBinaryOperators: boolean; +>InsertSpaceBeforeAndAfterBinaryOperators : boolean + + InsertSpaceAfterKeywordsInControlFlowStatements: boolean; +>InsertSpaceAfterKeywordsInControlFlowStatements : boolean + + InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; +>InsertSpaceAfterFunctionKeywordForAnonymousFunctions : boolean + + InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; +>InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis : boolean + + PlaceOpenBraceOnNewLineForFunctions: boolean; +>PlaceOpenBraceOnNewLineForFunctions : boolean + + PlaceOpenBraceOnNewLineForControlBlocks: boolean; +>PlaceOpenBraceOnNewLineForControlBlocks : boolean + } + interface DefinitionInfo { +>DefinitionInfo : DefinitionInfo + + fileName: string; +>fileName : string + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + kind: string; +>kind : string + + name: string; +>name : string + + containerKind: string; +>containerKind : string + + containerName: string; +>containerName : string + } + enum SymbolDisplayPartKind { +>SymbolDisplayPartKind : SymbolDisplayPartKind + + aliasName = 0, +>aliasName : SymbolDisplayPartKind + + className = 1, +>className : SymbolDisplayPartKind + + enumName = 2, +>enumName : SymbolDisplayPartKind + + fieldName = 3, +>fieldName : SymbolDisplayPartKind + + interfaceName = 4, +>interfaceName : SymbolDisplayPartKind + + keyword = 5, +>keyword : SymbolDisplayPartKind + + lineBreak = 6, +>lineBreak : SymbolDisplayPartKind + + numericLiteral = 7, +>numericLiteral : SymbolDisplayPartKind + + stringLiteral = 8, +>stringLiteral : SymbolDisplayPartKind + + localName = 9, +>localName : SymbolDisplayPartKind + + methodName = 10, +>methodName : SymbolDisplayPartKind + + moduleName = 11, +>moduleName : SymbolDisplayPartKind + + operator = 12, +>operator : SymbolDisplayPartKind + + parameterName = 13, +>parameterName : SymbolDisplayPartKind + + propertyName = 14, +>propertyName : SymbolDisplayPartKind + + punctuation = 15, +>punctuation : SymbolDisplayPartKind + + space = 16, +>space : SymbolDisplayPartKind + + text = 17, +>text : SymbolDisplayPartKind + + typeParameterName = 18, +>typeParameterName : SymbolDisplayPartKind + + enumMemberName = 19, +>enumMemberName : SymbolDisplayPartKind + + functionName = 20, +>functionName : SymbolDisplayPartKind + + regularExpressionLiteral = 21, +>regularExpressionLiteral : SymbolDisplayPartKind + } + interface SymbolDisplayPart { +>SymbolDisplayPart : SymbolDisplayPart + + text: string; +>text : string + + kind: string; +>kind : string + } + interface QuickInfo { +>QuickInfo : QuickInfo + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + displayParts: SymbolDisplayPart[]; +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface RenameInfo { +>RenameInfo : RenameInfo + + canRename: boolean; +>canRename : boolean + + localizedErrorMessage: string; +>localizedErrorMessage : string + + displayName: string; +>displayName : string + + fullDisplayName: string; +>fullDisplayName : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + triggerSpan: TextSpan; +>triggerSpan : TextSpan +>TextSpan : TextSpan + } + interface SignatureHelpParameter { +>SignatureHelpParameter : SignatureHelpParameter + + name: string; +>name : string + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + displayParts: SymbolDisplayPart[]; +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + isOptional: boolean; +>isOptional : boolean + } + /** + * Represents a single signature to show in signature help. + * The id is used for subsequent calls into the language service to ask questions about the + * signature help item in the context of any documents that have been updated. i.e. after + * an edit has happened, while signature help is still active, the host can ask important + * questions like 'what parameter is the user currently contained within?'. + */ + interface SignatureHelpItem { +>SignatureHelpItem : SignatureHelpItem + + isVariadic: boolean; +>isVariadic : boolean + + prefixDisplayParts: SymbolDisplayPart[]; +>prefixDisplayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + suffixDisplayParts: SymbolDisplayPart[]; +>suffixDisplayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + separatorDisplayParts: SymbolDisplayPart[]; +>separatorDisplayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + parameters: SignatureHelpParameter[]; +>parameters : SignatureHelpParameter[] +>SignatureHelpParameter : SignatureHelpParameter + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + /** + * Represents a set of signature help items, and the preferred item that should be selected. + */ + interface SignatureHelpItems { +>SignatureHelpItems : SignatureHelpItems + + items: SignatureHelpItem[]; +>items : SignatureHelpItem[] +>SignatureHelpItem : SignatureHelpItem + + applicableSpan: TextSpan; +>applicableSpan : TextSpan +>TextSpan : TextSpan + + selectedItemIndex: number; +>selectedItemIndex : number + + argumentIndex: number; +>argumentIndex : number + + argumentCount: number; +>argumentCount : number + } + interface CompletionInfo { +>CompletionInfo : CompletionInfo + + isMemberCompletion: boolean; +>isMemberCompletion : boolean + + entries: CompletionEntry[]; +>entries : CompletionEntry[] +>CompletionEntry : CompletionEntry + } + interface CompletionEntry { +>CompletionEntry : CompletionEntry + + name: string; +>name : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + } + interface CompletionEntryDetails { +>CompletionEntryDetails : CompletionEntryDetails + + name: string; +>name : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + displayParts: SymbolDisplayPart[]; +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface OutliningSpan { +>OutliningSpan : OutliningSpan + + /** The span of the document to actually collapse. */ + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + /** The span of the document to display when the user hovers over the collapsed span. */ + hintSpan: TextSpan; +>hintSpan : TextSpan +>TextSpan : TextSpan + + /** The text to display in the editor for the collapsed region. */ + bannerText: string; +>bannerText : string + + /** + * Whether or not this region should be automatically collapsed when + * the 'Collapse to Definitions' command is invoked. + */ + autoCollapse: boolean; +>autoCollapse : boolean + } + interface EmitOutput { +>EmitOutput : EmitOutput + + outputFiles: OutputFile[]; +>outputFiles : OutputFile[] +>OutputFile : OutputFile + + emitOutputStatus: EmitReturnStatus; +>emitOutputStatus : EmitReturnStatus +>EmitReturnStatus : EmitReturnStatus + } + const enum OutputFileType { +>OutputFileType : OutputFileType + + JavaScript = 0, +>JavaScript : OutputFileType + + SourceMap = 1, +>SourceMap : OutputFileType + + Declaration = 2, +>Declaration : OutputFileType + } + interface OutputFile { +>OutputFile : OutputFile + + name: string; +>name : string + + writeByteOrderMark: boolean; +>writeByteOrderMark : boolean + + text: string; +>text : string + } + const enum EndOfLineState { +>EndOfLineState : EndOfLineState + + Start = 0, +>Start : EndOfLineState + + InMultiLineCommentTrivia = 1, +>InMultiLineCommentTrivia : EndOfLineState + + InSingleQuoteStringLiteral = 2, +>InSingleQuoteStringLiteral : EndOfLineState + + InDoubleQuoteStringLiteral = 3, +>InDoubleQuoteStringLiteral : EndOfLineState + } + enum TokenClass { +>TokenClass : TokenClass + + Punctuation = 0, +>Punctuation : TokenClass + + Keyword = 1, +>Keyword : TokenClass + + Operator = 2, +>Operator : TokenClass + + Comment = 3, +>Comment : TokenClass + + Whitespace = 4, +>Whitespace : TokenClass + + Identifier = 5, +>Identifier : TokenClass + + NumberLiteral = 6, +>NumberLiteral : TokenClass + + StringLiteral = 7, +>StringLiteral : TokenClass + + RegExpLiteral = 8, +>RegExpLiteral : TokenClass + } + interface ClassificationResult { +>ClassificationResult : ClassificationResult + + finalLexState: EndOfLineState; +>finalLexState : EndOfLineState +>EndOfLineState : EndOfLineState + + entries: ClassificationInfo[]; +>entries : ClassificationInfo[] +>ClassificationInfo : ClassificationInfo + } + interface ClassificationInfo { +>ClassificationInfo : ClassificationInfo + + length: number; +>length : number + + classification: TokenClass; +>classification : TokenClass +>TokenClass : TokenClass + } + interface Classifier { +>Classifier : Classifier + + getClassificationsForLine(text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean): ClassificationResult; +>getClassificationsForLine : (text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean) => ClassificationResult +>text : string +>lexState : EndOfLineState +>EndOfLineState : EndOfLineState +>classifyKeywordsInGenerics : boolean +>ClassificationResult : ClassificationResult + } + interface DocumentRegistry { +>DocumentRegistry : DocumentRegistry + + acquireDocument(filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean): SourceFile; +>acquireDocument : (filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean) => SourceFile +>filename : string +>compilationSettings : CompilerOptions +>CompilerOptions : CompilerOptions +>scriptSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>version : string +>isOpen : boolean +>SourceFile : SourceFile + + updateDocument(sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; +>updateDocument : (sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange) => SourceFile +>sourceFile : SourceFile +>SourceFile : SourceFile +>filename : string +>compilationSettings : CompilerOptions +>CompilerOptions : CompilerOptions +>scriptSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>version : string +>isOpen : boolean +>textChangeRange : TextChangeRange +>TextChangeRange : TextChangeRange +>SourceFile : SourceFile + + releaseDocument(filename: string, compilationSettings: CompilerOptions): void; +>releaseDocument : (filename: string, compilationSettings: CompilerOptions) => void +>filename : string +>compilationSettings : CompilerOptions +>CompilerOptions : CompilerOptions + } + class ScriptElementKind { +>ScriptElementKind : ScriptElementKind + + static unknown: string; +>unknown : string + + static keyword: string; +>keyword : string + + static scriptElement: string; +>scriptElement : string + + static moduleElement: string; +>moduleElement : string + + static classElement: string; +>classElement : string + + static interfaceElement: string; +>interfaceElement : string + + static typeElement: string; +>typeElement : string + + static enumElement: string; +>enumElement : string + + static variableElement: string; +>variableElement : string + + static localVariableElement: string; +>localVariableElement : string + + static functionElement: string; +>functionElement : string + + static localFunctionElement: string; +>localFunctionElement : string + + static memberFunctionElement: string; +>memberFunctionElement : string + + static memberGetAccessorElement: string; +>memberGetAccessorElement : string + + static memberSetAccessorElement: string; +>memberSetAccessorElement : string + + static memberVariableElement: string; +>memberVariableElement : string + + static constructorImplementationElement: string; +>constructorImplementationElement : string + + static callSignatureElement: string; +>callSignatureElement : string + + static indexSignatureElement: string; +>indexSignatureElement : string + + static constructSignatureElement: string; +>constructSignatureElement : string + + static parameterElement: string; +>parameterElement : string + + static typeParameterElement: string; +>typeParameterElement : string + + static primitiveType: string; +>primitiveType : string + + static label: string; +>label : string + + static alias: string; +>alias : string + + static constElement: string; +>constElement : string + + static letElement: string; +>letElement : string + } + class ScriptElementKindModifier { +>ScriptElementKindModifier : ScriptElementKindModifier + + static none: string; +>none : string + + static publicMemberModifier: string; +>publicMemberModifier : string + + static privateMemberModifier: string; +>privateMemberModifier : string + + static protectedMemberModifier: string; +>protectedMemberModifier : string + + static exportedModifier: string; +>exportedModifier : string + + static ambientModifier: string; +>ambientModifier : string + + static staticModifier: string; +>staticModifier : string + } + class ClassificationTypeNames { +>ClassificationTypeNames : ClassificationTypeNames + + static comment: string; +>comment : string + + static identifier: string; +>identifier : string + + static keyword: string; +>keyword : string + + static numericLiteral: string; +>numericLiteral : string + + static operator: string; +>operator : string + + static stringLiteral: string; +>stringLiteral : string + + static whiteSpace: string; +>whiteSpace : string + + static text: string; +>text : string + + static punctuation: string; +>punctuation : string + + static className: string; +>className : string + + static enumName: string; +>enumName : string + + static interfaceName: string; +>interfaceName : string + + static moduleName: string; +>moduleName : string + + static typeParameterName: string; +>typeParameterName : string + } + function displayPartsToString(displayParts: SymbolDisplayPart[]): string; +>displayPartsToString : (displayParts: SymbolDisplayPart[]) => string +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + interface DisplayPartsSymbolWriter extends SymbolWriter { +>DisplayPartsSymbolWriter : DisplayPartsSymbolWriter +>SymbolWriter : SymbolWriter + + displayParts(): SymbolDisplayPart[]; +>displayParts : () => SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + function getDefaultCompilerOptions(): CompilerOptions; +>getDefaultCompilerOptions : () => CompilerOptions +>CompilerOptions : CompilerOptions + + class OperationCanceledException { +>OperationCanceledException : OperationCanceledException + } + class CancellationTokenObject { +>CancellationTokenObject : CancellationTokenObject + + private cancellationToken; +>cancellationToken : any + + static None: CancellationTokenObject; +>None : CancellationTokenObject +>CancellationTokenObject : CancellationTokenObject + + constructor(cancellationToken: CancellationToken); +>cancellationToken : CancellationToken +>CancellationToken : CancellationToken + + isCancellationRequested(): boolean; +>isCancellationRequested : () => boolean + + throwIfCancellationRequested(): void; +>throwIfCancellationRequested : () => void + } + function createDocumentRegistry(): DocumentRegistry; +>createDocumentRegistry : () => DocumentRegistry +>DocumentRegistry : DocumentRegistry + + function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; +>preProcessFile : (sourceText: string, readImportFiles?: boolean) => PreProcessedFileInfo +>sourceText : string +>readImportFiles : boolean +>PreProcessedFileInfo : PreProcessedFileInfo + + function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry): LanguageService; +>createLanguageService : (host: LanguageServiceHost, documentRegistry: DocumentRegistry) => LanguageService +>host : LanguageServiceHost +>LanguageServiceHost : LanguageServiceHost +>documentRegistry : DocumentRegistry +>DocumentRegistry : DocumentRegistry +>LanguageService : LanguageService + + function createClassifier(host: Logger): Classifier; +>createClassifier : (host: Logger) => Classifier +>host : Logger +>Logger : Logger +>Classifier : Classifier +} + diff --git a/tests/cases/compiler/APISample_node_compile.ts b/tests/cases/compiler/APISample_node_compile.ts new file mode 100644 index 00000000000..b138ce2b44c --- /dev/null +++ b/tests/cases/compiler/APISample_node_compile.ts @@ -0,0 +1,11 @@ +// @includeBuiltFile: typescript.d.ts +// @noImplicitAny: true +// @target: ES3 +// @module: CommonJs +// @noresolve: true + +import ts = require("typescript"); + +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); + +var program = ts.createProgram(["file1.ts"], {}, undefined); \ No newline at end of file diff --git a/tests/cases/compiler/APISample_standalone_compile.ts b/tests/cases/compiler/APISample_standalone_compile.ts new file mode 100644 index 00000000000..049aae5523f --- /dev/null +++ b/tests/cases/compiler/APISample_standalone_compile.ts @@ -0,0 +1,7 @@ +// @includeBuiltFile: typescriptServices.d.ts +// @noImplicitAny: true +// @target: ES3 + +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); + +var program = ts.createProgram(["file1.ts"], {}, undefined); \ No newline at end of file From 7fb92f8af0bdb4f5632277677b72019c28e1e710 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 10 Dec 2014 16:57:02 -0800 Subject: [PATCH 098/141] Fixed up baselines. --- .../reference/APISample_node_compile.js | 321 +++++----- .../reference/APISample_node_compile.types | 583 ++++++++++-------- .../reference/APISample_standalone_compile.js | 310 +++++----- .../APISample_standalone_compile.types | 562 ++++++++++------- 4 files changed, 1011 insertions(+), 765 deletions(-) diff --git a/tests/baselines/reference/APISample_node_compile.js b/tests/baselines/reference/APISample_node_compile.js index 2329e7be57c..6807d97db84 100644 --- a/tests/baselines/reference/APISample_node_compile.js +++ b/tests/baselines/reference/APISample_node_compile.js @@ -23,7 +23,7 @@ See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ -declare module ts { +declare module "typescript" { interface Map { [index: string]: T; } @@ -152,92 +152,91 @@ declare module ts { SetKeyword = 117, StringKeyword = 118, TypeKeyword = 119, - Missing = 120, - QualifiedName = 121, - ComputedPropertyName = 122, - TypeParameter = 123, - Parameter = 124, - Property = 125, - Method = 126, - Constructor = 127, - GetAccessor = 128, - SetAccessor = 129, - CallSignature = 130, - ConstructSignature = 131, - IndexSignature = 132, - TypeReference = 133, - FunctionType = 134, - ConstructorType = 135, - TypeQuery = 136, - TypeLiteral = 137, - ArrayType = 138, - TupleType = 139, - UnionType = 140, - ParenthesizedType = 141, - ArrayLiteralExpression = 142, - ObjectLiteralExpression = 143, - PropertyAccessExpression = 144, - ElementAccessExpression = 145, - CallExpression = 146, - NewExpression = 147, - TaggedTemplateExpression = 148, - TypeAssertionExpression = 149, - ParenthesizedExpression = 150, - FunctionExpression = 151, - ArrowFunction = 152, - DeleteExpression = 153, - TypeOfExpression = 154, - VoidExpression = 155, - PrefixUnaryExpression = 156, - PostfixUnaryExpression = 157, - BinaryExpression = 158, - ConditionalExpression = 159, - TemplateExpression = 160, - YieldExpression = 161, - OmittedExpression = 162, - TemplateSpan = 163, - Block = 164, - VariableStatement = 165, - EmptyStatement = 166, - ExpressionStatement = 167, - IfStatement = 168, - DoStatement = 169, - WhileStatement = 170, - ForStatement = 171, - ForInStatement = 172, - ContinueStatement = 173, - BreakStatement = 174, - ReturnStatement = 175, - WithStatement = 176, - SwitchStatement = 177, - LabeledStatement = 178, - ThrowStatement = 179, - TryStatement = 180, - TryBlock = 181, - CatchBlock = 182, - FinallyBlock = 183, - DebuggerStatement = 184, - VariableDeclaration = 185, - FunctionDeclaration = 186, - FunctionBlock = 187, - ClassDeclaration = 188, - InterfaceDeclaration = 189, - TypeAliasDeclaration = 190, - EnumDeclaration = 191, - ModuleDeclaration = 192, - ModuleBlock = 193, - ImportDeclaration = 194, - ExportAssignment = 195, - CaseClause = 196, - DefaultClause = 197, - HeritageClause = 198, - PropertyAssignment = 199, - ShorthandPropertyAssignment = 200, - EnumMember = 201, - SourceFile = 202, - Program = 203, - SyntaxList = 204, - Count = 205, + QualifiedName = 120, + ComputedPropertyName = 121, + TypeParameter = 122, + Parameter = 123, + Property = 124, + Method = 125, + Constructor = 126, + GetAccessor = 127, + SetAccessor = 128, + CallSignature = 129, + ConstructSignature = 130, + IndexSignature = 131, + TypeReference = 132, + FunctionType = 133, + ConstructorType = 134, + TypeQuery = 135, + TypeLiteral = 136, + ArrayType = 137, + TupleType = 138, + UnionType = 139, + ParenthesizedType = 140, + ArrayLiteralExpression = 141, + ObjectLiteralExpression = 142, + PropertyAccessExpression = 143, + ElementAccessExpression = 144, + CallExpression = 145, + NewExpression = 146, + TaggedTemplateExpression = 147, + TypeAssertionExpression = 148, + ParenthesizedExpression = 149, + FunctionExpression = 150, + ArrowFunction = 151, + DeleteExpression = 152, + TypeOfExpression = 153, + VoidExpression = 154, + PrefixUnaryExpression = 155, + PostfixUnaryExpression = 156, + BinaryExpression = 157, + ConditionalExpression = 158, + TemplateExpression = 159, + YieldExpression = 160, + OmittedExpression = 161, + TemplateSpan = 162, + Block = 163, + VariableStatement = 164, + EmptyStatement = 165, + ExpressionStatement = 166, + IfStatement = 167, + DoStatement = 168, + WhileStatement = 169, + ForStatement = 170, + ForInStatement = 171, + ContinueStatement = 172, + BreakStatement = 173, + ReturnStatement = 174, + WithStatement = 175, + SwitchStatement = 176, + LabeledStatement = 177, + ThrowStatement = 178, + TryStatement = 179, + TryBlock = 180, + FinallyBlock = 181, + DebuggerStatement = 182, + VariableDeclaration = 183, + FunctionDeclaration = 184, + ClassDeclaration = 185, + InterfaceDeclaration = 186, + TypeAliasDeclaration = 187, + EnumDeclaration = 188, + ModuleDeclaration = 189, + ModuleBlock = 190, + ImportDeclaration = 191, + ExportAssignment = 192, + ExternalModuleReference = 193, + CaseClause = 194, + DefaultClause = 195, + HeritageClause = 196, + CatchClause = 197, + PropertyAssignment = 198, + ShorthandPropertyAssignment = 199, + EnumMember = 200, + SourceFile = 201, + Program = 202, + SyntaxList = 203, + Count = 204, FirstAssignment = 51, LastAssignment = 62, FirstReservedWord = 64, @@ -246,11 +245,11 @@ declare module ts { LastKeyword = 119, FirstFutureReservedWord = 100, LastFutureReservedWord = 108, - FirstTypeNode = 133, - LastTypeNode = 141, + FirstTypeNode = 132, + LastTypeNode = 140, FirstPunctuation = 13, LastPunctuation = 62, - FirstToken = 1, + FirstToken = 0, LastToken = 119, FirstTriviaToken = 2, LastTriviaToken = 5, @@ -262,12 +261,11 @@ declare module ts { LastOperator = 62, FirstBinaryOperator = 23, LastBinaryOperator = 62, + FirstNode = 120, } const enum NodeFlags { Export = 1, Ambient = 2, - QuestionMark = 4, - Rest = 8, Public = 16, Private = 32, Protected = 64, @@ -287,6 +285,8 @@ declare module ts { DisallowIn = 2, Yield = 4, GeneratorParameter = 8, + ContainsError = 16, + HasPropagatedChildContainsErrorFlag = 32, } interface Node extends TextRange { kind: SyntaxKind; @@ -303,7 +303,7 @@ declare module ts { interface NodeArray extends Array, TextRange { hasTrailingComma?: boolean; } - interface ModifiersArray extends Array { + interface ModifiersArray extends NodeArray { flags: number; } interface Identifier extends PrimaryExpression { @@ -314,11 +314,6 @@ declare module ts { right: Identifier; } type EntityName = Identifier | QualifiedName; - interface ParsedSignature { - typeParameters?: NodeArray; - parameters: NodeArray; - type?: TypeNode; - } type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; interface Declaration extends Node { _declarationBrand: any; @@ -332,21 +327,43 @@ declare module ts { constraint?: TypeNode; expression?: Expression; } - interface SignatureDeclaration extends Declaration, ParsedSignature { + interface SignatureDeclaration extends Declaration { + typeParameters?: NodeArray; + parameters: NodeArray; + type?: TypeNode; } interface VariableDeclaration extends Declaration { name: Identifier; type?: TypeNode; initializer?: Expression; } + interface ParameterDeclaration extends Declaration { + dotDotDotToken?: Node; + name: Identifier; + questionToken?: Node; + type?: TypeNode | StringLiteralExpression; + initializer?: Expression; + } interface PropertyDeclaration extends Declaration, ClassElement { + _propertyDeclarationBrand: any; + questionToken?: Node; type?: TypeNode; initializer?: Expression; } - interface ShortHandPropertyDeclaration extends Declaration { - name: Identifier; + type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; + type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; + interface ObjectLiteralElement extends Declaration { + _objectLiteralBrandBrand: any; } - interface ParameterDeclaration extends VariableDeclaration { + interface ShorthandPropertyAssignment extends ObjectLiteralElement { + name: Identifier; + questionToken?: Node; + } + interface PropertyAssignment extends ObjectLiteralElement { + _propertyAssignmentBrand: any; + name: DeclarationName; + questionToken?: Node; + initializer: Expression; } /** * Several node kinds share function-like features such as a signature, @@ -359,25 +376,31 @@ declare module ts { interface FunctionLikeDeclaration extends SignatureDeclaration { _functionLikeDeclarationBrand: any; asteriskToken?: Node; + questionToken?: Node; body?: Block | Expression; } interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { name: Identifier; body?: Block; } - interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement { + interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { body?: Block; } interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { body?: Block; } - interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement { - body?: Block; + interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { + _accessorDeclarationBrand: any; + body: Block; } interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { _indexSignatureDeclarationBrand: any; } interface TypeNode extends Node { + _typeNodeBrand: any; + } + interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { + _functionOrConstructorTypeNodeBrand: any; } interface TypeReferenceNode extends TypeNode { typeName: EntityName; @@ -401,9 +424,6 @@ declare module ts { interface ParenthesizedTypeNode extends TypeNode { type: TypeNode; } - interface StringLiteralTypeNode extends TypeNode { - text: string; - } interface Expression extends Node { _expressionBrand: any; contextualType?: Type; @@ -460,6 +480,10 @@ declare module ts { } interface LiteralExpression extends PrimaryExpression { text: string; + isUnterminated?: boolean; + } + interface StringLiteralExpression extends LiteralExpression { + _stringLiteralExpressionBrand: any; } interface TemplateExpression extends PrimaryExpression { head: LiteralExpression; @@ -476,7 +500,7 @@ declare module ts { elements: NodeArray; } interface ObjectLiteralExpression extends PrimaryExpression, Declaration { - properties: NodeArray; + properties: NodeArray; } interface PropertyAccessExpression extends MemberExpression { expression: LeftHandSideExpression; @@ -484,7 +508,7 @@ declare module ts { } interface ElementAccessExpression extends MemberExpression { expression: LeftHandSideExpression; - argumentExpression: Expression; + argumentExpression?: Expression; } interface CallExpression extends LeftHandSideExpression { expression: LeftHandSideExpression; @@ -553,10 +577,14 @@ declare module ts { expression: Expression; clauses: NodeArray; } - interface CaseOrDefaultClause extends Node { + interface CaseClause extends Node { expression?: Expression; statements: NodeArray; } + interface DefaultClause extends Node { + statements: NodeArray; + } + type CaseOrDefaultClause = CaseClause | DefaultClause; interface LabeledStatement extends Statement { label: Identifier; statement: Statement; @@ -566,12 +594,13 @@ declare module ts { } interface TryStatement extends Statement { tryBlock: Block; - catchBlock?: CatchBlock; + catchClause?: CatchClause; finallyBlock?: Block; } - interface CatchBlock extends Block, Declaration { - variable: Identifier; + interface CatchClause extends Declaration { + name: Identifier; type?: TypeNode; + block: Block; } interface ModuleElement extends Node { _moduleElementBrand: any; @@ -616,8 +645,10 @@ declare module ts { } interface ImportDeclaration extends Declaration, ModuleElement { name: Identifier; - entityName?: EntityName; - externalModuleName?: LiteralExpression; + moduleReference: EntityName | ExternalModuleReference; + } + interface ExternalModuleReference extends Node { + expression?: Expression; } interface ExportAssignment extends Statement, ModuleElement { exportName: Identifier; @@ -630,6 +661,7 @@ declare module ts { } interface SourceFile extends Declaration { statements: NodeArray; + endOfFileToken: Node; filename: string; text: string; getLineAndCharacterFromPosition(position: number): LineAndCharacter; @@ -638,10 +670,11 @@ declare module ts { amdDependencies: string[]; amdModuleName: string; referencedFiles: FileReference[]; - semanticDiagnostics: Diagnostic[]; + referenceDiagnostics: Diagnostic[]; parseDiagnostics: Diagnostic[]; grammarDiagnostics: Diagnostic[]; getSyntacticDiagnostics(): Diagnostic[]; + semanticDiagnostics: Diagnostic[]; hasNoDefaultLib: boolean; externalModuleIndicator: Node; nodeCount: number; @@ -703,10 +736,8 @@ declare module ts { getIdentifierCount(): number; getSymbolCount(): number; getTypeCount(): number; - checkProgram(): void; emitFiles(targetSourceFile?: SourceFile): EmitResult; - getParentOfSymbol(symbol: Symbol): Symbol; - getNarrowedTypeOfSymbol(symbol: Symbol, node: Node): Type; + getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; getDeclaredTypeOfSymbol(symbol: Symbol): Type; getPropertiesOfType(type: Type): Symbol[]; getPropertyOfType(type: Type, propertyName: string): Symbol; @@ -714,16 +745,16 @@ declare module ts { getIndexTypeOfType(type: Type, kind: IndexKind): Type; getReturnTypeOfSignature(signature: Signature): Type; getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; - getSymbolInfo(node: Node): Symbol; + getSymbolAtLocation(node: Node): Symbol; getShorthandAssignmentValueSymbol(location: Node): Symbol; - getTypeOfNode(node: Node): Type; + getTypeAtLocation(node: Node): Type; typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; getSymbolDisplayBuilder(): SymbolDisplayBuilder; getFullyQualifiedName(symbol: Symbol): string; getAugmentedPropertiesOfType(type: Type): Symbol[]; getRootSymbols(symbol: Symbol): Symbol[]; - getContextualType(node: Node): Type; + getContextualType(node: Expression): Type; getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; @@ -797,10 +828,10 @@ declare module ts { isTopLevelValueImportWithEntityName(node: ImportDeclaration): boolean; getNodeCheckFlags(node: Node): NodeCheckFlags; getEnumMemberValue(node: EnumMember): number; - hasSemanticErrors(): boolean; + hasSemanticErrors(sourceFile?: SourceFile): boolean; isDeclarationVisible(node: Declaration): boolean; isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; - writeTypeAtLocation(location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; + writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; @@ -944,7 +975,6 @@ declare module ts { StringLike = 258, NumberLike = 132, ObjectType = 48128, - Structured = 65025, } interface Type { flags: TypeFlags; @@ -1057,12 +1087,6 @@ declare module ts { * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit */ isEarly?: boolean; - /** - * Parse error - error produced by parser when it scanner returns a token - * that parser does not understand in its current state - * (as opposed to grammar error when parser can interpret the token but interpretation is not legal from the grammar perespective) - */ - isParseError?: boolean; } enum DiagnosticCategory { Warning = 0, @@ -1094,6 +1118,7 @@ declare module ts { version?: boolean; watch?: boolean; preserveConstEnums?: boolean; + allowNonTsExtensions?: boolean; [option: string]: string | number | boolean; } const enum ModuleKind { @@ -1254,7 +1279,7 @@ declare module ts { } interface CompilerHost { getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; - getDefaultLibFilename(): string; + getDefaultLibFilename(options: CompilerOptions): string; getCancellationToken?(): CancellationToken; writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; getCurrentDirectory(): string; @@ -1263,7 +1288,7 @@ declare module ts { getNewLine(): string; } } -declare module ts { +declare module "typescript" { interface ErrorCallback { (message: DiagnosticMessage): void; } @@ -1280,12 +1305,14 @@ declare module ts { hasPrecedingLineBreak(): boolean; isIdentifier(): boolean; isReservedWord(): boolean; + isUnterminated(): boolean; reScanGreaterToken(): SyntaxKind; reScanSlashToken(): SyntaxKind; reScanTemplateToken(): SyntaxKind; scan(): SyntaxKind; setText(text: string): void; setTextPos(textPos: number): void; + lookAhead(callback: () => T): T; tryScan(callback: () => T): T; } function tokenToString(t: SyntaxKind): string; @@ -1307,23 +1334,19 @@ declare module ts { function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; - function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback): Scanner; + function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner; } -declare module ts { - interface ReferencePathMatchResult { - fileReference?: FileReference; - diagnostic?: DiagnosticMessage; - isNoDefaultLib?: boolean; - } +declare module "typescript" { function getNodeConstructor(kind: SyntaxKind): new () => Node; function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; } -declare module ts { +declare module "typescript" { function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; } -declare module ts { +declare module "typescript" { + var servicesVersion: string; interface Node { getSourceFile(): SourceFile; getChildCount(sourceFile?: SourceFile): number; @@ -1411,10 +1434,10 @@ declare module ts { getScriptVersion(fileName: string): string; getScriptIsOpen(fileName: string): boolean; getScriptSnapshot(fileName: string): IScriptSnapshot; - getLocalizedDiagnosticMessages(): any; - getCancellationToken(): CancellationToken; + getLocalizedDiagnosticMessages?(): any; + getCancellationToken?(): CancellationToken; getCurrentDirectory(): string; - getDefaultLibFilename(): string; + getDefaultLibFilename(options: CompilerOptions): string; } interface LanguageService { cleanupSemanticCache(): void; @@ -1423,7 +1446,7 @@ declare module ts { getCompilerOptionsDiagnostics(): Diagnostic[]; getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; - getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): CompletionInfo; + getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; @@ -1811,11 +1834,12 @@ declare module ts { static interfaceName: string; static moduleName: string; static typeParameterName: string; + static typeAlias: string; } - function displayPartsToString(displayParts: SymbolDisplayPart[]): string; interface DisplayPartsSymbolWriter extends SymbolWriter { displayParts(): SymbolDisplayPart[]; } + function displayPartsToString(displayParts: SymbolDisplayPart[]): string; function getDefaultCompilerOptions(): CompilerOptions; class OperationCanceledException { } @@ -1832,7 +1856,6 @@ declare module ts { function createClassifier(host: Logger): Classifier; } -export = ts; //// [APISample_node_compile.js] var ts = require("typescript"); diff --git a/tests/baselines/reference/APISample_node_compile.types b/tests/baselines/reference/APISample_node_compile.types index 15aa4b13a2e..4331fb28c72 100644 --- a/tests/baselines/reference/APISample_node_compile.types +++ b/tests/baselines/reference/APISample_node_compile.types @@ -41,9 +41,7 @@ See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ -declare module ts { ->ts : typeof ts - +declare module "typescript" { interface Map { >Map : Map >T : T @@ -424,262 +422,259 @@ declare module ts { TypeKeyword = 119, >TypeKeyword : SyntaxKind - Missing = 120, ->Missing : SyntaxKind - - QualifiedName = 121, + QualifiedName = 120, >QualifiedName : SyntaxKind - ComputedPropertyName = 122, + ComputedPropertyName = 121, >ComputedPropertyName : SyntaxKind - TypeParameter = 123, + TypeParameter = 122, >TypeParameter : SyntaxKind - Parameter = 124, + Parameter = 123, >Parameter : SyntaxKind - Property = 125, + Property = 124, >Property : SyntaxKind - Method = 126, + Method = 125, >Method : SyntaxKind - Constructor = 127, + Constructor = 126, >Constructor : SyntaxKind - GetAccessor = 128, + GetAccessor = 127, >GetAccessor : SyntaxKind - SetAccessor = 129, + SetAccessor = 128, >SetAccessor : SyntaxKind - CallSignature = 130, + CallSignature = 129, >CallSignature : SyntaxKind - ConstructSignature = 131, + ConstructSignature = 130, >ConstructSignature : SyntaxKind - IndexSignature = 132, + IndexSignature = 131, >IndexSignature : SyntaxKind - TypeReference = 133, + TypeReference = 132, >TypeReference : SyntaxKind - FunctionType = 134, + FunctionType = 133, >FunctionType : SyntaxKind - ConstructorType = 135, + ConstructorType = 134, >ConstructorType : SyntaxKind - TypeQuery = 136, + TypeQuery = 135, >TypeQuery : SyntaxKind - TypeLiteral = 137, + TypeLiteral = 136, >TypeLiteral : SyntaxKind - ArrayType = 138, + ArrayType = 137, >ArrayType : SyntaxKind - TupleType = 139, + TupleType = 138, >TupleType : SyntaxKind - UnionType = 140, + UnionType = 139, >UnionType : SyntaxKind - ParenthesizedType = 141, + ParenthesizedType = 140, >ParenthesizedType : SyntaxKind - ArrayLiteralExpression = 142, + ArrayLiteralExpression = 141, >ArrayLiteralExpression : SyntaxKind - ObjectLiteralExpression = 143, + ObjectLiteralExpression = 142, >ObjectLiteralExpression : SyntaxKind - PropertyAccessExpression = 144, + PropertyAccessExpression = 143, >PropertyAccessExpression : SyntaxKind - ElementAccessExpression = 145, + ElementAccessExpression = 144, >ElementAccessExpression : SyntaxKind - CallExpression = 146, + CallExpression = 145, >CallExpression : SyntaxKind - NewExpression = 147, + NewExpression = 146, >NewExpression : SyntaxKind - TaggedTemplateExpression = 148, + TaggedTemplateExpression = 147, >TaggedTemplateExpression : SyntaxKind - TypeAssertionExpression = 149, + TypeAssertionExpression = 148, >TypeAssertionExpression : SyntaxKind - ParenthesizedExpression = 150, + ParenthesizedExpression = 149, >ParenthesizedExpression : SyntaxKind - FunctionExpression = 151, + FunctionExpression = 150, >FunctionExpression : SyntaxKind - ArrowFunction = 152, + ArrowFunction = 151, >ArrowFunction : SyntaxKind - DeleteExpression = 153, + DeleteExpression = 152, >DeleteExpression : SyntaxKind - TypeOfExpression = 154, + TypeOfExpression = 153, >TypeOfExpression : SyntaxKind - VoidExpression = 155, + VoidExpression = 154, >VoidExpression : SyntaxKind - PrefixUnaryExpression = 156, + PrefixUnaryExpression = 155, >PrefixUnaryExpression : SyntaxKind - PostfixUnaryExpression = 157, + PostfixUnaryExpression = 156, >PostfixUnaryExpression : SyntaxKind - BinaryExpression = 158, + BinaryExpression = 157, >BinaryExpression : SyntaxKind - ConditionalExpression = 159, + ConditionalExpression = 158, >ConditionalExpression : SyntaxKind - TemplateExpression = 160, + TemplateExpression = 159, >TemplateExpression : SyntaxKind - YieldExpression = 161, + YieldExpression = 160, >YieldExpression : SyntaxKind - OmittedExpression = 162, + OmittedExpression = 161, >OmittedExpression : SyntaxKind - TemplateSpan = 163, + TemplateSpan = 162, >TemplateSpan : SyntaxKind - Block = 164, + Block = 163, >Block : SyntaxKind - VariableStatement = 165, + VariableStatement = 164, >VariableStatement : SyntaxKind - EmptyStatement = 166, + EmptyStatement = 165, >EmptyStatement : SyntaxKind - ExpressionStatement = 167, + ExpressionStatement = 166, >ExpressionStatement : SyntaxKind - IfStatement = 168, + IfStatement = 167, >IfStatement : SyntaxKind - DoStatement = 169, + DoStatement = 168, >DoStatement : SyntaxKind - WhileStatement = 170, + WhileStatement = 169, >WhileStatement : SyntaxKind - ForStatement = 171, + ForStatement = 170, >ForStatement : SyntaxKind - ForInStatement = 172, + ForInStatement = 171, >ForInStatement : SyntaxKind - ContinueStatement = 173, + ContinueStatement = 172, >ContinueStatement : SyntaxKind - BreakStatement = 174, + BreakStatement = 173, >BreakStatement : SyntaxKind - ReturnStatement = 175, + ReturnStatement = 174, >ReturnStatement : SyntaxKind - WithStatement = 176, + WithStatement = 175, >WithStatement : SyntaxKind - SwitchStatement = 177, + SwitchStatement = 176, >SwitchStatement : SyntaxKind - LabeledStatement = 178, + LabeledStatement = 177, >LabeledStatement : SyntaxKind - ThrowStatement = 179, + ThrowStatement = 178, >ThrowStatement : SyntaxKind - TryStatement = 180, + TryStatement = 179, >TryStatement : SyntaxKind - TryBlock = 181, + TryBlock = 180, >TryBlock : SyntaxKind - CatchBlock = 182, ->CatchBlock : SyntaxKind - - FinallyBlock = 183, + FinallyBlock = 181, >FinallyBlock : SyntaxKind - DebuggerStatement = 184, + DebuggerStatement = 182, >DebuggerStatement : SyntaxKind - VariableDeclaration = 185, + VariableDeclaration = 183, >VariableDeclaration : SyntaxKind - FunctionDeclaration = 186, + FunctionDeclaration = 184, >FunctionDeclaration : SyntaxKind - FunctionBlock = 187, ->FunctionBlock : SyntaxKind - - ClassDeclaration = 188, + ClassDeclaration = 185, >ClassDeclaration : SyntaxKind - InterfaceDeclaration = 189, + InterfaceDeclaration = 186, >InterfaceDeclaration : SyntaxKind - TypeAliasDeclaration = 190, + TypeAliasDeclaration = 187, >TypeAliasDeclaration : SyntaxKind - EnumDeclaration = 191, + EnumDeclaration = 188, >EnumDeclaration : SyntaxKind - ModuleDeclaration = 192, + ModuleDeclaration = 189, >ModuleDeclaration : SyntaxKind - ModuleBlock = 193, + ModuleBlock = 190, >ModuleBlock : SyntaxKind - ImportDeclaration = 194, + ImportDeclaration = 191, >ImportDeclaration : SyntaxKind - ExportAssignment = 195, + ExportAssignment = 192, >ExportAssignment : SyntaxKind - CaseClause = 196, + ExternalModuleReference = 193, +>ExternalModuleReference : SyntaxKind + + CaseClause = 194, >CaseClause : SyntaxKind - DefaultClause = 197, + DefaultClause = 195, >DefaultClause : SyntaxKind - HeritageClause = 198, + HeritageClause = 196, >HeritageClause : SyntaxKind - PropertyAssignment = 199, + CatchClause = 197, +>CatchClause : SyntaxKind + + PropertyAssignment = 198, >PropertyAssignment : SyntaxKind - ShorthandPropertyAssignment = 200, + ShorthandPropertyAssignment = 199, >ShorthandPropertyAssignment : SyntaxKind - EnumMember = 201, + EnumMember = 200, >EnumMember : SyntaxKind - SourceFile = 202, + SourceFile = 201, >SourceFile : SyntaxKind - Program = 203, + Program = 202, >Program : SyntaxKind - SyntaxList = 204, + SyntaxList = 203, >SyntaxList : SyntaxKind - Count = 205, + Count = 204, >Count : SyntaxKind FirstAssignment = 51, @@ -706,10 +701,10 @@ declare module ts { LastFutureReservedWord = 108, >LastFutureReservedWord : SyntaxKind - FirstTypeNode = 133, + FirstTypeNode = 132, >FirstTypeNode : SyntaxKind - LastTypeNode = 141, + LastTypeNode = 140, >LastTypeNode : SyntaxKind FirstPunctuation = 13, @@ -718,7 +713,7 @@ declare module ts { LastPunctuation = 62, >LastPunctuation : SyntaxKind - FirstToken = 1, + FirstToken = 0, >FirstToken : SyntaxKind LastToken = 119, @@ -753,6 +748,9 @@ declare module ts { LastBinaryOperator = 62, >LastBinaryOperator : SyntaxKind + + FirstNode = 120, +>FirstNode : SyntaxKind } const enum NodeFlags { >NodeFlags : NodeFlags @@ -763,12 +761,6 @@ declare module ts { Ambient = 2, >Ambient : NodeFlags - QuestionMark = 4, ->QuestionMark : NodeFlags - - Rest = 8, ->Rest : NodeFlags - Public = 16, >Public : NodeFlags @@ -822,6 +814,12 @@ declare module ts { GeneratorParameter = 8, >GeneratorParameter : ParserContextFlags + + ContainsError = 16, +>ContainsError : ParserContextFlags + + HasPropagatedChildContainsErrorFlag = 32, +>HasPropagatedChildContainsErrorFlag : ParserContextFlags } interface Node extends TextRange { >Node : Node @@ -876,9 +874,9 @@ declare module ts { hasTrailingComma?: boolean; >hasTrailingComma : boolean } - interface ModifiersArray extends Array { + interface ModifiersArray extends NodeArray { >ModifiersArray : ModifiersArray ->Array : T[] +>NodeArray : NodeArray >Node : Node flags: number; @@ -908,23 +906,6 @@ declare module ts { >Identifier : Identifier >QualifiedName : QualifiedName - interface ParsedSignature { ->ParsedSignature : ParsedSignature - - typeParameters?: NodeArray; ->typeParameters : NodeArray ->NodeArray : NodeArray ->TypeParameterDeclaration : TypeParameterDeclaration - - parameters: NodeArray; ->parameters : NodeArray ->NodeArray : NodeArray ->ParameterDeclaration : ParameterDeclaration - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - } type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; >DeclarationName : Identifier | LiteralExpression | ComputedPropertyName >Identifier : Identifier @@ -966,10 +947,23 @@ declare module ts { >expression : Expression >Expression : Expression } - interface SignatureDeclaration extends Declaration, ParsedSignature { + interface SignatureDeclaration extends Declaration { >SignatureDeclaration : SignatureDeclaration >Declaration : Declaration ->ParsedSignature : ParsedSignature + + typeParameters?: NodeArray; +>typeParameters : NodeArray +>NodeArray : NodeArray +>TypeParameterDeclaration : TypeParameterDeclaration + + parameters: NodeArray; +>parameters : NodeArray +>NodeArray : NodeArray +>ParameterDeclaration : ParameterDeclaration + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode } interface VariableDeclaration extends Declaration { >VariableDeclaration : VariableDeclaration @@ -985,6 +979,31 @@ declare module ts { initializer?: Expression; >initializer : Expression +>Expression : Expression + } + interface ParameterDeclaration extends Declaration { +>ParameterDeclaration : ParameterDeclaration +>Declaration : Declaration + + dotDotDotToken?: Node; +>dotDotDotToken : Node +>Node : Node + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + questionToken?: Node; +>questionToken : Node +>Node : Node + + type?: TypeNode | StringLiteralExpression; +>type : TypeNode | StringLiteralExpression +>TypeNode : TypeNode +>StringLiteralExpression : StringLiteralExpression + + initializer?: Expression; +>initializer : Expression >Expression : Expression } interface PropertyDeclaration extends Declaration, ClassElement { @@ -992,6 +1011,13 @@ declare module ts { >Declaration : Declaration >ClassElement : ClassElement + _propertyDeclarationBrand: any; +>_propertyDeclarationBrand : any + + questionToken?: Node; +>questionToken : Node +>Node : Node + type?: TypeNode; >type : TypeNode >TypeNode : TypeNode @@ -1000,17 +1026,53 @@ declare module ts { >initializer : Expression >Expression : Expression } - interface ShortHandPropertyDeclaration extends Declaration { ->ShortHandPropertyDeclaration : ShortHandPropertyDeclaration + type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; +>VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration +>VariableDeclaration : VariableDeclaration +>ParameterDeclaration : ParameterDeclaration + + type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; +>VariableOrParameterOrPropertyDeclaration : ParameterDeclaration | VariableDeclaration | PropertyDeclaration +>VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration +>PropertyDeclaration : PropertyDeclaration + + interface ObjectLiteralElement extends Declaration { +>ObjectLiteralElement : ObjectLiteralElement >Declaration : Declaration + _objectLiteralBrandBrand: any; +>_objectLiteralBrandBrand : any + } + interface ShorthandPropertyAssignment extends ObjectLiteralElement { +>ShorthandPropertyAssignment : ShorthandPropertyAssignment +>ObjectLiteralElement : ObjectLiteralElement + name: Identifier; >name : Identifier >Identifier : Identifier + + questionToken?: Node; +>questionToken : Node +>Node : Node } - interface ParameterDeclaration extends VariableDeclaration { ->ParameterDeclaration : ParameterDeclaration ->VariableDeclaration : VariableDeclaration + interface PropertyAssignment extends ObjectLiteralElement { +>PropertyAssignment : PropertyAssignment +>ObjectLiteralElement : ObjectLiteralElement + + _propertyAssignmentBrand: any; +>_propertyAssignmentBrand : any + + name: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName + + questionToken?: Node; +>questionToken : Node +>Node : Node + + initializer: Expression; +>initializer : Expression +>Expression : Expression } /** * Several node kinds share function-like features such as a signature, @@ -1029,6 +1091,10 @@ declare module ts { asteriskToken?: Node; >asteriskToken : Node +>Node : Node + + questionToken?: Node; +>questionToken : Node >Node : Node body?: Block | Expression; @@ -1049,10 +1115,11 @@ declare module ts { >body : Block >Block : Block } - interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement { + interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { >MethodDeclaration : MethodDeclaration >FunctionLikeDeclaration : FunctionLikeDeclaration >ClassElement : ClassElement +>ObjectLiteralElement : ObjectLiteralElement body?: Block; >body : Block @@ -1067,12 +1134,16 @@ declare module ts { >body : Block >Block : Block } - interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement { + interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { >AccessorDeclaration : AccessorDeclaration >FunctionLikeDeclaration : FunctionLikeDeclaration >ClassElement : ClassElement +>ObjectLiteralElement : ObjectLiteralElement - body?: Block; + _accessorDeclarationBrand: any; +>_accessorDeclarationBrand : any + + body: Block; >body : Block >Block : Block } @@ -1087,6 +1158,17 @@ declare module ts { interface TypeNode extends Node { >TypeNode : TypeNode >Node : Node + + _typeNodeBrand: any; +>_typeNodeBrand : any + } + interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { +>FunctionOrConstructorTypeNode : FunctionOrConstructorTypeNode +>TypeNode : TypeNode +>SignatureDeclaration : SignatureDeclaration + + _functionOrConstructorTypeNodeBrand: any; +>_functionOrConstructorTypeNodeBrand : any } interface TypeReferenceNode extends TypeNode { >TypeReferenceNode : TypeReferenceNode @@ -1152,13 +1234,6 @@ declare module ts { type: TypeNode; >type : TypeNode >TypeNode : TypeNode - } - interface StringLiteralTypeNode extends TypeNode { ->StringLiteralTypeNode : StringLiteralTypeNode ->TypeNode : TypeNode - - text: string; ->text : string } interface Expression extends Node { >Expression : Expression @@ -1318,6 +1393,16 @@ declare module ts { text: string; >text : string + + isUnterminated?: boolean; +>isUnterminated : boolean + } + interface StringLiteralExpression extends LiteralExpression { +>StringLiteralExpression : StringLiteralExpression +>LiteralExpression : LiteralExpression + + _stringLiteralExpressionBrand: any; +>_stringLiteralExpressionBrand : any } interface TemplateExpression extends PrimaryExpression { >TemplateExpression : TemplateExpression @@ -1366,10 +1451,10 @@ declare module ts { >PrimaryExpression : PrimaryExpression >Declaration : Declaration - properties: NodeArray; ->properties : NodeArray + properties: NodeArray; +>properties : NodeArray >NodeArray : NodeArray ->Declaration : Declaration +>ObjectLiteralElement : ObjectLiteralElement } interface PropertyAccessExpression extends MemberExpression { >PropertyAccessExpression : PropertyAccessExpression @@ -1391,7 +1476,7 @@ declare module ts { >expression : LeftHandSideExpression >LeftHandSideExpression : LeftHandSideExpression - argumentExpression: Expression; + argumentExpression?: Expression; >argumentExpression : Expression >Expression : Expression } @@ -1598,12 +1683,12 @@ declare module ts { >Expression : Expression clauses: NodeArray; ->clauses : NodeArray +>clauses : NodeArray >NodeArray : NodeArray ->CaseOrDefaultClause : CaseOrDefaultClause +>CaseOrDefaultClause : CaseClause | DefaultClause } - interface CaseOrDefaultClause extends Node { ->CaseOrDefaultClause : CaseOrDefaultClause + interface CaseClause extends Node { +>CaseClause : CaseClause >Node : Node expression?: Expression; @@ -1615,6 +1700,20 @@ declare module ts { >NodeArray : NodeArray >Statement : Statement } + interface DefaultClause extends Node { +>DefaultClause : DefaultClause +>Node : Node + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>Statement : Statement + } + type CaseOrDefaultClause = CaseClause | DefaultClause; +>CaseOrDefaultClause : CaseClause | DefaultClause +>CaseClause : CaseClause +>DefaultClause : DefaultClause + interface LabeledStatement extends Statement { >LabeledStatement : LabeledStatement >Statement : Statement @@ -1643,26 +1742,29 @@ declare module ts { >tryBlock : Block >Block : Block - catchBlock?: CatchBlock; ->catchBlock : CatchBlock ->CatchBlock : CatchBlock + catchClause?: CatchClause; +>catchClause : CatchClause +>CatchClause : CatchClause finallyBlock?: Block; >finallyBlock : Block >Block : Block } - interface CatchBlock extends Block, Declaration { ->CatchBlock : CatchBlock ->Block : Block + interface CatchClause extends Declaration { +>CatchClause : CatchClause >Declaration : Declaration - variable: Identifier; ->variable : Identifier + name: Identifier; +>name : Identifier >Identifier : Identifier type?: TypeNode; >type : TypeNode >TypeNode : TypeNode + + block: Block; +>block : Block +>Block : Block } interface ModuleElement extends Node { >ModuleElement : ModuleElement @@ -1812,13 +1914,18 @@ declare module ts { >name : Identifier >Identifier : Identifier - entityName?: EntityName; ->entityName : Identifier | QualifiedName + moduleReference: EntityName | ExternalModuleReference; +>moduleReference : Identifier | QualifiedName | ExternalModuleReference >EntityName : Identifier | QualifiedName +>ExternalModuleReference : ExternalModuleReference + } + interface ExternalModuleReference extends Node { +>ExternalModuleReference : ExternalModuleReference +>Node : Node - externalModuleName?: LiteralExpression; ->externalModuleName : LiteralExpression ->LiteralExpression : LiteralExpression + expression?: Expression; +>expression : Expression +>Expression : Expression } interface ExportAssignment extends Statement, ModuleElement { >ExportAssignment : ExportAssignment @@ -1852,6 +1959,10 @@ declare module ts { >NodeArray : NodeArray >ModuleElement : ModuleElement + endOfFileToken: Node; +>endOfFileToken : Node +>Node : Node + filename: string; >filename : string @@ -1881,8 +1992,8 @@ declare module ts { >referencedFiles : FileReference[] >FileReference : FileReference - semanticDiagnostics: Diagnostic[]; ->semanticDiagnostics : Diagnostic[] + referenceDiagnostics: Diagnostic[]; +>referenceDiagnostics : Diagnostic[] >Diagnostic : Diagnostic parseDiagnostics: Diagnostic[]; @@ -1895,6 +2006,10 @@ declare module ts { getSyntacticDiagnostics(): Diagnostic[]; >getSyntacticDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + semanticDiagnostics: Diagnostic[]; +>semanticDiagnostics : Diagnostic[] >Diagnostic : Diagnostic hasNoDefaultLib: boolean; @@ -2088,23 +2203,14 @@ declare module ts { getTypeCount(): number; >getTypeCount : () => number - checkProgram(): void; ->checkProgram : () => void - emitFiles(targetSourceFile?: SourceFile): EmitResult; >emitFiles : (targetSourceFile?: SourceFile) => EmitResult >targetSourceFile : SourceFile >SourceFile : SourceFile >EmitResult : EmitResult - getParentOfSymbol(symbol: Symbol): Symbol; ->getParentOfSymbol : (symbol: Symbol) => Symbol ->symbol : Symbol ->Symbol : Symbol ->Symbol : Symbol - - getNarrowedTypeOfSymbol(symbol: Symbol, node: Node): Type; ->getNarrowedTypeOfSymbol : (symbol: Symbol, node: Node) => Type + getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; +>getTypeOfSymbolAtLocation : (symbol: Symbol, node: Node) => Type >symbol : Symbol >Symbol : Symbol >node : Node @@ -2160,8 +2266,8 @@ declare module ts { >SymbolFlags : SymbolFlags >Symbol : Symbol - getSymbolInfo(node: Node): Symbol; ->getSymbolInfo : (node: Node) => Symbol + getSymbolAtLocation(node: Node): Symbol; +>getSymbolAtLocation : (node: Node) => Symbol >node : Node >Node : Node >Symbol : Symbol @@ -2172,8 +2278,8 @@ declare module ts { >Node : Node >Symbol : Symbol - getTypeOfNode(node: Node): Type; ->getTypeOfNode : (node: Node) => Type + getTypeAtLocation(node: Node): Type; +>getTypeAtLocation : (node: Node) => Type >node : Node >Node : Node >Type : Type @@ -2217,10 +2323,10 @@ declare module ts { >Symbol : Symbol >Symbol : Symbol - getContextualType(node: Node): Type; ->getContextualType : (node: Node) => Type ->node : Node ->Node : Node + getContextualType(node: Expression): Type; +>getContextualType : (node: Expression) => Type +>node : Expression +>Expression : Expression >Type : Type getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; @@ -2553,8 +2659,10 @@ declare module ts { >node : EnumMember >EnumMember : EnumMember - hasSemanticErrors(): boolean; ->hasSemanticErrors : () => boolean + hasSemanticErrors(sourceFile?: SourceFile): boolean; +>hasSemanticErrors : (sourceFile?: SourceFile) => boolean +>sourceFile : SourceFile +>SourceFile : SourceFile isDeclarationVisible(node: Declaration): boolean; >isDeclarationVisible : (node: Declaration) => boolean @@ -2566,10 +2674,11 @@ declare module ts { >node : FunctionLikeDeclaration >FunctionLikeDeclaration : FunctionLikeDeclaration - writeTypeAtLocation(location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; ->writeTypeAtLocation : (location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void ->location : Node ->Node : Node + writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; +>writeTypeOfDeclaration : (declaration: ParameterDeclaration | VariableDeclaration | AccessorDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void +>declaration : ParameterDeclaration | VariableDeclaration | AccessorDeclaration +>AccessorDeclaration : AccessorDeclaration +>VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration >enclosingDeclaration : Node >Node : Node >flags : TypeFormatFlags @@ -3027,9 +3136,6 @@ declare module ts { ObjectType = 48128, >ObjectType : TypeFlags - - Structured = 65025, ->Structured : TypeFlags } interface Type { >Type : Type @@ -3361,14 +3467,6 @@ declare module ts { */ isEarly?: boolean; >isEarly : boolean - - /** - * Parse error - error produced by parser when it scanner returns a token - * that parser does not understand in its current state - * (as opposed to grammar error when parser can interpret the token but interpretation is not legal from the grammar perespective) - */ - isParseError?: boolean; ->isParseError : boolean } enum DiagnosticCategory { >DiagnosticCategory : DiagnosticCategory @@ -3459,6 +3557,9 @@ declare module ts { preserveConstEnums?: boolean; >preserveConstEnums : boolean + allowNonTsExtensions?: boolean; +>allowNonTsExtensions : boolean + [option: string]: string | number | boolean; >option : string } @@ -3927,8 +4028,10 @@ declare module ts { >message : string >SourceFile : SourceFile - getDefaultLibFilename(): string; ->getDefaultLibFilename : () => string + getDefaultLibFilename(options: CompilerOptions): string; +>getDefaultLibFilename : (options: CompilerOptions) => string +>options : CompilerOptions +>CompilerOptions : CompilerOptions getCancellationToken?(): CancellationToken; >getCancellationToken : () => CancellationToken @@ -3956,9 +4059,7 @@ declare module ts { >getNewLine : () => string } } -declare module ts { ->ts : typeof ts - +declare module "typescript" { interface ErrorCallback { >ErrorCallback : ErrorCallback @@ -4004,6 +4105,9 @@ declare module ts { isReservedWord(): boolean; >isReservedWord : () => boolean + isUnterminated(): boolean; +>isUnterminated : () => boolean + reScanGreaterToken(): SyntaxKind; >reScanGreaterToken : () => SyntaxKind >SyntaxKind : SyntaxKind @@ -4028,6 +4132,13 @@ declare module ts { >setTextPos : (textPos: number) => void >textPos : number + lookAhead(callback: () => T): T; +>lookAhead : (callback: () => T) => T +>T : T +>callback : () => T +>T : T +>T : T + tryScan(callback: () => T): T; >tryScan : (callback: () => T) => T >T : T @@ -4116,35 +4227,17 @@ declare module ts { >languageVersion : ScriptTarget >ScriptTarget : ScriptTarget - function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback): Scanner; ->createScanner : (languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback) => Scanner + function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner; +>createScanner : (languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback) => Scanner >languageVersion : ScriptTarget >ScriptTarget : ScriptTarget >skipTrivia : boolean >text : string >onError : ErrorCallback >ErrorCallback : ErrorCallback ->onComment : CommentCallback ->CommentCallback : CommentCallback >Scanner : Scanner } -declare module ts { ->ts : typeof ts - - interface ReferencePathMatchResult { ->ReferencePathMatchResult : ReferencePathMatchResult - - fileReference?: FileReference; ->fileReference : FileReference ->FileReference : FileReference - - diagnostic?: DiagnosticMessage; ->diagnostic : DiagnosticMessage ->DiagnosticMessage : DiagnosticMessage - - isNoDefaultLib?: boolean; ->isNoDefaultLib : boolean - } +declare module "typescript" { function getNodeConstructor(kind: SyntaxKind): new () => Node; >getNodeConstructor : (kind: SyntaxKind) => new () => Node >kind : SyntaxKind @@ -4185,9 +4278,7 @@ declare module ts { >CompilerHost : CompilerHost >Program : Program } -declare module ts { ->ts : typeof ts - +declare module "typescript" { function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; >createTypeChecker : (program: Program, fullTypeCheck: boolean) => TypeChecker >program : Program @@ -4195,8 +4286,9 @@ declare module ts { >fullTypeCheck : boolean >TypeChecker : TypeChecker } -declare module ts { ->ts : typeof ts +declare module "typescript" { + var servicesVersion: string; +>servicesVersion : string interface Node { >Node : Node @@ -4463,18 +4555,20 @@ declare module ts { >fileName : string >IScriptSnapshot : IScriptSnapshot - getLocalizedDiagnosticMessages(): any; + getLocalizedDiagnosticMessages?(): any; >getLocalizedDiagnosticMessages : () => any - getCancellationToken(): CancellationToken; + getCancellationToken?(): CancellationToken; >getCancellationToken : () => CancellationToken >CancellationToken : CancellationToken getCurrentDirectory(): string; >getCurrentDirectory : () => string - getDefaultLibFilename(): string; ->getDefaultLibFilename : () => string + getDefaultLibFilename(options: CompilerOptions): string; +>getDefaultLibFilename : (options: CompilerOptions) => string +>options : CompilerOptions +>CompilerOptions : CompilerOptions } interface LanguageService { >LanguageService : LanguageService @@ -4510,11 +4604,10 @@ declare module ts { >TextSpan : TextSpan >ClassifiedSpan : ClassifiedSpan - getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): CompletionInfo; ->getCompletionsAtPosition : (fileName: string, position: number, isMemberCompletion: boolean) => CompletionInfo + getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; +>getCompletionsAtPosition : (fileName: string, position: number) => CompletionInfo >fileName : string >position : number ->isMemberCompletion : boolean >CompletionInfo : CompletionInfo getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; @@ -5576,12 +5669,10 @@ declare module ts { static typeParameterName: string; >typeParameterName : string - } - function displayPartsToString(displayParts: SymbolDisplayPart[]): string; ->displayPartsToString : (displayParts: SymbolDisplayPart[]) => string ->displayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart + static typeAlias: string; +>typeAlias : string + } interface DisplayPartsSymbolWriter extends SymbolWriter { >DisplayPartsSymbolWriter : DisplayPartsSymbolWriter >SymbolWriter : SymbolWriter @@ -5590,6 +5681,11 @@ declare module ts { >displayParts : () => SymbolDisplayPart[] >SymbolDisplayPart : SymbolDisplayPart } + function displayPartsToString(displayParts: SymbolDisplayPart[]): string; +>displayPartsToString : (displayParts: SymbolDisplayPart[]) => string +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + function getDefaultCompilerOptions(): CompilerOptions; >getDefaultCompilerOptions : () => CompilerOptions >CompilerOptions : CompilerOptions @@ -5641,7 +5737,4 @@ declare module ts { >Logger : Logger >Classifier : Classifier } - -export = ts; ->ts : typeof ts diff --git a/tests/baselines/reference/APISample_standalone_compile.js b/tests/baselines/reference/APISample_standalone_compile.js index e1f55f8a4c2..fff2226f320 100644 --- a/tests/baselines/reference/APISample_standalone_compile.js +++ b/tests/baselines/reference/APISample_standalone_compile.js @@ -150,92 +150,91 @@ declare module ts { SetKeyword = 117, StringKeyword = 118, TypeKeyword = 119, - Missing = 120, - QualifiedName = 121, - ComputedPropertyName = 122, - TypeParameter = 123, - Parameter = 124, - Property = 125, - Method = 126, - Constructor = 127, - GetAccessor = 128, - SetAccessor = 129, - CallSignature = 130, - ConstructSignature = 131, - IndexSignature = 132, - TypeReference = 133, - FunctionType = 134, - ConstructorType = 135, - TypeQuery = 136, - TypeLiteral = 137, - ArrayType = 138, - TupleType = 139, - UnionType = 140, - ParenthesizedType = 141, - ArrayLiteralExpression = 142, - ObjectLiteralExpression = 143, - PropertyAccessExpression = 144, - ElementAccessExpression = 145, - CallExpression = 146, - NewExpression = 147, - TaggedTemplateExpression = 148, - TypeAssertionExpression = 149, - ParenthesizedExpression = 150, - FunctionExpression = 151, - ArrowFunction = 152, - DeleteExpression = 153, - TypeOfExpression = 154, - VoidExpression = 155, - PrefixUnaryExpression = 156, - PostfixUnaryExpression = 157, - BinaryExpression = 158, - ConditionalExpression = 159, - TemplateExpression = 160, - YieldExpression = 161, - OmittedExpression = 162, - TemplateSpan = 163, - Block = 164, - VariableStatement = 165, - EmptyStatement = 166, - ExpressionStatement = 167, - IfStatement = 168, - DoStatement = 169, - WhileStatement = 170, - ForStatement = 171, - ForInStatement = 172, - ContinueStatement = 173, - BreakStatement = 174, - ReturnStatement = 175, - WithStatement = 176, - SwitchStatement = 177, - LabeledStatement = 178, - ThrowStatement = 179, - TryStatement = 180, - TryBlock = 181, - CatchBlock = 182, - FinallyBlock = 183, - DebuggerStatement = 184, - VariableDeclaration = 185, - FunctionDeclaration = 186, - FunctionBlock = 187, - ClassDeclaration = 188, - InterfaceDeclaration = 189, - TypeAliasDeclaration = 190, - EnumDeclaration = 191, - ModuleDeclaration = 192, - ModuleBlock = 193, - ImportDeclaration = 194, - ExportAssignment = 195, - CaseClause = 196, - DefaultClause = 197, - HeritageClause = 198, - PropertyAssignment = 199, - ShorthandPropertyAssignment = 200, - EnumMember = 201, - SourceFile = 202, - Program = 203, - SyntaxList = 204, - Count = 205, + QualifiedName = 120, + ComputedPropertyName = 121, + TypeParameter = 122, + Parameter = 123, + Property = 124, + Method = 125, + Constructor = 126, + GetAccessor = 127, + SetAccessor = 128, + CallSignature = 129, + ConstructSignature = 130, + IndexSignature = 131, + TypeReference = 132, + FunctionType = 133, + ConstructorType = 134, + TypeQuery = 135, + TypeLiteral = 136, + ArrayType = 137, + TupleType = 138, + UnionType = 139, + ParenthesizedType = 140, + ArrayLiteralExpression = 141, + ObjectLiteralExpression = 142, + PropertyAccessExpression = 143, + ElementAccessExpression = 144, + CallExpression = 145, + NewExpression = 146, + TaggedTemplateExpression = 147, + TypeAssertionExpression = 148, + ParenthesizedExpression = 149, + FunctionExpression = 150, + ArrowFunction = 151, + DeleteExpression = 152, + TypeOfExpression = 153, + VoidExpression = 154, + PrefixUnaryExpression = 155, + PostfixUnaryExpression = 156, + BinaryExpression = 157, + ConditionalExpression = 158, + TemplateExpression = 159, + YieldExpression = 160, + OmittedExpression = 161, + TemplateSpan = 162, + Block = 163, + VariableStatement = 164, + EmptyStatement = 165, + ExpressionStatement = 166, + IfStatement = 167, + DoStatement = 168, + WhileStatement = 169, + ForStatement = 170, + ForInStatement = 171, + ContinueStatement = 172, + BreakStatement = 173, + ReturnStatement = 174, + WithStatement = 175, + SwitchStatement = 176, + LabeledStatement = 177, + ThrowStatement = 178, + TryStatement = 179, + TryBlock = 180, + FinallyBlock = 181, + DebuggerStatement = 182, + VariableDeclaration = 183, + FunctionDeclaration = 184, + ClassDeclaration = 185, + InterfaceDeclaration = 186, + TypeAliasDeclaration = 187, + EnumDeclaration = 188, + ModuleDeclaration = 189, + ModuleBlock = 190, + ImportDeclaration = 191, + ExportAssignment = 192, + ExternalModuleReference = 193, + CaseClause = 194, + DefaultClause = 195, + HeritageClause = 196, + CatchClause = 197, + PropertyAssignment = 198, + ShorthandPropertyAssignment = 199, + EnumMember = 200, + SourceFile = 201, + Program = 202, + SyntaxList = 203, + Count = 204, FirstAssignment = 51, LastAssignment = 62, FirstReservedWord = 64, @@ -244,11 +243,11 @@ declare module ts { LastKeyword = 119, FirstFutureReservedWord = 100, LastFutureReservedWord = 108, - FirstTypeNode = 133, - LastTypeNode = 141, + FirstTypeNode = 132, + LastTypeNode = 140, FirstPunctuation = 13, LastPunctuation = 62, - FirstToken = 1, + FirstToken = 0, LastToken = 119, FirstTriviaToken = 2, LastTriviaToken = 5, @@ -260,12 +259,11 @@ declare module ts { LastOperator = 62, FirstBinaryOperator = 23, LastBinaryOperator = 62, + FirstNode = 120, } const enum NodeFlags { Export = 1, Ambient = 2, - QuestionMark = 4, - Rest = 8, Public = 16, Private = 32, Protected = 64, @@ -285,6 +283,8 @@ declare module ts { DisallowIn = 2, Yield = 4, GeneratorParameter = 8, + ContainsError = 16, + HasPropagatedChildContainsErrorFlag = 32, } interface Node extends TextRange { kind: SyntaxKind; @@ -301,7 +301,7 @@ declare module ts { interface NodeArray extends Array, TextRange { hasTrailingComma?: boolean; } - interface ModifiersArray extends Array { + interface ModifiersArray extends NodeArray { flags: number; } interface Identifier extends PrimaryExpression { @@ -312,11 +312,6 @@ declare module ts { right: Identifier; } type EntityName = Identifier | QualifiedName; - interface ParsedSignature { - typeParameters?: NodeArray; - parameters: NodeArray; - type?: TypeNode; - } type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; interface Declaration extends Node { _declarationBrand: any; @@ -330,21 +325,43 @@ declare module ts { constraint?: TypeNode; expression?: Expression; } - interface SignatureDeclaration extends Declaration, ParsedSignature { + interface SignatureDeclaration extends Declaration { + typeParameters?: NodeArray; + parameters: NodeArray; + type?: TypeNode; } interface VariableDeclaration extends Declaration { name: Identifier; type?: TypeNode; initializer?: Expression; } + interface ParameterDeclaration extends Declaration { + dotDotDotToken?: Node; + name: Identifier; + questionToken?: Node; + type?: TypeNode | StringLiteralExpression; + initializer?: Expression; + } interface PropertyDeclaration extends Declaration, ClassElement { + _propertyDeclarationBrand: any; + questionToken?: Node; type?: TypeNode; initializer?: Expression; } - interface ShortHandPropertyDeclaration extends Declaration { - name: Identifier; + type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; + type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; + interface ObjectLiteralElement extends Declaration { + _objectLiteralBrandBrand: any; } - interface ParameterDeclaration extends VariableDeclaration { + interface ShorthandPropertyAssignment extends ObjectLiteralElement { + name: Identifier; + questionToken?: Node; + } + interface PropertyAssignment extends ObjectLiteralElement { + _propertyAssignmentBrand: any; + name: DeclarationName; + questionToken?: Node; + initializer: Expression; } /** * Several node kinds share function-like features such as a signature, @@ -357,25 +374,31 @@ declare module ts { interface FunctionLikeDeclaration extends SignatureDeclaration { _functionLikeDeclarationBrand: any; asteriskToken?: Node; + questionToken?: Node; body?: Block | Expression; } interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { name: Identifier; body?: Block; } - interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement { + interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { body?: Block; } interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { body?: Block; } - interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement { - body?: Block; + interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { + _accessorDeclarationBrand: any; + body: Block; } interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { _indexSignatureDeclarationBrand: any; } interface TypeNode extends Node { + _typeNodeBrand: any; + } + interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { + _functionOrConstructorTypeNodeBrand: any; } interface TypeReferenceNode extends TypeNode { typeName: EntityName; @@ -399,9 +422,6 @@ declare module ts { interface ParenthesizedTypeNode extends TypeNode { type: TypeNode; } - interface StringLiteralTypeNode extends TypeNode { - text: string; - } interface Expression extends Node { _expressionBrand: any; contextualType?: Type; @@ -458,6 +478,10 @@ declare module ts { } interface LiteralExpression extends PrimaryExpression { text: string; + isUnterminated?: boolean; + } + interface StringLiteralExpression extends LiteralExpression { + _stringLiteralExpressionBrand: any; } interface TemplateExpression extends PrimaryExpression { head: LiteralExpression; @@ -474,7 +498,7 @@ declare module ts { elements: NodeArray; } interface ObjectLiteralExpression extends PrimaryExpression, Declaration { - properties: NodeArray; + properties: NodeArray; } interface PropertyAccessExpression extends MemberExpression { expression: LeftHandSideExpression; @@ -482,7 +506,7 @@ declare module ts { } interface ElementAccessExpression extends MemberExpression { expression: LeftHandSideExpression; - argumentExpression: Expression; + argumentExpression?: Expression; } interface CallExpression extends LeftHandSideExpression { expression: LeftHandSideExpression; @@ -551,10 +575,14 @@ declare module ts { expression: Expression; clauses: NodeArray; } - interface CaseOrDefaultClause extends Node { + interface CaseClause extends Node { expression?: Expression; statements: NodeArray; } + interface DefaultClause extends Node { + statements: NodeArray; + } + type CaseOrDefaultClause = CaseClause | DefaultClause; interface LabeledStatement extends Statement { label: Identifier; statement: Statement; @@ -564,12 +592,13 @@ declare module ts { } interface TryStatement extends Statement { tryBlock: Block; - catchBlock?: CatchBlock; + catchClause?: CatchClause; finallyBlock?: Block; } - interface CatchBlock extends Block, Declaration { - variable: Identifier; + interface CatchClause extends Declaration { + name: Identifier; type?: TypeNode; + block: Block; } interface ModuleElement extends Node { _moduleElementBrand: any; @@ -614,8 +643,10 @@ declare module ts { } interface ImportDeclaration extends Declaration, ModuleElement { name: Identifier; - entityName?: EntityName; - externalModuleName?: LiteralExpression; + moduleReference: EntityName | ExternalModuleReference; + } + interface ExternalModuleReference extends Node { + expression?: Expression; } interface ExportAssignment extends Statement, ModuleElement { exportName: Identifier; @@ -628,6 +659,7 @@ declare module ts { } interface SourceFile extends Declaration { statements: NodeArray; + endOfFileToken: Node; filename: string; text: string; getLineAndCharacterFromPosition(position: number): LineAndCharacter; @@ -636,10 +668,11 @@ declare module ts { amdDependencies: string[]; amdModuleName: string; referencedFiles: FileReference[]; - semanticDiagnostics: Diagnostic[]; + referenceDiagnostics: Diagnostic[]; parseDiagnostics: Diagnostic[]; grammarDiagnostics: Diagnostic[]; getSyntacticDiagnostics(): Diagnostic[]; + semanticDiagnostics: Diagnostic[]; hasNoDefaultLib: boolean; externalModuleIndicator: Node; nodeCount: number; @@ -701,10 +734,8 @@ declare module ts { getIdentifierCount(): number; getSymbolCount(): number; getTypeCount(): number; - checkProgram(): void; emitFiles(targetSourceFile?: SourceFile): EmitResult; - getParentOfSymbol(symbol: Symbol): Symbol; - getNarrowedTypeOfSymbol(symbol: Symbol, node: Node): Type; + getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; getDeclaredTypeOfSymbol(symbol: Symbol): Type; getPropertiesOfType(type: Type): Symbol[]; getPropertyOfType(type: Type, propertyName: string): Symbol; @@ -712,16 +743,16 @@ declare module ts { getIndexTypeOfType(type: Type, kind: IndexKind): Type; getReturnTypeOfSignature(signature: Signature): Type; getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; - getSymbolInfo(node: Node): Symbol; + getSymbolAtLocation(node: Node): Symbol; getShorthandAssignmentValueSymbol(location: Node): Symbol; - getTypeOfNode(node: Node): Type; + getTypeAtLocation(node: Node): Type; typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; getSymbolDisplayBuilder(): SymbolDisplayBuilder; getFullyQualifiedName(symbol: Symbol): string; getAugmentedPropertiesOfType(type: Type): Symbol[]; getRootSymbols(symbol: Symbol): Symbol[]; - getContextualType(node: Node): Type; + getContextualType(node: Expression): Type; getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; @@ -795,10 +826,10 @@ declare module ts { isTopLevelValueImportWithEntityName(node: ImportDeclaration): boolean; getNodeCheckFlags(node: Node): NodeCheckFlags; getEnumMemberValue(node: EnumMember): number; - hasSemanticErrors(): boolean; + hasSemanticErrors(sourceFile?: SourceFile): boolean; isDeclarationVisible(node: Declaration): boolean; isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; - writeTypeAtLocation(location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; + writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; @@ -942,7 +973,6 @@ declare module ts { StringLike = 258, NumberLike = 132, ObjectType = 48128, - Structured = 65025, } interface Type { flags: TypeFlags; @@ -1055,12 +1085,6 @@ declare module ts { * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit */ isEarly?: boolean; - /** - * Parse error - error produced by parser when it scanner returns a token - * that parser does not understand in its current state - * (as opposed to grammar error when parser can interpret the token but interpretation is not legal from the grammar perespective) - */ - isParseError?: boolean; } enum DiagnosticCategory { Warning = 0, @@ -1092,6 +1116,7 @@ declare module ts { version?: boolean; watch?: boolean; preserveConstEnums?: boolean; + allowNonTsExtensions?: boolean; [option: string]: string | number | boolean; } const enum ModuleKind { @@ -1252,7 +1277,7 @@ declare module ts { } interface CompilerHost { getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; - getDefaultLibFilename(): string; + getDefaultLibFilename(options: CompilerOptions): string; getCancellationToken?(): CancellationToken; writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; getCurrentDirectory(): string; @@ -1278,12 +1303,14 @@ declare module ts { hasPrecedingLineBreak(): boolean; isIdentifier(): boolean; isReservedWord(): boolean; + isUnterminated(): boolean; reScanGreaterToken(): SyntaxKind; reScanSlashToken(): SyntaxKind; reScanTemplateToken(): SyntaxKind; scan(): SyntaxKind; setText(text: string): void; setTextPos(textPos: number): void; + lookAhead(callback: () => T): T; tryScan(callback: () => T): T; } function tokenToString(t: SyntaxKind): string; @@ -1305,14 +1332,9 @@ declare module ts { function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; - function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback): Scanner; + function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner; } declare module ts { - interface ReferencePathMatchResult { - fileReference?: FileReference; - diagnostic?: DiagnosticMessage; - isNoDefaultLib?: boolean; - } function getNodeConstructor(kind: SyntaxKind): new () => Node; function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; @@ -1322,6 +1344,7 @@ declare module ts { function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; } declare module ts { + var servicesVersion: string; interface Node { getSourceFile(): SourceFile; getChildCount(sourceFile?: SourceFile): number; @@ -1409,10 +1432,10 @@ declare module ts { getScriptVersion(fileName: string): string; getScriptIsOpen(fileName: string): boolean; getScriptSnapshot(fileName: string): IScriptSnapshot; - getLocalizedDiagnosticMessages(): any; - getCancellationToken(): CancellationToken; + getLocalizedDiagnosticMessages?(): any; + getCancellationToken?(): CancellationToken; getCurrentDirectory(): string; - getDefaultLibFilename(): string; + getDefaultLibFilename(options: CompilerOptions): string; } interface LanguageService { cleanupSemanticCache(): void; @@ -1421,7 +1444,7 @@ declare module ts { getCompilerOptionsDiagnostics(): Diagnostic[]; getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; - getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): CompletionInfo; + getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; @@ -1809,11 +1832,12 @@ declare module ts { static interfaceName: string; static moduleName: string; static typeParameterName: string; + static typeAlias: string; } - function displayPartsToString(displayParts: SymbolDisplayPart[]): string; interface DisplayPartsSymbolWriter extends SymbolWriter { displayParts(): SymbolDisplayPart[]; } + function displayPartsToString(displayParts: SymbolDisplayPart[]): string; function getDefaultCompilerOptions(): CompilerOptions; class OperationCanceledException { } diff --git a/tests/baselines/reference/APISample_standalone_compile.types b/tests/baselines/reference/APISample_standalone_compile.types index ebde76e4aa4..c69e655aec1 100644 --- a/tests/baselines/reference/APISample_standalone_compile.types +++ b/tests/baselines/reference/APISample_standalone_compile.types @@ -421,262 +421,259 @@ declare module ts { TypeKeyword = 119, >TypeKeyword : SyntaxKind - Missing = 120, ->Missing : SyntaxKind - - QualifiedName = 121, + QualifiedName = 120, >QualifiedName : SyntaxKind - ComputedPropertyName = 122, + ComputedPropertyName = 121, >ComputedPropertyName : SyntaxKind - TypeParameter = 123, + TypeParameter = 122, >TypeParameter : SyntaxKind - Parameter = 124, + Parameter = 123, >Parameter : SyntaxKind - Property = 125, + Property = 124, >Property : SyntaxKind - Method = 126, + Method = 125, >Method : SyntaxKind - Constructor = 127, + Constructor = 126, >Constructor : SyntaxKind - GetAccessor = 128, + GetAccessor = 127, >GetAccessor : SyntaxKind - SetAccessor = 129, + SetAccessor = 128, >SetAccessor : SyntaxKind - CallSignature = 130, + CallSignature = 129, >CallSignature : SyntaxKind - ConstructSignature = 131, + ConstructSignature = 130, >ConstructSignature : SyntaxKind - IndexSignature = 132, + IndexSignature = 131, >IndexSignature : SyntaxKind - TypeReference = 133, + TypeReference = 132, >TypeReference : SyntaxKind - FunctionType = 134, + FunctionType = 133, >FunctionType : SyntaxKind - ConstructorType = 135, + ConstructorType = 134, >ConstructorType : SyntaxKind - TypeQuery = 136, + TypeQuery = 135, >TypeQuery : SyntaxKind - TypeLiteral = 137, + TypeLiteral = 136, >TypeLiteral : SyntaxKind - ArrayType = 138, + ArrayType = 137, >ArrayType : SyntaxKind - TupleType = 139, + TupleType = 138, >TupleType : SyntaxKind - UnionType = 140, + UnionType = 139, >UnionType : SyntaxKind - ParenthesizedType = 141, + ParenthesizedType = 140, >ParenthesizedType : SyntaxKind - ArrayLiteralExpression = 142, + ArrayLiteralExpression = 141, >ArrayLiteralExpression : SyntaxKind - ObjectLiteralExpression = 143, + ObjectLiteralExpression = 142, >ObjectLiteralExpression : SyntaxKind - PropertyAccessExpression = 144, + PropertyAccessExpression = 143, >PropertyAccessExpression : SyntaxKind - ElementAccessExpression = 145, + ElementAccessExpression = 144, >ElementAccessExpression : SyntaxKind - CallExpression = 146, + CallExpression = 145, >CallExpression : SyntaxKind - NewExpression = 147, + NewExpression = 146, >NewExpression : SyntaxKind - TaggedTemplateExpression = 148, + TaggedTemplateExpression = 147, >TaggedTemplateExpression : SyntaxKind - TypeAssertionExpression = 149, + TypeAssertionExpression = 148, >TypeAssertionExpression : SyntaxKind - ParenthesizedExpression = 150, + ParenthesizedExpression = 149, >ParenthesizedExpression : SyntaxKind - FunctionExpression = 151, + FunctionExpression = 150, >FunctionExpression : SyntaxKind - ArrowFunction = 152, + ArrowFunction = 151, >ArrowFunction : SyntaxKind - DeleteExpression = 153, + DeleteExpression = 152, >DeleteExpression : SyntaxKind - TypeOfExpression = 154, + TypeOfExpression = 153, >TypeOfExpression : SyntaxKind - VoidExpression = 155, + VoidExpression = 154, >VoidExpression : SyntaxKind - PrefixUnaryExpression = 156, + PrefixUnaryExpression = 155, >PrefixUnaryExpression : SyntaxKind - PostfixUnaryExpression = 157, + PostfixUnaryExpression = 156, >PostfixUnaryExpression : SyntaxKind - BinaryExpression = 158, + BinaryExpression = 157, >BinaryExpression : SyntaxKind - ConditionalExpression = 159, + ConditionalExpression = 158, >ConditionalExpression : SyntaxKind - TemplateExpression = 160, + TemplateExpression = 159, >TemplateExpression : SyntaxKind - YieldExpression = 161, + YieldExpression = 160, >YieldExpression : SyntaxKind - OmittedExpression = 162, + OmittedExpression = 161, >OmittedExpression : SyntaxKind - TemplateSpan = 163, + TemplateSpan = 162, >TemplateSpan : SyntaxKind - Block = 164, + Block = 163, >Block : SyntaxKind - VariableStatement = 165, + VariableStatement = 164, >VariableStatement : SyntaxKind - EmptyStatement = 166, + EmptyStatement = 165, >EmptyStatement : SyntaxKind - ExpressionStatement = 167, + ExpressionStatement = 166, >ExpressionStatement : SyntaxKind - IfStatement = 168, + IfStatement = 167, >IfStatement : SyntaxKind - DoStatement = 169, + DoStatement = 168, >DoStatement : SyntaxKind - WhileStatement = 170, + WhileStatement = 169, >WhileStatement : SyntaxKind - ForStatement = 171, + ForStatement = 170, >ForStatement : SyntaxKind - ForInStatement = 172, + ForInStatement = 171, >ForInStatement : SyntaxKind - ContinueStatement = 173, + ContinueStatement = 172, >ContinueStatement : SyntaxKind - BreakStatement = 174, + BreakStatement = 173, >BreakStatement : SyntaxKind - ReturnStatement = 175, + ReturnStatement = 174, >ReturnStatement : SyntaxKind - WithStatement = 176, + WithStatement = 175, >WithStatement : SyntaxKind - SwitchStatement = 177, + SwitchStatement = 176, >SwitchStatement : SyntaxKind - LabeledStatement = 178, + LabeledStatement = 177, >LabeledStatement : SyntaxKind - ThrowStatement = 179, + ThrowStatement = 178, >ThrowStatement : SyntaxKind - TryStatement = 180, + TryStatement = 179, >TryStatement : SyntaxKind - TryBlock = 181, + TryBlock = 180, >TryBlock : SyntaxKind - CatchBlock = 182, ->CatchBlock : SyntaxKind - - FinallyBlock = 183, + FinallyBlock = 181, >FinallyBlock : SyntaxKind - DebuggerStatement = 184, + DebuggerStatement = 182, >DebuggerStatement : SyntaxKind - VariableDeclaration = 185, + VariableDeclaration = 183, >VariableDeclaration : SyntaxKind - FunctionDeclaration = 186, + FunctionDeclaration = 184, >FunctionDeclaration : SyntaxKind - FunctionBlock = 187, ->FunctionBlock : SyntaxKind - - ClassDeclaration = 188, + ClassDeclaration = 185, >ClassDeclaration : SyntaxKind - InterfaceDeclaration = 189, + InterfaceDeclaration = 186, >InterfaceDeclaration : SyntaxKind - TypeAliasDeclaration = 190, + TypeAliasDeclaration = 187, >TypeAliasDeclaration : SyntaxKind - EnumDeclaration = 191, + EnumDeclaration = 188, >EnumDeclaration : SyntaxKind - ModuleDeclaration = 192, + ModuleDeclaration = 189, >ModuleDeclaration : SyntaxKind - ModuleBlock = 193, + ModuleBlock = 190, >ModuleBlock : SyntaxKind - ImportDeclaration = 194, + ImportDeclaration = 191, >ImportDeclaration : SyntaxKind - ExportAssignment = 195, + ExportAssignment = 192, >ExportAssignment : SyntaxKind - CaseClause = 196, + ExternalModuleReference = 193, +>ExternalModuleReference : SyntaxKind + + CaseClause = 194, >CaseClause : SyntaxKind - DefaultClause = 197, + DefaultClause = 195, >DefaultClause : SyntaxKind - HeritageClause = 198, + HeritageClause = 196, >HeritageClause : SyntaxKind - PropertyAssignment = 199, + CatchClause = 197, +>CatchClause : SyntaxKind + + PropertyAssignment = 198, >PropertyAssignment : SyntaxKind - ShorthandPropertyAssignment = 200, + ShorthandPropertyAssignment = 199, >ShorthandPropertyAssignment : SyntaxKind - EnumMember = 201, + EnumMember = 200, >EnumMember : SyntaxKind - SourceFile = 202, + SourceFile = 201, >SourceFile : SyntaxKind - Program = 203, + Program = 202, >Program : SyntaxKind - SyntaxList = 204, + SyntaxList = 203, >SyntaxList : SyntaxKind - Count = 205, + Count = 204, >Count : SyntaxKind FirstAssignment = 51, @@ -703,10 +700,10 @@ declare module ts { LastFutureReservedWord = 108, >LastFutureReservedWord : SyntaxKind - FirstTypeNode = 133, + FirstTypeNode = 132, >FirstTypeNode : SyntaxKind - LastTypeNode = 141, + LastTypeNode = 140, >LastTypeNode : SyntaxKind FirstPunctuation = 13, @@ -715,7 +712,7 @@ declare module ts { LastPunctuation = 62, >LastPunctuation : SyntaxKind - FirstToken = 1, + FirstToken = 0, >FirstToken : SyntaxKind LastToken = 119, @@ -750,6 +747,9 @@ declare module ts { LastBinaryOperator = 62, >LastBinaryOperator : SyntaxKind + + FirstNode = 120, +>FirstNode : SyntaxKind } const enum NodeFlags { >NodeFlags : NodeFlags @@ -760,12 +760,6 @@ declare module ts { Ambient = 2, >Ambient : NodeFlags - QuestionMark = 4, ->QuestionMark : NodeFlags - - Rest = 8, ->Rest : NodeFlags - Public = 16, >Public : NodeFlags @@ -819,6 +813,12 @@ declare module ts { GeneratorParameter = 8, >GeneratorParameter : ParserContextFlags + + ContainsError = 16, +>ContainsError : ParserContextFlags + + HasPropagatedChildContainsErrorFlag = 32, +>HasPropagatedChildContainsErrorFlag : ParserContextFlags } interface Node extends TextRange { >Node : Node @@ -873,9 +873,9 @@ declare module ts { hasTrailingComma?: boolean; >hasTrailingComma : boolean } - interface ModifiersArray extends Array { + interface ModifiersArray extends NodeArray { >ModifiersArray : ModifiersArray ->Array : T[] +>NodeArray : NodeArray >Node : Node flags: number; @@ -905,23 +905,6 @@ declare module ts { >Identifier : Identifier >QualifiedName : QualifiedName - interface ParsedSignature { ->ParsedSignature : ParsedSignature - - typeParameters?: NodeArray; ->typeParameters : NodeArray ->NodeArray : NodeArray ->TypeParameterDeclaration : TypeParameterDeclaration - - parameters: NodeArray; ->parameters : NodeArray ->NodeArray : NodeArray ->ParameterDeclaration : ParameterDeclaration - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - } type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; >DeclarationName : Identifier | LiteralExpression | ComputedPropertyName >Identifier : Identifier @@ -963,10 +946,23 @@ declare module ts { >expression : Expression >Expression : Expression } - interface SignatureDeclaration extends Declaration, ParsedSignature { + interface SignatureDeclaration extends Declaration { >SignatureDeclaration : SignatureDeclaration >Declaration : Declaration ->ParsedSignature : ParsedSignature + + typeParameters?: NodeArray; +>typeParameters : NodeArray +>NodeArray : NodeArray +>TypeParameterDeclaration : TypeParameterDeclaration + + parameters: NodeArray; +>parameters : NodeArray +>NodeArray : NodeArray +>ParameterDeclaration : ParameterDeclaration + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode } interface VariableDeclaration extends Declaration { >VariableDeclaration : VariableDeclaration @@ -982,6 +978,31 @@ declare module ts { initializer?: Expression; >initializer : Expression +>Expression : Expression + } + interface ParameterDeclaration extends Declaration { +>ParameterDeclaration : ParameterDeclaration +>Declaration : Declaration + + dotDotDotToken?: Node; +>dotDotDotToken : Node +>Node : Node + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + questionToken?: Node; +>questionToken : Node +>Node : Node + + type?: TypeNode | StringLiteralExpression; +>type : TypeNode | StringLiteralExpression +>TypeNode : TypeNode +>StringLiteralExpression : StringLiteralExpression + + initializer?: Expression; +>initializer : Expression >Expression : Expression } interface PropertyDeclaration extends Declaration, ClassElement { @@ -989,6 +1010,13 @@ declare module ts { >Declaration : Declaration >ClassElement : ClassElement + _propertyDeclarationBrand: any; +>_propertyDeclarationBrand : any + + questionToken?: Node; +>questionToken : Node +>Node : Node + type?: TypeNode; >type : TypeNode >TypeNode : TypeNode @@ -997,17 +1025,53 @@ declare module ts { >initializer : Expression >Expression : Expression } - interface ShortHandPropertyDeclaration extends Declaration { ->ShortHandPropertyDeclaration : ShortHandPropertyDeclaration + type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; +>VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration +>VariableDeclaration : VariableDeclaration +>ParameterDeclaration : ParameterDeclaration + + type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; +>VariableOrParameterOrPropertyDeclaration : ParameterDeclaration | VariableDeclaration | PropertyDeclaration +>VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration +>PropertyDeclaration : PropertyDeclaration + + interface ObjectLiteralElement extends Declaration { +>ObjectLiteralElement : ObjectLiteralElement >Declaration : Declaration + _objectLiteralBrandBrand: any; +>_objectLiteralBrandBrand : any + } + interface ShorthandPropertyAssignment extends ObjectLiteralElement { +>ShorthandPropertyAssignment : ShorthandPropertyAssignment +>ObjectLiteralElement : ObjectLiteralElement + name: Identifier; >name : Identifier >Identifier : Identifier + + questionToken?: Node; +>questionToken : Node +>Node : Node } - interface ParameterDeclaration extends VariableDeclaration { ->ParameterDeclaration : ParameterDeclaration ->VariableDeclaration : VariableDeclaration + interface PropertyAssignment extends ObjectLiteralElement { +>PropertyAssignment : PropertyAssignment +>ObjectLiteralElement : ObjectLiteralElement + + _propertyAssignmentBrand: any; +>_propertyAssignmentBrand : any + + name: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName + + questionToken?: Node; +>questionToken : Node +>Node : Node + + initializer: Expression; +>initializer : Expression +>Expression : Expression } /** * Several node kinds share function-like features such as a signature, @@ -1026,6 +1090,10 @@ declare module ts { asteriskToken?: Node; >asteriskToken : Node +>Node : Node + + questionToken?: Node; +>questionToken : Node >Node : Node body?: Block | Expression; @@ -1046,10 +1114,11 @@ declare module ts { >body : Block >Block : Block } - interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement { + interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { >MethodDeclaration : MethodDeclaration >FunctionLikeDeclaration : FunctionLikeDeclaration >ClassElement : ClassElement +>ObjectLiteralElement : ObjectLiteralElement body?: Block; >body : Block @@ -1064,12 +1133,16 @@ declare module ts { >body : Block >Block : Block } - interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement { + interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { >AccessorDeclaration : AccessorDeclaration >FunctionLikeDeclaration : FunctionLikeDeclaration >ClassElement : ClassElement +>ObjectLiteralElement : ObjectLiteralElement - body?: Block; + _accessorDeclarationBrand: any; +>_accessorDeclarationBrand : any + + body: Block; >body : Block >Block : Block } @@ -1084,6 +1157,17 @@ declare module ts { interface TypeNode extends Node { >TypeNode : TypeNode >Node : Node + + _typeNodeBrand: any; +>_typeNodeBrand : any + } + interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { +>FunctionOrConstructorTypeNode : FunctionOrConstructorTypeNode +>TypeNode : TypeNode +>SignatureDeclaration : SignatureDeclaration + + _functionOrConstructorTypeNodeBrand: any; +>_functionOrConstructorTypeNodeBrand : any } interface TypeReferenceNode extends TypeNode { >TypeReferenceNode : TypeReferenceNode @@ -1149,13 +1233,6 @@ declare module ts { type: TypeNode; >type : TypeNode >TypeNode : TypeNode - } - interface StringLiteralTypeNode extends TypeNode { ->StringLiteralTypeNode : StringLiteralTypeNode ->TypeNode : TypeNode - - text: string; ->text : string } interface Expression extends Node { >Expression : Expression @@ -1315,6 +1392,16 @@ declare module ts { text: string; >text : string + + isUnterminated?: boolean; +>isUnterminated : boolean + } + interface StringLiteralExpression extends LiteralExpression { +>StringLiteralExpression : StringLiteralExpression +>LiteralExpression : LiteralExpression + + _stringLiteralExpressionBrand: any; +>_stringLiteralExpressionBrand : any } interface TemplateExpression extends PrimaryExpression { >TemplateExpression : TemplateExpression @@ -1363,10 +1450,10 @@ declare module ts { >PrimaryExpression : PrimaryExpression >Declaration : Declaration - properties: NodeArray; ->properties : NodeArray + properties: NodeArray; +>properties : NodeArray >NodeArray : NodeArray ->Declaration : Declaration +>ObjectLiteralElement : ObjectLiteralElement } interface PropertyAccessExpression extends MemberExpression { >PropertyAccessExpression : PropertyAccessExpression @@ -1388,7 +1475,7 @@ declare module ts { >expression : LeftHandSideExpression >LeftHandSideExpression : LeftHandSideExpression - argumentExpression: Expression; + argumentExpression?: Expression; >argumentExpression : Expression >Expression : Expression } @@ -1595,12 +1682,12 @@ declare module ts { >Expression : Expression clauses: NodeArray; ->clauses : NodeArray +>clauses : NodeArray >NodeArray : NodeArray ->CaseOrDefaultClause : CaseOrDefaultClause +>CaseOrDefaultClause : CaseClause | DefaultClause } - interface CaseOrDefaultClause extends Node { ->CaseOrDefaultClause : CaseOrDefaultClause + interface CaseClause extends Node { +>CaseClause : CaseClause >Node : Node expression?: Expression; @@ -1612,6 +1699,20 @@ declare module ts { >NodeArray : NodeArray >Statement : Statement } + interface DefaultClause extends Node { +>DefaultClause : DefaultClause +>Node : Node + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>Statement : Statement + } + type CaseOrDefaultClause = CaseClause | DefaultClause; +>CaseOrDefaultClause : CaseClause | DefaultClause +>CaseClause : CaseClause +>DefaultClause : DefaultClause + interface LabeledStatement extends Statement { >LabeledStatement : LabeledStatement >Statement : Statement @@ -1640,26 +1741,29 @@ declare module ts { >tryBlock : Block >Block : Block - catchBlock?: CatchBlock; ->catchBlock : CatchBlock ->CatchBlock : CatchBlock + catchClause?: CatchClause; +>catchClause : CatchClause +>CatchClause : CatchClause finallyBlock?: Block; >finallyBlock : Block >Block : Block } - interface CatchBlock extends Block, Declaration { ->CatchBlock : CatchBlock ->Block : Block + interface CatchClause extends Declaration { +>CatchClause : CatchClause >Declaration : Declaration - variable: Identifier; ->variable : Identifier + name: Identifier; +>name : Identifier >Identifier : Identifier type?: TypeNode; >type : TypeNode >TypeNode : TypeNode + + block: Block; +>block : Block +>Block : Block } interface ModuleElement extends Node { >ModuleElement : ModuleElement @@ -1809,13 +1913,18 @@ declare module ts { >name : Identifier >Identifier : Identifier - entityName?: EntityName; ->entityName : Identifier | QualifiedName + moduleReference: EntityName | ExternalModuleReference; +>moduleReference : Identifier | QualifiedName | ExternalModuleReference >EntityName : Identifier | QualifiedName +>ExternalModuleReference : ExternalModuleReference + } + interface ExternalModuleReference extends Node { +>ExternalModuleReference : ExternalModuleReference +>Node : Node - externalModuleName?: LiteralExpression; ->externalModuleName : LiteralExpression ->LiteralExpression : LiteralExpression + expression?: Expression; +>expression : Expression +>Expression : Expression } interface ExportAssignment extends Statement, ModuleElement { >ExportAssignment : ExportAssignment @@ -1849,6 +1958,10 @@ declare module ts { >NodeArray : NodeArray >ModuleElement : ModuleElement + endOfFileToken: Node; +>endOfFileToken : Node +>Node : Node + filename: string; >filename : string @@ -1878,8 +1991,8 @@ declare module ts { >referencedFiles : FileReference[] >FileReference : FileReference - semanticDiagnostics: Diagnostic[]; ->semanticDiagnostics : Diagnostic[] + referenceDiagnostics: Diagnostic[]; +>referenceDiagnostics : Diagnostic[] >Diagnostic : Diagnostic parseDiagnostics: Diagnostic[]; @@ -1892,6 +2005,10 @@ declare module ts { getSyntacticDiagnostics(): Diagnostic[]; >getSyntacticDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + semanticDiagnostics: Diagnostic[]; +>semanticDiagnostics : Diagnostic[] >Diagnostic : Diagnostic hasNoDefaultLib: boolean; @@ -2085,23 +2202,14 @@ declare module ts { getTypeCount(): number; >getTypeCount : () => number - checkProgram(): void; ->checkProgram : () => void - emitFiles(targetSourceFile?: SourceFile): EmitResult; >emitFiles : (targetSourceFile?: SourceFile) => EmitResult >targetSourceFile : SourceFile >SourceFile : SourceFile >EmitResult : EmitResult - getParentOfSymbol(symbol: Symbol): Symbol; ->getParentOfSymbol : (symbol: Symbol) => Symbol ->symbol : Symbol ->Symbol : Symbol ->Symbol : Symbol - - getNarrowedTypeOfSymbol(symbol: Symbol, node: Node): Type; ->getNarrowedTypeOfSymbol : (symbol: Symbol, node: Node) => Type + getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; +>getTypeOfSymbolAtLocation : (symbol: Symbol, node: Node) => Type >symbol : Symbol >Symbol : Symbol >node : Node @@ -2157,8 +2265,8 @@ declare module ts { >SymbolFlags : SymbolFlags >Symbol : Symbol - getSymbolInfo(node: Node): Symbol; ->getSymbolInfo : (node: Node) => Symbol + getSymbolAtLocation(node: Node): Symbol; +>getSymbolAtLocation : (node: Node) => Symbol >node : Node >Node : Node >Symbol : Symbol @@ -2169,8 +2277,8 @@ declare module ts { >Node : Node >Symbol : Symbol - getTypeOfNode(node: Node): Type; ->getTypeOfNode : (node: Node) => Type + getTypeAtLocation(node: Node): Type; +>getTypeAtLocation : (node: Node) => Type >node : Node >Node : Node >Type : Type @@ -2214,10 +2322,10 @@ declare module ts { >Symbol : Symbol >Symbol : Symbol - getContextualType(node: Node): Type; ->getContextualType : (node: Node) => Type ->node : Node ->Node : Node + getContextualType(node: Expression): Type; +>getContextualType : (node: Expression) => Type +>node : Expression +>Expression : Expression >Type : Type getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; @@ -2550,8 +2658,10 @@ declare module ts { >node : EnumMember >EnumMember : EnumMember - hasSemanticErrors(): boolean; ->hasSemanticErrors : () => boolean + hasSemanticErrors(sourceFile?: SourceFile): boolean; +>hasSemanticErrors : (sourceFile?: SourceFile) => boolean +>sourceFile : SourceFile +>SourceFile : SourceFile isDeclarationVisible(node: Declaration): boolean; >isDeclarationVisible : (node: Declaration) => boolean @@ -2563,10 +2673,11 @@ declare module ts { >node : FunctionLikeDeclaration >FunctionLikeDeclaration : FunctionLikeDeclaration - writeTypeAtLocation(location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; ->writeTypeAtLocation : (location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void ->location : Node ->Node : Node + writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; +>writeTypeOfDeclaration : (declaration: ParameterDeclaration | VariableDeclaration | AccessorDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void +>declaration : ParameterDeclaration | VariableDeclaration | AccessorDeclaration +>AccessorDeclaration : AccessorDeclaration +>VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration >enclosingDeclaration : Node >Node : Node >flags : TypeFormatFlags @@ -3024,9 +3135,6 @@ declare module ts { ObjectType = 48128, >ObjectType : TypeFlags - - Structured = 65025, ->Structured : TypeFlags } interface Type { >Type : Type @@ -3358,14 +3466,6 @@ declare module ts { */ isEarly?: boolean; >isEarly : boolean - - /** - * Parse error - error produced by parser when it scanner returns a token - * that parser does not understand in its current state - * (as opposed to grammar error when parser can interpret the token but interpretation is not legal from the grammar perespective) - */ - isParseError?: boolean; ->isParseError : boolean } enum DiagnosticCategory { >DiagnosticCategory : DiagnosticCategory @@ -3456,6 +3556,9 @@ declare module ts { preserveConstEnums?: boolean; >preserveConstEnums : boolean + allowNonTsExtensions?: boolean; +>allowNonTsExtensions : boolean + [option: string]: string | number | boolean; >option : string } @@ -3924,8 +4027,10 @@ declare module ts { >message : string >SourceFile : SourceFile - getDefaultLibFilename(): string; ->getDefaultLibFilename : () => string + getDefaultLibFilename(options: CompilerOptions): string; +>getDefaultLibFilename : (options: CompilerOptions) => string +>options : CompilerOptions +>CompilerOptions : CompilerOptions getCancellationToken?(): CancellationToken; >getCancellationToken : () => CancellationToken @@ -4001,6 +4106,9 @@ declare module ts { isReservedWord(): boolean; >isReservedWord : () => boolean + isUnterminated(): boolean; +>isUnterminated : () => boolean + reScanGreaterToken(): SyntaxKind; >reScanGreaterToken : () => SyntaxKind >SyntaxKind : SyntaxKind @@ -4025,6 +4133,13 @@ declare module ts { >setTextPos : (textPos: number) => void >textPos : number + lookAhead(callback: () => T): T; +>lookAhead : (callback: () => T) => T +>T : T +>callback : () => T +>T : T +>T : T + tryScan(callback: () => T): T; >tryScan : (callback: () => T) => T >T : T @@ -4113,35 +4228,19 @@ declare module ts { >languageVersion : ScriptTarget >ScriptTarget : ScriptTarget - function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback): Scanner; ->createScanner : (languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback) => Scanner + function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner; +>createScanner : (languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback) => Scanner >languageVersion : ScriptTarget >ScriptTarget : ScriptTarget >skipTrivia : boolean >text : string >onError : ErrorCallback >ErrorCallback : ErrorCallback ->onComment : CommentCallback ->CommentCallback : CommentCallback >Scanner : Scanner } declare module ts { >ts : typeof ts - interface ReferencePathMatchResult { ->ReferencePathMatchResult : ReferencePathMatchResult - - fileReference?: FileReference; ->fileReference : FileReference ->FileReference : FileReference - - diagnostic?: DiagnosticMessage; ->diagnostic : DiagnosticMessage ->DiagnosticMessage : DiagnosticMessage - - isNoDefaultLib?: boolean; ->isNoDefaultLib : boolean - } function getNodeConstructor(kind: SyntaxKind): new () => Node; >getNodeConstructor : (kind: SyntaxKind) => new () => Node >kind : SyntaxKind @@ -4195,6 +4294,9 @@ declare module ts { declare module ts { >ts : typeof ts + var servicesVersion: string; +>servicesVersion : string + interface Node { >Node : Node @@ -4460,18 +4562,20 @@ declare module ts { >fileName : string >IScriptSnapshot : IScriptSnapshot - getLocalizedDiagnosticMessages(): any; + getLocalizedDiagnosticMessages?(): any; >getLocalizedDiagnosticMessages : () => any - getCancellationToken(): CancellationToken; + getCancellationToken?(): CancellationToken; >getCancellationToken : () => CancellationToken >CancellationToken : CancellationToken getCurrentDirectory(): string; >getCurrentDirectory : () => string - getDefaultLibFilename(): string; ->getDefaultLibFilename : () => string + getDefaultLibFilename(options: CompilerOptions): string; +>getDefaultLibFilename : (options: CompilerOptions) => string +>options : CompilerOptions +>CompilerOptions : CompilerOptions } interface LanguageService { >LanguageService : LanguageService @@ -4507,11 +4611,10 @@ declare module ts { >TextSpan : TextSpan >ClassifiedSpan : ClassifiedSpan - getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): CompletionInfo; ->getCompletionsAtPosition : (fileName: string, position: number, isMemberCompletion: boolean) => CompletionInfo + getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; +>getCompletionsAtPosition : (fileName: string, position: number) => CompletionInfo >fileName : string >position : number ->isMemberCompletion : boolean >CompletionInfo : CompletionInfo getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; @@ -5573,12 +5676,10 @@ declare module ts { static typeParameterName: string; >typeParameterName : string - } - function displayPartsToString(displayParts: SymbolDisplayPart[]): string; ->displayPartsToString : (displayParts: SymbolDisplayPart[]) => string ->displayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart + static typeAlias: string; +>typeAlias : string + } interface DisplayPartsSymbolWriter extends SymbolWriter { >DisplayPartsSymbolWriter : DisplayPartsSymbolWriter >SymbolWriter : SymbolWriter @@ -5587,6 +5688,11 @@ declare module ts { >displayParts : () => SymbolDisplayPart[] >SymbolDisplayPart : SymbolDisplayPart } + function displayPartsToString(displayParts: SymbolDisplayPart[]): string; +>displayPartsToString : (displayParts: SymbolDisplayPart[]) => string +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + function getDefaultCompilerOptions(): CompilerOptions; >getDefaultCompilerOptions : () => CompilerOptions >CompilerOptions : CompilerOptions From 905d97888345b054fff3e85ce67548729d63ce45 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 10 Dec 2014 17:13:39 -0800 Subject: [PATCH 099/141] Moved createCompilerHost into parser.ts --- src/compiler/parser.ts | 71 +++++++++++++++++++ src/compiler/tsc.ts | 69 ------------------ .../reference/APISample_node_compile.js | 1 + .../reference/APISample_node_compile.types | 6 ++ .../reference/APISample_standalone_compile.js | 1 + .../APISample_standalone_compile.types | 6 ++ 6 files changed, 85 insertions(+), 69 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 5c0d1535985..cdfb09e19ec 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -268,6 +268,77 @@ module ts { } } + // TODO (drosen, mhegazy): Move to a more appropriate file. + export function createCompilerHost(options: CompilerOptions): CompilerHost { + var currentDirectory: string; + var existingDirectories: Map = {}; + + function getCanonicalFileName(fileName: string): string { + // if underlying system can distinguish between two files whose names differs only in cases then file name already in canonical form. + // otherwise use toLowerCase as a canonical form. + return sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase(); + } + + // returned by CScript sys environment + var unsupportedFileEncodingErrorCode = -2147024809; + + function getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile { + try { + var text = sys.readFile(filename, options.charset); + } + catch (e) { + if (onError) { + onError(e.number === unsupportedFileEncodingErrorCode ? + createCompilerDiagnostic(Diagnostics.Unsupported_file_encoding).messageText : + e.message); + } + text = ""; + } + return text !== undefined ? createSourceFile(filename, text, languageVersion, /*version:*/ "0") : undefined; + } + + function writeFile(fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void) { + + function directoryExists(directoryPath: string): boolean { + if (hasProperty(existingDirectories, directoryPath)) { + return true; + } + if (sys.directoryExists(directoryPath)) { + existingDirectories[directoryPath] = true; + return true; + } + return false; + } + + function ensureDirectoriesExist(directoryPath: string) { + if (directoryPath.length > getRootLength(directoryPath) && !directoryExists(directoryPath)) { + var parentDirectory = getDirectoryPath(directoryPath); + ensureDirectoriesExist(parentDirectory); + sys.createDirectory(directoryPath); + } + } + + try { + ensureDirectoriesExist(getDirectoryPath(normalizePath(fileName))); + sys.writeFile(fileName, data, writeByteOrderMark); + } + catch (e) { + if (onError) onError(e.message); + } + } + + return { + getSourceFile, + getDefaultLibFilename: options => combinePaths(getDirectoryPath(normalizePath(sys.getExecutingFilePath())), options.target === ScriptTarget.ES6 ? "lib.es6.d.ts" : "lib.d.ts"), + writeFile, + getCurrentDirectory: () => currentDirectory || (currentDirectory = sys.getCurrentDirectory()), + useCaseSensitiveFileNames: () => sys.useCaseSensitiveFileNames, + getCanonicalFileName, + getNewLine: () => sys.newLine + }; + } + + const enum ParsingContext { SourceElements, // Elements in source file ModuleElements, // Elements in module declaration diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index 1756f26ab48..5e4918d91e9 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -133,75 +133,6 @@ module ts { reportStatisticalValue(name, (time / 1000).toFixed(2) + "s"); } - function createCompilerHost(options: CompilerOptions): CompilerHost { - var currentDirectory: string; - var existingDirectories: Map = {}; - - function getCanonicalFileName(fileName: string): string { - // if underlying system can distinguish between two files whose names differs only in cases then file name already in canonical form. - // otherwise use toLowerCase as a canonical form. - return sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase(); - } - - // returned by CScript sys environment - var unsupportedFileEncodingErrorCode = -2147024809; - - function getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile { - try { - var text = sys.readFile(filename, options.charset); - } - catch (e) { - if (onError) { - onError(e.number === unsupportedFileEncodingErrorCode ? - getDiagnosticText(Diagnostics.Unsupported_file_encoding) : - e.message); - } - text = ""; - } - return text !== undefined ? createSourceFile(filename, text, languageVersion, /*version:*/ "0") : undefined; - } - - function writeFile(fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void) { - - function directoryExists(directoryPath: string): boolean { - if (hasProperty(existingDirectories, directoryPath)) { - return true; - } - if (sys.directoryExists(directoryPath)) { - existingDirectories[directoryPath] = true; - return true; - } - return false; - } - - function ensureDirectoriesExist(directoryPath: string) { - if (directoryPath.length > getRootLength(directoryPath) && !directoryExists(directoryPath)) { - var parentDirectory = getDirectoryPath(directoryPath); - ensureDirectoriesExist(parentDirectory); - sys.createDirectory(directoryPath); - } - } - - try { - ensureDirectoriesExist(getDirectoryPath(normalizePath(fileName))); - sys.writeFile(fileName, data, writeByteOrderMark); - } - catch (e) { - if (onError) onError(e.message); - } - } - - return { - getSourceFile, - getDefaultLibFilename: options => combinePaths(getDirectoryPath(normalizePath(sys.getExecutingFilePath())), options.target === ScriptTarget.ES6 ? "lib.es6.d.ts" : "lib.d.ts"), - writeFile, - getCurrentDirectory: () => currentDirectory || (currentDirectory = sys.getCurrentDirectory()), - useCaseSensitiveFileNames: () => sys.useCaseSensitiveFileNames, - getCanonicalFileName, - getNewLine: () => sys.newLine - }; - } - export function executeCommandLine(args: string[]): void { var commandLine = parseCommandLine(args); var compilerOptions = commandLine.options; diff --git a/tests/baselines/reference/APISample_node_compile.js b/tests/baselines/reference/APISample_node_compile.js index 6807d97db84..bcadb7c109e 100644 --- a/tests/baselines/reference/APISample_node_compile.js +++ b/tests/baselines/reference/APISample_node_compile.js @@ -1339,6 +1339,7 @@ declare module "typescript" { declare module "typescript" { function getNodeConstructor(kind: SyntaxKind): new () => Node; function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; + function createCompilerHost(options: CompilerOptions): CompilerHost; function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; } diff --git a/tests/baselines/reference/APISample_node_compile.types b/tests/baselines/reference/APISample_node_compile.types index 4331fb28c72..389093ba3e7 100644 --- a/tests/baselines/reference/APISample_node_compile.types +++ b/tests/baselines/reference/APISample_node_compile.types @@ -4259,6 +4259,12 @@ declare module "typescript" { >T : T >T : T + function createCompilerHost(options: CompilerOptions): CompilerHost; +>createCompilerHost : (options: CompilerOptions) => CompilerHost +>options : CompilerOptions +>CompilerOptions : CompilerOptions +>CompilerHost : CompilerHost + function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; >createSourceFile : (filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean) => SourceFile >filename : string diff --git a/tests/baselines/reference/APISample_standalone_compile.js b/tests/baselines/reference/APISample_standalone_compile.js index fff2226f320..edd6c3ed49b 100644 --- a/tests/baselines/reference/APISample_standalone_compile.js +++ b/tests/baselines/reference/APISample_standalone_compile.js @@ -1337,6 +1337,7 @@ declare module ts { declare module ts { function getNodeConstructor(kind: SyntaxKind): new () => Node; function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; + function createCompilerHost(options: CompilerOptions): CompilerHost; function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; } diff --git a/tests/baselines/reference/APISample_standalone_compile.types b/tests/baselines/reference/APISample_standalone_compile.types index c69e655aec1..c4630007cba 100644 --- a/tests/baselines/reference/APISample_standalone_compile.types +++ b/tests/baselines/reference/APISample_standalone_compile.types @@ -4262,6 +4262,12 @@ declare module ts { >T : T >T : T + function createCompilerHost(options: CompilerOptions): CompilerHost; +>createCompilerHost : (options: CompilerOptions) => CompilerHost +>options : CompilerOptions +>CompilerOptions : CompilerOptions +>CompilerHost : CompilerHost + function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; >createSourceFile : (filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean) => SourceFile >filename : string From b6e8dd49e4bc5d74ff5c8dae171be72d82fe10b8 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 10 Dec 2014 17:34:17 -0800 Subject: [PATCH 100/141] Responded to CR feedback. --- src/compiler/parser.ts | 7 ++++--- src/compiler/utilities.ts | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index cdfb09e19ec..66ed2c312fd 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -323,7 +323,9 @@ module ts { sys.writeFile(fileName, data, writeByteOrderMark); } catch (e) { - if (onError) onError(e.message); + if (onError) { + onError(e.message); + } } } @@ -405,14 +407,13 @@ module ts { function isEvalOrArgumentsIdentifier(node: Node): boolean { return node.kind === SyntaxKind.Identifier && - (node).text && ((node).text === "eval" || (node).text === "arguments"); } /// Should be called only on prologue directives (isPrologueDirective(node) should be true) function isUseStrictPrologueDirective(node: Node): boolean { Debug.assert(isPrologueDirective(node)); - return ((node).expression).text === "use strict"; + return getTextOfNode((node).expression) === '"use strict"'; } export function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen: boolean = false): SourceFile { diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index c3e067b7e75..fb88b818917 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -90,7 +90,9 @@ module ts { } export function getSourceFileOfNode(node: Node): SourceFile { - while (node && node.kind !== SyntaxKind.SourceFile) node = node.parent; + while (node && node.kind !== SyntaxKind.SourceFile) { + node = node.parent; + } return node; } @@ -161,7 +163,7 @@ module ts { node = getErrorSpanForNode(node); var file = getSourceFileOfNode(node); - var start = getFullWidth(node) === 0 ? node.pos : skipTrivia(file.text, node.pos); + var start = getTokenPosOfNode(node, file); var length = node.end - start; return createFileDiagnostic(file, start, length, message, arg0, arg1, arg2); From 9e58b8aedae7afa9dffce344a0ba4c2b1786832f Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Wed, 10 Dec 2014 17:41:48 -0800 Subject: [PATCH 101/141] respond to code review commments --- src/harness/fourslash.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 2d81524bf6d..b48f8fba5f6 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -167,7 +167,7 @@ module FourSlash { settings.module = ts.ModuleKind.CommonJS; break; default: - ts.Debug.assert(typeof globalOptions[prop] === "undefined" || globalOptions[prop] === "None"); + ts.Debug.assert(globalOptions[prop] === undefined || globalOptions[prop] === "None"); settings.module = ts.ModuleKind.None; break; } From d2c7c01ff3556a36ad8c0ecb2f4b8b461cffc786 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Wed, 10 Dec 2014 17:51:14 -0800 Subject: [PATCH 102/141] Respond to code review commments --- src/compiler/commandLineParser.ts | 2 +- src/compiler/diagnosticInformationMap.generated.ts | 2 +- src/compiler/diagnosticMessages.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index cbe69b37167..ae4c751869c 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -112,7 +112,7 @@ module ts { { name: "suppressImplicitAnyIndexErrors", type: "boolean", - description: Diagnostics.Suppress_noImplicitAny_errors_for_indexing_into_objects_lacking_index_signatures, + description: Diagnostics.Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures, }, { name: "target", diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index daacddaeddb..6ce7579588e 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -411,7 +411,7 @@ module ts { Warn_on_expressions_and_declarations_with_an_implied_any_type: { code: 6052, category: DiagnosticCategory.Message, key: "Warn on expressions and declarations with an implied 'any' type." }, File_0_not_found: { code: 6053, category: DiagnosticCategory.Error, key: "File '{0}' not found." }, File_0_must_have_extension_ts_or_d_ts: { code: 6054, category: DiagnosticCategory.Error, key: "File '{0}' must have extension '.ts' or '.d.ts'." }, - Suppress_noImplicitAny_errors_for_indexing_into_objects_lacking_index_signatures: { code: 6055, category: DiagnosticCategory.Message, key: "Suppress noImplicitAny errors for indexing into objects lacking index signatures." }, + Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: { code: 6055, category: DiagnosticCategory.Message, key: "Suppress noImplicitAny errors for indexing objects lacking index signatures." }, Variable_0_implicitly_has_an_1_type: { code: 7005, category: DiagnosticCategory.Error, key: "Variable '{0}' implicitly has an '{1}' type." }, Parameter_0_implicitly_has_an_1_type: { code: 7006, category: DiagnosticCategory.Error, key: "Parameter '{0}' implicitly has an '{1}' type." }, Member_0_implicitly_has_an_1_type: { code: 7008, category: DiagnosticCategory.Error, key: "Member '{0}' implicitly has an '{1}' type." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index da24c881253..3e5ac7ae1d6 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1643,7 +1643,7 @@ "category": "Error", "code": 6054 }, - "Suppress noImplicitAny errors for indexing into objects lacking index signatures.": { + "Suppress noImplicitAny errors for indexing objects lacking index signatures.": { "category": "Message", "code": 6055 }, From 0aca3b966790623b5c5e646ffeaef07d88db417a Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 10 Dec 2014 18:17:59 -0800 Subject: [PATCH 103/141] Fixed 'use strict' check. --- src/compiler/parser.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 66ed2c312fd..2c8a09faaa1 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -411,9 +411,10 @@ module ts { } /// Should be called only on prologue directives (isPrologueDirective(node) should be true) - function isUseStrictPrologueDirective(node: Node): boolean { + function isUseStrictPrologueDirective(sourceFile: SourceFile, node: Node): boolean { Debug.assert(isPrologueDirective(node)); - return getTextOfNode((node).expression) === '"use strict"'; + var nodeText = getSourceTextOfNodeFromSourceFile(sourceFile,(node).expression); + return nodeText === '"use strict"' || nodeText === "'use strict'"; } export function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen: boolean = false): SourceFile { @@ -1073,7 +1074,7 @@ module ts { // test elements only if we are not already in strict mode if (checkForStrictMode && !inStrictModeContext()) { if (isPrologueDirective(element)) { - if (isUseStrictPrologueDirective(element)) { + if (isUseStrictPrologueDirective(sourceFile, element)) { setStrictModeContext(true); checkForStrictMode = false; } From d69ba56ece6ece08051877d37f93d6906435b495 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 10 Dec 2014 22:01:34 -0800 Subject: [PATCH 104/141] added test for inherited indentation --- .../cases/fourslash/formattingConditionals.ts | 31 ++++++++++++++++--- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/tests/cases/fourslash/formattingConditionals.ts b/tests/cases/fourslash/formattingConditionals.ts index 65029134b87..cb6edfcd56b 100644 --- a/tests/cases/fourslash/formattingConditionals.ts +++ b/tests/cases/fourslash/formattingConditionals.ts @@ -10,14 +10,35 @@ /////*3*/? c /////*4*/: d; +////var x = +/////*5*/a +/////*6*/? function(){ +/////*7*/var z = 1 +/////*8*/} +/////*9*/: function(){ +/////*10*/var z = 2 +/////*11*/} + + + + function verifyLine(marker: string, content: string) { goTo.marker(marker); verify.currentLineContentIs(content); } format.document(); -verifyLine("0", " a === b"); -verifyLine("1", " ? c"); -verifyLine("2", " : d;"); -verifyLine("3", " ? c"); -verifyLine("4", " : d;"); +verifyLine("0", " a === b"); +verifyLine("1", " ? c"); +verifyLine("2", " : d;"); + +verifyLine("3", " ? c"); +verifyLine("4", " : d;"); + +verifyLine("5", " a"); +verifyLine("6", " ? function() {"); +verifyLine("7", " var z = 1"); +verifyLine("8", " }"); +verifyLine("9", " : function() {"); +verifyLine("10", " var z = 2"); +verifyLine("11", " }"); From 978ac26eff63d13aee0a97cb5dd7d2cfb8837e77 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 10 Dec 2014 14:38:14 -0800 Subject: [PATCH 105/141] Allow typescript to be importable in node. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f6391394c6a..a52067a3d08 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "url" : "https://github.com/Microsoft/TypeScript.git" }, "preferGlobal" : true, - "main" : "./bin/tsc.js", + "main" : "./bin/typescriptServices.js", "bin" : { "tsc" : "./bin/tsc" }, From c5510444d9111d393197f7fd03185173de2f73a6 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 4 Dec 2014 16:37:12 -0800 Subject: [PATCH 106/141] Use __filename for 'getExecutingFilePath'. --- src/compiler/sys.ts | 5 +++-- src/harness/harness.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index e58d08589ba..adcedb02869 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -25,6 +25,7 @@ declare var require: any; declare var module: any; declare var process: any; declare var global: any; +declare var __filename: string; var sys: System = (function () { @@ -224,10 +225,10 @@ var sys: System = (function () { } }, getExecutingFilePath() { - return process.mainModule.filename; + return __filename; }, getCurrentDirectory() { - return (process).cwd(); + return process.cwd(); }, getMemoryUsage() { if (global.gc) { diff --git a/src/harness/harness.ts b/src/harness/harness.ts index c535f94bcf7..585d0191d85 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -25,7 +25,7 @@ // this will work in the browser via browserify var _chai: typeof chai = require('chai'); var assert: typeof _chai.assert = _chai.assert; -declare var __dirname: any; // Node-specific +declare var __dirname: string; // Node-specific var global = Function("return this").call(null); module Utils { From be1eb3430c953b9fd0f690fc4d65561089d5b025 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 5 Dec 2014 16:33:39 -0800 Subject: [PATCH 107/141] Put 'sys' into the 'ts' module. --- src/compiler/sys.ts | 466 +++++++++++++++++----------------- src/compiler/tsc.ts | 2 +- src/harness/fourslash.ts | 10 +- src/harness/harness.ts | 33 +-- src/harness/projectsRunner.ts | 24 +- src/harness/runner.ts | 2 +- src/harness/rwcRunner.ts | 16 +- 7 files changed, 279 insertions(+), 274 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index adcedb02869..27a8c305c4b 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -1,253 +1,255 @@ -interface System { - args: string[]; - newLine: string; - useCaseSensitiveFileNames: boolean; - write(s: string): void; - readFile(fileName: string, encoding?: string): string; - writeFile(fileName: string, data: string, writeByteOrderMark?: boolean): void; - watchFile?(fileName: string, callback: (fileName: string) => void): FileWatcher; - resolvePath(path: string): string; - fileExists(path: string): boolean; - directoryExists(path: string): boolean; - createDirectory(directoryName: string): void; - getExecutingFilePath(): string; - getCurrentDirectory(): string; - getMemoryUsage?(): number; - exit(exitCode?: number): void; -} +module ts { + export interface System { + args: string[]; + newLine: string; + useCaseSensitiveFileNames: boolean; + write(s: string): void; + readFile(fileName: string, encoding?: string): string; + writeFile(fileName: string, data: string, writeByteOrderMark?: boolean): void; + watchFile? (fileName: string, callback: (fileName: string) => void): FileWatcher; + resolvePath(path: string): string; + fileExists(path: string): boolean; + directoryExists(path: string): boolean; + createDirectory(directoryName: string): void; + getExecutingFilePath(): string; + getCurrentDirectory(): string; + getMemoryUsage? (): number; + exit(exitCode?: number): void; + } -interface FileWatcher { - close(): void; -} + export interface FileWatcher { + close(): void; + } -declare var require: any; -declare var module: any; -declare var process: any; -declare var global: any; -declare var __filename: string; + declare var require: any; + declare var module: any; + declare var process: any; + declare var global: any; + declare var __filename: string; -var sys: System = (function () { + export var sys: System = (function () { - function getWScriptSystem(): System { + function getWScriptSystem(): System { - var fso = new ActiveXObject("Scripting.FileSystemObject"); + var fso = new ActiveXObject("Scripting.FileSystemObject"); - var fileStream = new ActiveXObject("ADODB.Stream"); - fileStream.Type = 2 /*text*/; + var fileStream = new ActiveXObject("ADODB.Stream"); + fileStream.Type = 2 /*text*/; - var binaryStream = new ActiveXObject("ADODB.Stream"); - binaryStream.Type = 1 /*binary*/; + var binaryStream = new ActiveXObject("ADODB.Stream"); + binaryStream.Type = 1 /*binary*/; - var args: string[] = []; - for (var i = 0; i < WScript.Arguments.length; i++) { - args[i] = WScript.Arguments.Item(i); - } - - function readFile(fileName: string, encoding?: string): string { - if (!fso.FileExists(fileName)) { - return undefined; + var args: string[] = []; + for (var i = 0; i < WScript.Arguments.length; i++) { + args[i] = WScript.Arguments.Item(i); } - fileStream.Open(); - try { - if (encoding) { - fileStream.Charset = encoding; - fileStream.LoadFromFile(fileName); + + function readFile(fileName: string, encoding?: string): string { + if (!fso.FileExists(fileName)) { + return undefined; } - else { - // Load file and read the first two bytes into a string with no interpretation - fileStream.Charset = "x-ansi"; - fileStream.LoadFromFile(fileName); - var bom = fileStream.ReadText(2) || ""; - // Position must be at 0 before encoding can be changed - fileStream.Position = 0; - // [0xFF,0xFE] and [0xFE,0xFF] mean utf-16 (little or big endian), otherwise default to utf-8 - fileStream.Charset = bom.length >= 2 && (bom.charCodeAt(0) === 0xFF && bom.charCodeAt(1) === 0xFE || bom.charCodeAt(0) === 0xFE && bom.charCodeAt(1) === 0xFF) ? "unicode" : "utf-8"; - } - // ReadText method always strips byte order mark from resulting string - return fileStream.ReadText(); - } - catch (e) { - throw e; - } - finally { - fileStream.Close(); - } - } - - function writeFile(fileName: string, data: string, writeByteOrderMark?: boolean): void { - fileStream.Open(); - binaryStream.Open(); - try { - // Write characters in UTF-8 encoding - fileStream.Charset = "utf-8"; - fileStream.WriteText(data); - // If we don't want the BOM, then skip it by setting the starting location to 3 (size of BOM). - // If not, start from position 0, as the BOM will be added automatically when charset==utf8. - if (writeByteOrderMark) { - fileStream.Position = 0; - } - else { - fileStream.Position = 3; - } - fileStream.CopyTo(binaryStream); - binaryStream.SaveToFile(fileName, 2 /*overwrite*/); - } - finally { - binaryStream.Close(); - fileStream.Close(); - } - } - - return { - args, - newLine: "\r\n", - useCaseSensitiveFileNames: false, - write(s: string): void { - WScript.StdOut.Write(s); - }, - readFile, - writeFile, - resolvePath(path: string): string { - return fso.GetAbsolutePathName(path); - }, - fileExists(path: string): boolean { - return fso.FileExists(path); - }, - directoryExists(path: string) { - return fso.FolderExists(path); - }, - createDirectory(directoryName: string) { - if (!this.directoryExists(directoryName)) { - fso.CreateFolder(directoryName); - } - }, - getExecutingFilePath() { - return WScript.ScriptFullName; - }, - getCurrentDirectory() { - return new ActiveXObject("WScript.Shell").CurrentDirectory; - }, - exit(exitCode?: number): void { + fileStream.Open(); try { - WScript.Quit(exitCode); + if (encoding) { + fileStream.Charset = encoding; + fileStream.LoadFromFile(fileName); + } + else { + // Load file and read the first two bytes into a string with no interpretation + fileStream.Charset = "x-ansi"; + fileStream.LoadFromFile(fileName); + var bom = fileStream.ReadText(2) || ""; + // Position must be at 0 before encoding can be changed + fileStream.Position = 0; + // [0xFF,0xFE] and [0xFE,0xFF] mean utf-16 (little or big endian), otherwise default to utf-8 + fileStream.Charset = bom.length >= 2 && (bom.charCodeAt(0) === 0xFF && bom.charCodeAt(1) === 0xFE || bom.charCodeAt(0) === 0xFE && bom.charCodeAt(1) === 0xFF) ? "unicode" : "utf-8"; + } + // ReadText method always strips byte order mark from resulting string + return fileStream.ReadText(); } catch (e) { + throw e; + } + finally { + fileStream.Close(); } } - }; - } - function getNodeSystem(): System { - var _fs = require("fs"); - var _path = require("path"); - var _os = require('os'); - var platform: string = _os.platform(); - // win32\win64 are case insensitive platforms, MacOS (darwin) by default is also case insensitive - var useCaseSensitiveFileNames = platform !== "win32" && platform !== "win64" && platform !== "darwin"; - - function readFile(fileName: string, encoding?: string): string { - if (!_fs.existsSync(fileName)) { - return undefined; - } - var buffer = _fs.readFileSync(fileName); - var len = buffer.length; - if (len >= 2 && buffer[0] === 0xFE && buffer[1] === 0xFF) { - // Big endian UTF-16 byte order mark detected. Since big endian is not supported by node.js, - // flip all byte pairs and treat as little endian. - len &= ~1; - for (var i = 0; i < len; i += 2) { - var temp = buffer[i]; - buffer[i] = buffer[i + 1]; - buffer[i + 1] = temp; - } - return buffer.toString("utf16le", 2); - } - if (len >= 2 && buffer[0] === 0xFF && buffer[1] === 0xFE) { - // Little endian UTF-16 byte order mark detected - return buffer.toString("utf16le", 2); - } - if (len >= 3 && buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) { - // UTF-8 byte order mark detected - return buffer.toString("utf8", 3); - } - // Default is UTF-8 with no byte order mark - return buffer.toString("utf8"); - } - - function writeFile(fileName: string, data: string, writeByteOrderMark?: boolean): void { - // If a BOM is required, emit one - if (writeByteOrderMark) { - data = '\uFEFF' + data; - } - - _fs.writeFileSync(fileName, data, "utf8"); - } - - return { - args: process.argv.slice(2), - newLine: _os.EOL, - useCaseSensitiveFileNames: useCaseSensitiveFileNames, - write(s: string): void { - // 1 is a standard descriptor for stdout - _fs.writeSync(1, s); - }, - readFile, - writeFile, - watchFile: (fileName, callback) => { - // watchFile polls a file every 250ms, picking up file notifications. - _fs.watchFile(fileName, { persistent: true, interval: 250 }, fileChanged); - - return { - close() { _fs.unwatchFile(fileName, fileChanged); } - }; - - function fileChanged(curr: any, prev: any) { - if (+curr.mtime <= +prev.mtime) { - return; + function writeFile(fileName: string, data: string, writeByteOrderMark?: boolean): void { + fileStream.Open(); + binaryStream.Open(); + try { + // Write characters in UTF-8 encoding + fileStream.Charset = "utf-8"; + fileStream.WriteText(data); + // If we don't want the BOM, then skip it by setting the starting location to 3 (size of BOM). + // If not, start from position 0, as the BOM will be added automatically when charset==utf8. + if (writeByteOrderMark) { + fileStream.Position = 0; } - - callback(fileName); - }; - }, - resolvePath: function (path: string): string { - return _path.resolve(path); - }, - fileExists(path: string): boolean { - return _fs.existsSync(path); - }, - directoryExists(path: string) { - return _fs.existsSync(path) && _fs.statSync(path).isDirectory(); - }, - createDirectory(directoryName: string) { - if (!this.directoryExists(directoryName)) { - _fs.mkdirSync(directoryName); + else { + fileStream.Position = 3; + } + fileStream.CopyTo(binaryStream); + binaryStream.SaveToFile(fileName, 2 /*overwrite*/); } - }, - getExecutingFilePath() { - return __filename; - }, - getCurrentDirectory() { - return process.cwd(); - }, - getMemoryUsage() { - if (global.gc) { - global.gc(); + finally { + binaryStream.Close(); + fileStream.Close(); } - return process.memoryUsage().heapUsed; - }, - exit(exitCode?: number): void { - process.exit(exitCode); } - }; - } - if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") { - return getWScriptSystem(); - } - else if (typeof module !== "undefined" && module.exports) { - return getNodeSystem(); - } - else { - return undefined; // Unsupported host - } -})(); + + return { + args, + newLine: "\r\n", + useCaseSensitiveFileNames: false, + write(s: string): void { + WScript.StdOut.Write(s); + }, + readFile, + writeFile, + resolvePath(path: string): string { + return fso.GetAbsolutePathName(path); + }, + fileExists(path: string): boolean { + return fso.FileExists(path); + }, + directoryExists(path: string) { + return fso.FolderExists(path); + }, + createDirectory(directoryName: string) { + if (!this.directoryExists(directoryName)) { + fso.CreateFolder(directoryName); + } + }, + getExecutingFilePath() { + return WScript.ScriptFullName; + }, + getCurrentDirectory() { + return new ActiveXObject("WScript.Shell").CurrentDirectory; + }, + exit(exitCode?: number): void { + try { + WScript.Quit(exitCode); + } + catch (e) { + } + } + }; + } + function getNodeSystem(): System { + var _fs = require("fs"); + var _path = require("path"); + var _os = require('os'); + + var platform: string = _os.platform(); + // win32\win64 are case insensitive platforms, MacOS (darwin) by default is also case insensitive + var useCaseSensitiveFileNames = platform !== "win32" && platform !== "win64" && platform !== "darwin"; + + function readFile(fileName: string, encoding?: string): string { + if (!_fs.existsSync(fileName)) { + return undefined; + } + var buffer = _fs.readFileSync(fileName); + var len = buffer.length; + if (len >= 2 && buffer[0] === 0xFE && buffer[1] === 0xFF) { + // Big endian UTF-16 byte order mark detected. Since big endian is not supported by node.js, + // flip all byte pairs and treat as little endian. + len &= ~1; + for (var i = 0; i < len; i += 2) { + var temp = buffer[i]; + buffer[i] = buffer[i + 1]; + buffer[i + 1] = temp; + } + return buffer.toString("utf16le", 2); + } + if (len >= 2 && buffer[0] === 0xFF && buffer[1] === 0xFE) { + // Little endian UTF-16 byte order mark detected + return buffer.toString("utf16le", 2); + } + if (len >= 3 && buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) { + // UTF-8 byte order mark detected + return buffer.toString("utf8", 3); + } + // Default is UTF-8 with no byte order mark + return buffer.toString("utf8"); + } + + function writeFile(fileName: string, data: string, writeByteOrderMark?: boolean): void { + // If a BOM is required, emit one + if (writeByteOrderMark) { + data = '\uFEFF' + data; + } + + _fs.writeFileSync(fileName, data, "utf8"); + } + + return { + args: process.argv.slice(2), + newLine: _os.EOL, + useCaseSensitiveFileNames: useCaseSensitiveFileNames, + write(s: string): void { + // 1 is a standard descriptor for stdout + _fs.writeSync(1, s); + }, + readFile, + writeFile, + watchFile: (fileName, callback) => { + // watchFile polls a file every 250ms, picking up file notifications. + _fs.watchFile(fileName, { persistent: true, interval: 250 }, fileChanged); + + return { + close() { _fs.unwatchFile(fileName, fileChanged); } + }; + + function fileChanged(curr: any, prev: any) { + if (+curr.mtime <= +prev.mtime) { + return; + } + + callback(fileName); + }; + }, + resolvePath: function (path: string): string { + return _path.resolve(path); + }, + fileExists(path: string): boolean { + return _fs.existsSync(path); + }, + directoryExists(path: string) { + return _fs.existsSync(path) && _fs.statSync(path).isDirectory(); + }, + createDirectory(directoryName: string) { + if (!this.directoryExists(directoryName)) { + _fs.mkdirSync(directoryName); + } + }, + getExecutingFilePath() { + return __filename; + }, + getCurrentDirectory() { + return process.cwd(); + }, + getMemoryUsage() { + if (global.gc) { + global.gc(); + } + return process.memoryUsage().heapUsed; + }, + exit(exitCode?: number): void { + process.exit(exitCode); + } + }; + } + if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") { + return getWScriptSystem(); + } + else if (typeof module !== "undefined" && module.exports) { + return getNodeSystem(); + } + else { + return undefined; // Unsupported host + } + })(); +} \ No newline at end of file diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index bb031c0e902..54d80d31190 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -490,4 +490,4 @@ module ts { } } -ts.executeCommandLine(sys.args); +ts.executeCommandLine(ts.sys.args); diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 0114d213398..da13735872d 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -363,7 +363,7 @@ module FourSlash { this.formatCodeOptions = { IndentSize: 4, TabSize: 4, - NewLineCharacter: sys.newLine, + NewLineCharacter: ts.sys.newLine, ConvertTabsToSpaces: true, InsertSpaceAfterCommaDelimiter: true, InsertSpaceAfterSemicolonInForStatements: true, @@ -1747,9 +1747,9 @@ module FourSlash { } function jsonMismatchString() { - return sys.newLine + - "expected: '" + sys.newLine + JSON.stringify(expected, (k,v) => v, 2) + "'" + sys.newLine + - "actual: '" + sys.newLine + JSON.stringify(actual, (k, v) => v, 2) + "'"; + return ts.sys.newLine + + "expected: '" + ts.sys.newLine + JSON.stringify(expected, (k,v) => v, 2) + "'" + ts.sys.newLine + + "actual: '" + ts.sys.newLine + JSON.stringify(actual, (k, v) => v, 2) + "'"; } } @@ -2246,7 +2246,7 @@ module FourSlash { { unitName: fileName, content: content }], (fn, contents) => result = contents, ts.ScriptTarget.Latest, - sys.useCaseSensitiveFileNames); + ts.sys.useCaseSensitiveFileNames); // TODO (drosen): We need to enforce checking on these tests. var program = ts.createProgram([Harness.Compiler.fourslashFilename, fileName], { out: "fourslashTestOutput.js", noResolve: true }, host); var checker = ts.createTypeChecker(program, /*fullTypeCheckMode*/ true); diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 585d0191d85..80bc62556a9 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -22,6 +22,9 @@ /// /// +declare var require: any; +declare var process: any; + // this will work in the browser via browserify var _chai: typeof chai = require('chai'); var assert: typeof _chai.assert = _chai.assert; @@ -41,7 +44,7 @@ module Utils { export function getExecutionEnvironment() { if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") { return ExecutionEnvironment.CScript; - } else if (process && (process).execPath && (process).execPath.indexOf("node") !== -1) { + } else if (process && process.execPath && process.execPath.indexOf("node") !== -1) { return ExecutionEnvironment.Node; } else { return ExecutionEnvironment.Browser; @@ -93,7 +96,7 @@ module Utils { } try { - var content = sys.readFile(Harness.userSpecifiedroot + path); + var content = ts.sys.readFile(Harness.userSpecifiedroot + path); } catch (err) { return undefined; @@ -217,8 +220,8 @@ module Harness { fso = {}; } - export var readFile: typeof IO.readFile = sys.readFile; - export var writeFile: typeof IO.writeFile = sys.writeFile; + export var readFile: typeof IO.readFile = ts.sys.readFile; + export var writeFile: typeof IO.writeFile = ts.sys.writeFile; export var directoryName: typeof IO.directoryName = fso.GetParentFolderName; export var directoryExists: typeof IO.directoryExists = fso.FolderExists; export var fileExists: typeof IO.fileExists = fso.FileExists; @@ -279,8 +282,8 @@ module Harness { fs = pathModule = {}; } - export var readFile: typeof IO.readFile = sys.readFile; - export var writeFile: typeof IO.writeFile = sys.writeFile; + export var readFile: typeof IO.readFile = ts.sys.readFile; + export var writeFile: typeof IO.writeFile = ts.sys.writeFile; export var fileExists: typeof IO.fileExists = fs.existsSync; export var log: typeof IO.log = console.log; @@ -608,7 +611,7 @@ module Harness { export var fourslashSourceFile: ts.SourceFile; export function getCanonicalFileName(fileName: string): string { - return sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase(); + return ts.sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase(); } export function createCompilerHost(inputFiles: { unitName: string; content: string; }[], @@ -632,7 +635,7 @@ module Harness { inputFiles.forEach(register); return { - getCurrentDirectory: sys.getCurrentDirectory, + getCurrentDirectory: ts.sys.getCurrentDirectory, getCancellationToken: (): any => undefined, getSourceFile: (fn, languageVersion) => { if (Object.prototype.hasOwnProperty.call(filemap, getCanonicalFileName(fn))) { @@ -655,7 +658,7 @@ module Harness { writeFile, getCanonicalFileName, useCaseSensitiveFileNames: () => useCaseSensitiveFileNames, - getNewLine: ()=> sys.newLine + getNewLine: ()=> ts.sys.newLine }; } @@ -725,7 +728,7 @@ module Harness { settingsCallback(null); } - var useCaseSensitiveFileNames = sys.useCaseSensitiveFileNames; + var useCaseSensitiveFileNames = ts.sys.useCaseSensitiveFileNames; this.settings.forEach(setting => { switch (setting.flag.toLowerCase()) { // "filename", "comments", "declaration", "module", "nolib", "sourcemap", "target", "out", "outdir", "noimplicitany", "noresolve" @@ -803,7 +806,7 @@ module Harness { case 'newline': case 'newlines': - sys.newLine = setting.value; + ts.sys.newLine = setting.value; break; case 'comments': @@ -878,11 +881,11 @@ module Harness { }); this.lastErrors = errors; - var result = new CompilerResult(fileOutputs, errors, program, sys.getCurrentDirectory(), emitResult ? emitResult.sourceMaps : undefined); + var result = new CompilerResult(fileOutputs, errors, program, ts.sys.getCurrentDirectory(), emitResult ? emitResult.sourceMaps : undefined); onComplete(result, checker); // reset what newline means in case the last test changed it - sys.newLine = '\r\n'; + ts.sys.newLine = '\r\n'; return options; } @@ -977,7 +980,7 @@ module Harness { errorOutput += diagnotic.filename + "(" + diagnotic.line + "," + diagnotic.character + "): "; } - errorOutput += diagnotic.category + " TS" + diagnotic.code + ": " + diagnotic.message + sys.newLine; + errorOutput += diagnotic.category + " TS" + diagnotic.code + ": " + diagnotic.message + ts.sys.newLine; }); return errorOutput; @@ -1079,7 +1082,7 @@ module Harness { assert.equal(totalErrorsReported + numLibraryDiagnostics, diagnostics.length, 'total number of errors'); return minimalDiagnosticsToString(diagnostics) + - sys.newLine + sys.newLine + outputLines.join('\r\n'); + ts.sys.newLine + ts.sys.newLine + outputLines.join('\r\n'); } export function collateOutputs(outputFiles: Harness.Compiler.GeneratedFile[], clean?: (s: string) => string) { diff --git a/src/harness/projectsRunner.ts b/src/harness/projectsRunner.ts index fc841aa3e3c..81791c099d3 100644 --- a/src/harness/projectsRunner.ts +++ b/src/harness/projectsRunner.ts @@ -60,7 +60,7 @@ class ProjectRunner extends RunnerBase { var testCase: ProjectRunnerTestCase; try { - var testFileText = sys.readFile(testCaseFileName); + var testFileText = ts.sys.readFile(testCaseFileName); } catch (e) { assert(false, "Unable to open testcase file: " + testCaseFileName + ": " + e.message); @@ -96,7 +96,7 @@ class ProjectRunner extends RunnerBase { } function cleanProjectUrl(url: string) { - var diskProjectPath = ts.normalizeSlashes(sys.resolvePath(testCase.projectRoot)); + var diskProjectPath = ts.normalizeSlashes(ts.sys.resolvePath(testCase.projectRoot)); var projectRootUrl = "file:///" + diskProjectPath; var normalizedProjectRoot = ts.normalizeSlashes(testCase.projectRoot); diskProjectPath = diskProjectPath.substr(0, diskProjectPath.lastIndexOf(normalizedProjectRoot)); @@ -119,7 +119,7 @@ class ProjectRunner extends RunnerBase { } function getCurrentDirectory() { - return sys.resolvePath(testCase.projectRoot); + return ts.sys.resolvePath(testCase.projectRoot); } function compileProjectFiles(moduleKind: ts.ModuleKind, getInputFiles: ()=> string[], @@ -161,8 +161,8 @@ class ProjectRunner extends RunnerBase { sourceMap: !!testCase.sourceMap, out: testCase.out, outDir: testCase.outDir, - mapRoot: testCase.resolveMapRoot && testCase.mapRoot ? sys.resolvePath(testCase.mapRoot) : testCase.mapRoot, - sourceRoot: testCase.resolveSourceRoot && testCase.sourceRoot ? sys.resolvePath(testCase.sourceRoot) : testCase.sourceRoot, + mapRoot: testCase.resolveMapRoot && testCase.mapRoot ? ts.sys.resolvePath(testCase.mapRoot) : testCase.mapRoot, + sourceRoot: testCase.resolveSourceRoot && testCase.sourceRoot ? ts.sys.resolvePath(testCase.sourceRoot) : testCase.sourceRoot, module: moduleKind, noResolve: testCase.noResolve }; @@ -190,8 +190,8 @@ class ProjectRunner extends RunnerBase { writeFile, getCurrentDirectory, getCanonicalFileName: Harness.Compiler.getCanonicalFileName, - useCaseSensitiveFileNames: () => sys.useCaseSensitiveFileNames, - getNewLine: () => sys.newLine + useCaseSensitiveFileNames: () => ts.sys.useCaseSensitiveFileNames, + getNewLine: () => ts.sys.newLine }; } } @@ -213,7 +213,7 @@ class ProjectRunner extends RunnerBase { function getSourceFileText(filename: string): string { try { - var text = sys.readFile(ts.isRootedDiskPath(filename) + var text = ts.sys.readFile(ts.isRootedDiskPath(filename) ? filename : ts.normalizeSlashes(testCase.projectRoot) + "/" + ts.normalizeSlashes(filename)); } @@ -260,14 +260,14 @@ class ProjectRunner extends RunnerBase { // Actual writing of file as in tc.ts function ensureDirectoryStructure(directoryname: string) { if (directoryname) { - if (!sys.directoryExists(directoryname)) { + if (!ts.sys.directoryExists(directoryname)) { ensureDirectoryStructure(ts.getDirectoryPath(directoryname)); - sys.createDirectory(directoryname); + ts.sys.createDirectory(directoryname); } } } ensureDirectoryStructure(ts.getDirectoryPath(ts.normalizePath(outputFilePath))); - sys.writeFile(outputFilePath, data, writeByteOrderMark); + ts.sys.writeFile(outputFilePath, data, writeByteOrderMark); outputFiles.push({ emittedFileName: filename, code: data, fileName: diskRelativeName, writeByteOrderMark: writeByteOrderMark }); } @@ -374,7 +374,7 @@ class ProjectRunner extends RunnerBase { it('Baseline of emitted result (' + moduleNameToString(compilerResult.moduleKind) + '): ' + testCaseFileName, () => { Harness.Baseline.runBaseline('Baseline of emitted result (' + moduleNameToString(compilerResult.moduleKind) + '): ' + testCaseFileName, getBaselineFolder(compilerResult.moduleKind) + outputFile.fileName, () => { try { - return sys.readFile(getProjectOutputFolder(outputFile.fileName, compilerResult.moduleKind)); + return ts.sys.readFile(getProjectOutputFolder(outputFile.fileName, compilerResult.moduleKind)); } catch (e) { return undefined; diff --git a/src/harness/runner.ts b/src/harness/runner.ts index da37c02e224..24349ada3fd 100644 --- a/src/harness/runner.ts +++ b/src/harness/runner.ts @@ -94,6 +94,6 @@ if (runners.length === 0) { //runners.push(new GeneratedFourslashRunner()); } -sys.newLine = '\r\n'; +ts.sys.newLine = '\r\n'; runTests(runners); diff --git a/src/harness/rwcRunner.ts b/src/harness/rwcRunner.ts index b8bc2a80a52..8d22b1da1d8 100644 --- a/src/harness/rwcRunner.ts +++ b/src/harness/rwcRunner.ts @@ -6,17 +6,17 @@ module RWC { function runWithIOLog(ioLog: IOLog, fn: () => void) { - var oldSys = sys; + var oldSys = ts.sys; - var wrappedSys = Playback.wrapSystem(sys); + var wrappedSys = Playback.wrapSystem(ts.sys); wrappedSys.startReplayFromData(ioLog); - sys = wrappedSys; + ts.sys = wrappedSys; try { fn(); } finally { wrappedSys.endReplay(); - sys = oldSys; + ts.sys = oldSys; } } @@ -74,7 +74,7 @@ module RWC { } ts.forEach(ioLog.filesRead, fileRead => { - var resolvedPath = ts.normalizeSlashes(sys.resolvePath(fileRead.path)); + var resolvedPath = ts.normalizeSlashes(ts.sys.resolvePath(fileRead.path)); var inInputList = ts.forEach(inputFiles, inputFile=> inputFile.unitName === resolvedPath); if (!inInputList) { // Add the file to other files @@ -92,9 +92,9 @@ module RWC { }); function getHarnessCompilerInputUnit(fileName: string) { - var unitName = ts.normalizeSlashes(sys.resolvePath(fileName)); + var unitName = ts.normalizeSlashes(ts.sys.resolvePath(fileName)); try { - var content = sys.readFile(unitName); + var content = ts.sys.readFile(unitName); } catch (e) { // Leave content undefined. @@ -160,7 +160,7 @@ module RWC { } return Harness.Compiler.minimalDiagnosticsToString(declFileCompilationResult.declResult.errors) + - sys.newLine + sys.newLine + + ts.sys.newLine + ts.sys.newLine + Harness.Compiler.getErrorBaseline(declFileCompilationResult.declInputFiles.concat(declFileCompilationResult.declOtherFiles), declFileCompilationResult.declResult.errors); }, false, baselineOpts); } From 606ee84fd1c6dcecc00921c6e007dd812edbdbb6 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Sat, 6 Dec 2014 09:10:16 -0800 Subject: [PATCH 108/141] move text defintions to services.ts --- src/services/formatting/references.ts | 1 - src/services/services.ts | 296 +++++++++++++++++++++++++- src/services/text.ts | 296 -------------------------- 3 files changed, 295 insertions(+), 298 deletions(-) delete mode 100644 src/services/text.ts diff --git a/src/services/formatting/references.ts b/src/services/formatting/references.ts index 9f4b7e37436..3d19b33d821 100644 --- a/src/services/formatting/references.ts +++ b/src/services/formatting/references.ts @@ -13,7 +13,6 @@ // limitations under the License. // -/// /// /// /// diff --git a/src/services/services.ts b/src/services/services.ts index 74e7f924a20..66269f8655a 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -4,7 +4,6 @@ /// /// -/// /// /// /// @@ -952,6 +951,301 @@ module ts { dispose(): void; } + export class TextSpan { + private _start: number; + private _length: number; + + /** + * Creates a TextSpan instance beginning with the position Start and having the Length + * specified with length. + */ + constructor(start: number, length: number) { + Debug.assert(start >= 0, "start"); + Debug.assert(length >= 0, "length"); + + this._start = start; + this._length = length; + } + + public toJSON(key: any): any { + return { start: this._start, length: this._length }; + } + + public start(): number { + return this._start; + } + + public length(): number { + return this._length; + } + + public end(): number { + return this._start + this._length; + } + + public isEmpty(): boolean { + return this._length === 0; + } + + /** + * Determines whether the position lies within the span. Returns true if the position is greater than or equal to Start and strictly less + * than End, otherwise false. + * @param position The position to check. + */ + public containsPosition(position: number): boolean { + return position >= this._start && position < this.end(); + } + + /** + * Determines whether span falls completely within this span. Returns true if the specified span falls completely within this span, otherwise false. + * @param span The span to check. + */ + public containsTextSpan(span: TextSpan): boolean { + return span._start >= this._start && span.end() <= this.end(); + } + + /** + * Determines whether the given span overlaps this span. Two spans are considered to overlap + * if they have positions in common and neither is empty. Empty spans do not overlap with any + * other span. Returns true if the spans overlap, false otherwise. + * @param span The span to check. + */ + public overlapsWith(span: TextSpan): boolean { + var overlapStart = Math.max(this._start, span._start); + var overlapEnd = Math.min(this.end(), span.end()); + + return overlapStart < overlapEnd; + } + + /** + * Returns the overlap with the given span, or undefined if there is no overlap. + * @param span The span to check. + */ + public overlap(span: TextSpan): TextSpan { + var overlapStart = Math.max(this._start, span._start); + var overlapEnd = Math.min(this.end(), span.end()); + + if (overlapStart < overlapEnd) { + return TextSpan.fromBounds(overlapStart, overlapEnd); + } + + return undefined; + } + + /** + * Determines whether span intersects this span. Two spans are considered to + * intersect if they have positions in common or the end of one span + * coincides with the start of the other span. Returns true if the spans intersect, false otherwise. + * @param The span to check. + */ + public intersectsWithTextSpan(span: TextSpan): boolean { + return span._start <= this.end() && span.end() >= this._start; + } + + public intersectsWith(start: number, length: number): boolean { + var end = start + length; + return start <= this.end() && end >= this._start; + } + + /** + * Determines whether the given position intersects this span. + * A position is considered to intersect if it is between the start and + * end positions (inclusive) of this span. Returns true if the position intersects, false otherwise. + * @param position The position to check. + */ + public intersectsWithPosition(position: number): boolean { + return position <= this.end() && position >= this._start; + } + + /** + * Returns the intersection with the given span, or undefined if there is no intersection. + * @param span The span to check. + */ + public intersection(span: TextSpan): TextSpan { + var intersectStart = Math.max(this._start, span._start); + var intersectEnd = Math.min(this.end(), span.end()); + + if (intersectStart <= intersectEnd) { + return TextSpan.fromBounds(intersectStart, intersectEnd); + } + + return undefined; + } + + /** + * Creates a new TextSpan from the given start and end positions + * as opposed to a position and length. + */ + public static fromBounds(start: number, end: number): TextSpan { + Debug.assert(start >= 0); + Debug.assert(end - start >= 0); + return new TextSpan(start, end - start); + } + } + + export class TextChangeRange { + public static unchanged = new TextChangeRange(new TextSpan(0, 0), 0); + + private _span: TextSpan; + private _newLength: number; + + /** + * Initializes a new instance of TextChangeRange. + */ + constructor(span: TextSpan, newLength: number) { + Debug.assert(newLength >= 0, "newLength"); + + this._span = span; + this._newLength = newLength; + } + + /** + * The span of text before the edit which is being changed + */ + public span(): TextSpan { + return this._span; + } + + /** + * Width of the span after the edit. A 0 here would represent a delete + */ + public newLength(): number { + return this._newLength; + } + + public newSpan(): TextSpan { + return new TextSpan(this.span().start(), this.newLength()); + } + + public isUnchanged(): boolean { + return this.span().isEmpty() && this.newLength() === 0; + } + + /** + * Called to merge all the changes that occurred across several versions of a script snapshot + * into a single change. i.e. if a user keeps making successive edits to a script we will + * have a text change from V1 to V2, V2 to V3, ..., Vn. + * + * This function will then merge those changes into a single change range valid between V1 and + * Vn. + */ + public static collapseChangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange { + if (changes.length === 0) { + return TextChangeRange.unchanged; + } + + if (changes.length === 1) { + return changes[0]; + } + + // We change from talking about { { oldStart, oldLength }, newLength } to { oldStart, oldEnd, newEnd } + // as it makes things much easier to reason about. + var change0 = changes[0]; + + var oldStartN = change0.span().start(); + var oldEndN = change0.span().end(); + var newEndN = oldStartN + change0.newLength(); + + for (var i = 1; i < changes.length; i++) { + var nextChange = changes[i]; + + // Consider the following case: + // i.e. two edits. The first represents the text change range { { 10, 50 }, 30 }. i.e. The span starting + // at 10, with length 50 is reduced to length 30. The second represents the text change range { { 30, 30 }, 40 }. + // i.e. the span starting at 30 with length 30 is increased to length 40. + // + // 0 10 20 30 40 50 60 70 80 90 100 + // ------------------------------------------------------------------------------------------------------- + // | / + // | /---- + // T1 | /---- + // | /---- + // | /---- + // ------------------------------------------------------------------------------------------------------- + // | \ + // | \ + // T2 | \ + // | \ + // | \ + // ------------------------------------------------------------------------------------------------------- + // + // Merging these turns out to not be too difficult. First, determining the new start of the change is trivial + // it's just the min of the old and new starts. i.e.: + // + // 0 10 20 30 40 50 60 70 80 90 100 + // ------------------------------------------------------------*------------------------------------------ + // | / + // | /---- + // T1 | /---- + // | /---- + // | /---- + // ----------------------------------------$-------------------$------------------------------------------ + // . | \ + // . | \ + // T2 . | \ + // . | \ + // . | \ + // ----------------------------------------------------------------------*-------------------------------- + // + // (Note the dots represent the newly inferrred start. + // Determining the new and old end is also pretty simple. Basically it boils down to paying attention to the + // absolute positions at the asterixes, and the relative change between the dollar signs. Basically, we see + // which if the two $'s precedes the other, and we move that one forward until they line up. in this case that + // means: + // + // 0 10 20 30 40 50 60 70 80 90 100 + // --------------------------------------------------------------------------------*---------------------- + // | / + // | /---- + // T1 | /---- + // | /---- + // | /---- + // ------------------------------------------------------------$------------------------------------------ + // . | \ + // . | \ + // T2 . | \ + // . | \ + // . | \ + // ----------------------------------------------------------------------*-------------------------------- + // + // In other words (in this case), we're recognizing that the second edit happened after where the first edit + // ended with a delta of 20 characters (60 - 40). Thus, if we go back in time to where the first edit started + // that's the same as if we started at char 80 instead of 60. + // + // As it so happens, the same logic applies if the second edit precedes the first edit. In that case rahter + // than pusing the first edit forward to match the second, we'll push the second edit forward to match the + // first. + // + // In this case that means we have { oldStart: 10, oldEnd: 80, newEnd: 70 } or, in TextChangeRange + // semantics: { { start: 10, length: 70 }, newLength: 60 } + // + // The math then works out as follows. + // If we have { oldStart1, oldEnd1, newEnd1 } and { oldStart2, oldEnd2, newEnd2 } then we can compute the + // final result like so: + // + // { + // oldStart3: Min(oldStart1, oldStart2), + // oldEnd3 : Max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1)), + // newEnd3 : Max(newEnd2, newEnd2 + (newEnd1 - oldEnd2)) + // } + + var oldStart1 = oldStartN; + var oldEnd1 = oldEndN; + var newEnd1 = newEndN; + + var oldStart2 = nextChange.span().start(); + var oldEnd2 = nextChange.span().end(); + var newEnd2 = oldStart2 + nextChange.newLength(); + + oldStartN = Math.min(oldStart1, oldStart2); + oldEndN = Math.max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1)); + newEndN = Math.max(newEnd2, newEnd2 + (newEnd1 - oldEnd2)); + } + + return new TextChangeRange(TextSpan.fromBounds(oldStartN, oldEndN), /*newLength: */newEndN - oldStartN); + } + } + export interface ClassifiedSpan { textSpan: TextSpan; classificationType: string; // ClassificationTypeNames diff --git a/src/services/text.ts b/src/services/text.ts deleted file mode 100644 index fd768785dea..00000000000 --- a/src/services/text.ts +++ /dev/null @@ -1,296 +0,0 @@ -module ts { - export class TextSpan { - private _start: number; - private _length: number; - - /** - * Creates a TextSpan instance beginning with the position Start and having the Length - * specified with length. - */ - constructor(start: number, length: number) { - Debug.assert(start >= 0, "start"); - Debug.assert(length >= 0, "length"); - - this._start = start; - this._length = length; - } - - public toJSON(key: any): any { - return { start: this._start, length: this._length }; - } - - public start(): number { - return this._start; - } - - public length(): number { - return this._length; - } - - public end(): number { - return this._start + this._length; - } - - public isEmpty(): boolean { - return this._length === 0; - } - - /** - * Determines whether the position lies within the span. Returns true if the position is greater than or equal to Start and strictly less - * than End, otherwise false. - * @param position The position to check. - */ - public containsPosition(position: number): boolean { - return position >= this._start && position < this.end(); - } - - /** - * Determines whether span falls completely within this span. Returns true if the specified span falls completely within this span, otherwise false. - * @param span The span to check. - */ - public containsTextSpan(span: TextSpan): boolean { - return span._start >= this._start && span.end() <= this.end(); - } - - /** - * Determines whether the given span overlaps this span. Two spans are considered to overlap - * if they have positions in common and neither is empty. Empty spans do not overlap with any - * other span. Returns true if the spans overlap, false otherwise. - * @param span The span to check. - */ - public overlapsWith(span: TextSpan): boolean { - var overlapStart = Math.max(this._start, span._start); - var overlapEnd = Math.min(this.end(), span.end()); - - return overlapStart < overlapEnd; - } - - /** - * Returns the overlap with the given span, or undefined if there is no overlap. - * @param span The span to check. - */ - public overlap(span: TextSpan): TextSpan { - var overlapStart = Math.max(this._start, span._start); - var overlapEnd = Math.min(this.end(), span.end()); - - if (overlapStart < overlapEnd) { - return TextSpan.fromBounds(overlapStart, overlapEnd); - } - - return undefined; - } - - /** - * Determines whether span intersects this span. Two spans are considered to - * intersect if they have positions in common or the end of one span - * coincides with the start of the other span. Returns true if the spans intersect, false otherwise. - * @param The span to check. - */ - public intersectsWithTextSpan(span: TextSpan): boolean { - return span._start <= this.end() && span.end() >= this._start; - } - - public intersectsWith(start: number, length: number): boolean { - var end = start + length; - return start <= this.end() && end >= this._start; - } - - /** - * Determines whether the given position intersects this span. - * A position is considered to intersect if it is between the start and - * end positions (inclusive) of this span. Returns true if the position intersects, false otherwise. - * @param position The position to check. - */ - public intersectsWithPosition(position: number): boolean { - return position <= this.end() && position >= this._start; - } - - /** - * Returns the intersection with the given span, or undefined if there is no intersection. - * @param span The span to check. - */ - public intersection(span: TextSpan): TextSpan { - var intersectStart = Math.max(this._start, span._start); - var intersectEnd = Math.min(this.end(), span.end()); - - if (intersectStart <= intersectEnd) { - return TextSpan.fromBounds(intersectStart, intersectEnd); - } - - return undefined; - } - - /** - * Creates a new TextSpan from the given start and end positions - * as opposed to a position and length. - */ - public static fromBounds(start: number, end: number): TextSpan { - Debug.assert(start >= 0); - Debug.assert(end - start >= 0); - return new TextSpan(start, end - start); - } - } - - export class TextChangeRange { - public static unchanged = new TextChangeRange(new TextSpan(0, 0), 0); - - private _span: TextSpan; - private _newLength: number; - - /** - * Initializes a new instance of TextChangeRange. - */ - constructor(span: TextSpan, newLength: number) { - Debug.assert(newLength >= 0, "newLength"); - - this._span = span; - this._newLength = newLength; - } - - /** - * The span of text before the edit which is being changed - */ - public span(): TextSpan { - return this._span; - } - - /** - * Width of the span after the edit. A 0 here would represent a delete - */ - public newLength(): number { - return this._newLength; - } - - public newSpan(): TextSpan { - return new TextSpan(this.span().start(), this.newLength()); - } - - public isUnchanged(): boolean { - return this.span().isEmpty() && this.newLength() === 0; - } - - /** - * Called to merge all the changes that occurred across several versions of a script snapshot - * into a single change. i.e. if a user keeps making successive edits to a script we will - * have a text change from V1 to V2, V2 to V3, ..., Vn. - * - * This function will then merge those changes into a single change range valid between V1 and - * Vn. - */ - public static collapseChangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange { - if (changes.length === 0) { - return TextChangeRange.unchanged; - } - - if (changes.length === 1) { - return changes[0]; - } - - // We change from talking about { { oldStart, oldLength }, newLength } to { oldStart, oldEnd, newEnd } - // as it makes things much easier to reason about. - var change0 = changes[0]; - - var oldStartN = change0.span().start(); - var oldEndN = change0.span().end(); - var newEndN = oldStartN + change0.newLength(); - - for (var i = 1; i < changes.length; i++) { - var nextChange = changes[i]; - - // Consider the following case: - // i.e. two edits. The first represents the text change range { { 10, 50 }, 30 }. i.e. The span starting - // at 10, with length 50 is reduced to length 30. The second represents the text change range { { 30, 30 }, 40 }. - // i.e. the span starting at 30 with length 30 is increased to length 40. - // - // 0 10 20 30 40 50 60 70 80 90 100 - // ------------------------------------------------------------------------------------------------------- - // | / - // | /---- - // T1 | /---- - // | /---- - // | /---- - // ------------------------------------------------------------------------------------------------------- - // | \ - // | \ - // T2 | \ - // | \ - // | \ - // ------------------------------------------------------------------------------------------------------- - // - // Merging these turns out to not be too difficult. First, determining the new start of the change is trivial - // it's just the min of the old and new starts. i.e.: - // - // 0 10 20 30 40 50 60 70 80 90 100 - // ------------------------------------------------------------*------------------------------------------ - // | / - // | /---- - // T1 | /---- - // | /---- - // | /---- - // ----------------------------------------$-------------------$------------------------------------------ - // . | \ - // . | \ - // T2 . | \ - // . | \ - // . | \ - // ----------------------------------------------------------------------*-------------------------------- - // - // (Note the dots represent the newly inferrred start. - // Determining the new and old end is also pretty simple. Basically it boils down to paying attention to the - // absolute positions at the asterixes, and the relative change between the dollar signs. Basically, we see - // which if the two $'s precedes the other, and we move that one forward until they line up. in this case that - // means: - // - // 0 10 20 30 40 50 60 70 80 90 100 - // --------------------------------------------------------------------------------*---------------------- - // | / - // | /---- - // T1 | /---- - // | /---- - // | /---- - // ------------------------------------------------------------$------------------------------------------ - // . | \ - // . | \ - // T2 . | \ - // . | \ - // . | \ - // ----------------------------------------------------------------------*-------------------------------- - // - // In other words (in this case), we're recognizing that the second edit happened after where the first edit - // ended with a delta of 20 characters (60 - 40). Thus, if we go back in time to where the first edit started - // that's the same as if we started at char 80 instead of 60. - // - // As it so happens, the same logic applies if the second edit precedes the first edit. In that case rahter - // than pusing the first edit forward to match the second, we'll push the second edit forward to match the - // first. - // - // In this case that means we have { oldStart: 10, oldEnd: 80, newEnd: 70 } or, in TextChangeRange - // semantics: { { start: 10, length: 70 }, newLength: 60 } - // - // The math then works out as follows. - // If we have { oldStart1, oldEnd1, newEnd1 } and { oldStart2, oldEnd2, newEnd2 } then we can compute the - // final result like so: - // - // { - // oldStart3: Min(oldStart1, oldStart2), - // oldEnd3 : Max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1)), - // newEnd3 : Max(newEnd2, newEnd2 + (newEnd1 - oldEnd2)) - // } - - var oldStart1 = oldStartN; - var oldEnd1 = oldEndN; - var newEnd1 = newEndN; - - var oldStart2 = nextChange.span().start(); - var oldEnd2 = nextChange.span().end(); - var newEnd2 = oldStart2 + nextChange.newLength(); - - oldStartN = Math.min(oldStart1, oldStart2); - oldEndN = Math.max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1)); - newEndN = Math.max(newEnd2, newEnd2 + (newEnd1 - oldEnd2)); - } - - return new TextChangeRange(TextSpan.fromBounds(oldStartN, oldEndN), /*newLength: */newEndN - oldStartN); - } - } -} \ No newline at end of file From 841842b733f74989ca95723e20915704577d17a6 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Sun, 7 Dec 2014 20:55:37 -0800 Subject: [PATCH 109/141] use ts.System for tests --- src/harness/loggedIO.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/harness/loggedIO.ts b/src/harness/loggedIO.ts index c6305c50c10..c6d15c34a84 100644 --- a/src/harness/loggedIO.ts +++ b/src/harness/loggedIO.ts @@ -91,7 +91,7 @@ module Playback { return run; } - export interface PlaybackSystem extends System, PlaybackControl { } + export interface PlaybackSystem extends ts.System, PlaybackControl { } function createEmptyLog(): IOLog { return { @@ -221,7 +221,7 @@ module Playback { //console.log("Swallowed write operation during replay: " + name); } - export function wrapSystem(underlying: System): PlaybackSystem { + export function wrapSystem(underlying: ts.System): PlaybackSystem { var wrapper: PlaybackSystem = {}; initWrapper(wrapper, underlying); From eaa812e3b5648cbf978d58dcba01cfdc07b7650f Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Sun, 7 Dec 2014 21:22:22 -0800 Subject: [PATCH 110/141] Move Map to types to ensure it is visible in definition files --- src/compiler/core.ts | 4 ---- src/compiler/types.ts | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 0aa51622c08..6e0c307034b 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -15,10 +15,6 @@ module ts { True = -1 } - export interface Map { - [index: string]: T; - } - export const enum Comparison { LessThan = -1, EqualTo = 0, diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 8398387094a..96e644f8e1a 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1,6 +1,9 @@ /// module ts { + export interface Map { + [index: string]: T; + } export interface TextRange { pos: number; From 791ba336cca2d4e3c544a5f87824b5874821fbd5 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Sun, 7 Dec 2014 15:55:40 -0800 Subject: [PATCH 111/141] remove unused file --- src/services/findReferenceHelpers.ts | 152 --------------------------- 1 file changed, 152 deletions(-) delete mode 100644 src/services/findReferenceHelpers.ts diff --git a/src/services/findReferenceHelpers.ts b/src/services/findReferenceHelpers.ts deleted file mode 100644 index 68131a41115..00000000000 --- a/src/services/findReferenceHelpers.ts +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. -// See LICENSE.txt in the project root for complete license information. - -/// - -module TypeScript.Services { - export class FindReferenceHelpers { - public static compareSymbolsForLexicalIdentity(firstSymbol: TypeScript.PullSymbol, secondSymbol: TypeScript.PullSymbol): boolean { - // Unwrap modules so that we're always referring to the variable. - if (!firstSymbol.isAlias() && firstSymbol.isContainer()) { - var containerForFirstSymbol = (firstSymbol); - if (containerForFirstSymbol.getInstanceSymbol()) { - firstSymbol = containerForFirstSymbol.getInstanceSymbol(); - } - } - - if (!secondSymbol.isAlias() && secondSymbol.isContainer()) { - var containerForSecondSymbol = (secondSymbol); - if (containerForSecondSymbol.getInstanceSymbol()) { - secondSymbol = containerForSecondSymbol.getInstanceSymbol(); - } - } - - if (firstSymbol.kind === secondSymbol.kind) { - if (firstSymbol === secondSymbol) { - return true; - } - - // If we have two variables and they have the same name and the same parent, then - // they are the same symbol. - if (firstSymbol.kind === TypeScript.PullElementKind.Variable && - firstSymbol.name === secondSymbol.name && - firstSymbol.getDeclarations() && firstSymbol.getDeclarations().length >= 1 && - secondSymbol.getDeclarations() && secondSymbol.getDeclarations().length >= 1) { - - var firstSymbolDecl = firstSymbol.getDeclarations()[0]; - var secondSymbolDecl = secondSymbol.getDeclarations()[0]; - - return firstSymbolDecl.getParentDecl() === secondSymbolDecl.getParentDecl(); - } - - // If we have two properties that belong to an object literal, then we need ot see - // if they came from teh same object literal ast. - if (firstSymbol.kind === TypeScript.PullElementKind.Property && - firstSymbol.name === secondSymbol.name && - firstSymbol.getDeclarations() && firstSymbol.getDeclarations().length >= 1 && - secondSymbol.getDeclarations() && secondSymbol.getDeclarations().length >= 1) { - - var firstSymbolDecl = firstSymbol.getDeclarations()[0]; - var secondSymbolDecl = secondSymbol.getDeclarations()[0]; - - var firstParentDecl = firstSymbolDecl.getParentDecl(); - var secondParentDecl = secondSymbolDecl.getParentDecl(); - - if (firstParentDecl.kind === TypeScript.PullElementKind.ObjectLiteral && - secondParentDecl.kind === TypeScript.PullElementKind.ObjectLiteral) { - - return firstParentDecl.ast() === secondParentDecl.ast(); - } - } - - // check if we are dealing with the implementation of interface method or a method override - if (firstSymbol.name === secondSymbol.name) { - // at this point firstSymbol.kind === secondSymbol.kind so we can pick any of those - switch (firstSymbol.kind) { - case PullElementKind.Property: - case PullElementKind.Method: - case PullElementKind.GetAccessor: - case PullElementKind.SetAccessor: - // these kinds can only be defined in types - var t1 = firstSymbol.getContainer(); - var t2 = secondSymbol.getContainer(); - t1._resolveDeclaredSymbol(); - t2._resolveDeclaredSymbol(); - - return t1.hasBase(t2) || t2.hasBase(t1); - break; - } - } - - return false; - } - else { - switch (firstSymbol.kind) { - case TypeScript.PullElementKind.Class: { - return this.checkSymbolsForDeclarationEquality(firstSymbol, secondSymbol); - } - case TypeScript.PullElementKind.Property: { - if (firstSymbol.isAccessor()) { - var getterSymbol = (firstSymbol).getGetter(); - var setterSymbol = (firstSymbol).getSetter(); - - if (getterSymbol && getterSymbol === secondSymbol) { - return true; - } - - if (setterSymbol && setterSymbol === secondSymbol) { - return true; - } - } - return false; - } - case TypeScript.PullElementKind.Function: { - if (secondSymbol.isAccessor()) { - var getterSymbol = (secondSymbol).getGetter(); - var setterSymbol = (secondSymbol).getSetter(); - - if (getterSymbol && getterSymbol === firstSymbol) { - return true; - } - - if (setterSymbol && setterSymbol === firstSymbol) { - return true; - } - } - return false; - } - case TypeScript.PullElementKind.ConstructorMethod: { - return this.checkSymbolsForDeclarationEquality(firstSymbol, secondSymbol); - } - } - } - - return firstSymbol === secondSymbol; - } - - private static checkSymbolsForDeclarationEquality(firstSymbol: TypeScript.PullSymbol, secondSymbol: TypeScript.PullSymbol): boolean { - var firstSymbolDeclarations: TypeScript.PullDecl[] = firstSymbol.getDeclarations(); - var secondSymbolDeclarations: TypeScript.PullDecl[] = secondSymbol.getDeclarations(); - for (var i = 0, iLen = firstSymbolDeclarations.length; i < iLen; i++) { - for (var j = 0, jLen = secondSymbolDeclarations.length; j < jLen; j++) { - if (this.declarationsAreSameOrParents(firstSymbolDeclarations[i], secondSymbolDeclarations[j])) { - return true; - } - } - } - return false; - } - - private static declarationsAreSameOrParents(firstDecl: TypeScript.PullDecl, secondDecl: TypeScript.PullDecl): boolean { - var firstParent: TypeScript.PullDecl = firstDecl.getParentDecl(); - var secondParent: TypeScript.PullDecl = secondDecl.getParentDecl(); - if (firstDecl === secondDecl || - firstDecl === secondParent || - firstParent === secondDecl || - firstParent === secondParent) { - return true; - } - return false; - } - } -} \ No newline at end of file From b87a7fafaf5ea74f846cf5f0456149e13d97993a Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Sun, 7 Dec 2014 16:26:08 -0800 Subject: [PATCH 112/141] move formatting.ts and smartIndernter.ts into formatting folder to match thier namespace --- src/services/{ => formatting}/formatting.ts | 59 +++++++++++++++++-- src/services/formatting/formattingScanner.ts | 2 +- .../{ => formatting}/smartIndenter.ts | 2 +- src/services/services.ts | 6 +- 4 files changed, 60 insertions(+), 9 deletions(-) rename src/services/{ => formatting}/formatting.ts (93%) rename src/services/{ => formatting}/smartIndenter.ts (97%) diff --git a/src/services/formatting.ts b/src/services/formatting/formatting.ts similarity index 93% rename from src/services/formatting.ts rename to src/services/formatting/formatting.ts index 48d3c80445c..f0252a254c3 100644 --- a/src/services/formatting.ts +++ b/src/services/formatting/formatting.ts @@ -1,7 +1,6 @@ -/// -/// -/// -/// +/// +/// +/// module ts.formatting { @@ -991,4 +990,56 @@ module ts.formatting { return SyntaxKind.Unknown; } + + var internedTabsIndentation: string[]; + var internedSpacesIndentation: string[]; + + export function getIndentationString(indentation: number, options: FormatCodeOptions): string { + if (!options.ConvertTabsToSpaces) { + var tabs = Math.floor(indentation / options.TabSize); + var spaces = indentation - tabs * options.TabSize; + + var tabString: string; + if (!internedTabsIndentation) { + internedTabsIndentation = []; + } + + if (internedTabsIndentation[tabs] === undefined) { + internedTabsIndentation[tabs] = tabString = repeat('\t', tabs); + } + else { + tabString = internedTabsIndentation[tabs]; + } + + return spaces ? tabString + repeat(" ", spaces) : tabString; + } + else { + var spacesString: string; + var quotient = Math.floor(indentation / options.IndentSize); + var remainder = indentation % options.IndentSize; + if (!internedSpacesIndentation) { + internedSpacesIndentation = []; + } + + if (internedSpacesIndentation[quotient] === undefined) { + spacesString = repeat(" ", options.IndentSize * quotient); + internedSpacesIndentation[quotient] = spacesString; + } + else { + spacesString = internedSpacesIndentation[quotient]; + } + + + return remainder ? spacesString + repeat(" ", remainder) : spacesString; + } + + function repeat(value: string, count: number): string { + var s = ""; + for (var i = 0; i < count; ++i) { + s += value; + } + + return s; + } + } } \ No newline at end of file diff --git a/src/services/formatting/formattingScanner.ts b/src/services/formatting/formattingScanner.ts index 710881bf80b..7ddfecc17f2 100644 --- a/src/services/formatting/formattingScanner.ts +++ b/src/services/formatting/formattingScanner.ts @@ -1,4 +1,4 @@ -/// +/// /// module ts.formatting { diff --git a/src/services/smartIndenter.ts b/src/services/formatting/smartIndenter.ts similarity index 97% rename from src/services/smartIndenter.ts rename to src/services/formatting/smartIndenter.ts index 758c06226a4..f6f5031d60e 100644 --- a/src/services/smartIndenter.ts +++ b/src/services/formatting/smartIndenter.ts @@ -1,4 +1,4 @@ -/// +/// module ts.formatting { export module SmartIndenter { diff --git a/src/services/services.ts b/src/services/services.ts index 66269f8655a..df8cae5900e 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -4,13 +4,13 @@ /// /// +/// /// /// -/// /// /// -/// -/// +/// +/// module ts { From f207acff510e79cb678d28887e738e339328b7f0 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 10 Dec 2014 14:49:59 -0800 Subject: [PATCH 113/141] Removed tokenSpan.ts. --- src/services/formatting/formatting.ts | 1 + src/services/formatting/references.ts | 3 +-- src/services/formatting/tokenSpan.ts | 24 ------------------------ 3 files changed, 2 insertions(+), 26 deletions(-) delete mode 100644 src/services/formatting/tokenSpan.ts diff --git a/src/services/formatting/formatting.ts b/src/services/formatting/formatting.ts index f0252a254c3..823a5ff4e00 100644 --- a/src/services/formatting/formatting.ts +++ b/src/services/formatting/formatting.ts @@ -1,5 +1,6 @@ /// /// +/// /// module ts.formatting { diff --git a/src/services/formatting/references.ts b/src/services/formatting/references.ts index 3d19b33d821..b421424a61b 100644 --- a/src/services/formatting/references.ts +++ b/src/services/formatting/references.ts @@ -24,5 +24,4 @@ /// /// /// -/// -/// \ No newline at end of file +/// \ No newline at end of file diff --git a/src/services/formatting/tokenSpan.ts b/src/services/formatting/tokenSpan.ts deleted file mode 100644 index 1d8173a8227..00000000000 --- a/src/services/formatting/tokenSpan.ts +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/// - -module ts.formatting { - export class TokenSpan extends TextSpan { - constructor(public kind: SyntaxKind, start: number, length: number) { - super(start, length); - } - } -} \ No newline at end of file From a7219e7569a985b0b7a648a397a1d7a8ff6534a2 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Sun, 7 Dec 2014 21:23:03 -0800 Subject: [PATCH 114/141] move OutliningSpan definitions to services to ensure it is visible in definitions file --- src/services/outliningElementsCollector.ts | 16 ---------------- src/services/services.ts | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/services/outliningElementsCollector.ts b/src/services/outliningElementsCollector.ts index 83eef2f4378..5af69cd3626 100644 --- a/src/services/outliningElementsCollector.ts +++ b/src/services/outliningElementsCollector.ts @@ -14,22 +14,6 @@ // module ts { - - export interface OutliningSpan { - /** - * @param textSpan The span of the document to actually collapse. - * @param hintSpan The span of the document to display when the user hovers over the - * collapsed span. - * @param bannerText The text to display in the editor for the collapsed region. - * @param autoCollapse Whether or not this region should be automatically collapsed when - * the 'Collapse to Definitions' command is invoked. - */ - textSpan: TextSpan; - hintSpan: TextSpan; - bannerText: string; - autoCollapse: boolean; - } - export module OutliningElementsCollector { export function collectElements(sourceFile: SourceFile): OutliningSpan[] { var elements: OutliningSpan[] = []; diff --git a/src/services/services.ts b/src/services/services.ts index df8cae5900e..50b468b73f8 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1428,6 +1428,23 @@ module ts { documentation: SymbolDisplayPart[]; } + export interface OutliningSpan { + /** The span of the document to actually collapse. */ + textSpan: TextSpan; + + /** The span of the document to display when the user hovers over the collapsed span. */ + hintSpan: TextSpan; + + /** The text to display in the editor for the collapsed region. */ + bannerText: string; + + /** + * Whether or not this region should be automatically collapsed when + * the 'Collapse to Definitions' command is invoked. + */ + autoCollapse: boolean; + } + export interface EmitOutput { outputFiles: OutputFile[]; emitOutputStatus: EmitReturnStatus; From 8420fae7a48c71bc302a91b0904d39cc4a515019 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 10 Dec 2014 14:58:08 -0800 Subject: [PATCH 115/141] Make getLocalizedDiagnosticMessages and getCancellationToken optional --- src/harness/harness.ts | 1 - src/services/services.ts | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 80bc62556a9..d39c9956424 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -636,7 +636,6 @@ module Harness { return { getCurrentDirectory: ts.sys.getCurrentDirectory, - getCancellationToken: (): any => undefined, getSourceFile: (fn, languageVersion) => { if (Object.prototype.hasOwnProperty.call(filemap, getCanonicalFileName(fn))) { return filemap[getCanonicalFileName(fn)]; diff --git a/src/services/services.ts b/src/services/services.ts index 50b468b73f8..86577da8fbd 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -894,8 +894,8 @@ module ts { getScriptVersion(fileName: string): string; getScriptIsOpen(fileName: string): boolean; getScriptSnapshot(fileName: string): IScriptSnapshot; - getLocalizedDiagnosticMessages(): any; - getCancellationToken(): CancellationToken; + getLocalizedDiagnosticMessages?(): any; + getCancellationToken?(): CancellationToken; getCurrentDirectory(): string; getDefaultLibFilename(options: CompilerOptions): string; } @@ -2398,12 +2398,12 @@ module ts { var useCaseSensitivefilenames = false; var sourceFilesByName: Map = {}; var documentRegistry = documentRegistry; - var cancellationToken = new CancellationTokenObject(host.getCancellationToken()); + var cancellationToken = new CancellationTokenObject(host.getCancellationToken && host.getCancellationToken()); var activeCompletionSession: CompletionSession; // The current active completion session, used to get the completion entry details var writer: (filename: string, data: string, writeByteOrderMark: boolean) => void = undefined; // Check if the localized messages json is set, otherwise query the host for it - if (!localizedDiagnosticMessages) { + if (!localizedDiagnosticMessages && host.getLocalizedDiagnosticMessages) { localizedDiagnosticMessages = host.getLocalizedDiagnosticMessages(); } From 1fe19136d767ad2e00a6d47a7af16408ad8ac0de Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Mon, 8 Dec 2014 13:00:46 -0800 Subject: [PATCH 116/141] Remove unused parameter to getCompletionsAtPosition Conflicts: tests/baselines/reference/APISample_node_compile.js tests/baselines/reference/APISample_node_compile.types tests/baselines/reference/APISample_standalone_compile.js tests/baselines/reference/APISample_standalone_compile.types --- src/harness/fourslash.ts | 6 +++--- src/services/services.ts | 6 +++--- src/services/shims.ts | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index da13735872d..e523def8be2 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -750,11 +750,11 @@ module FourSlash { } private getMemberListAtCaret() { - return this.languageService.getCompletionsAtPosition(this.activeFile.fileName, this.currentCaretPosition, true); + return this.languageService.getCompletionsAtPosition(this.activeFile.fileName, this.currentCaretPosition); } private getCompletionListAtCaret() { - return this.languageService.getCompletionsAtPosition(this.activeFile.fileName, this.currentCaretPosition, false); + return this.languageService.getCompletionsAtPosition(this.activeFile.fileName, this.currentCaretPosition); } private getCompletionEntryDetails(entryName: string) { @@ -1364,7 +1364,7 @@ module FourSlash { this.languageService.getSignatureHelpItems(this.activeFile.fileName, offset); } else if (prevChar === ' ' && /A-Za-z_/.test(ch)) { /* Completions */ - this.languageService.getCompletionsAtPosition(this.activeFile.fileName, offset, false); + this.languageService.getCompletionsAtPosition(this.activeFile.fileName, offset); } if (i % errorCadence === 0) { diff --git a/src/services/services.ts b/src/services/services.ts index 86577da8fbd..66108bb29bb 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -914,7 +914,7 @@ module ts { getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; - getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): CompletionInfo; + getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; @@ -2669,7 +2669,7 @@ module ts { }; } - function getCompletionsAtPosition(filename: string, position: number, isMemberCompletion: boolean) { + function getCompletionsAtPosition(filename: string, position: number) { synchronizeHostData(); filename = normalizeSlashes(filename); @@ -2744,7 +2744,7 @@ module ts { if (isRightOfDot) { // Right of dot member completion list var symbols: Symbol[] = []; - isMemberCompletion = true; + var isMemberCompletion = true; if (node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.QualifiedName || node.kind === SyntaxKind.PropertyAccessExpression) { var symbol = typeInfoResolver.getSymbolAtLocation(node); diff --git a/src/services/shims.ts b/src/services/shims.ts index d139381c225..dfec12d0f79 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -88,7 +88,7 @@ module ts { getSyntacticClassifications(fileName: string, start: number, length: number): string; - getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): string; + getCompletionsAtPosition(fileName: string, position: number): string; getCompletionEntryDetails(fileName: string, position: number, entryName: string): string; getQuickInfoAtPosition(fileName: string, position: number): string; @@ -694,11 +694,11 @@ module ts { * to provide at the given source position and providing a member completion * list if requested. */ - public getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean) { + public getCompletionsAtPosition(fileName: string, position: number) { return this.forwardJSONCall( - "getCompletionsAtPosition('" + fileName + "', " + position + ", " + isMemberCompletion + ")", + "getCompletionsAtPosition('" + fileName + "', " + position + ")", () => { - var completion = this.languageService.getCompletionsAtPosition(fileName, position, isMemberCompletion); + var completion = this.languageService.getCompletionsAtPosition(fileName, position); return completion; }); } From a173017aa6381a21c8917be22b9acf5fe397931e Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 8 Dec 2014 17:42:08 -0800 Subject: [PATCH 117/141] Explicit default target for fourslash tests in the harness. --- src/harness/fourslash.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index e523def8be2..ac64e4c906e 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -2248,7 +2248,7 @@ module FourSlash { ts.ScriptTarget.Latest, ts.sys.useCaseSensitiveFileNames); // TODO (drosen): We need to enforce checking on these tests. - var program = ts.createProgram([Harness.Compiler.fourslashFilename, fileName], { out: "fourslashTestOutput.js", noResolve: true }, host); + var program = ts.createProgram([Harness.Compiler.fourslashFilename, fileName], { out: "fourslashTestOutput.js", noResolve: true, target: ts.ScriptTarget.ES3 }, host); var checker = ts.createTypeChecker(program, /*fullTypeCheckMode*/ true); var errors = program.getDiagnostics().concat(checker.getDiagnostics()); From 0ce3861602c9d6df0808d4db073390dd13ed0e8a Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 10 Dec 2014 16:42:41 -0800 Subject: [PATCH 118/141] Moved non-exposed functions to utilities; fix up emitted .d.ts in Jakefile. Conflicts: src/compiler/parser.ts --- Jakefile | 111 ++++-- src/compiler/checker.ts | 54 +-- src/compiler/parser.ts | 677 +---------------------------------- src/compiler/utilities.ts | 732 ++++++++++++++++++++++++++++++++++++++ src/services/services.ts | 179 +--------- src/services/utilities.ts | 178 ++++++++- 6 files changed, 1004 insertions(+), 927 deletions(-) create mode 100644 src/compiler/utilities.ts diff --git a/Jakefile b/Jakefile index 039c085ba12..89586e8ca62 100644 --- a/Jakefile +++ b/Jakefile @@ -35,6 +35,7 @@ var compilerSources = [ "types.ts", "scanner.ts", "parser.ts", + "utilities.ts", "binder.ts", "checker.ts", "emitter.ts", @@ -47,26 +48,53 @@ var compilerSources = [ var servicesSources = [ "core.ts", + "sys.ts", "types.ts", "scanner.ts", "parser.ts", + "utilities.ts", "binder.ts", "checker.ts", - "emitter.ts" + "emitter.ts", + "diagnosticInformationMap.generated.ts" ].map(function (f) { return path.join(compilerDirectory, f); }).concat([ "breakpoints.ts", + "navigationBar.ts", + "outliningElementsCollector.ts", "services.ts", "shims.ts", "signatureHelp.ts", "utilities.ts", - "navigationBar.ts", - "outliningElementsCollector.ts" + "formatting/formatting.ts", + "formatting/formattingContext.ts", + "formatting/formattingRequestKind.ts", + "formatting/formattingScanner.ts", + "formatting/references.ts", + "formatting/rule.ts", + "formatting/ruleAction.ts", + "formatting/ruleDescriptor.ts", + "formatting/ruleFlag.ts", + "formatting/ruleOperation.ts", + "formatting/ruleOperationContext.ts", + "formatting/rules.ts", + "formatting/rulesMap.ts", + "formatting/rulesProvider.ts", + "formatting/smartIndenter.ts", + "formatting/tokenRange.ts" ].map(function (f) { return path.join(servicesDirectory, f); })); +var definitionsRoots = [ + "compiler/types.d.ts", + "compiler/scanner.d.ts", + "compiler/parser.d.ts", + "compiler/checker.d.ts", + "services/services.d.ts", +]; + var harnessSources = [ "harness.ts", "sourceMapRecorder.ts", @@ -149,25 +177,48 @@ var compilerFilename = "tsc.js"; * @param prefixes: a list of files to prepend to the target file * @param useBuiltCompiler: true to use the built compiler, false to use the LKG * @param noOutFile: true to compile without using --out + * @param generateDeclarations: true to compile using --declaration + * @param outDir: true to compile using --outDir + * @param keepComments: false to compile using --removeComments + * @param callback: a function to execute after the compilation process ends */ -function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOutFile, generateDeclarations, callback) { +function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOutFile, generateDeclarations, outDir, keepComments, noResolve, callback) { file(outFile, prereqs, function() { var dir = useBuiltCompiler ? builtLocalDirectory : LKGDirectory; - var options = "-removeComments --module commonjs -noImplicitAny "; + var options = "--module commonjs -noImplicitAny"; + + if (!keepComments) { + options += " -removeComments"; + } + if (generateDeclarations) { - options += "--declaration "; + options += " --declaration"; } if (useDebugMode) { - options += "--preserveConstEnums "; + options += " --preserveConstEnums"; + } + + if (outDir) { + options += " --outDir " + outDir; + } + + if (!noOutFile) { + options += " --out " + outFile; + } + + if(noResolve) { + options += " --noResolve"; + } + + if (useDebugMode) { + options += " -sourcemap -mapRoot file:///" + path.resolve(path.dirname(outFile)); } var cmd = host + " " + dir + compilerFilename + " " + options + " "; - cmd = cmd + sources.join(" ") + (!noOutFile ? " -out " + outFile : ""); - if (useDebugMode) { - cmd = cmd + " -sourcemap -mapRoot file:///" + path.resolve(path.dirname(outFile)); - } + cmd = cmd + sources.join(" "); console.log(cmd + "\n"); + var ex = jake.createExec([cmd]); // Add listeners for output and error ex.addListener("stdout", function(output) { @@ -260,24 +311,38 @@ var tscFile = path.join(builtLocalDirectory, compilerFilename); compileFile(tscFile, compilerSources, [builtLocalDirectory, copyright].concat(compilerSources), [copyright], /*useBuiltCompiler:*/ false); var servicesFile = path.join(builtLocalDirectory, "typescriptServices.js"); -var servicesDefinitionsFile = path.join(builtLocalDirectory, "typescriptServices.d.ts"); +compileFile(servicesFile, servicesSources,[builtLocalDirectory, copyright].concat(servicesSources), [copyright], /*useBuiltCompiler*/ true); -compileFile(servicesFile, - servicesSources, - [builtLocalDirectory, copyright].concat(servicesSources), - [copyright], +var nodeDefinitionsFile = path.join(builtLocalDirectory, "typescript.d.ts"); +var standaloneDefinitionsFile = path.join(builtLocalDirectory, "typescriptServices.d.ts"); +var tempDirPath = path.join(builtLocalDirectory, "temptempdir"); +compileFile(nodeDefinitionsFile, servicesSources,[builtLocalDirectory, copyright].concat(servicesSources), + /*prefixes*/ undefined, /*useBuiltCompiler*/ true, - /*noOutFile*/ false, + /*noOutFile*/ true, /*generateDeclarations*/ true, - /*callback*/ fixDeclarationFile); + /*outDir*/ tempDirPath, + /*keepComments*/ true, + /*noResolve*/ true, + /*callback*/ function () { + concatenateFiles(standaloneDefinitionsFile, definitionsRoots.map(function (f) { + return path.join(tempDirPath, f); + })); + prependFile(copyright, standaloneDefinitionsFile); -function fixDeclarationFile() { - fs.appendFileSync(servicesDefinitionsFile, os.EOL + "export = ts;") -} + // Create the node definition file by replacing 'ts' module with '"typescript"' as a module. + jake.cpR(standaloneDefinitionsFile, nodeDefinitionsFile, {silent: true}); + var definitionFileContents = fs.readFileSync(nodeDefinitionsFile).toString(); + definitionFileContents = definitionFileContents.replace(/declare module ts/g, 'declare module "typescript"'); + fs.writeFileSync(nodeDefinitionsFile, definitionFileContents); + + // Delete the temp dir + jake.rmRf(tempDirPath, {silent: true}); + }); // Local target to build the compiler and services desc("Builds the full compiler and services"); -task("local", ["generate-diagnostics", "lib", tscFile, servicesFile]); +task("local", ["generate-diagnostics", "lib", tscFile, servicesFile, nodeDefinitionsFile]); // Local target to build the compiler and services desc("Sets release mode flag"); @@ -328,7 +393,7 @@ task("generate-spec", [specMd]) // Makes a new LKG. This target does not build anything, but errors if not all the outputs are present in the built/local directory desc("Makes a new LKG out of the built js files"); task("LKG", ["clean", "release", "local"].concat(libraryTargets), function() { - var expectedFiles = [tscFile, servicesFile, servicesDefinitionsFile].concat(libraryTargets); + var expectedFiles = [tscFile, servicesFile, nodeDefinitionsFile, standaloneDefinitionsFile].concat(libraryTargets); var missingFiles = expectedFiles.filter(function (f) { return !fs.existsSync(f); }); diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 1e8a87bc4d4..cb9912c47d0 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -4,57 +4,12 @@ /// /// /// +/// module ts { var nextSymbolId = 1; var nextNodeId = 1; - var nextMergeId = 1; - - export function getDeclarationOfKind(symbol: Symbol, kind: SyntaxKind): Declaration { - var declarations = symbol.declarations; - for (var i = 0; i < declarations.length; i++) { - var declaration = declarations[i]; - if (declaration.kind === kind) { - return declaration; - } - } - - return undefined; - } - - export interface StringSymbolWriter extends SymbolWriter { - string(): string; - } - - // Pool writers to avoid needing to allocate them for every symbol we write. - var stringWriters: StringSymbolWriter[] = []; - export function getSingleLineStringWriter(): StringSymbolWriter { - if (stringWriters.length == 0) { - var str = ""; - - var writeText: (text: string) => void = text => str += text; - return { - string: () => str, - writeKeyword: writeText, - writeOperator: writeText, - writePunctuation: writeText, - writeSpace: writeText, - writeStringLiteral: writeText, - writeParameter: writeText, - writeSymbol: writeText, - - // Completely ignore indentation for string writers. And map newlines to - // a single space. - writeLine: () => str += " ", - increaseIndent: () => { }, - decreaseIndent: () => { }, - clear: () => str = "", - trackSymbol: () => { } - }; - } - - return stringWriters.pop(); - } + var nextMergeId = 1; /// fullTypeCheck denotes if this instance of the typechecker will be used to get semantic diagnostics. /// If fullTypeCheck === true, then the typechecker should do every possible check to produce all errors @@ -1012,11 +967,6 @@ module ts { }; } - function releaseStringWriter(writer: StringSymbolWriter) { - writer.clear() - stringWriters.push(writer); - } - function writeKeyword(writer: SymbolWriter, kind: SyntaxKind) { writer.writeKeyword(tokenToString(kind)); } diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index d810c5126fa..d2a5971a078 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -1,41 +1,11 @@ /// /// /// +/// module ts { var nodeConstructors = new Array Node>(SyntaxKind.Count); - export function getFullWidth(node: Node) { - return node.end - node.pos; - } - - function hasFlag(val: number, flag: number): boolean { - return (val & flag) !== 0; - } - - // Returns true if this node contains a parse error anywhere underneath it. - export function containsParseError(node: Node): boolean { - if (!hasFlag(node.parserContextFlags, ParserContextFlags.HasPropagatedChildContainsErrorFlag)) { - // A node is considered to contain a parse error if: - // a) the parser explicitly marked that it had an error - // b) any of it's children reported that it had an error. - var val = hasFlag(node.parserContextFlags, ParserContextFlags.ContainsError) || - forEachChild(node, containsParseError); - - // If so, mark ourselves accordingly. - if (val) { - node.parserContextFlags |= ParserContextFlags.ContainsError; - } - - // Also mark that we've propogated the child information to this node. This way we can - // always consult the bit directly on this node without needing to check its children - // again. - node.parserContextFlags |= ParserContextFlags.HasPropagatedChildContainsErrorFlag; - } - - return hasFlag(node.parserContextFlags, ParserContextFlags.ContainsError); - } - export function getNodeConstructor(kind: SyntaxKind): new () => Node { return nodeConstructors[kind] || (nodeConstructors[kind] = objectAllocator.getNodeConstructor(kind)); } @@ -44,140 +14,6 @@ module ts { return new (getNodeConstructor(kind))(); } - export function getSourceFileOfNode(node: Node): SourceFile { - while (node && node.kind !== SyntaxKind.SourceFile) node = node.parent; - return node; - } - - // This is a useful function for debugging purposes. - export function nodePosToString(node: Node): string { - var file = getSourceFileOfNode(node); - var loc = file.getLineAndCharacterFromPosition(node.pos); - return file.filename + "(" + loc.line + "," + loc.character + ")"; - } - - export function getStartPosOfNode(node: Node): number { - return node.pos; - } - - export function isMissingNode(node: Node) { - return node.pos === node.end && node.kind !== SyntaxKind.EndOfFileToken; - } - - export function getTokenPosOfNode(node: Node, sourceFile?: SourceFile): number { - // With nodes that have no width (i.e. 'Missing' nodes), we actually *don't* - // want to skip trivia because this will launch us forward to the next token. - if (isMissingNode(node)) { - return node.pos; - } - - return skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); - } - - export function getSourceTextOfNodeFromSourceFile(sourceFile: SourceFile, node: Node): string { - if (isMissingNode(node)) { - return ""; - } - - var text = sourceFile.text; - return text.substring(skipTrivia(text, node.pos), node.end); - } - - export function getTextOfNodeFromSourceText(sourceText: string, node: Node): string { - if (isMissingNode(node)) { - return ""; - } - - return sourceText.substring(skipTrivia(sourceText, node.pos), node.end); - } - - export function getTextOfNode(node: Node): string { - return getSourceTextOfNodeFromSourceFile(getSourceFileOfNode(node), node); - } - - // Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__' - export function escapeIdentifier(identifier: string): string { - return identifier.length >= 2 && identifier.charCodeAt(0) === CharacterCodes._ && identifier.charCodeAt(1) === CharacterCodes._ ? "_" + identifier : identifier; - } - - // Remove extra underscore from escaped identifier - export function unescapeIdentifier(identifier: string): string { - return identifier.length >= 3 && identifier.charCodeAt(0) === CharacterCodes._ && identifier.charCodeAt(1) === CharacterCodes._ && identifier.charCodeAt(2) === CharacterCodes._ ? identifier.substr(1) : identifier; - } - - // Return display name of an identifier - // Computed property names will just be emitted as "[]", where is the source - // text of the expression in the computed property. - export function declarationNameToString(name: DeclarationName) { - return getFullWidth(name) === 0 ? "(Missing)" : getTextOfNode(name); - } - - export function createDiagnosticForNode(node: Node, message: DiagnosticMessage, arg0?: any, arg1?: any, arg2?: any): Diagnostic { - node = getErrorSpanForNode(node); - var file = getSourceFileOfNode(node); - - var start = getFullWidth(node) === 0 ? node.pos : skipTrivia(file.text, node.pos); - var length = node.end - start; - - return createFileDiagnostic(file, start, length, message, arg0, arg1, arg2); - } - - export function createDiagnosticForNodeFromMessageChain(node: Node, messageChain: DiagnosticMessageChain, newLine: string): Diagnostic { - node = getErrorSpanForNode(node); - var file = getSourceFileOfNode(node); - var start = skipTrivia(file.text, node.pos); - var length = node.end - start; - return flattenDiagnosticChain(file, start, length, messageChain, newLine); - } - - export function getErrorSpanForNode(node: Node): Node { - var errorSpan: Node; - switch (node.kind) { - // This list is a work in progress. Add missing node kinds to improve their error - // spans. - case SyntaxKind.VariableDeclaration: - case SyntaxKind.BindingElement: - case SyntaxKind.ClassDeclaration: - case SyntaxKind.InterfaceDeclaration: - case SyntaxKind.ModuleDeclaration: - case SyntaxKind.EnumDeclaration: - case SyntaxKind.EnumMember: - errorSpan = (node).name; - break; - } - - // We now have the ideal error span, but it may be a node that is optional and absent - // (e.g. the name of a function expression), in which case errorSpan will be undefined. - // Alternatively, it might be required and missing (e.g. the name of a module), in which - // case its pos will equal its end (length 0). In either of these cases, we should fall - // back to the original node that the error was issued on. - return errorSpan && errorSpan.pos < errorSpan.end ? errorSpan : node; - } - - export function isExternalModule(file: SourceFile): boolean { - return file.externalModuleIndicator !== undefined; - } - - export function isDeclarationFile(file: SourceFile): boolean { - return (file.flags & NodeFlags.DeclarationFile) !== 0; - } - - export function isConstEnumDeclaration(node: Node): boolean { - return node.kind === SyntaxKind.EnumDeclaration && isConst(node); - } - - export function isConst(node: Node): boolean { - return !!(node.flags & NodeFlags.Const); - } - - export function isLet(node: Node): boolean { - return !!(node.flags & NodeFlags.Let); - } - - export function isPrologueDirective(node: Node): boolean { - return node.kind === SyntaxKind.ExpressionStatement && (node).expression.kind === SyntaxKind.StringLiteral; - } - function isEvalOrArgumentsIdentifier(node: Node): boolean { return node.kind === SyntaxKind.Identifier && (node).text && @@ -190,36 +26,6 @@ module ts { return ((node).expression).text === "use strict"; } - export function getLeadingCommentRangesOfNode(node: Node, sourceFileOfNode?: SourceFile) { - sourceFileOfNode = sourceFileOfNode || getSourceFileOfNode(node); - - // If parameter/type parameter, the prev token trailing comments are part of this node too - if (node.kind === SyntaxKind.Parameter || node.kind === SyntaxKind.TypeParameter) { - // e.g. (/** blah */ a, /** blah */ b); - return concatenate(getTrailingCommentRanges(sourceFileOfNode.text, node.pos), - // e.g.: ( - // /** blah */ a, - // /** blah */ b); - getLeadingCommentRanges(sourceFileOfNode.text, node.pos)); - } - else { - return getLeadingCommentRanges(sourceFileOfNode.text, node.pos); - } - } - - export function getJsDocComments(node: Node, sourceFileOfNode: SourceFile) { - return filter(getLeadingCommentRangesOfNode(node, sourceFileOfNode), isJsDocComment); - - function isJsDocComment(comment: CommentRange) { - // True if the comment starts with '/**' but not if it is '/**/' - return sourceFileOfNode.text.charCodeAt(comment.pos + 1) === CharacterCodes.asterisk && - sourceFileOfNode.text.charCodeAt(comment.pos + 2) === CharacterCodes.asterisk && - sourceFileOfNode.text.charCodeAt(comment.pos + 3) !== CharacterCodes.slash; - } - } - - export var fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*/ - // Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes // stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise, // embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns @@ -466,425 +272,6 @@ module ts { } } - // Warning: This has the same semantics as the forEach family of functions, - // in that traversal terminates in the event that 'visitor' supplies a truthy value. - export function forEachReturnStatement(body: Block, visitor: (stmt: ReturnStatement) => T): T { - - return traverse(body); - - function traverse(node: Node): T { - switch (node.kind) { - case SyntaxKind.ReturnStatement: - return visitor(node); - case SyntaxKind.Block: - case SyntaxKind.IfStatement: - case SyntaxKind.DoStatement: - case SyntaxKind.WhileStatement: - case SyntaxKind.ForStatement: - case SyntaxKind.ForInStatement: - case SyntaxKind.WithStatement: - case SyntaxKind.SwitchStatement: - case SyntaxKind.CaseClause: - case SyntaxKind.DefaultClause: - case SyntaxKind.LabeledStatement: - case SyntaxKind.TryStatement: - case SyntaxKind.TryBlock: - case SyntaxKind.CatchClause: - case SyntaxKind.FinallyBlock: - return forEachChild(node, traverse); - } - } - } - - export function isAnyFunction(node: Node): boolean { - if (node) { - switch (node.kind) { - case SyntaxKind.Constructor: - case SyntaxKind.FunctionExpression: - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.ArrowFunction: - case SyntaxKind.MethodDeclaration: - case SyntaxKind.MethodSignature: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - case SyntaxKind.CallSignature: - case SyntaxKind.ConstructSignature: - case SyntaxKind.IndexSignature: - case SyntaxKind.FunctionType: - case SyntaxKind.ConstructorType: - case SyntaxKind.FunctionExpression: - case SyntaxKind.ArrowFunction: - case SyntaxKind.FunctionDeclaration: - return true; - } - } - - return false; - } - - export function isFunctionBlock(node: Node) { - return node && node.kind === SyntaxKind.Block && isAnyFunction(node.parent); - } - - export function isObjectLiteralMethod(node: Node) { - return node && node.kind === SyntaxKind.MethodDeclaration && node.parent.kind === SyntaxKind.ObjectLiteralExpression; - } - - export function getContainingFunction(node: Node): FunctionLikeDeclaration { - while (true) { - node = node.parent; - if (!node || isAnyFunction(node)) { - return node; - } - } - } - - export function getThisContainer(node: Node, includeArrowFunctions: boolean): Node { - while (true) { - node = node.parent; - if (!node) { - return undefined; - } - switch (node.kind) { - case SyntaxKind.ArrowFunction: - if (!includeArrowFunctions) { - continue; - } - // Fall through - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.FunctionExpression: - case SyntaxKind.ModuleDeclaration: - case SyntaxKind.PropertyDeclaration: - case SyntaxKind.PropertySignature: - case SyntaxKind.MethodDeclaration: - case SyntaxKind.MethodSignature: - case SyntaxKind.Constructor: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - case SyntaxKind.EnumDeclaration: - case SyntaxKind.SourceFile: - return node; - } - } - } - - export function getSuperContainer(node: Node): Node { - while (true) { - node = node.parent; - if (!node) { - return undefined; - } - switch (node.kind) { - case SyntaxKind.PropertyDeclaration: - case SyntaxKind.PropertySignature: - case SyntaxKind.MethodDeclaration: - case SyntaxKind.MethodSignature: - case SyntaxKind.Constructor: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - return node; - } - } - } - - export function getInvokedExpression(node: CallLikeExpression): Expression { - if (node.kind === SyntaxKind.TaggedTemplateExpression) { - return (node).tag; - } - - // Will either be a CallExpression or NewExpression. - return (node).expression; - } - - export function isExpression(node: Node): boolean { - switch (node.kind) { - case SyntaxKind.ThisKeyword: - case SyntaxKind.SuperKeyword: - case SyntaxKind.NullKeyword: - case SyntaxKind.TrueKeyword: - case SyntaxKind.FalseKeyword: - case SyntaxKind.RegularExpressionLiteral: - case SyntaxKind.ArrayLiteralExpression: - case SyntaxKind.ObjectLiteralExpression: - case SyntaxKind.PropertyAccessExpression: - case SyntaxKind.ElementAccessExpression: - case SyntaxKind.CallExpression: - case SyntaxKind.NewExpression: - case SyntaxKind.TaggedTemplateExpression: - case SyntaxKind.TypeAssertionExpression: - case SyntaxKind.ParenthesizedExpression: - case SyntaxKind.FunctionExpression: - case SyntaxKind.ArrowFunction: - case SyntaxKind.VoidExpression: - case SyntaxKind.DeleteExpression: - case SyntaxKind.TypeOfExpression: - case SyntaxKind.PrefixUnaryExpression: - case SyntaxKind.PostfixUnaryExpression: - case SyntaxKind.BinaryExpression: - case SyntaxKind.ConditionalExpression: - case SyntaxKind.TemplateExpression: - case SyntaxKind.NoSubstitutionTemplateLiteral: - case SyntaxKind.OmittedExpression: - return true; - case SyntaxKind.QualifiedName: - while (node.parent.kind === SyntaxKind.QualifiedName) { - node = node.parent; - } - - return node.parent.kind === SyntaxKind.TypeQuery; - case SyntaxKind.Identifier: - if (node.parent.kind === SyntaxKind.TypeQuery) { - return true; - } - // fall through - case SyntaxKind.NumericLiteral: - case SyntaxKind.StringLiteral: - var parent = node.parent; - switch (parent.kind) { - case SyntaxKind.VariableDeclaration: - case SyntaxKind.Parameter: - case SyntaxKind.PropertyDeclaration: - case SyntaxKind.PropertySignature: - case SyntaxKind.EnumMember: - case SyntaxKind.PropertyAssignment: - case SyntaxKind.BindingElement: - return (parent).initializer === node; - case SyntaxKind.ExpressionStatement: - case SyntaxKind.IfStatement: - case SyntaxKind.DoStatement: - case SyntaxKind.WhileStatement: - case SyntaxKind.ReturnStatement: - case SyntaxKind.WithStatement: - case SyntaxKind.SwitchStatement: - case SyntaxKind.CaseClause: - case SyntaxKind.ThrowStatement: - case SyntaxKind.SwitchStatement: - return (parent).expression === node; - case SyntaxKind.ForStatement: - return (parent).initializer === node || - (parent).condition === node || - (parent).iterator === node; - case SyntaxKind.ForInStatement: - return (parent).variable === node || - (parent).expression === node; - case SyntaxKind.TypeAssertionExpression: - return node === (parent).expression; - case SyntaxKind.TemplateSpan: - return node === (parent).expression; - default: - if (isExpression(parent)) { - return true; - } - } - } - return false; - } - - export function isExternalModuleImportDeclaration(node: Node) { - return node.kind === SyntaxKind.ImportDeclaration && (node).moduleReference.kind === SyntaxKind.ExternalModuleReference; - } - - export function getExternalModuleImportDeclarationExpression(node: Node) { - Debug.assert(isExternalModuleImportDeclaration(node)); - return ((node).moduleReference).expression; - } - - export function isInternalModuleImportDeclaration(node: Node) { - return node.kind === SyntaxKind.ImportDeclaration && (node).moduleReference.kind !== SyntaxKind.ExternalModuleReference; - } - - export function hasDotDotDotToken(node: Node) { - return node && node.kind === SyntaxKind.Parameter && (node).dotDotDotToken !== undefined; - } - - export function hasQuestionToken(node: Node) { - if (node) { - switch (node.kind) { - case SyntaxKind.Parameter: - return (node).questionToken !== undefined; - case SyntaxKind.MethodDeclaration: - case SyntaxKind.MethodSignature: - return (node).questionToken !== undefined; - case SyntaxKind.ShorthandPropertyAssignment: - case SyntaxKind.PropertyAssignment: - case SyntaxKind.PropertyDeclaration: - case SyntaxKind.PropertySignature: - return (node).questionToken !== undefined; - } - } - - return false; - } - - export function hasRestParameters(s: SignatureDeclaration): boolean { - return s.parameters.length > 0 && s.parameters[s.parameters.length - 1].dotDotDotToken !== undefined; - } - - export function isLiteralKind(kind: SyntaxKind): boolean { - return SyntaxKind.FirstLiteralToken <= kind && kind <= SyntaxKind.LastLiteralToken; - } - - export function isTextualLiteralKind(kind: SyntaxKind): boolean { - return kind === SyntaxKind.StringLiteral || kind === SyntaxKind.NoSubstitutionTemplateLiteral; - } - - export function isTemplateLiteralKind(kind: SyntaxKind): boolean { - return SyntaxKind.FirstTemplateToken <= kind && kind <= SyntaxKind.LastTemplateToken; - } - - export function isBindingPattern(node: Node) { - return node.kind === SyntaxKind.ArrayBindingPattern || node.kind === SyntaxKind.ObjectBindingPattern; - } - - export function isInAmbientContext(node: Node): boolean { - while (node) { - if (node.flags & (NodeFlags.Ambient | NodeFlags.DeclarationFile)) return true; - node = node.parent; - } - return false; - } - - export function isDeclaration(node: Node): boolean { - switch (node.kind) { - case SyntaxKind.TypeParameter: - case SyntaxKind.Parameter: - case SyntaxKind.VariableDeclaration: - case SyntaxKind.BindingElement: - case SyntaxKind.PropertyDeclaration: - case SyntaxKind.PropertySignature: - case SyntaxKind.PropertyAssignment: - case SyntaxKind.ShorthandPropertyAssignment: - case SyntaxKind.EnumMember: - case SyntaxKind.MethodDeclaration: - case SyntaxKind.MethodSignature: - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - case SyntaxKind.Constructor: - case SyntaxKind.ClassDeclaration: - case SyntaxKind.InterfaceDeclaration: - case SyntaxKind.TypeAliasDeclaration: - case SyntaxKind.EnumDeclaration: - case SyntaxKind.ModuleDeclaration: - case SyntaxKind.ImportDeclaration: - return true; - } - return false; - } - - export function isStatement(n: Node): boolean { - switch(n.kind) { - case SyntaxKind.BreakStatement: - case SyntaxKind.ContinueStatement: - case SyntaxKind.DebuggerStatement: - case SyntaxKind.DoStatement: - case SyntaxKind.ExpressionStatement: - case SyntaxKind.EmptyStatement: - case SyntaxKind.ForInStatement: - case SyntaxKind.ForStatement: - case SyntaxKind.IfStatement: - case SyntaxKind.LabeledStatement: - case SyntaxKind.ReturnStatement: - case SyntaxKind.SwitchStatement: - case SyntaxKind.ThrowKeyword: - case SyntaxKind.TryStatement: - case SyntaxKind.VariableStatement: - case SyntaxKind.WhileStatement: - case SyntaxKind.WithStatement: - case SyntaxKind.ExportAssignment: - return true; - default: - return false; - } - } - - // True if the given identifier, string literal, or number literal is the name of a declaration node - export function isDeclarationOrFunctionExpressionOrCatchVariableName(name: Node): boolean { - if (name.kind !== SyntaxKind.Identifier && name.kind !== SyntaxKind.StringLiteral && name.kind !== SyntaxKind.NumericLiteral) { - return false; - } - - var parent = name.parent; - if (isDeclaration(parent) || parent.kind === SyntaxKind.FunctionExpression) { - return (parent).name === name; - } - - if (parent.kind === SyntaxKind.CatchClause) { - return (parent).name === name; - } - - return false; - } - - export function getClassBaseTypeNode(node: ClassDeclaration) { - var heritageClause = getHeritageClause(node.heritageClauses, SyntaxKind.ExtendsKeyword); - return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; - } - - export function getClassImplementedTypeNodes(node: ClassDeclaration) { - var heritageClause = getHeritageClause(node.heritageClauses, SyntaxKind.ImplementsKeyword); - return heritageClause ? heritageClause.types : undefined; - } - - export function getInterfaceBaseTypeNodes(node: InterfaceDeclaration) { - var heritageClause = getHeritageClause(node.heritageClauses, SyntaxKind.ExtendsKeyword); - return heritageClause ? heritageClause.types : undefined; - } - - export function getHeritageClause(clauses: NodeArray, kind: SyntaxKind) { - if (clauses) { - for (var i = 0, n = clauses.length; i < n; i++) { - if (clauses[i].token === kind) { - return clauses[i]; - } - } - } - - return undefined; - } - - export function tryResolveScriptReference(program: Program, sourceFile: SourceFile, reference: FileReference) { - if (!program.getCompilerOptions().noResolve) { - var referenceFileName = isRootedDiskPath(reference.filename) ? reference.filename : combinePaths(getDirectoryPath(sourceFile.filename), reference.filename); - referenceFileName = getNormalizedAbsolutePath(referenceFileName, program.getCompilerHost().getCurrentDirectory()); - return program.getSourceFile(referenceFileName); - } - } - - export function getAncestor(node: Node, kind: SyntaxKind): Node { - switch (kind) { - // special-cases that can be come first - case SyntaxKind.ClassDeclaration: - while (node) { - switch (node.kind) { - case SyntaxKind.ClassDeclaration: - return node; - case SyntaxKind.EnumDeclaration: - case SyntaxKind.InterfaceDeclaration: - case SyntaxKind.TypeAliasDeclaration: - case SyntaxKind.ModuleDeclaration: - case SyntaxKind.ImportDeclaration: - // early exit cases - declarations cannot be nested in classes - return undefined; - default: - node = node.parent; - continue; - } - } - break; - default: - while (node) { - if (node.kind === kind) { - return node; - } - node = node.parent; - } - break; - } - - return undefined; - } - const enum ParsingContext { SourceElements, // Elements in source file ModuleElements, // Elements in module declaration @@ -940,68 +327,6 @@ module ts { } }; - export interface ReferencePathMatchResult { - fileReference?: FileReference - diagnosticMessage?: DiagnosticMessage - isNoDefaultLib?: boolean - } - - export function getFileReferenceFromReferencePath(comment: string, commentRange: CommentRange): ReferencePathMatchResult { - var simpleReferenceRegEx = /^\/\/\/\s*/gim; - if (simpleReferenceRegEx.exec(comment)) { - if (isNoDefaultLibRegEx.exec(comment)) { - return { - isNoDefaultLib: true - } - } - else { - var matchResult = fullTripleSlashReferencePathRegEx.exec(comment); - if (matchResult) { - var start = commentRange.pos; - var end = commentRange.end; - return { - fileReference: { - pos: start, - end: end, - filename: matchResult[3] - }, - isNoDefaultLib: false - }; - } - else { - return { - diagnosticMessage: Diagnostics.Invalid_reference_directive_syntax, - isNoDefaultLib: false - }; - } - } - } - return undefined; - } - - export function isKeyword(token: SyntaxKind): boolean { - return SyntaxKind.FirstKeyword <= token && token <= SyntaxKind.LastKeyword; - } - - export function isTrivia(token: SyntaxKind) { - return SyntaxKind.FirstTriviaToken <= token && token <= SyntaxKind.LastTriviaToken; - } - - export function isModifier(token: SyntaxKind): boolean { - switch (token) { - case SyntaxKind.PublicKeyword: - case SyntaxKind.PrivateKeyword: - case SyntaxKind.ProtectedKeyword: - case SyntaxKind.StaticKeyword: - case SyntaxKind.ExportKeyword: - case SyntaxKind.DeclareKeyword: - case SyntaxKind.ConstKeyword: - return true; - } - return false; - } - function modifierToFlag(token: SyntaxKind): NodeFlags { switch (token) { case SyntaxKind.StaticKeyword: return NodeFlags.Static; diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts new file mode 100644 index 00000000000..15b0bdfc0b2 --- /dev/null +++ b/src/compiler/utilities.ts @@ -0,0 +1,732 @@ +/// + +module ts { + export interface ReferencePathMatchResult { + fileReference?: FileReference + diagnosticMessage?: DiagnosticMessage + isNoDefaultLib?: boolean + } + + export function getDeclarationOfKind(symbol: Symbol, kind: SyntaxKind): Declaration { + var declarations = symbol.declarations; + for (var i = 0; i < declarations.length; i++) { + var declaration = declarations[i]; + if (declaration.kind === kind) { + return declaration; + } + } + + return undefined; + } + + export interface StringSymbolWriter extends SymbolWriter { + string(): string; + } + + // Pool writers to avoid needing to allocate them for every symbol we write. + var stringWriters: StringSymbolWriter[] = []; + export function getSingleLineStringWriter(): StringSymbolWriter { + if (stringWriters.length == 0) { + var str = ""; + + var writeText: (text: string) => void = text => str += text; + return { + string: () => str, + writeKeyword: writeText, + writeOperator: writeText, + writePunctuation: writeText, + writeSpace: writeText, + writeStringLiteral: writeText, + writeParameter: writeText, + writeSymbol: writeText, + + // Completely ignore indentation for string writers. And map newlines to + // a single space. + writeLine: () => str += " ", + increaseIndent: () => { }, + decreaseIndent: () => { }, + clear: () => str = "", + trackSymbol: () => { } + }; + } + + return stringWriters.pop(); + } + + export function releaseStringWriter(writer: StringSymbolWriter) { + writer.clear() + stringWriters.push(writer); + } + + export function getFullWidth(node: Node) { + return node.end - node.pos; + } + + export function hasFlag(val: number, flag: number): boolean { + return (val & flag) !== 0; + } + + // Returns true if this node contains a parse error anywhere underneath it. + export function containsParseError(node: Node): boolean { + if (!hasFlag(node.parserContextFlags, ParserContextFlags.HasPropagatedChildContainsErrorFlag)) { + // A node is considered to contain a parse error if: + // a) the parser explicitly marked that it had an error + // b) any of it's children reported that it had an error. + var val = hasFlag(node.parserContextFlags, ParserContextFlags.ContainsError) || + forEachChild(node, containsParseError); + + // If so, mark ourselves accordingly. + if (val) { + node.parserContextFlags |= ParserContextFlags.ContainsError; + } + + // Also mark that we've propogated the child information to this node. This way we can + // always consult the bit directly on this node without needing to check its children + // again. + node.parserContextFlags |= ParserContextFlags.HasPropagatedChildContainsErrorFlag; + } + + return hasFlag(node.parserContextFlags, ParserContextFlags.ContainsError); + } + + export function getSourceFileOfNode(node: Node): SourceFile { + while (node && node.kind !== SyntaxKind.SourceFile) node = node.parent; + return node; + } + + // This is a useful function for debugging purposes. + export function nodePosToString(node: Node): string { + var file = getSourceFileOfNode(node); + var loc = file.getLineAndCharacterFromPosition(node.pos); + return file.filename + "(" + loc.line + "," + loc.character + ")"; + } + + export function getStartPosOfNode(node: Node): number { + return node.pos; + } + + export function isMissingNode(node: Node) { + return node.pos === node.end && node.kind !== SyntaxKind.EndOfFileToken; + } + + export function getTokenPosOfNode(node: Node, sourceFile?: SourceFile): number { + // With nodes that have no width (i.e. 'Missing' nodes), we actually *don't* + // want to skip trivia because this will launch us forward to the next token. + if (isMissingNode(node)) { + return node.pos; + } + + return skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); + } + + export function getSourceTextOfNodeFromSourceFile(sourceFile: SourceFile, node: Node): string { + if (isMissingNode(node)) { + return ""; + } + + var text = sourceFile.text; + return text.substring(skipTrivia(text, node.pos), node.end); + } + + export function getTextOfNodeFromSourceText(sourceText: string, node: Node): string { + if (isMissingNode(node)) { + return ""; + } + + return sourceText.substring(skipTrivia(sourceText, node.pos), node.end); + } + + export function getTextOfNode(node: Node): string { + return getSourceTextOfNodeFromSourceFile(getSourceFileOfNode(node), node); + } + + // Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__' + export function escapeIdentifier(identifier: string): string { + return identifier.length >= 2 && identifier.charCodeAt(0) === CharacterCodes._ && identifier.charCodeAt(1) === CharacterCodes._ ? "_" + identifier : identifier; + } + + // Remove extra underscore from escaped identifier + export function unescapeIdentifier(identifier: string): string { + return identifier.length >= 3 && identifier.charCodeAt(0) === CharacterCodes._ && identifier.charCodeAt(1) === CharacterCodes._ && identifier.charCodeAt(2) === CharacterCodes._ ? identifier.substr(1) : identifier; + } + + // Return display name of an identifier + // Computed property names will just be emitted as "[]", where is the source + // text of the expression in the computed property. + export function declarationNameToString(name: DeclarationName) { + return getFullWidth(name) === 0 ? "(Missing)" : getTextOfNode(name); + } + + export function createDiagnosticForNode(node: Node, message: DiagnosticMessage, arg0?: any, arg1?: any, arg2?: any): Diagnostic { + node = getErrorSpanForNode(node); + var file = getSourceFileOfNode(node); + + var start = getFullWidth(node) === 0 ? node.pos : skipTrivia(file.text, node.pos); + var length = node.end - start; + + return createFileDiagnostic(file, start, length, message, arg0, arg1, arg2); + } + + export function createDiagnosticForNodeFromMessageChain(node: Node, messageChain: DiagnosticMessageChain, newLine: string): Diagnostic { + node = getErrorSpanForNode(node); + var file = getSourceFileOfNode(node); + var start = skipTrivia(file.text, node.pos); + var length = node.end - start; + return flattenDiagnosticChain(file, start, length, messageChain, newLine); + } + + export function getErrorSpanForNode(node: Node): Node { + var errorSpan: Node; + switch (node.kind) { + // This list is a work in progress. Add missing node kinds to improve their error + // spans. + case SyntaxKind.VariableDeclaration: + case SyntaxKind.BindingElement: + case SyntaxKind.ClassDeclaration: + case SyntaxKind.InterfaceDeclaration: + case SyntaxKind.ModuleDeclaration: + case SyntaxKind.EnumDeclaration: + case SyntaxKind.EnumMember: + errorSpan = (node).name; + break; + } + + // We now have the ideal error span, but it may be a node that is optional and absent + // (e.g. the name of a function expression), in which case errorSpan will be undefined. + // Alternatively, it might be required and missing (e.g. the name of a module), in which + // case its pos will equal its end (length 0). In either of these cases, we should fall + // back to the original node that the error was issued on. + return errorSpan && errorSpan.pos < errorSpan.end ? errorSpan : node; + } + + export function isExternalModule(file: SourceFile): boolean { + return file.externalModuleIndicator !== undefined; + } + + export function isDeclarationFile(file: SourceFile): boolean { + return (file.flags & NodeFlags.DeclarationFile) !== 0; + } + + export function isConstEnumDeclaration(node: Node): boolean { + return node.kind === SyntaxKind.EnumDeclaration && isConst(node); + } + + export function isConst(node: Node): boolean { + return !!(node.flags & NodeFlags.Const); + } + + export function isLet(node: Node): boolean { + return !!(node.flags & NodeFlags.Let); + } + + export function isPrologueDirective(node: Node): boolean { + return node.kind === SyntaxKind.ExpressionStatement && (node).expression.kind === SyntaxKind.StringLiteral; + } + + export function getLeadingCommentRangesOfNode(node: Node, sourceFileOfNode?: SourceFile) { + sourceFileOfNode = sourceFileOfNode || getSourceFileOfNode(node); + + // If parameter/type parameter, the prev token trailing comments are part of this node too + if (node.kind === SyntaxKind.Parameter || node.kind === SyntaxKind.TypeParameter) { + // e.g. (/** blah */ a, /** blah */ b); + return concatenate(getTrailingCommentRanges(sourceFileOfNode.text, node.pos), + // e.g.: ( + // /** blah */ a, + // /** blah */ b); + getLeadingCommentRanges(sourceFileOfNode.text, node.pos)); + } + else { + return getLeadingCommentRanges(sourceFileOfNode.text, node.pos); + } + } + + export function getJsDocComments(node: Node, sourceFileOfNode: SourceFile) { + return filter(getLeadingCommentRangesOfNode(node, sourceFileOfNode), isJsDocComment); + + function isJsDocComment(comment: CommentRange) { + // True if the comment starts with '/**' but not if it is '/**/' + return sourceFileOfNode.text.charCodeAt(comment.pos + 1) === CharacterCodes.asterisk && + sourceFileOfNode.text.charCodeAt(comment.pos + 2) === CharacterCodes.asterisk && + sourceFileOfNode.text.charCodeAt(comment.pos + 3) !== CharacterCodes.slash; + } + } + + export var fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*/ + + + // Warning: This has the same semantics as the forEach family of functions, + // in that traversal terminates in the event that 'visitor' supplies a truthy value. + export function forEachReturnStatement(body: Block, visitor: (stmt: ReturnStatement) => T): T { + + return traverse(body); + + function traverse(node: Node): T { + switch (node.kind) { + case SyntaxKind.ReturnStatement: + return visitor(node); + case SyntaxKind.Block: + case SyntaxKind.IfStatement: + case SyntaxKind.DoStatement: + case SyntaxKind.WhileStatement: + case SyntaxKind.ForStatement: + case SyntaxKind.ForInStatement: + case SyntaxKind.WithStatement: + case SyntaxKind.SwitchStatement: + case SyntaxKind.CaseClause: + case SyntaxKind.DefaultClause: + case SyntaxKind.LabeledStatement: + case SyntaxKind.TryStatement: + case SyntaxKind.TryBlock: + case SyntaxKind.CatchClause: + case SyntaxKind.FinallyBlock: + return forEachChild(node, traverse); + } + } + } + + export function isAnyFunction(node: Node): boolean { + if (node) { + switch (node.kind) { + case SyntaxKind.Constructor: + case SyntaxKind.FunctionExpression: + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.ArrowFunction: + case SyntaxKind.MethodDeclaration: + case SyntaxKind.MethodSignature: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + case SyntaxKind.CallSignature: + case SyntaxKind.ConstructSignature: + case SyntaxKind.IndexSignature: + case SyntaxKind.FunctionType: + case SyntaxKind.ConstructorType: + case SyntaxKind.FunctionExpression: + case SyntaxKind.ArrowFunction: + case SyntaxKind.FunctionDeclaration: + return true; + } + } + + return false; + } + + export function isFunctionBlock(node: Node) { + return node && node.kind === SyntaxKind.Block && isAnyFunction(node.parent); + } + + export function isObjectLiteralMethod(node: Node) { + return node && node.kind === SyntaxKind.MethodDeclaration && node.parent.kind === SyntaxKind.ObjectLiteralExpression; + } + + export function getContainingFunction(node: Node): FunctionLikeDeclaration { + while (true) { + node = node.parent; + if (!node || isAnyFunction(node)) { + return node; + } + } + } + + export function getThisContainer(node: Node, includeArrowFunctions: boolean): Node { + while (true) { + node = node.parent; + if (!node) { + return undefined; + } + switch (node.kind) { + case SyntaxKind.ArrowFunction: + if (!includeArrowFunctions) { + continue; + } + // Fall through + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.FunctionExpression: + case SyntaxKind.ModuleDeclaration: + case SyntaxKind.PropertyDeclaration: + case SyntaxKind.PropertySignature: + case SyntaxKind.MethodDeclaration: + case SyntaxKind.MethodSignature: + case SyntaxKind.Constructor: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + case SyntaxKind.EnumDeclaration: + case SyntaxKind.SourceFile: + return node; + } + } + } + + export function getSuperContainer(node: Node): Node { + while (true) { + node = node.parent; + if (!node) { + return undefined; + } + switch (node.kind) { + case SyntaxKind.PropertyDeclaration: + case SyntaxKind.PropertySignature: + case SyntaxKind.MethodDeclaration: + case SyntaxKind.MethodSignature: + case SyntaxKind.Constructor: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + return node; + } + } + } + + export function getInvokedExpression(node: CallLikeExpression): Expression { + if (node.kind === SyntaxKind.TaggedTemplateExpression) { + return (node).tag; + } + + // Will either be a CallExpression or NewExpression. + return (node).expression; + } + + export function isExpression(node: Node): boolean { + switch (node.kind) { + case SyntaxKind.ThisKeyword: + case SyntaxKind.SuperKeyword: + case SyntaxKind.NullKeyword: + case SyntaxKind.TrueKeyword: + case SyntaxKind.FalseKeyword: + case SyntaxKind.RegularExpressionLiteral: + case SyntaxKind.ArrayLiteralExpression: + case SyntaxKind.ObjectLiteralExpression: + case SyntaxKind.PropertyAccessExpression: + case SyntaxKind.ElementAccessExpression: + case SyntaxKind.CallExpression: + case SyntaxKind.NewExpression: + case SyntaxKind.TaggedTemplateExpression: + case SyntaxKind.TypeAssertionExpression: + case SyntaxKind.ParenthesizedExpression: + case SyntaxKind.FunctionExpression: + case SyntaxKind.ArrowFunction: + case SyntaxKind.VoidExpression: + case SyntaxKind.DeleteExpression: + case SyntaxKind.TypeOfExpression: + case SyntaxKind.PrefixUnaryExpression: + case SyntaxKind.PostfixUnaryExpression: + case SyntaxKind.BinaryExpression: + case SyntaxKind.ConditionalExpression: + case SyntaxKind.TemplateExpression: + case SyntaxKind.NoSubstitutionTemplateLiteral: + case SyntaxKind.OmittedExpression: + return true; + case SyntaxKind.QualifiedName: + while (node.parent.kind === SyntaxKind.QualifiedName) { + node = node.parent; + } + + return node.parent.kind === SyntaxKind.TypeQuery; + case SyntaxKind.Identifier: + if (node.parent.kind === SyntaxKind.TypeQuery) { + return true; + } + // fall through + case SyntaxKind.NumericLiteral: + case SyntaxKind.StringLiteral: + var parent = node.parent; + switch (parent.kind) { + case SyntaxKind.VariableDeclaration: + case SyntaxKind.Parameter: + case SyntaxKind.PropertyDeclaration: + case SyntaxKind.PropertySignature: + case SyntaxKind.EnumMember: + case SyntaxKind.PropertyAssignment: + case SyntaxKind.BindingElement: + return (parent).initializer === node; + case SyntaxKind.ExpressionStatement: + case SyntaxKind.IfStatement: + case SyntaxKind.DoStatement: + case SyntaxKind.WhileStatement: + case SyntaxKind.ReturnStatement: + case SyntaxKind.WithStatement: + case SyntaxKind.SwitchStatement: + case SyntaxKind.CaseClause: + case SyntaxKind.ThrowStatement: + case SyntaxKind.SwitchStatement: + return (parent).expression === node; + case SyntaxKind.ForStatement: + return (parent).initializer === node || + (parent).condition === node || + (parent).iterator === node; + case SyntaxKind.ForInStatement: + return (parent).variable === node || + (parent).expression === node; + case SyntaxKind.TypeAssertionExpression: + return node === (parent).expression; + case SyntaxKind.TemplateSpan: + return node === (parent).expression; + default: + if (isExpression(parent)) { + return true; + } + } + } + return false; + } + + export function isExternalModuleImportDeclaration(node: Node) { + return node.kind === SyntaxKind.ImportDeclaration && (node).moduleReference.kind === SyntaxKind.ExternalModuleReference; + } + + export function getExternalModuleImportDeclarationExpression(node: Node) { + Debug.assert(isExternalModuleImportDeclaration(node)); + return ((node).moduleReference).expression; + } + + export function isInternalModuleImportDeclaration(node: Node) { + return node.kind === SyntaxKind.ImportDeclaration && (node).moduleReference.kind !== SyntaxKind.ExternalModuleReference; + } + + export function hasDotDotDotToken(node: Node) { + return node && node.kind === SyntaxKind.Parameter && (node).dotDotDotToken !== undefined; + } + + export function hasQuestionToken(node: Node) { + if (node) { + switch (node.kind) { + case SyntaxKind.Parameter: + return (node).questionToken !== undefined; + case SyntaxKind.MethodDeclaration: + case SyntaxKind.MethodSignature: + return (node).questionToken !== undefined; + case SyntaxKind.ShorthandPropertyAssignment: + case SyntaxKind.PropertyAssignment: + case SyntaxKind.PropertyDeclaration: + case SyntaxKind.PropertySignature: + return (node).questionToken !== undefined; + } + } + + return false; + } + + export function hasRestParameters(s: SignatureDeclaration): boolean { + return s.parameters.length > 0 && s.parameters[s.parameters.length - 1].dotDotDotToken !== undefined; + } + + export function isLiteralKind(kind: SyntaxKind): boolean { + return SyntaxKind.FirstLiteralToken <= kind && kind <= SyntaxKind.LastLiteralToken; + } + + export function isTextualLiteralKind(kind: SyntaxKind): boolean { + return kind === SyntaxKind.StringLiteral || kind === SyntaxKind.NoSubstitutionTemplateLiteral; + } + + export function isTemplateLiteralKind(kind: SyntaxKind): boolean { + return SyntaxKind.FirstTemplateToken <= kind && kind <= SyntaxKind.LastTemplateToken; + } + + export function isBindingPattern(node: Node) { + return node.kind === SyntaxKind.ArrayBindingPattern || node.kind === SyntaxKind.ObjectBindingPattern; + } + + export function isInAmbientContext(node: Node): boolean { + while (node) { + if (node.flags & (NodeFlags.Ambient | NodeFlags.DeclarationFile)) return true; + node = node.parent; + } + return false; + } + + export function isDeclaration(node: Node): boolean { + switch (node.kind) { + case SyntaxKind.TypeParameter: + case SyntaxKind.Parameter: + case SyntaxKind.VariableDeclaration: + case SyntaxKind.BindingElement: + case SyntaxKind.PropertyDeclaration: + case SyntaxKind.PropertySignature: + case SyntaxKind.PropertyAssignment: + case SyntaxKind.ShorthandPropertyAssignment: + case SyntaxKind.EnumMember: + case SyntaxKind.MethodDeclaration: + case SyntaxKind.MethodSignature: + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + case SyntaxKind.Constructor: + case SyntaxKind.ClassDeclaration: + case SyntaxKind.InterfaceDeclaration: + case SyntaxKind.TypeAliasDeclaration: + case SyntaxKind.EnumDeclaration: + case SyntaxKind.ModuleDeclaration: + case SyntaxKind.ImportDeclaration: + return true; + } + return false; + } + + export function isStatement(n: Node): boolean { + switch (n.kind) { + case SyntaxKind.BreakStatement: + case SyntaxKind.ContinueStatement: + case SyntaxKind.DebuggerStatement: + case SyntaxKind.DoStatement: + case SyntaxKind.ExpressionStatement: + case SyntaxKind.EmptyStatement: + case SyntaxKind.ForInStatement: + case SyntaxKind.ForStatement: + case SyntaxKind.IfStatement: + case SyntaxKind.LabeledStatement: + case SyntaxKind.ReturnStatement: + case SyntaxKind.SwitchStatement: + case SyntaxKind.ThrowKeyword: + case SyntaxKind.TryStatement: + case SyntaxKind.VariableStatement: + case SyntaxKind.WhileStatement: + case SyntaxKind.WithStatement: + case SyntaxKind.ExportAssignment: + return true; + default: + return false; + } + } + + // True if the given identifier, string literal, or number literal is the name of a declaration node + export function isDeclarationOrFunctionExpressionOrCatchVariableName(name: Node): boolean { + if (name.kind !== SyntaxKind.Identifier && name.kind !== SyntaxKind.StringLiteral && name.kind !== SyntaxKind.NumericLiteral) { + return false; + } + + var parent = name.parent; + if (isDeclaration(parent) || parent.kind === SyntaxKind.FunctionExpression) { + return (parent).name === name; + } + + if (parent.kind === SyntaxKind.CatchClause) { + return (parent).name === name; + } + + return false; + } + + export function getClassBaseTypeNode(node: ClassDeclaration) { + var heritageClause = getHeritageClause(node.heritageClauses, SyntaxKind.ExtendsKeyword); + return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; + } + + export function getClassImplementedTypeNodes(node: ClassDeclaration) { + var heritageClause = getHeritageClause(node.heritageClauses, SyntaxKind.ImplementsKeyword); + return heritageClause ? heritageClause.types : undefined; + } + + export function getInterfaceBaseTypeNodes(node: InterfaceDeclaration) { + var heritageClause = getHeritageClause(node.heritageClauses, SyntaxKind.ExtendsKeyword); + return heritageClause ? heritageClause.types : undefined; + } + + export function getHeritageClause(clauses: NodeArray, kind: SyntaxKind) { + if (clauses) { + for (var i = 0, n = clauses.length; i < n; i++) { + if (clauses[i].token === kind) { + return clauses[i]; + } + } + } + + return undefined; + } + + export function tryResolveScriptReference(program: Program, sourceFile: SourceFile, reference: FileReference) { + if (!program.getCompilerOptions().noResolve) { + var referenceFileName = isRootedDiskPath(reference.filename) ? reference.filename : combinePaths(getDirectoryPath(sourceFile.filename), reference.filename); + referenceFileName = getNormalizedAbsolutePath(referenceFileName, program.getCompilerHost().getCurrentDirectory()); + return program.getSourceFile(referenceFileName); + } + } + + export function getAncestor(node: Node, kind: SyntaxKind): Node { + switch (kind) { + // special-cases that can be come first + case SyntaxKind.ClassDeclaration: + while (node) { + switch (node.kind) { + case SyntaxKind.ClassDeclaration: + return node; + case SyntaxKind.EnumDeclaration: + case SyntaxKind.InterfaceDeclaration: + case SyntaxKind.TypeAliasDeclaration: + case SyntaxKind.ModuleDeclaration: + case SyntaxKind.ImportDeclaration: + // early exit cases - declarations cannot be nested in classes + return undefined; + default: + node = node.parent; + continue; + } + } + break; + default: + while (node) { + if (node.kind === kind) { + return node; + } + node = node.parent; + } + break; + } + + return undefined; + } + + export function getFileReferenceFromReferencePath(comment: string, commentRange: CommentRange): ReferencePathMatchResult { + var simpleReferenceRegEx = /^\/\/\/\s*/gim; + if (simpleReferenceRegEx.exec(comment)) { + if (isNoDefaultLibRegEx.exec(comment)) { + return { + isNoDefaultLib: true + } + } + else { + var matchResult = fullTripleSlashReferencePathRegEx.exec(comment); + if (matchResult) { + var start = commentRange.pos; + var end = commentRange.end; + return { + fileReference: { + pos: start, + end: end, + filename: matchResult[3] + }, + isNoDefaultLib: false + }; + } + else { + return { + diagnosticMessage: Diagnostics.Invalid_reference_directive_syntax, + isNoDefaultLib: false + }; + } + } + } + return undefined; + } + + export function isKeyword(token: SyntaxKind): boolean { + return SyntaxKind.FirstKeyword <= token && token <= SyntaxKind.LastKeyword; + } + + export function isTrivia(token: SyntaxKind) { + return SyntaxKind.FirstTriviaToken <= token && token <= SyntaxKind.LastTriviaToken; + } + + export function isModifier(token: SyntaxKind): boolean { + switch (token) { + case SyntaxKind.PublicKeyword: + case SyntaxKind.PrivateKeyword: + case SyntaxKind.ProtectedKeyword: + case SyntaxKind.StaticKeyword: + case SyntaxKind.ExportKeyword: + case SyntaxKind.DeclareKeyword: + case SyntaxKind.ConstKeyword: + return true; + } + return false; + } + +} \ No newline at end of file diff --git a/src/services/services.ts b/src/services/services.ts index 66108bb29bb..cdf4c55881a 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1662,6 +1662,10 @@ module ts { owners: string[]; } + export interface DisplayPartsSymbolWriter extends SymbolWriter { + displayParts(): SymbolDisplayPart[]; + } + export function displayPartsToString(displayParts: SymbolDisplayPart[]) { if (displayParts) { return map(displayParts, displayPart => displayPart.text).join(""); @@ -1670,100 +1674,6 @@ module ts { return ""; } - export interface DisplayPartsSymbolWriter extends SymbolWriter { - displayParts(): SymbolDisplayPart[]; - } - - var displayPartWriter = getDisplayPartWriter(); - function getDisplayPartWriter(): DisplayPartsSymbolWriter { - var displayParts: SymbolDisplayPart[]; - var lineStart: boolean; - var indent: number; - - resetWriter(); - return { - displayParts: () => displayParts, - writeKeyword: text => writeKind(text, SymbolDisplayPartKind.keyword), - writeOperator: text => writeKind(text, SymbolDisplayPartKind.operator), - writePunctuation: text => writeKind(text, SymbolDisplayPartKind.punctuation), - writeSpace: text => writeKind(text, SymbolDisplayPartKind.space), - writeStringLiteral: text => writeKind(text, SymbolDisplayPartKind.stringLiteral), - writeParameter: text => writeKind(text, SymbolDisplayPartKind.parameterName), - writeSymbol, - writeLine, - increaseIndent: () => { indent++; }, - decreaseIndent: () => { indent--; }, - clear: resetWriter, - trackSymbol: () => { } - }; - - function writeIndent() { - if (lineStart) { - var indentString = getIndentString(indent); - if (indentString) { - displayParts.push(displayPart(indentString, SymbolDisplayPartKind.space)); - } - lineStart = false; - } - } - - function writeKind(text: string, kind: SymbolDisplayPartKind) { - writeIndent(); - displayParts.push(displayPart(text, kind)); - } - - function writeSymbol(text: string, symbol: Symbol) { - writeIndent(); - displayParts.push(symbolPart(text, symbol)); - } - - function writeLine() { - displayParts.push(lineBreakPart()); - lineStart = true; - } - - function resetWriter() { - displayParts = [] - lineStart = true; - indent = 0; - } - } - - function displayPart(text: string, kind: SymbolDisplayPartKind, symbol?: Symbol): SymbolDisplayPart { - return { - text: text, - kind: SymbolDisplayPartKind[kind] - }; - } - - export function spacePart() { - return displayPart(" ", SymbolDisplayPartKind.space); - } - - export function keywordPart(kind: SyntaxKind) { - return displayPart(tokenToString(kind), SymbolDisplayPartKind.keyword); - } - - export function punctuationPart(kind: SyntaxKind) { - return displayPart(tokenToString(kind), SymbolDisplayPartKind.punctuation); - } - - export function operatorPart(kind: SyntaxKind) { - return displayPart(tokenToString(kind), SymbolDisplayPartKind.operator); - } - - export function textPart(text: string) { - return displayPart(text, SymbolDisplayPartKind.text); - } - - export function lineBreakPart() { - return displayPart("\n", SymbolDisplayPartKind.lineBreak); - } - - function isFirstDeclarationOfSymbolParameter(symbol: Symbol) { - return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === SyntaxKind.Parameter; - } - function isLocalVariableOrFunction(symbol: Symbol) { if (symbol.parent) { return false; // This is exported symbol @@ -1792,59 +1702,6 @@ module ts { }); } - export function symbolPart(text: string, symbol: Symbol) { - return displayPart(text, displayPartKind(symbol), symbol); - - function displayPartKind(symbol: Symbol): SymbolDisplayPartKind { - var flags = symbol.flags; - - if (flags & SymbolFlags.Variable) { - return isFirstDeclarationOfSymbolParameter(symbol) ? SymbolDisplayPartKind.parameterName : SymbolDisplayPartKind.localName; - } - else if (flags & SymbolFlags.Property) { return SymbolDisplayPartKind.propertyName; } - else if (flags & SymbolFlags.GetAccessor) { return SymbolDisplayPartKind.propertyName; } - else if (flags & SymbolFlags.SetAccessor) { return SymbolDisplayPartKind.propertyName; } - else if (flags & SymbolFlags.EnumMember) { return SymbolDisplayPartKind.enumMemberName; } - else if (flags & SymbolFlags.Function) { return SymbolDisplayPartKind.functionName; } - else if (flags & SymbolFlags.Class) { return SymbolDisplayPartKind.className; } - else if (flags & SymbolFlags.Interface) { return SymbolDisplayPartKind.interfaceName; } - else if (flags & SymbolFlags.Enum) { return SymbolDisplayPartKind.enumName; } - else if (flags & SymbolFlags.Module) { return SymbolDisplayPartKind.moduleName; } - else if (flags & SymbolFlags.Method) { return SymbolDisplayPartKind.methodName; } - else if (flags & SymbolFlags.TypeParameter) { return SymbolDisplayPartKind.typeParameterName; } - else if (flags & SymbolFlags.TypeAlias) { return SymbolDisplayPartKind.aliasName; } - else if (flags & SymbolFlags.Import) { return SymbolDisplayPartKind.aliasName; } - - - return SymbolDisplayPartKind.text; - } - } - - export function mapToDisplayParts(writeDisplayParts: (writer: DisplayPartsSymbolWriter) => void): SymbolDisplayPart[] { - writeDisplayParts(displayPartWriter); - var result = displayPartWriter.displayParts(); - displayPartWriter.clear(); - return result; - } - - export function typeToDisplayParts(typechecker: TypeChecker, type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): SymbolDisplayPart[] { - return mapToDisplayParts(writer => { - typechecker.getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags); - }); - } - - export function symbolToDisplayParts(typeChecker: TypeChecker, symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): SymbolDisplayPart[] { - return mapToDisplayParts(writer => { - typeChecker.getSymbolDisplayBuilder().buildSymbolDisplay(symbol, writer, enclosingDeclaration, meaning, flags); - }); - } - - function signatureToDisplayParts(typechecker: TypeChecker, signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags): SymbolDisplayPart[]{ - return mapToDisplayParts(writer => { - typechecker.getSymbolDisplayBuilder().buildSignatureDisplay(signature, writer, enclosingDeclaration, flags); - }); - } - export function getDefaultCompilerOptions(): CompilerOptions { // Set "ScriptTarget.Latest" target by default for language service return { @@ -1853,20 +1710,6 @@ module ts { }; } - export function compareDataObjects(dst: any, src: any): boolean { - for (var e in dst) { - if (typeof dst[e] === "object") { - if (!compareDataObjects(dst[e], src[e])) - return false; - } - else if (typeof dst[e] !== "function") { - if (dst[e] !== src[e]) - return false; - } - } - return true; - } - export class OperationCanceledException { } export class CancellationTokenObject { @@ -2205,20 +2048,6 @@ module ts { } /// Helpers - export function getNodeModifiers(node: Node): string { - var flags = node.flags; - var result: string[] = []; - - if (flags & NodeFlags.Private) result.push(ScriptElementKindModifier.privateMemberModifier); - if (flags & NodeFlags.Protected) result.push(ScriptElementKindModifier.protectedMemberModifier); - if (flags & NodeFlags.Public) result.push(ScriptElementKindModifier.publicMemberModifier); - if (flags & NodeFlags.Static) result.push(ScriptElementKindModifier.staticModifier); - if (flags & NodeFlags.Export) result.push(ScriptElementKindModifier.exportedModifier); - if (isInAmbientContext(node)) result.push(ScriptElementKindModifier.ambientModifier); - - return result.length > 0 ? result.join(',') : ScriptElementKindModifier.none; - } - function getTargetLabel(referenceNode: Node, labelName: string): Identifier { while (referenceNode) { if (referenceNode.kind === SyntaxKind.LabeledStatement && (referenceNode).label.text === labelName) { diff --git a/src/services/utilities.ts b/src/services/utilities.ts index 32551d9737b..146ea141d76 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -270,7 +270,21 @@ module ts { return n.getWidth() !== 0; } - export function getTypeArgumentOrTypeParameterList(node: Node): NodeArray { + export function getNodeModifiers(node: Node): string { + var flags = node.flags; + var result: string[] = []; + + if (flags & NodeFlags.Private) result.push(ScriptElementKindModifier.privateMemberModifier); + if (flags & NodeFlags.Protected) result.push(ScriptElementKindModifier.protectedMemberModifier); + if (flags & NodeFlags.Public) result.push(ScriptElementKindModifier.publicMemberModifier); + if (flags & NodeFlags.Static) result.push(ScriptElementKindModifier.staticModifier); + if (flags & NodeFlags.Export) result.push(ScriptElementKindModifier.exportedModifier); + if (isInAmbientContext(node)) result.push(ScriptElementKindModifier.ambientModifier); + + return result.length > 0 ? result.join(',') : ScriptElementKindModifier.none; + } + + export function getTypeArgumentOrTypeParameterList(node: Node): NodeArray { if (node.kind === SyntaxKind.TypeReference || node.kind === SyntaxKind.CallExpression) { return (node).typeArguments; } @@ -306,4 +320,166 @@ module ts { return isTemplateLiteralKind(node.kind) && (node.getStart() < position && position < node.getEnd()) || (!!node.isUnterminated && position === node.getEnd()); } + + export function compareDataObjects(dst: any, src: any): boolean { + for (var e in dst) { + if (typeof dst[e] === "object") { + if (!compareDataObjects(dst[e], src[e])) { + return false; + } + } + else if (typeof dst[e] !== "function") { + if (dst[e] !== src[e]) { + return false; + } + } + } + return true; + } +} + +// Display-part writer helpers +module ts { + export function isFirstDeclarationOfSymbolParameter(symbol: Symbol) { + return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === SyntaxKind.Parameter; + } + + var displayPartWriter = getDisplayPartWriter(); + function getDisplayPartWriter(): DisplayPartsSymbolWriter { + var displayParts: SymbolDisplayPart[]; + var lineStart: boolean; + var indent: number; + + resetWriter(); + return { + displayParts: () => displayParts, + writeKeyword: text => writeKind(text, SymbolDisplayPartKind.keyword), + writeOperator: text => writeKind(text, SymbolDisplayPartKind.operator), + writePunctuation: text => writeKind(text, SymbolDisplayPartKind.punctuation), + writeSpace: text => writeKind(text, SymbolDisplayPartKind.space), + writeStringLiteral: text => writeKind(text, SymbolDisplayPartKind.stringLiteral), + writeParameter: text => writeKind(text, SymbolDisplayPartKind.parameterName), + writeSymbol, + writeLine, + increaseIndent: () => { indent++; }, + decreaseIndent: () => { indent--; }, + clear: resetWriter, + trackSymbol: () => { } + }; + + function writeIndent() { + if (lineStart) { + var indentString = getIndentString(indent); + if (indentString) { + displayParts.push(displayPart(indentString, SymbolDisplayPartKind.space)); + } + lineStart = false; + } + } + + function writeKind(text: string, kind: SymbolDisplayPartKind) { + writeIndent(); + displayParts.push(displayPart(text, kind)); + } + + function writeSymbol(text: string, symbol: Symbol) { + writeIndent(); + displayParts.push(symbolPart(text, symbol)); + } + + function writeLine() { + displayParts.push(lineBreakPart()); + lineStart = true; + } + + function resetWriter() { + displayParts = [] + lineStart = true; + indent = 0; + } + } + + export function symbolPart(text: string, symbol: Symbol) { + return displayPart(text, displayPartKind(symbol), symbol); + + function displayPartKind(symbol: Symbol): SymbolDisplayPartKind { + var flags = symbol.flags; + + if (flags & SymbolFlags.Variable) { + return isFirstDeclarationOfSymbolParameter(symbol) ? SymbolDisplayPartKind.parameterName : SymbolDisplayPartKind.localName; + } + else if (flags & SymbolFlags.Property) { return SymbolDisplayPartKind.propertyName; } + else if (flags & SymbolFlags.GetAccessor) { return SymbolDisplayPartKind.propertyName; } + else if (flags & SymbolFlags.SetAccessor) { return SymbolDisplayPartKind.propertyName; } + else if (flags & SymbolFlags.EnumMember) { return SymbolDisplayPartKind.enumMemberName; } + else if (flags & SymbolFlags.Function) { return SymbolDisplayPartKind.functionName; } + else if (flags & SymbolFlags.Class) { return SymbolDisplayPartKind.className; } + else if (flags & SymbolFlags.Interface) { return SymbolDisplayPartKind.interfaceName; } + else if (flags & SymbolFlags.Enum) { return SymbolDisplayPartKind.enumName; } + else if (flags & SymbolFlags.Module) { return SymbolDisplayPartKind.moduleName; } + else if (flags & SymbolFlags.Method) { return SymbolDisplayPartKind.methodName; } + else if (flags & SymbolFlags.TypeParameter) { return SymbolDisplayPartKind.typeParameterName; } + else if (flags & SymbolFlags.TypeAlias) { return SymbolDisplayPartKind.aliasName; } + else if (flags & SymbolFlags.Import) { return SymbolDisplayPartKind.aliasName; } + + + return SymbolDisplayPartKind.text; + } + } + + export function displayPart(text: string, kind: SymbolDisplayPartKind, symbol?: Symbol): SymbolDisplayPart { + return { + text: text, + kind: SymbolDisplayPartKind[kind] + }; + } + + export function spacePart() { + return displayPart(" ", SymbolDisplayPartKind.space); + } + + export function keywordPart(kind: SyntaxKind) { + return displayPart(tokenToString(kind), SymbolDisplayPartKind.keyword); + } + + export function punctuationPart(kind: SyntaxKind) { + return displayPart(tokenToString(kind), SymbolDisplayPartKind.punctuation); + } + + export function operatorPart(kind: SyntaxKind) { + return displayPart(tokenToString(kind), SymbolDisplayPartKind.operator); + } + + export function textPart(text: string) { + return displayPart(text, SymbolDisplayPartKind.text); + } + + export function lineBreakPart() { + return displayPart("\n", SymbolDisplayPartKind.lineBreak); + } + + export function mapToDisplayParts(writeDisplayParts: (writer: DisplayPartsSymbolWriter) => void): SymbolDisplayPart[] { + writeDisplayParts(displayPartWriter); + var result = displayPartWriter.displayParts(); + displayPartWriter.clear(); + return result; + } + + export function typeToDisplayParts(typechecker: TypeChecker, type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): SymbolDisplayPart[] { + return mapToDisplayParts(writer => { + typechecker.getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags); + }); + } + + export function symbolToDisplayParts(typeChecker: TypeChecker, symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): SymbolDisplayPart[] { + return mapToDisplayParts(writer => { + typeChecker.getSymbolDisplayBuilder().buildSymbolDisplay(symbol, writer, enclosingDeclaration, meaning, flags); + }); + } + + export function signatureToDisplayParts(typechecker: TypeChecker, signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags): SymbolDisplayPart[] { + return mapToDisplayParts(writer => { + typechecker.getSymbolDisplayBuilder().buildSignatureDisplay(signature, writer, enclosingDeclaration, flags); + }); + } } \ No newline at end of file From b45ab580d517253e2149d34a08ea700e27f160e5 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Sun, 7 Dec 2014 22:17:39 -0800 Subject: [PATCH 119/141] Add tests for public declarations --- src/harness/harness.ts | 8 +- .../reference/APISample_node_compile.js | 1840 ++++++ .../reference/APISample_node_compile.types | 5647 +++++++++++++++++ .../reference/APISample_standalone_compile.js | 1836 ++++++ .../APISample_standalone_compile.types | 5641 ++++++++++++++++ .../cases/compiler/APISample_node_compile.ts | 11 + .../compiler/APISample_standalone_compile.ts | 7 + 7 files changed, 14989 insertions(+), 1 deletion(-) create mode 100644 tests/baselines/reference/APISample_node_compile.js create mode 100644 tests/baselines/reference/APISample_node_compile.types create mode 100644 tests/baselines/reference/APISample_standalone_compile.js create mode 100644 tests/baselines/reference/APISample_standalone_compile.types create mode 100644 tests/cases/compiler/APISample_node_compile.ts create mode 100644 tests/cases/compiler/APISample_standalone_compile.ts diff --git a/src/harness/harness.ts b/src/harness/harness.ts index d39c9956424..9bab6596fe6 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -837,9 +837,15 @@ module Harness { case 'errortruncation': options.noErrorTruncation = setting.value === 'false'; break; + case 'preserveconstenums': options.preserveConstEnums = setting.value === 'true'; break; + + case 'includebuiltfile': + inputFiles.push({ unitName: setting.value, content: IO.readFile(libFolder + setting.value)}); + break; + default: throw new Error('Unsupported compiler setting ' + setting.flag); } @@ -1229,7 +1235,7 @@ module Harness { var optionRegex = /^[\/]{2}\s*@(\w+)\s*:\s*(\S*)/gm; // multiple matches on multiple lines // List of allowed metadata names - var fileMetadataNames = ["filename", "comments", "declaration", "module", "nolib", "sourcemap", "target", "out", "outdir", "noemitonerror","noimplicitany", "noresolve", "newline", "newlines", "emitbom", "errortruncation", "usecasesensitivefilenames", "preserveconstenums"]; + var fileMetadataNames = ["filename", "comments", "declaration", "module", "nolib", "sourcemap", "target", "out", "outdir", "noemitonerror", "noimplicitany", "noresolve", "newline", "newlines", "emitbom", "errortruncation", "usecasesensitivefilenames", "preserveconstenums", "includebuiltfile"]; function extractCompilerSettings(content: string): CompilerSetting[] { diff --git a/tests/baselines/reference/APISample_node_compile.js b/tests/baselines/reference/APISample_node_compile.js new file mode 100644 index 00000000000..2329e7be57c --- /dev/null +++ b/tests/baselines/reference/APISample_node_compile.js @@ -0,0 +1,1840 @@ +//// [tests/cases/compiler/APISample_node_compile.ts] //// + +//// [APISample_node_compile.ts] + +import ts = require("typescript"); + +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); + +var program = ts.createProgram(["file1.ts"], {}, undefined); +//// [typescript.d.ts] +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + +declare module ts { + interface Map { + [index: string]: T; + } + interface TextRange { + pos: number; + end: number; + } + const enum SyntaxKind { + Unknown = 0, + EndOfFileToken = 1, + SingleLineCommentTrivia = 2, + MultiLineCommentTrivia = 3, + NewLineTrivia = 4, + WhitespaceTrivia = 5, + NumericLiteral = 6, + StringLiteral = 7, + RegularExpressionLiteral = 8, + NoSubstitutionTemplateLiteral = 9, + TemplateHead = 10, + TemplateMiddle = 11, + TemplateTail = 12, + OpenBraceToken = 13, + CloseBraceToken = 14, + OpenParenToken = 15, + CloseParenToken = 16, + OpenBracketToken = 17, + CloseBracketToken = 18, + DotToken = 19, + DotDotDotToken = 20, + SemicolonToken = 21, + CommaToken = 22, + LessThanToken = 23, + GreaterThanToken = 24, + LessThanEqualsToken = 25, + GreaterThanEqualsToken = 26, + EqualsEqualsToken = 27, + ExclamationEqualsToken = 28, + EqualsEqualsEqualsToken = 29, + ExclamationEqualsEqualsToken = 30, + EqualsGreaterThanToken = 31, + PlusToken = 32, + MinusToken = 33, + AsteriskToken = 34, + SlashToken = 35, + PercentToken = 36, + PlusPlusToken = 37, + MinusMinusToken = 38, + LessThanLessThanToken = 39, + GreaterThanGreaterThanToken = 40, + GreaterThanGreaterThanGreaterThanToken = 41, + AmpersandToken = 42, + BarToken = 43, + CaretToken = 44, + ExclamationToken = 45, + TildeToken = 46, + AmpersandAmpersandToken = 47, + BarBarToken = 48, + QuestionToken = 49, + ColonToken = 50, + EqualsToken = 51, + PlusEqualsToken = 52, + MinusEqualsToken = 53, + AsteriskEqualsToken = 54, + SlashEqualsToken = 55, + PercentEqualsToken = 56, + LessThanLessThanEqualsToken = 57, + GreaterThanGreaterThanEqualsToken = 58, + GreaterThanGreaterThanGreaterThanEqualsToken = 59, + AmpersandEqualsToken = 60, + BarEqualsToken = 61, + CaretEqualsToken = 62, + Identifier = 63, + BreakKeyword = 64, + CaseKeyword = 65, + CatchKeyword = 66, + ClassKeyword = 67, + ConstKeyword = 68, + ContinueKeyword = 69, + DebuggerKeyword = 70, + DefaultKeyword = 71, + DeleteKeyword = 72, + DoKeyword = 73, + ElseKeyword = 74, + EnumKeyword = 75, + ExportKeyword = 76, + ExtendsKeyword = 77, + FalseKeyword = 78, + FinallyKeyword = 79, + ForKeyword = 80, + FunctionKeyword = 81, + IfKeyword = 82, + ImportKeyword = 83, + InKeyword = 84, + InstanceOfKeyword = 85, + NewKeyword = 86, + NullKeyword = 87, + ReturnKeyword = 88, + SuperKeyword = 89, + SwitchKeyword = 90, + ThisKeyword = 91, + ThrowKeyword = 92, + TrueKeyword = 93, + TryKeyword = 94, + TypeOfKeyword = 95, + VarKeyword = 96, + VoidKeyword = 97, + WhileKeyword = 98, + WithKeyword = 99, + ImplementsKeyword = 100, + InterfaceKeyword = 101, + LetKeyword = 102, + PackageKeyword = 103, + PrivateKeyword = 104, + ProtectedKeyword = 105, + PublicKeyword = 106, + StaticKeyword = 107, + YieldKeyword = 108, + AnyKeyword = 109, + BooleanKeyword = 110, + ConstructorKeyword = 111, + DeclareKeyword = 112, + GetKeyword = 113, + ModuleKeyword = 114, + RequireKeyword = 115, + NumberKeyword = 116, + SetKeyword = 117, + StringKeyword = 118, + TypeKeyword = 119, + Missing = 120, + QualifiedName = 121, + ComputedPropertyName = 122, + TypeParameter = 123, + Parameter = 124, + Property = 125, + Method = 126, + Constructor = 127, + GetAccessor = 128, + SetAccessor = 129, + CallSignature = 130, + ConstructSignature = 131, + IndexSignature = 132, + TypeReference = 133, + FunctionType = 134, + ConstructorType = 135, + TypeQuery = 136, + TypeLiteral = 137, + ArrayType = 138, + TupleType = 139, + UnionType = 140, + ParenthesizedType = 141, + ArrayLiteralExpression = 142, + ObjectLiteralExpression = 143, + PropertyAccessExpression = 144, + ElementAccessExpression = 145, + CallExpression = 146, + NewExpression = 147, + TaggedTemplateExpression = 148, + TypeAssertionExpression = 149, + ParenthesizedExpression = 150, + FunctionExpression = 151, + ArrowFunction = 152, + DeleteExpression = 153, + TypeOfExpression = 154, + VoidExpression = 155, + PrefixUnaryExpression = 156, + PostfixUnaryExpression = 157, + BinaryExpression = 158, + ConditionalExpression = 159, + TemplateExpression = 160, + YieldExpression = 161, + OmittedExpression = 162, + TemplateSpan = 163, + Block = 164, + VariableStatement = 165, + EmptyStatement = 166, + ExpressionStatement = 167, + IfStatement = 168, + DoStatement = 169, + WhileStatement = 170, + ForStatement = 171, + ForInStatement = 172, + ContinueStatement = 173, + BreakStatement = 174, + ReturnStatement = 175, + WithStatement = 176, + SwitchStatement = 177, + LabeledStatement = 178, + ThrowStatement = 179, + TryStatement = 180, + TryBlock = 181, + CatchBlock = 182, + FinallyBlock = 183, + DebuggerStatement = 184, + VariableDeclaration = 185, + FunctionDeclaration = 186, + FunctionBlock = 187, + ClassDeclaration = 188, + InterfaceDeclaration = 189, + TypeAliasDeclaration = 190, + EnumDeclaration = 191, + ModuleDeclaration = 192, + ModuleBlock = 193, + ImportDeclaration = 194, + ExportAssignment = 195, + CaseClause = 196, + DefaultClause = 197, + HeritageClause = 198, + PropertyAssignment = 199, + ShorthandPropertyAssignment = 200, + EnumMember = 201, + SourceFile = 202, + Program = 203, + SyntaxList = 204, + Count = 205, + FirstAssignment = 51, + LastAssignment = 62, + FirstReservedWord = 64, + LastReservedWord = 99, + FirstKeyword = 64, + LastKeyword = 119, + FirstFutureReservedWord = 100, + LastFutureReservedWord = 108, + FirstTypeNode = 133, + LastTypeNode = 141, + FirstPunctuation = 13, + LastPunctuation = 62, + FirstToken = 1, + LastToken = 119, + FirstTriviaToken = 2, + LastTriviaToken = 5, + FirstLiteralToken = 6, + LastLiteralToken = 9, + FirstTemplateToken = 9, + LastTemplateToken = 12, + FirstOperator = 21, + LastOperator = 62, + FirstBinaryOperator = 23, + LastBinaryOperator = 62, + } + const enum NodeFlags { + Export = 1, + Ambient = 2, + QuestionMark = 4, + Rest = 8, + Public = 16, + Private = 32, + Protected = 64, + Static = 128, + MultiLine = 256, + Synthetic = 512, + DeclarationFile = 1024, + Let = 2048, + Const = 4096, + OctalLiteral = 8192, + Modifier = 243, + AccessibilityModifier = 112, + BlockScoped = 6144, + } + const enum ParserContextFlags { + StrictMode = 1, + DisallowIn = 2, + Yield = 4, + GeneratorParameter = 8, + } + interface Node extends TextRange { + kind: SyntaxKind; + flags: NodeFlags; + parserContextFlags?: ParserContextFlags; + id?: number; + parent?: Node; + symbol?: Symbol; + locals?: SymbolTable; + nextContainer?: Node; + localSymbol?: Symbol; + modifiers?: ModifiersArray; + } + interface NodeArray extends Array, TextRange { + hasTrailingComma?: boolean; + } + interface ModifiersArray extends Array { + flags: number; + } + interface Identifier extends PrimaryExpression { + text: string; + } + interface QualifiedName extends Node { + left: EntityName; + right: Identifier; + } + type EntityName = Identifier | QualifiedName; + interface ParsedSignature { + typeParameters?: NodeArray; + parameters: NodeArray; + type?: TypeNode; + } + type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; + interface Declaration extends Node { + _declarationBrand: any; + name?: DeclarationName; + } + interface ComputedPropertyName extends Node { + expression: Expression; + } + interface TypeParameterDeclaration extends Declaration { + name: Identifier; + constraint?: TypeNode; + expression?: Expression; + } + interface SignatureDeclaration extends Declaration, ParsedSignature { + } + interface VariableDeclaration extends Declaration { + name: Identifier; + type?: TypeNode; + initializer?: Expression; + } + interface PropertyDeclaration extends Declaration, ClassElement { + type?: TypeNode; + initializer?: Expression; + } + interface ShortHandPropertyDeclaration extends Declaration { + name: Identifier; + } + interface ParameterDeclaration extends VariableDeclaration { + } + /** + * Several node kinds share function-like features such as a signature, + * a name, and a body. These nodes should extend FunctionLikeDeclaration. + * Examples: + * FunctionDeclaration + * MethodDeclaration + * AccessorDeclaration + */ + interface FunctionLikeDeclaration extends SignatureDeclaration { + _functionLikeDeclarationBrand: any; + asteriskToken?: Node; + body?: Block | Expression; + } + interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { + name: Identifier; + body?: Block; + } + interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement { + body?: Block; + } + interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { + body?: Block; + } + interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement { + body?: Block; + } + interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { + _indexSignatureDeclarationBrand: any; + } + interface TypeNode extends Node { + } + interface TypeReferenceNode extends TypeNode { + typeName: EntityName; + typeArguments?: NodeArray; + } + interface TypeQueryNode extends TypeNode { + exprName: EntityName; + } + interface TypeLiteralNode extends TypeNode, Declaration { + members: NodeArray; + } + interface ArrayTypeNode extends TypeNode { + elementType: TypeNode; + } + interface TupleTypeNode extends TypeNode { + elementTypes: NodeArray; + } + interface UnionTypeNode extends TypeNode { + types: NodeArray; + } + interface ParenthesizedTypeNode extends TypeNode { + type: TypeNode; + } + interface StringLiteralTypeNode extends TypeNode { + text: string; + } + interface Expression extends Node { + _expressionBrand: any; + contextualType?: Type; + } + interface UnaryExpression extends Expression { + _unaryExpressionBrand: any; + } + interface PrefixUnaryExpression extends UnaryExpression { + operator: SyntaxKind; + operand: UnaryExpression; + } + interface PostfixUnaryExpression extends PostfixExpression { + operand: LeftHandSideExpression; + operator: SyntaxKind; + } + interface PostfixExpression extends UnaryExpression { + _postfixExpressionBrand: any; + } + interface LeftHandSideExpression extends PostfixExpression { + _leftHandSideExpressionBrand: any; + } + interface MemberExpression extends LeftHandSideExpression { + _memberExpressionBrand: any; + } + interface PrimaryExpression extends MemberExpression { + _primaryExpressionBrand: any; + } + interface DeleteExpression extends UnaryExpression { + expression: UnaryExpression; + } + interface TypeOfExpression extends UnaryExpression { + expression: UnaryExpression; + } + interface VoidExpression extends UnaryExpression { + expression: UnaryExpression; + } + interface YieldExpression extends Expression { + asteriskToken?: Node; + expression: Expression; + } + interface BinaryExpression extends Expression { + left: Expression; + operator: SyntaxKind; + right: Expression; + } + interface ConditionalExpression extends Expression { + condition: Expression; + whenTrue: Expression; + whenFalse: Expression; + } + interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { + name?: Identifier; + body: Block | Expression; + } + interface LiteralExpression extends PrimaryExpression { + text: string; + } + interface TemplateExpression extends PrimaryExpression { + head: LiteralExpression; + templateSpans: NodeArray; + } + interface TemplateSpan extends Node { + expression: Expression; + literal: LiteralExpression; + } + interface ParenthesizedExpression extends PrimaryExpression { + expression: Expression; + } + interface ArrayLiteralExpression extends PrimaryExpression { + elements: NodeArray; + } + interface ObjectLiteralExpression extends PrimaryExpression, Declaration { + properties: NodeArray; + } + interface PropertyAccessExpression extends MemberExpression { + expression: LeftHandSideExpression; + name: Identifier; + } + interface ElementAccessExpression extends MemberExpression { + expression: LeftHandSideExpression; + argumentExpression: Expression; + } + interface CallExpression extends LeftHandSideExpression { + expression: LeftHandSideExpression; + typeArguments?: NodeArray; + arguments: NodeArray; + } + interface NewExpression extends CallExpression, PrimaryExpression { + } + interface TaggedTemplateExpression extends MemberExpression { + tag: LeftHandSideExpression; + template: LiteralExpression | TemplateExpression; + } + type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression; + interface TypeAssertion extends UnaryExpression { + type: TypeNode; + expression: UnaryExpression; + } + interface Statement extends Node, ModuleElement { + _statementBrand: any; + } + interface Block extends Statement { + statements: NodeArray; + } + interface VariableStatement extends Statement { + declarations: NodeArray; + } + interface ExpressionStatement extends Statement { + expression: Expression; + } + interface IfStatement extends Statement { + expression: Expression; + thenStatement: Statement; + elseStatement?: Statement; + } + interface IterationStatement extends Statement { + statement: Statement; + } + interface DoStatement extends IterationStatement { + expression: Expression; + } + interface WhileStatement extends IterationStatement { + expression: Expression; + } + interface ForStatement extends IterationStatement { + declarations?: NodeArray; + initializer?: Expression; + condition?: Expression; + iterator?: Expression; + } + interface ForInStatement extends IterationStatement { + declarations?: NodeArray; + variable?: Expression; + expression: Expression; + } + interface BreakOrContinueStatement extends Statement { + label?: Identifier; + } + interface ReturnStatement extends Statement { + expression?: Expression; + } + interface WithStatement extends Statement { + expression: Expression; + statement: Statement; + } + interface SwitchStatement extends Statement { + expression: Expression; + clauses: NodeArray; + } + interface CaseOrDefaultClause extends Node { + expression?: Expression; + statements: NodeArray; + } + interface LabeledStatement extends Statement { + label: Identifier; + statement: Statement; + } + interface ThrowStatement extends Statement { + expression: Expression; + } + interface TryStatement extends Statement { + tryBlock: Block; + catchBlock?: CatchBlock; + finallyBlock?: Block; + } + interface CatchBlock extends Block, Declaration { + variable: Identifier; + type?: TypeNode; + } + interface ModuleElement extends Node { + _moduleElementBrand: any; + } + interface ClassDeclaration extends Declaration, ModuleElement { + name: Identifier; + typeParameters?: NodeArray; + heritageClauses?: NodeArray; + members: NodeArray; + } + interface ClassElement extends Declaration { + _classElementBrand: any; + } + interface InterfaceDeclaration extends Declaration, ModuleElement { + name: Identifier; + typeParameters?: NodeArray; + heritageClauses?: NodeArray; + members: NodeArray; + } + interface HeritageClause extends Node { + token: SyntaxKind; + types?: NodeArray; + } + interface TypeAliasDeclaration extends Declaration, ModuleElement { + name: Identifier; + type: TypeNode; + } + interface EnumMember extends Declaration { + name: DeclarationName; + initializer?: Expression; + } + interface EnumDeclaration extends Declaration, ModuleElement { + name: Identifier; + members: NodeArray; + } + interface ModuleDeclaration extends Declaration, ModuleElement { + name: Identifier | LiteralExpression; + body: ModuleBlock | ModuleDeclaration; + } + interface ModuleBlock extends Node, ModuleElement { + statements: NodeArray; + } + interface ImportDeclaration extends Declaration, ModuleElement { + name: Identifier; + entityName?: EntityName; + externalModuleName?: LiteralExpression; + } + interface ExportAssignment extends Statement, ModuleElement { + exportName: Identifier; + } + interface FileReference extends TextRange { + filename: string; + } + interface CommentRange extends TextRange { + hasTrailingNewLine?: boolean; + } + interface SourceFile extends Declaration { + statements: NodeArray; + filename: string; + text: string; + getLineAndCharacterFromPosition(position: number): LineAndCharacter; + getPositionFromLineAndCharacter(line: number, character: number): number; + getLineStarts(): number[]; + amdDependencies: string[]; + amdModuleName: string; + referencedFiles: FileReference[]; + semanticDiagnostics: Diagnostic[]; + parseDiagnostics: Diagnostic[]; + grammarDiagnostics: Diagnostic[]; + getSyntacticDiagnostics(): Diagnostic[]; + hasNoDefaultLib: boolean; + externalModuleIndicator: Node; + nodeCount: number; + identifierCount: number; + symbolCount: number; + isOpen: boolean; + version: string; + languageVersion: ScriptTarget; + identifiers: Map; + } + interface Program { + getSourceFile(filename: string): SourceFile; + getSourceFiles(): SourceFile[]; + getCompilerOptions(): CompilerOptions; + getCompilerHost(): CompilerHost; + getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; + getGlobalDiagnostics(): Diagnostic[]; + getTypeChecker(fullTypeCheckMode: boolean): TypeChecker; + getCommonSourceDirectory(): string; + } + interface SourceMapSpan { + emittedLine: number; + emittedColumn: number; + sourceLine: number; + sourceColumn: number; + nameIndex?: number; + sourceIndex: number; + } + interface SourceMapData { + sourceMapFilePath: string; + jsSourceMappingURL: string; + sourceMapFile: string; + sourceMapSourceRoot: string; + sourceMapSources: string[]; + inputSourceFileNames: string[]; + sourceMapNames?: string[]; + sourceMapMappings: string; + sourceMapDecodedMappings: SourceMapSpan[]; + } + enum EmitReturnStatus { + Succeeded = 0, + AllOutputGenerationSkipped = 1, + JSGeneratedWithSemanticErrors = 2, + DeclarationGenerationSkipped = 3, + EmitErrorsEncountered = 4, + CompilerOptionsErrors = 5, + } + interface EmitResult { + emitResultStatus: EmitReturnStatus; + diagnostics: Diagnostic[]; + sourceMaps: SourceMapData[]; + } + interface TypeChecker { + getProgram(): Program; + getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; + getDeclarationDiagnostics(sourceFile: SourceFile): Diagnostic[]; + getGlobalDiagnostics(): Diagnostic[]; + getNodeCount(): number; + getIdentifierCount(): number; + getSymbolCount(): number; + getTypeCount(): number; + checkProgram(): void; + emitFiles(targetSourceFile?: SourceFile): EmitResult; + getParentOfSymbol(symbol: Symbol): Symbol; + getNarrowedTypeOfSymbol(symbol: Symbol, node: Node): Type; + getDeclaredTypeOfSymbol(symbol: Symbol): Type; + getPropertiesOfType(type: Type): Symbol[]; + getPropertyOfType(type: Type, propertyName: string): Symbol; + getSignaturesOfType(type: Type, kind: SignatureKind): Signature[]; + getIndexTypeOfType(type: Type, kind: IndexKind): Type; + getReturnTypeOfSignature(signature: Signature): Type; + getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; + getSymbolInfo(node: Node): Symbol; + getShorthandAssignmentValueSymbol(location: Node): Symbol; + getTypeOfNode(node: Node): Type; + typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; + symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; + getSymbolDisplayBuilder(): SymbolDisplayBuilder; + getFullyQualifiedName(symbol: Symbol): string; + getAugmentedPropertiesOfType(type: Type): Symbol[]; + getRootSymbols(symbol: Symbol): Symbol[]; + getContextualType(node: Node): Type; + getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; + getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; + isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; + isUndefinedSymbol(symbol: Symbol): boolean; + isArgumentsSymbol(symbol: Symbol): boolean; + isEmitBlocked(sourceFile?: SourceFile): boolean; + getEnumMemberValue(node: EnumMember): number; + isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; + getAliasedSymbol(symbol: Symbol): Symbol; + } + interface SymbolDisplayBuilder { + buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void; + buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void; + buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + } + interface SymbolWriter { + writeKeyword(text: string): void; + writeOperator(text: string): void; + writePunctuation(text: string): void; + writeSpace(text: string): void; + writeStringLiteral(text: string): void; + writeParameter(text: string): void; + writeSymbol(text: string, symbol: Symbol): void; + writeLine(): void; + increaseIndent(): void; + decreaseIndent(): void; + clear(): void; + trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void; + } + const enum TypeFormatFlags { + None = 0, + WriteArrayAsGenericType = 1, + UseTypeOfFunction = 2, + NoTruncation = 4, + WriteArrowStyleSignature = 8, + WriteOwnNameForAnyLike = 16, + WriteTypeArgumentsOfSignature = 32, + InElementType = 64, + } + const enum SymbolFormatFlags { + None = 0, + WriteTypeParametersOrArguments = 1, + UseOnlyExternalAliasing = 2, + } + const enum SymbolAccessibility { + Accessible = 0, + NotAccessible = 1, + CannotBeNamed = 2, + } + interface SymbolVisibilityResult { + accessibility: SymbolAccessibility; + aliasesToMakeVisible?: ImportDeclaration[]; + errorSymbolName?: string; + errorNode?: Node; + } + interface SymbolAccessiblityResult extends SymbolVisibilityResult { + errorModuleName?: string; + } + interface EmitResolver { + getProgram(): Program; + getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; + getExpressionNamePrefix(node: Identifier): string; + getExportAssignmentName(node: SourceFile): string; + isReferencedImportDeclaration(node: ImportDeclaration): boolean; + isTopLevelValueImportWithEntityName(node: ImportDeclaration): boolean; + getNodeCheckFlags(node: Node): NodeCheckFlags; + getEnumMemberValue(node: EnumMember): number; + hasSemanticErrors(): boolean; + isDeclarationVisible(node: Declaration): boolean; + isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; + writeTypeAtLocation(location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; + writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; + isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; + isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; + getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number; + isEmitBlocked(sourceFile?: SourceFile): boolean; + } + const enum SymbolFlags { + FunctionScopedVariable = 1, + BlockScopedVariable = 2, + Property = 4, + EnumMember = 8, + Function = 16, + Class = 32, + Interface = 64, + ConstEnum = 128, + RegularEnum = 256, + ValueModule = 512, + NamespaceModule = 1024, + TypeLiteral = 2048, + ObjectLiteral = 4096, + Method = 8192, + Constructor = 16384, + GetAccessor = 32768, + SetAccessor = 65536, + CallSignature = 131072, + ConstructSignature = 262144, + IndexSignature = 524288, + TypeParameter = 1048576, + TypeAlias = 2097152, + ExportValue = 4194304, + ExportType = 8388608, + ExportNamespace = 16777216, + Import = 33554432, + Instantiated = 67108864, + Merged = 134217728, + Transient = 268435456, + Prototype = 536870912, + UnionProperty = 1073741824, + Enum = 384, + Variable = 3, + Value = 107455, + Type = 3152352, + Namespace = 1536, + Module = 1536, + Accessor = 98304, + Signature = 917504, + FunctionScopedVariableExcludes = 107454, + BlockScopedVariableExcludes = 107455, + ParameterExcludes = 107455, + PropertyExcludes = 107455, + EnumMemberExcludes = 107455, + FunctionExcludes = 106927, + ClassExcludes = 3258879, + InterfaceExcludes = 3152288, + RegularEnumExcludes = 3258623, + ConstEnumExcludes = 3259263, + ValueModuleExcludes = 106639, + NamespaceModuleExcludes = 0, + MethodExcludes = 99263, + GetAccessorExcludes = 41919, + SetAccessorExcludes = 74687, + TypeParameterExcludes = 2103776, + TypeAliasExcludes = 3152352, + ImportExcludes = 33554432, + ModuleMember = 35653619, + ExportHasLocal = 944, + HasLocals = 1041936, + HasExports = 1952, + HasMembers = 6240, + IsContainer = 1048560, + PropertyOrAccessor = 98308, + Export = 29360128, + } + interface Symbol { + flags: SymbolFlags; + name: string; + id?: number; + mergeId?: number; + declarations?: Declaration[]; + parent?: Symbol; + members?: SymbolTable; + exports?: SymbolTable; + exportSymbol?: Symbol; + valueDeclaration?: Declaration; + constEnumOnlyModule?: boolean; + } + interface SymbolLinks { + target?: Symbol; + type?: Type; + declaredType?: Type; + mapper?: TypeMapper; + referenced?: boolean; + exportAssignSymbol?: Symbol; + unionType?: UnionType; + } + interface TransientSymbol extends Symbol, SymbolLinks { + } + interface SymbolTable { + [index: string]: Symbol; + } + const enum NodeCheckFlags { + TypeChecked = 1, + LexicalThis = 2, + CaptureThis = 4, + EmitExtends = 8, + SuperInstance = 16, + SuperStatic = 32, + ContextChecked = 64, + EnumValuesComputed = 128, + } + interface NodeLinks { + resolvedType?: Type; + resolvedSignature?: Signature; + resolvedSymbol?: Symbol; + flags?: NodeCheckFlags; + enumMemberValue?: number; + isIllegalTypeReferenceInConstraint?: boolean; + isVisible?: boolean; + localModuleName?: string; + assignmentChecks?: Map; + } + const enum TypeFlags { + Any = 1, + String = 2, + Number = 4, + Boolean = 8, + Void = 16, + Undefined = 32, + Null = 64, + Enum = 128, + StringLiteral = 256, + TypeParameter = 512, + Class = 1024, + Interface = 2048, + Reference = 4096, + Tuple = 8192, + Union = 16384, + Anonymous = 32768, + FromSignature = 65536, + Intrinsic = 127, + StringLike = 258, + NumberLike = 132, + ObjectType = 48128, + Structured = 65025, + } + interface Type { + flags: TypeFlags; + id: number; + symbol?: Symbol; + } + interface IntrinsicType extends Type { + intrinsicName: string; + } + interface StringLiteralType extends Type { + text: string; + } + interface ObjectType extends Type { + } + interface InterfaceType extends ObjectType { + typeParameters: TypeParameter[]; + baseTypes: ObjectType[]; + declaredProperties: Symbol[]; + declaredCallSignatures: Signature[]; + declaredConstructSignatures: Signature[]; + declaredStringIndexType: Type; + declaredNumberIndexType: Type; + } + interface TypeReference extends ObjectType { + target: GenericType; + typeArguments: Type[]; + } + interface GenericType extends InterfaceType, TypeReference { + instantiations: Map; + openReferenceTargets: GenericType[]; + openReferenceChecks: Map; + } + interface TupleType extends ObjectType { + elementTypes: Type[]; + baseArrayType: TypeReference; + } + interface UnionType extends Type { + types: Type[]; + resolvedProperties: SymbolTable; + } + interface ResolvedType extends ObjectType, UnionType { + members: SymbolTable; + properties: Symbol[]; + callSignatures: Signature[]; + constructSignatures: Signature[]; + stringIndexType: Type; + numberIndexType: Type; + } + interface TypeParameter extends Type { + constraint: Type; + target?: TypeParameter; + mapper?: TypeMapper; + } + const enum SignatureKind { + Call = 0, + Construct = 1, + } + interface Signature { + declaration: SignatureDeclaration; + typeParameters: TypeParameter[]; + parameters: Symbol[]; + resolvedReturnType: Type; + minArgumentCount: number; + hasRestParameter: boolean; + hasStringLiterals: boolean; + target?: Signature; + mapper?: TypeMapper; + unionSignatures?: Signature[]; + erasedSignatureCache?: Signature; + isolatedSignatureType?: ObjectType; + } + const enum IndexKind { + String = 0, + Number = 1, + } + interface TypeMapper { + (t: Type): Type; + } + interface TypeInferences { + primary: Type[]; + secondary: Type[]; + } + interface InferenceContext { + typeParameters: TypeParameter[]; + inferUnionTypes: boolean; + inferences: TypeInferences[]; + inferredTypes: Type[]; + failedTypeParameterIndex?: number; + } + interface DiagnosticMessage { + key: string; + category: DiagnosticCategory; + code: number; + isEarly?: boolean; + } + interface DiagnosticMessageChain { + messageText: string; + category: DiagnosticCategory; + code: number; + next?: DiagnosticMessageChain; + } + interface Diagnostic { + file: SourceFile; + start: number; + length: number; + messageText: string; + category: DiagnosticCategory; + code: number; + /** + * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit + */ + isEarly?: boolean; + /** + * Parse error - error produced by parser when it scanner returns a token + * that parser does not understand in its current state + * (as opposed to grammar error when parser can interpret the token but interpretation is not legal from the grammar perespective) + */ + isParseError?: boolean; + } + enum DiagnosticCategory { + Warning = 0, + Error = 1, + Message = 2, + } + interface CompilerOptions { + charset?: string; + codepage?: number; + declaration?: boolean; + diagnostics?: boolean; + emitBOM?: boolean; + help?: boolean; + locale?: string; + mapRoot?: string; + module?: ModuleKind; + noEmitOnError?: boolean; + noErrorTruncation?: boolean; + noImplicitAny?: boolean; + noLib?: boolean; + noLibCheck?: boolean; + noResolve?: boolean; + out?: string; + outDir?: string; + removeComments?: boolean; + sourceMap?: boolean; + sourceRoot?: string; + target?: ScriptTarget; + version?: boolean; + watch?: boolean; + preserveConstEnums?: boolean; + [option: string]: string | number | boolean; + } + const enum ModuleKind { + None = 0, + CommonJS = 1, + AMD = 2, + } + interface LineAndCharacter { + line: number; + character: number; + } + const enum ScriptTarget { + ES3 = 0, + ES5 = 1, + ES6 = 2, + Latest = 2, + } + interface ParsedCommandLine { + options: CompilerOptions; + filenames: string[]; + errors: Diagnostic[]; + } + interface CommandLineOption { + name: string; + type: string | Map; + shortName?: string; + description?: DiagnosticMessage; + paramName?: DiagnosticMessage; + error?: DiagnosticMessage; + } + const enum CharacterCodes { + nullCharacter = 0, + maxAsciiCharacter = 127, + lineFeed = 10, + carriageReturn = 13, + lineSeparator = 8232, + paragraphSeparator = 8233, + nextLine = 133, + space = 32, + nonBreakingSpace = 160, + enQuad = 8192, + emQuad = 8193, + enSpace = 8194, + emSpace = 8195, + threePerEmSpace = 8196, + fourPerEmSpace = 8197, + sixPerEmSpace = 8198, + figureSpace = 8199, + punctuationSpace = 8200, + thinSpace = 8201, + hairSpace = 8202, + zeroWidthSpace = 8203, + narrowNoBreakSpace = 8239, + ideographicSpace = 12288, + mathematicalSpace = 8287, + ogham = 5760, + _ = 95, + $ = 36, + _0 = 48, + _1 = 49, + _2 = 50, + _3 = 51, + _4 = 52, + _5 = 53, + _6 = 54, + _7 = 55, + _8 = 56, + _9 = 57, + a = 97, + b = 98, + c = 99, + d = 100, + e = 101, + f = 102, + g = 103, + h = 104, + i = 105, + j = 106, + k = 107, + l = 108, + m = 109, + n = 110, + o = 111, + p = 112, + q = 113, + r = 114, + s = 115, + t = 116, + u = 117, + v = 118, + w = 119, + x = 120, + y = 121, + z = 122, + A = 65, + B = 66, + C = 67, + D = 68, + E = 69, + F = 70, + G = 71, + H = 72, + I = 73, + J = 74, + K = 75, + L = 76, + M = 77, + N = 78, + O = 79, + P = 80, + Q = 81, + R = 82, + S = 83, + T = 84, + U = 85, + V = 86, + W = 87, + X = 88, + Y = 89, + Z = 90, + ampersand = 38, + asterisk = 42, + at = 64, + backslash = 92, + backtick = 96, + bar = 124, + caret = 94, + closeBrace = 125, + closeBracket = 93, + closeParen = 41, + colon = 58, + comma = 44, + dot = 46, + doubleQuote = 34, + equals = 61, + exclamation = 33, + greaterThan = 62, + lessThan = 60, + minus = 45, + openBrace = 123, + openBracket = 91, + openParen = 40, + percent = 37, + plus = 43, + question = 63, + semicolon = 59, + singleQuote = 39, + slash = 47, + tilde = 126, + backspace = 8, + formFeed = 12, + byteOrderMark = 65279, + tab = 9, + verticalTab = 11, + } + interface CancellationToken { + isCancellationRequested(): boolean; + } + interface CompilerHost { + getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; + getDefaultLibFilename(): string; + getCancellationToken?(): CancellationToken; + writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; + getCurrentDirectory(): string; + getCanonicalFileName(fileName: string): string; + useCaseSensitiveFileNames(): boolean; + getNewLine(): string; + } +} +declare module ts { + interface ErrorCallback { + (message: DiagnosticMessage): void; + } + interface CommentCallback { + (pos: number, end: number): void; + } + interface Scanner { + getStartPos(): number; + getToken(): SyntaxKind; + getTextPos(): number; + getTokenPos(): number; + getTokenText(): string; + getTokenValue(): string; + hasPrecedingLineBreak(): boolean; + isIdentifier(): boolean; + isReservedWord(): boolean; + reScanGreaterToken(): SyntaxKind; + reScanSlashToken(): SyntaxKind; + reScanTemplateToken(): SyntaxKind; + scan(): SyntaxKind; + setText(text: string): void; + setTextPos(textPos: number): void; + tryScan(callback: () => T): T; + } + function tokenToString(t: SyntaxKind): string; + function computeLineStarts(text: string): number[]; + function getPositionFromLineAndCharacter(lineStarts: number[], line: number, character: number): number; + function getLineAndCharacterOfPosition(lineStarts: number[], position: number): { + line: number; + character: number; + }; + function positionToLineAndCharacter(text: string, pos: number): { + line: number; + character: number; + }; + function isWhiteSpace(ch: number): boolean; + function isLineBreak(ch: number): boolean; + function isOctalDigit(ch: number): boolean; + function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean): number; + function getLeadingCommentRanges(text: string, pos: number): CommentRange[]; + function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; + function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; + function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; + function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback): Scanner; +} +declare module ts { + interface ReferencePathMatchResult { + fileReference?: FileReference; + diagnostic?: DiagnosticMessage; + isNoDefaultLib?: boolean; + } + function getNodeConstructor(kind: SyntaxKind): new () => Node; + function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; + function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; + function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; +} +declare module ts { + function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; +} +declare module ts { + interface Node { + getSourceFile(): SourceFile; + getChildCount(sourceFile?: SourceFile): number; + getChildAt(index: number, sourceFile?: SourceFile): Node; + getChildren(sourceFile?: SourceFile): Node[]; + getStart(sourceFile?: SourceFile): number; + getFullStart(): number; + getEnd(): number; + getWidth(sourceFile?: SourceFile): number; + getFullWidth(): number; + getLeadingTriviaWidth(sourceFile?: SourceFile): number; + getFullText(sourceFile?: SourceFile): string; + getText(sourceFile?: SourceFile): string; + getFirstToken(sourceFile?: SourceFile): Node; + getLastToken(sourceFile?: SourceFile): Node; + } + interface Symbol { + getFlags(): SymbolFlags; + getName(): string; + getDeclarations(): Declaration[]; + getDocumentationComment(): SymbolDisplayPart[]; + } + interface Type { + getFlags(): TypeFlags; + getSymbol(): Symbol; + getProperties(): Symbol[]; + getProperty(propertyName: string): Symbol; + getApparentProperties(): Symbol[]; + getCallSignatures(): Signature[]; + getConstructSignatures(): Signature[]; + getStringIndexType(): Type; + getNumberIndexType(): Type; + } + interface Signature { + getDeclaration(): SignatureDeclaration; + getTypeParameters(): Type[]; + getParameters(): Symbol[]; + getReturnType(): Type; + getDocumentationComment(): SymbolDisplayPart[]; + } + interface SourceFile { + getScriptSnapshot(): IScriptSnapshot; + getNamedDeclarations(): Declaration[]; + update(scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; + } + /** + * Represents an immutable snapshot of a script at a specified time.Once acquired, the + * snapshot is observably immutable. i.e. the same calls with the same parameters will return + * the same values. + */ + interface IScriptSnapshot { + /** Gets a portion of the script snapshot specified by [start, end). */ + getText(start: number, end: number): string; + /** Gets the length of this script snapshot. */ + getLength(): number; + /** + * This call returns the array containing the start position of every line. + * i.e."[0, 10, 55]". TODO: consider making this optional. The language service could + * always determine this (albeit in a more expensive manner). + */ + getLineStartPositions(): number[]; + /** + * Gets the TextChangeRange that describe how the text changed between this text and + * an older version. This information is used by the incremental parser to determine + * what sections of the script need to be re-parsed. 'undefined' can be returned if the + * change range cannot be determined. However, in that case, incremental parsing will + * not happen and the entire document will be re - parsed. + */ + getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; + } + module ScriptSnapshot { + function fromString(text: string): IScriptSnapshot; + } + interface PreProcessedFileInfo { + referencedFiles: FileReference[]; + importedFiles: FileReference[]; + isLibFile: boolean; + } + interface Logger { + log(s: string): void; + } + interface LanguageServiceHost extends Logger { + getCompilationSettings(): CompilerOptions; + getScriptFileNames(): string[]; + getScriptVersion(fileName: string): string; + getScriptIsOpen(fileName: string): boolean; + getScriptSnapshot(fileName: string): IScriptSnapshot; + getLocalizedDiagnosticMessages(): any; + getCancellationToken(): CancellationToken; + getCurrentDirectory(): string; + getDefaultLibFilename(): string; + } + interface LanguageService { + cleanupSemanticCache(): void; + getSyntacticDiagnostics(fileName: string): Diagnostic[]; + getSemanticDiagnostics(fileName: string): Diagnostic[]; + getCompilerOptionsDiagnostics(): Diagnostic[]; + getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; + getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; + getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): CompletionInfo; + getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; + getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; + getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; + getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan; + getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems; + getRenameInfo(fileName: string, position: number): RenameInfo; + findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[]; + getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; + getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; + getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; + getNavigateToItems(searchValue: string): NavigateToItem[]; + getNavigationBarItems(fileName: string): NavigationBarItem[]; + getOutliningSpans(fileName: string): OutliningSpan[]; + getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; + getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; + getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number; + getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[]; + getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; + getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[]; + getEmitOutput(fileName: string): EmitOutput; + getSourceFile(filename: string): SourceFile; + dispose(): void; + } + class TextSpan { + private _start; + private _length; + /** + * Creates a TextSpan instance beginning with the position Start and having the Length + * specified with length. + */ + constructor(start: number, length: number); + toJSON(key: any): any; + start(): number; + length(): number; + end(): number; + isEmpty(): boolean; + /** + * Determines whether the position lies within the span. Returns true if the position is greater than or equal to Start and strictly less + * than End, otherwise false. + * @param position The position to check. + */ + containsPosition(position: number): boolean; + /** + * Determines whether span falls completely within this span. Returns true if the specified span falls completely within this span, otherwise false. + * @param span The span to check. + */ + containsTextSpan(span: TextSpan): boolean; + /** + * Determines whether the given span overlaps this span. Two spans are considered to overlap + * if they have positions in common and neither is empty. Empty spans do not overlap with any + * other span. Returns true if the spans overlap, false otherwise. + * @param span The span to check. + */ + overlapsWith(span: TextSpan): boolean; + /** + * Returns the overlap with the given span, or undefined if there is no overlap. + * @param span The span to check. + */ + overlap(span: TextSpan): TextSpan; + /** + * Determines whether span intersects this span. Two spans are considered to + * intersect if they have positions in common or the end of one span + * coincides with the start of the other span. Returns true if the spans intersect, false otherwise. + * @param The span to check. + */ + intersectsWithTextSpan(span: TextSpan): boolean; + intersectsWith(start: number, length: number): boolean; + /** + * Determines whether the given position intersects this span. + * A position is considered to intersect if it is between the start and + * end positions (inclusive) of this span. Returns true if the position intersects, false otherwise. + * @param position The position to check. + */ + intersectsWithPosition(position: number): boolean; + /** + * Returns the intersection with the given span, or undefined if there is no intersection. + * @param span The span to check. + */ + intersection(span: TextSpan): TextSpan; + /** + * Creates a new TextSpan from the given start and end positions + * as opposed to a position and length. + */ + static fromBounds(start: number, end: number): TextSpan; + } + class TextChangeRange { + static unchanged: TextChangeRange; + private _span; + private _newLength; + /** + * Initializes a new instance of TextChangeRange. + */ + constructor(span: TextSpan, newLength: number); + /** + * The span of text before the edit which is being changed + */ + span(): TextSpan; + /** + * Width of the span after the edit. A 0 here would represent a delete + */ + newLength(): number; + newSpan(): TextSpan; + isUnchanged(): boolean; + /** + * Called to merge all the changes that occurred across several versions of a script snapshot + * into a single change. i.e. if a user keeps making successive edits to a script we will + * have a text change from V1 to V2, V2 to V3, ..., Vn. + * + * This function will then merge those changes into a single change range valid between V1 and + * Vn. + */ + static collapseChangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; + } + interface ClassifiedSpan { + textSpan: TextSpan; + classificationType: string; + } + interface NavigationBarItem { + text: string; + kind: string; + kindModifiers: string; + spans: TextSpan[]; + childItems: NavigationBarItem[]; + indent: number; + bolded: boolean; + grayed: boolean; + } + interface TodoCommentDescriptor { + text: string; + priority: number; + } + interface TodoComment { + descriptor: TodoCommentDescriptor; + message: string; + position: number; + } + class TextChange { + span: TextSpan; + newText: string; + } + interface RenameLocation { + textSpan: TextSpan; + fileName: string; + } + interface ReferenceEntry { + textSpan: TextSpan; + fileName: string; + isWriteAccess: boolean; + } + interface NavigateToItem { + name: string; + kind: string; + kindModifiers: string; + matchKind: string; + fileName: string; + textSpan: TextSpan; + containerName: string; + containerKind: string; + } + interface EditorOptions { + IndentSize: number; + TabSize: number; + NewLineCharacter: string; + ConvertTabsToSpaces: boolean; + } + interface FormatCodeOptions extends EditorOptions { + InsertSpaceAfterCommaDelimiter: boolean; + InsertSpaceAfterSemicolonInForStatements: boolean; + InsertSpaceBeforeAndAfterBinaryOperators: boolean; + InsertSpaceAfterKeywordsInControlFlowStatements: boolean; + InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; + InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; + PlaceOpenBraceOnNewLineForFunctions: boolean; + PlaceOpenBraceOnNewLineForControlBlocks: boolean; + } + interface DefinitionInfo { + fileName: string; + textSpan: TextSpan; + kind: string; + name: string; + containerKind: string; + containerName: string; + } + enum SymbolDisplayPartKind { + aliasName = 0, + className = 1, + enumName = 2, + fieldName = 3, + interfaceName = 4, + keyword = 5, + lineBreak = 6, + numericLiteral = 7, + stringLiteral = 8, + localName = 9, + methodName = 10, + moduleName = 11, + operator = 12, + parameterName = 13, + propertyName = 14, + punctuation = 15, + space = 16, + text = 17, + typeParameterName = 18, + enumMemberName = 19, + functionName = 20, + regularExpressionLiteral = 21, + } + interface SymbolDisplayPart { + text: string; + kind: string; + } + interface QuickInfo { + kind: string; + kindModifiers: string; + textSpan: TextSpan; + displayParts: SymbolDisplayPart[]; + documentation: SymbolDisplayPart[]; + } + interface RenameInfo { + canRename: boolean; + localizedErrorMessage: string; + displayName: string; + fullDisplayName: string; + kind: string; + kindModifiers: string; + triggerSpan: TextSpan; + } + interface SignatureHelpParameter { + name: string; + documentation: SymbolDisplayPart[]; + displayParts: SymbolDisplayPart[]; + isOptional: boolean; + } + /** + * Represents a single signature to show in signature help. + * The id is used for subsequent calls into the language service to ask questions about the + * signature help item in the context of any documents that have been updated. i.e. after + * an edit has happened, while signature help is still active, the host can ask important + * questions like 'what parameter is the user currently contained within?'. + */ + interface SignatureHelpItem { + isVariadic: boolean; + prefixDisplayParts: SymbolDisplayPart[]; + suffixDisplayParts: SymbolDisplayPart[]; + separatorDisplayParts: SymbolDisplayPart[]; + parameters: SignatureHelpParameter[]; + documentation: SymbolDisplayPart[]; + } + /** + * Represents a set of signature help items, and the preferred item that should be selected. + */ + interface SignatureHelpItems { + items: SignatureHelpItem[]; + applicableSpan: TextSpan; + selectedItemIndex: number; + argumentIndex: number; + argumentCount: number; + } + interface CompletionInfo { + isMemberCompletion: boolean; + entries: CompletionEntry[]; + } + interface CompletionEntry { + name: string; + kind: string; + kindModifiers: string; + } + interface CompletionEntryDetails { + name: string; + kind: string; + kindModifiers: string; + displayParts: SymbolDisplayPart[]; + documentation: SymbolDisplayPart[]; + } + interface OutliningSpan { + /** The span of the document to actually collapse. */ + textSpan: TextSpan; + /** The span of the document to display when the user hovers over the collapsed span. */ + hintSpan: TextSpan; + /** The text to display in the editor for the collapsed region. */ + bannerText: string; + /** + * Whether or not this region should be automatically collapsed when + * the 'Collapse to Definitions' command is invoked. + */ + autoCollapse: boolean; + } + interface EmitOutput { + outputFiles: OutputFile[]; + emitOutputStatus: EmitReturnStatus; + } + const enum OutputFileType { + JavaScript = 0, + SourceMap = 1, + Declaration = 2, + } + interface OutputFile { + name: string; + writeByteOrderMark: boolean; + text: string; + } + const enum EndOfLineState { + Start = 0, + InMultiLineCommentTrivia = 1, + InSingleQuoteStringLiteral = 2, + InDoubleQuoteStringLiteral = 3, + } + enum TokenClass { + Punctuation = 0, + Keyword = 1, + Operator = 2, + Comment = 3, + Whitespace = 4, + Identifier = 5, + NumberLiteral = 6, + StringLiteral = 7, + RegExpLiteral = 8, + } + interface ClassificationResult { + finalLexState: EndOfLineState; + entries: ClassificationInfo[]; + } + interface ClassificationInfo { + length: number; + classification: TokenClass; + } + interface Classifier { + getClassificationsForLine(text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean): ClassificationResult; + } + interface DocumentRegistry { + acquireDocument(filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean): SourceFile; + updateDocument(sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; + releaseDocument(filename: string, compilationSettings: CompilerOptions): void; + } + class ScriptElementKind { + static unknown: string; + static keyword: string; + static scriptElement: string; + static moduleElement: string; + static classElement: string; + static interfaceElement: string; + static typeElement: string; + static enumElement: string; + static variableElement: string; + static localVariableElement: string; + static functionElement: string; + static localFunctionElement: string; + static memberFunctionElement: string; + static memberGetAccessorElement: string; + static memberSetAccessorElement: string; + static memberVariableElement: string; + static constructorImplementationElement: string; + static callSignatureElement: string; + static indexSignatureElement: string; + static constructSignatureElement: string; + static parameterElement: string; + static typeParameterElement: string; + static primitiveType: string; + static label: string; + static alias: string; + static constElement: string; + static letElement: string; + } + class ScriptElementKindModifier { + static none: string; + static publicMemberModifier: string; + static privateMemberModifier: string; + static protectedMemberModifier: string; + static exportedModifier: string; + static ambientModifier: string; + static staticModifier: string; + } + class ClassificationTypeNames { + static comment: string; + static identifier: string; + static keyword: string; + static numericLiteral: string; + static operator: string; + static stringLiteral: string; + static whiteSpace: string; + static text: string; + static punctuation: string; + static className: string; + static enumName: string; + static interfaceName: string; + static moduleName: string; + static typeParameterName: string; + } + function displayPartsToString(displayParts: SymbolDisplayPart[]): string; + interface DisplayPartsSymbolWriter extends SymbolWriter { + displayParts(): SymbolDisplayPart[]; + } + function getDefaultCompilerOptions(): CompilerOptions; + class OperationCanceledException { + } + class CancellationTokenObject { + private cancellationToken; + static None: CancellationTokenObject; + constructor(cancellationToken: CancellationToken); + isCancellationRequested(): boolean; + throwIfCancellationRequested(): void; + } + function createDocumentRegistry(): DocumentRegistry; + function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; + function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry): LanguageService; + function createClassifier(host: Logger): Classifier; +} + +export = ts; + +//// [APISample_node_compile.js] +var ts = require("typescript"); +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", 2 /* Latest */, "0.0"); +var program = ts.createProgram(["file1.ts"], {}, undefined); diff --git a/tests/baselines/reference/APISample_node_compile.types b/tests/baselines/reference/APISample_node_compile.types new file mode 100644 index 00000000000..15aa4b13a2e --- /dev/null +++ b/tests/baselines/reference/APISample_node_compile.types @@ -0,0 +1,5647 @@ +=== tests/cases/compiler/APISample_node_compile.ts === + +import ts = require("typescript"); +>ts : typeof ts + +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); +>sourceFile : ts.SourceFile +>ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0") : ts.SourceFile +>ts.createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, version: string, isOpen?: boolean) => ts.SourceFile +>ts : typeof ts +>createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, version: string, isOpen?: boolean) => ts.SourceFile +>ts.ScriptTarget.Latest : ts.ScriptTarget +>ts.ScriptTarget : typeof ts.ScriptTarget +>ts : typeof ts +>ScriptTarget : typeof ts.ScriptTarget +>Latest : ts.ScriptTarget + +var program = ts.createProgram(["file1.ts"], {}, undefined); +>program : ts.Program +>ts.createProgram(["file1.ts"], {}, undefined) : ts.Program +>ts.createProgram : (rootNames: string[], options: ts.CompilerOptions, host: ts.CompilerHost) => ts.Program +>ts : typeof ts +>createProgram : (rootNames: string[], options: ts.CompilerOptions, host: ts.CompilerHost) => ts.Program +>["file1.ts"] : string[] +>{} : { [x: string]: undefined; } +>undefined : undefined + +=== typescript.d.ts === +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + +declare module ts { +>ts : typeof ts + + interface Map { +>Map : Map +>T : T + + [index: string]: T; +>index : string +>T : T + } + interface TextRange { +>TextRange : TextRange + + pos: number; +>pos : number + + end: number; +>end : number + } + const enum SyntaxKind { +>SyntaxKind : SyntaxKind + + Unknown = 0, +>Unknown : SyntaxKind + + EndOfFileToken = 1, +>EndOfFileToken : SyntaxKind + + SingleLineCommentTrivia = 2, +>SingleLineCommentTrivia : SyntaxKind + + MultiLineCommentTrivia = 3, +>MultiLineCommentTrivia : SyntaxKind + + NewLineTrivia = 4, +>NewLineTrivia : SyntaxKind + + WhitespaceTrivia = 5, +>WhitespaceTrivia : SyntaxKind + + NumericLiteral = 6, +>NumericLiteral : SyntaxKind + + StringLiteral = 7, +>StringLiteral : SyntaxKind + + RegularExpressionLiteral = 8, +>RegularExpressionLiteral : SyntaxKind + + NoSubstitutionTemplateLiteral = 9, +>NoSubstitutionTemplateLiteral : SyntaxKind + + TemplateHead = 10, +>TemplateHead : SyntaxKind + + TemplateMiddle = 11, +>TemplateMiddle : SyntaxKind + + TemplateTail = 12, +>TemplateTail : SyntaxKind + + OpenBraceToken = 13, +>OpenBraceToken : SyntaxKind + + CloseBraceToken = 14, +>CloseBraceToken : SyntaxKind + + OpenParenToken = 15, +>OpenParenToken : SyntaxKind + + CloseParenToken = 16, +>CloseParenToken : SyntaxKind + + OpenBracketToken = 17, +>OpenBracketToken : SyntaxKind + + CloseBracketToken = 18, +>CloseBracketToken : SyntaxKind + + DotToken = 19, +>DotToken : SyntaxKind + + DotDotDotToken = 20, +>DotDotDotToken : SyntaxKind + + SemicolonToken = 21, +>SemicolonToken : SyntaxKind + + CommaToken = 22, +>CommaToken : SyntaxKind + + LessThanToken = 23, +>LessThanToken : SyntaxKind + + GreaterThanToken = 24, +>GreaterThanToken : SyntaxKind + + LessThanEqualsToken = 25, +>LessThanEqualsToken : SyntaxKind + + GreaterThanEqualsToken = 26, +>GreaterThanEqualsToken : SyntaxKind + + EqualsEqualsToken = 27, +>EqualsEqualsToken : SyntaxKind + + ExclamationEqualsToken = 28, +>ExclamationEqualsToken : SyntaxKind + + EqualsEqualsEqualsToken = 29, +>EqualsEqualsEqualsToken : SyntaxKind + + ExclamationEqualsEqualsToken = 30, +>ExclamationEqualsEqualsToken : SyntaxKind + + EqualsGreaterThanToken = 31, +>EqualsGreaterThanToken : SyntaxKind + + PlusToken = 32, +>PlusToken : SyntaxKind + + MinusToken = 33, +>MinusToken : SyntaxKind + + AsteriskToken = 34, +>AsteriskToken : SyntaxKind + + SlashToken = 35, +>SlashToken : SyntaxKind + + PercentToken = 36, +>PercentToken : SyntaxKind + + PlusPlusToken = 37, +>PlusPlusToken : SyntaxKind + + MinusMinusToken = 38, +>MinusMinusToken : SyntaxKind + + LessThanLessThanToken = 39, +>LessThanLessThanToken : SyntaxKind + + GreaterThanGreaterThanToken = 40, +>GreaterThanGreaterThanToken : SyntaxKind + + GreaterThanGreaterThanGreaterThanToken = 41, +>GreaterThanGreaterThanGreaterThanToken : SyntaxKind + + AmpersandToken = 42, +>AmpersandToken : SyntaxKind + + BarToken = 43, +>BarToken : SyntaxKind + + CaretToken = 44, +>CaretToken : SyntaxKind + + ExclamationToken = 45, +>ExclamationToken : SyntaxKind + + TildeToken = 46, +>TildeToken : SyntaxKind + + AmpersandAmpersandToken = 47, +>AmpersandAmpersandToken : SyntaxKind + + BarBarToken = 48, +>BarBarToken : SyntaxKind + + QuestionToken = 49, +>QuestionToken : SyntaxKind + + ColonToken = 50, +>ColonToken : SyntaxKind + + EqualsToken = 51, +>EqualsToken : SyntaxKind + + PlusEqualsToken = 52, +>PlusEqualsToken : SyntaxKind + + MinusEqualsToken = 53, +>MinusEqualsToken : SyntaxKind + + AsteriskEqualsToken = 54, +>AsteriskEqualsToken : SyntaxKind + + SlashEqualsToken = 55, +>SlashEqualsToken : SyntaxKind + + PercentEqualsToken = 56, +>PercentEqualsToken : SyntaxKind + + LessThanLessThanEqualsToken = 57, +>LessThanLessThanEqualsToken : SyntaxKind + + GreaterThanGreaterThanEqualsToken = 58, +>GreaterThanGreaterThanEqualsToken : SyntaxKind + + GreaterThanGreaterThanGreaterThanEqualsToken = 59, +>GreaterThanGreaterThanGreaterThanEqualsToken : SyntaxKind + + AmpersandEqualsToken = 60, +>AmpersandEqualsToken : SyntaxKind + + BarEqualsToken = 61, +>BarEqualsToken : SyntaxKind + + CaretEqualsToken = 62, +>CaretEqualsToken : SyntaxKind + + Identifier = 63, +>Identifier : SyntaxKind + + BreakKeyword = 64, +>BreakKeyword : SyntaxKind + + CaseKeyword = 65, +>CaseKeyword : SyntaxKind + + CatchKeyword = 66, +>CatchKeyword : SyntaxKind + + ClassKeyword = 67, +>ClassKeyword : SyntaxKind + + ConstKeyword = 68, +>ConstKeyword : SyntaxKind + + ContinueKeyword = 69, +>ContinueKeyword : SyntaxKind + + DebuggerKeyword = 70, +>DebuggerKeyword : SyntaxKind + + DefaultKeyword = 71, +>DefaultKeyword : SyntaxKind + + DeleteKeyword = 72, +>DeleteKeyword : SyntaxKind + + DoKeyword = 73, +>DoKeyword : SyntaxKind + + ElseKeyword = 74, +>ElseKeyword : SyntaxKind + + EnumKeyword = 75, +>EnumKeyword : SyntaxKind + + ExportKeyword = 76, +>ExportKeyword : SyntaxKind + + ExtendsKeyword = 77, +>ExtendsKeyword : SyntaxKind + + FalseKeyword = 78, +>FalseKeyword : SyntaxKind + + FinallyKeyword = 79, +>FinallyKeyword : SyntaxKind + + ForKeyword = 80, +>ForKeyword : SyntaxKind + + FunctionKeyword = 81, +>FunctionKeyword : SyntaxKind + + IfKeyword = 82, +>IfKeyword : SyntaxKind + + ImportKeyword = 83, +>ImportKeyword : SyntaxKind + + InKeyword = 84, +>InKeyword : SyntaxKind + + InstanceOfKeyword = 85, +>InstanceOfKeyword : SyntaxKind + + NewKeyword = 86, +>NewKeyword : SyntaxKind + + NullKeyword = 87, +>NullKeyword : SyntaxKind + + ReturnKeyword = 88, +>ReturnKeyword : SyntaxKind + + SuperKeyword = 89, +>SuperKeyword : SyntaxKind + + SwitchKeyword = 90, +>SwitchKeyword : SyntaxKind + + ThisKeyword = 91, +>ThisKeyword : SyntaxKind + + ThrowKeyword = 92, +>ThrowKeyword : SyntaxKind + + TrueKeyword = 93, +>TrueKeyword : SyntaxKind + + TryKeyword = 94, +>TryKeyword : SyntaxKind + + TypeOfKeyword = 95, +>TypeOfKeyword : SyntaxKind + + VarKeyword = 96, +>VarKeyword : SyntaxKind + + VoidKeyword = 97, +>VoidKeyword : SyntaxKind + + WhileKeyword = 98, +>WhileKeyword : SyntaxKind + + WithKeyword = 99, +>WithKeyword : SyntaxKind + + ImplementsKeyword = 100, +>ImplementsKeyword : SyntaxKind + + InterfaceKeyword = 101, +>InterfaceKeyword : SyntaxKind + + LetKeyword = 102, +>LetKeyword : SyntaxKind + + PackageKeyword = 103, +>PackageKeyword : SyntaxKind + + PrivateKeyword = 104, +>PrivateKeyword : SyntaxKind + + ProtectedKeyword = 105, +>ProtectedKeyword : SyntaxKind + + PublicKeyword = 106, +>PublicKeyword : SyntaxKind + + StaticKeyword = 107, +>StaticKeyword : SyntaxKind + + YieldKeyword = 108, +>YieldKeyword : SyntaxKind + + AnyKeyword = 109, +>AnyKeyword : SyntaxKind + + BooleanKeyword = 110, +>BooleanKeyword : SyntaxKind + + ConstructorKeyword = 111, +>ConstructorKeyword : SyntaxKind + + DeclareKeyword = 112, +>DeclareKeyword : SyntaxKind + + GetKeyword = 113, +>GetKeyword : SyntaxKind + + ModuleKeyword = 114, +>ModuleKeyword : SyntaxKind + + RequireKeyword = 115, +>RequireKeyword : SyntaxKind + + NumberKeyword = 116, +>NumberKeyword : SyntaxKind + + SetKeyword = 117, +>SetKeyword : SyntaxKind + + StringKeyword = 118, +>StringKeyword : SyntaxKind + + TypeKeyword = 119, +>TypeKeyword : SyntaxKind + + Missing = 120, +>Missing : SyntaxKind + + QualifiedName = 121, +>QualifiedName : SyntaxKind + + ComputedPropertyName = 122, +>ComputedPropertyName : SyntaxKind + + TypeParameter = 123, +>TypeParameter : SyntaxKind + + Parameter = 124, +>Parameter : SyntaxKind + + Property = 125, +>Property : SyntaxKind + + Method = 126, +>Method : SyntaxKind + + Constructor = 127, +>Constructor : SyntaxKind + + GetAccessor = 128, +>GetAccessor : SyntaxKind + + SetAccessor = 129, +>SetAccessor : SyntaxKind + + CallSignature = 130, +>CallSignature : SyntaxKind + + ConstructSignature = 131, +>ConstructSignature : SyntaxKind + + IndexSignature = 132, +>IndexSignature : SyntaxKind + + TypeReference = 133, +>TypeReference : SyntaxKind + + FunctionType = 134, +>FunctionType : SyntaxKind + + ConstructorType = 135, +>ConstructorType : SyntaxKind + + TypeQuery = 136, +>TypeQuery : SyntaxKind + + TypeLiteral = 137, +>TypeLiteral : SyntaxKind + + ArrayType = 138, +>ArrayType : SyntaxKind + + TupleType = 139, +>TupleType : SyntaxKind + + UnionType = 140, +>UnionType : SyntaxKind + + ParenthesizedType = 141, +>ParenthesizedType : SyntaxKind + + ArrayLiteralExpression = 142, +>ArrayLiteralExpression : SyntaxKind + + ObjectLiteralExpression = 143, +>ObjectLiteralExpression : SyntaxKind + + PropertyAccessExpression = 144, +>PropertyAccessExpression : SyntaxKind + + ElementAccessExpression = 145, +>ElementAccessExpression : SyntaxKind + + CallExpression = 146, +>CallExpression : SyntaxKind + + NewExpression = 147, +>NewExpression : SyntaxKind + + TaggedTemplateExpression = 148, +>TaggedTemplateExpression : SyntaxKind + + TypeAssertionExpression = 149, +>TypeAssertionExpression : SyntaxKind + + ParenthesizedExpression = 150, +>ParenthesizedExpression : SyntaxKind + + FunctionExpression = 151, +>FunctionExpression : SyntaxKind + + ArrowFunction = 152, +>ArrowFunction : SyntaxKind + + DeleteExpression = 153, +>DeleteExpression : SyntaxKind + + TypeOfExpression = 154, +>TypeOfExpression : SyntaxKind + + VoidExpression = 155, +>VoidExpression : SyntaxKind + + PrefixUnaryExpression = 156, +>PrefixUnaryExpression : SyntaxKind + + PostfixUnaryExpression = 157, +>PostfixUnaryExpression : SyntaxKind + + BinaryExpression = 158, +>BinaryExpression : SyntaxKind + + ConditionalExpression = 159, +>ConditionalExpression : SyntaxKind + + TemplateExpression = 160, +>TemplateExpression : SyntaxKind + + YieldExpression = 161, +>YieldExpression : SyntaxKind + + OmittedExpression = 162, +>OmittedExpression : SyntaxKind + + TemplateSpan = 163, +>TemplateSpan : SyntaxKind + + Block = 164, +>Block : SyntaxKind + + VariableStatement = 165, +>VariableStatement : SyntaxKind + + EmptyStatement = 166, +>EmptyStatement : SyntaxKind + + ExpressionStatement = 167, +>ExpressionStatement : SyntaxKind + + IfStatement = 168, +>IfStatement : SyntaxKind + + DoStatement = 169, +>DoStatement : SyntaxKind + + WhileStatement = 170, +>WhileStatement : SyntaxKind + + ForStatement = 171, +>ForStatement : SyntaxKind + + ForInStatement = 172, +>ForInStatement : SyntaxKind + + ContinueStatement = 173, +>ContinueStatement : SyntaxKind + + BreakStatement = 174, +>BreakStatement : SyntaxKind + + ReturnStatement = 175, +>ReturnStatement : SyntaxKind + + WithStatement = 176, +>WithStatement : SyntaxKind + + SwitchStatement = 177, +>SwitchStatement : SyntaxKind + + LabeledStatement = 178, +>LabeledStatement : SyntaxKind + + ThrowStatement = 179, +>ThrowStatement : SyntaxKind + + TryStatement = 180, +>TryStatement : SyntaxKind + + TryBlock = 181, +>TryBlock : SyntaxKind + + CatchBlock = 182, +>CatchBlock : SyntaxKind + + FinallyBlock = 183, +>FinallyBlock : SyntaxKind + + DebuggerStatement = 184, +>DebuggerStatement : SyntaxKind + + VariableDeclaration = 185, +>VariableDeclaration : SyntaxKind + + FunctionDeclaration = 186, +>FunctionDeclaration : SyntaxKind + + FunctionBlock = 187, +>FunctionBlock : SyntaxKind + + ClassDeclaration = 188, +>ClassDeclaration : SyntaxKind + + InterfaceDeclaration = 189, +>InterfaceDeclaration : SyntaxKind + + TypeAliasDeclaration = 190, +>TypeAliasDeclaration : SyntaxKind + + EnumDeclaration = 191, +>EnumDeclaration : SyntaxKind + + ModuleDeclaration = 192, +>ModuleDeclaration : SyntaxKind + + ModuleBlock = 193, +>ModuleBlock : SyntaxKind + + ImportDeclaration = 194, +>ImportDeclaration : SyntaxKind + + ExportAssignment = 195, +>ExportAssignment : SyntaxKind + + CaseClause = 196, +>CaseClause : SyntaxKind + + DefaultClause = 197, +>DefaultClause : SyntaxKind + + HeritageClause = 198, +>HeritageClause : SyntaxKind + + PropertyAssignment = 199, +>PropertyAssignment : SyntaxKind + + ShorthandPropertyAssignment = 200, +>ShorthandPropertyAssignment : SyntaxKind + + EnumMember = 201, +>EnumMember : SyntaxKind + + SourceFile = 202, +>SourceFile : SyntaxKind + + Program = 203, +>Program : SyntaxKind + + SyntaxList = 204, +>SyntaxList : SyntaxKind + + Count = 205, +>Count : SyntaxKind + + FirstAssignment = 51, +>FirstAssignment : SyntaxKind + + LastAssignment = 62, +>LastAssignment : SyntaxKind + + FirstReservedWord = 64, +>FirstReservedWord : SyntaxKind + + LastReservedWord = 99, +>LastReservedWord : SyntaxKind + + FirstKeyword = 64, +>FirstKeyword : SyntaxKind + + LastKeyword = 119, +>LastKeyword : SyntaxKind + + FirstFutureReservedWord = 100, +>FirstFutureReservedWord : SyntaxKind + + LastFutureReservedWord = 108, +>LastFutureReservedWord : SyntaxKind + + FirstTypeNode = 133, +>FirstTypeNode : SyntaxKind + + LastTypeNode = 141, +>LastTypeNode : SyntaxKind + + FirstPunctuation = 13, +>FirstPunctuation : SyntaxKind + + LastPunctuation = 62, +>LastPunctuation : SyntaxKind + + FirstToken = 1, +>FirstToken : SyntaxKind + + LastToken = 119, +>LastToken : SyntaxKind + + FirstTriviaToken = 2, +>FirstTriviaToken : SyntaxKind + + LastTriviaToken = 5, +>LastTriviaToken : SyntaxKind + + FirstLiteralToken = 6, +>FirstLiteralToken : SyntaxKind + + LastLiteralToken = 9, +>LastLiteralToken : SyntaxKind + + FirstTemplateToken = 9, +>FirstTemplateToken : SyntaxKind + + LastTemplateToken = 12, +>LastTemplateToken : SyntaxKind + + FirstOperator = 21, +>FirstOperator : SyntaxKind + + LastOperator = 62, +>LastOperator : SyntaxKind + + FirstBinaryOperator = 23, +>FirstBinaryOperator : SyntaxKind + + LastBinaryOperator = 62, +>LastBinaryOperator : SyntaxKind + } + const enum NodeFlags { +>NodeFlags : NodeFlags + + Export = 1, +>Export : NodeFlags + + Ambient = 2, +>Ambient : NodeFlags + + QuestionMark = 4, +>QuestionMark : NodeFlags + + Rest = 8, +>Rest : NodeFlags + + Public = 16, +>Public : NodeFlags + + Private = 32, +>Private : NodeFlags + + Protected = 64, +>Protected : NodeFlags + + Static = 128, +>Static : NodeFlags + + MultiLine = 256, +>MultiLine : NodeFlags + + Synthetic = 512, +>Synthetic : NodeFlags + + DeclarationFile = 1024, +>DeclarationFile : NodeFlags + + Let = 2048, +>Let : NodeFlags + + Const = 4096, +>Const : NodeFlags + + OctalLiteral = 8192, +>OctalLiteral : NodeFlags + + Modifier = 243, +>Modifier : NodeFlags + + AccessibilityModifier = 112, +>AccessibilityModifier : NodeFlags + + BlockScoped = 6144, +>BlockScoped : NodeFlags + } + const enum ParserContextFlags { +>ParserContextFlags : ParserContextFlags + + StrictMode = 1, +>StrictMode : ParserContextFlags + + DisallowIn = 2, +>DisallowIn : ParserContextFlags + + Yield = 4, +>Yield : ParserContextFlags + + GeneratorParameter = 8, +>GeneratorParameter : ParserContextFlags + } + interface Node extends TextRange { +>Node : Node +>TextRange : TextRange + + kind: SyntaxKind; +>kind : SyntaxKind +>SyntaxKind : SyntaxKind + + flags: NodeFlags; +>flags : NodeFlags +>NodeFlags : NodeFlags + + parserContextFlags?: ParserContextFlags; +>parserContextFlags : ParserContextFlags +>ParserContextFlags : ParserContextFlags + + id?: number; +>id : number + + parent?: Node; +>parent : Node +>Node : Node + + symbol?: Symbol; +>symbol : Symbol +>Symbol : Symbol + + locals?: SymbolTable; +>locals : SymbolTable +>SymbolTable : SymbolTable + + nextContainer?: Node; +>nextContainer : Node +>Node : Node + + localSymbol?: Symbol; +>localSymbol : Symbol +>Symbol : Symbol + + modifiers?: ModifiersArray; +>modifiers : ModifiersArray +>ModifiersArray : ModifiersArray + } + interface NodeArray extends Array, TextRange { +>NodeArray : NodeArray +>T : T +>Array : T[] +>T : T +>TextRange : TextRange + + hasTrailingComma?: boolean; +>hasTrailingComma : boolean + } + interface ModifiersArray extends Array { +>ModifiersArray : ModifiersArray +>Array : T[] +>Node : Node + + flags: number; +>flags : number + } + interface Identifier extends PrimaryExpression { +>Identifier : Identifier +>PrimaryExpression : PrimaryExpression + + text: string; +>text : string + } + interface QualifiedName extends Node { +>QualifiedName : QualifiedName +>Node : Node + + left: EntityName; +>left : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName + + right: Identifier; +>right : Identifier +>Identifier : Identifier + } + type EntityName = Identifier | QualifiedName; +>EntityName : Identifier | QualifiedName +>Identifier : Identifier +>QualifiedName : QualifiedName + + interface ParsedSignature { +>ParsedSignature : ParsedSignature + + typeParameters?: NodeArray; +>typeParameters : NodeArray +>NodeArray : NodeArray +>TypeParameterDeclaration : TypeParameterDeclaration + + parameters: NodeArray; +>parameters : NodeArray +>NodeArray : NodeArray +>ParameterDeclaration : ParameterDeclaration + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + } + type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName +>Identifier : Identifier +>LiteralExpression : LiteralExpression +>ComputedPropertyName : ComputedPropertyName + + interface Declaration extends Node { +>Declaration : Declaration +>Node : Node + + _declarationBrand: any; +>_declarationBrand : any + + name?: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName + } + interface ComputedPropertyName extends Node { +>ComputedPropertyName : ComputedPropertyName +>Node : Node + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface TypeParameterDeclaration extends Declaration { +>TypeParameterDeclaration : TypeParameterDeclaration +>Declaration : Declaration + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + constraint?: TypeNode; +>constraint : TypeNode +>TypeNode : TypeNode + + expression?: Expression; +>expression : Expression +>Expression : Expression + } + interface SignatureDeclaration extends Declaration, ParsedSignature { +>SignatureDeclaration : SignatureDeclaration +>Declaration : Declaration +>ParsedSignature : ParsedSignature + } + interface VariableDeclaration extends Declaration { +>VariableDeclaration : VariableDeclaration +>Declaration : Declaration + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + interface PropertyDeclaration extends Declaration, ClassElement { +>PropertyDeclaration : PropertyDeclaration +>Declaration : Declaration +>ClassElement : ClassElement + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + interface ShortHandPropertyDeclaration extends Declaration { +>ShortHandPropertyDeclaration : ShortHandPropertyDeclaration +>Declaration : Declaration + + name: Identifier; +>name : Identifier +>Identifier : Identifier + } + interface ParameterDeclaration extends VariableDeclaration { +>ParameterDeclaration : ParameterDeclaration +>VariableDeclaration : VariableDeclaration + } + /** + * Several node kinds share function-like features such as a signature, + * a name, and a body. These nodes should extend FunctionLikeDeclaration. + * Examples: + * FunctionDeclaration + * MethodDeclaration + * AccessorDeclaration + */ + interface FunctionLikeDeclaration extends SignatureDeclaration { +>FunctionLikeDeclaration : FunctionLikeDeclaration +>SignatureDeclaration : SignatureDeclaration + + _functionLikeDeclarationBrand: any; +>_functionLikeDeclarationBrand : any + + asteriskToken?: Node; +>asteriskToken : Node +>Node : Node + + body?: Block | Expression; +>body : Expression | Block +>Block : Block +>Expression : Expression + } + interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { +>FunctionDeclaration : FunctionDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>Statement : Statement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + body?: Block; +>body : Block +>Block : Block + } + interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement { +>MethodDeclaration : MethodDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>ClassElement : ClassElement + + body?: Block; +>body : Block +>Block : Block + } + interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { +>ConstructorDeclaration : ConstructorDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>ClassElement : ClassElement + + body?: Block; +>body : Block +>Block : Block + } + interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement { +>AccessorDeclaration : AccessorDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>ClassElement : ClassElement + + body?: Block; +>body : Block +>Block : Block + } + interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { +>IndexSignatureDeclaration : IndexSignatureDeclaration +>SignatureDeclaration : SignatureDeclaration +>ClassElement : ClassElement + + _indexSignatureDeclarationBrand: any; +>_indexSignatureDeclarationBrand : any + } + interface TypeNode extends Node { +>TypeNode : TypeNode +>Node : Node + } + interface TypeReferenceNode extends TypeNode { +>TypeReferenceNode : TypeReferenceNode +>TypeNode : TypeNode + + typeName: EntityName; +>typeName : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName + + typeArguments?: NodeArray; +>typeArguments : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + } + interface TypeQueryNode extends TypeNode { +>TypeQueryNode : TypeQueryNode +>TypeNode : TypeNode + + exprName: EntityName; +>exprName : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName + } + interface TypeLiteralNode extends TypeNode, Declaration { +>TypeLiteralNode : TypeLiteralNode +>TypeNode : TypeNode +>Declaration : Declaration + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>Node : Node + } + interface ArrayTypeNode extends TypeNode { +>ArrayTypeNode : ArrayTypeNode +>TypeNode : TypeNode + + elementType: TypeNode; +>elementType : TypeNode +>TypeNode : TypeNode + } + interface TupleTypeNode extends TypeNode { +>TupleTypeNode : TupleTypeNode +>TypeNode : TypeNode + + elementTypes: NodeArray; +>elementTypes : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + } + interface UnionTypeNode extends TypeNode { +>UnionTypeNode : UnionTypeNode +>TypeNode : TypeNode + + types: NodeArray; +>types : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + } + interface ParenthesizedTypeNode extends TypeNode { +>ParenthesizedTypeNode : ParenthesizedTypeNode +>TypeNode : TypeNode + + type: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + } + interface StringLiteralTypeNode extends TypeNode { +>StringLiteralTypeNode : StringLiteralTypeNode +>TypeNode : TypeNode + + text: string; +>text : string + } + interface Expression extends Node { +>Expression : Expression +>Node : Node + + _expressionBrand: any; +>_expressionBrand : any + + contextualType?: Type; +>contextualType : Type +>Type : Type + } + interface UnaryExpression extends Expression { +>UnaryExpression : UnaryExpression +>Expression : Expression + + _unaryExpressionBrand: any; +>_unaryExpressionBrand : any + } + interface PrefixUnaryExpression extends UnaryExpression { +>PrefixUnaryExpression : PrefixUnaryExpression +>UnaryExpression : UnaryExpression + + operator: SyntaxKind; +>operator : SyntaxKind +>SyntaxKind : SyntaxKind + + operand: UnaryExpression; +>operand : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface PostfixUnaryExpression extends PostfixExpression { +>PostfixUnaryExpression : PostfixUnaryExpression +>PostfixExpression : PostfixExpression + + operand: LeftHandSideExpression; +>operand : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + operator: SyntaxKind; +>operator : SyntaxKind +>SyntaxKind : SyntaxKind + } + interface PostfixExpression extends UnaryExpression { +>PostfixExpression : PostfixExpression +>UnaryExpression : UnaryExpression + + _postfixExpressionBrand: any; +>_postfixExpressionBrand : any + } + interface LeftHandSideExpression extends PostfixExpression { +>LeftHandSideExpression : LeftHandSideExpression +>PostfixExpression : PostfixExpression + + _leftHandSideExpressionBrand: any; +>_leftHandSideExpressionBrand : any + } + interface MemberExpression extends LeftHandSideExpression { +>MemberExpression : MemberExpression +>LeftHandSideExpression : LeftHandSideExpression + + _memberExpressionBrand: any; +>_memberExpressionBrand : any + } + interface PrimaryExpression extends MemberExpression { +>PrimaryExpression : PrimaryExpression +>MemberExpression : MemberExpression + + _primaryExpressionBrand: any; +>_primaryExpressionBrand : any + } + interface DeleteExpression extends UnaryExpression { +>DeleteExpression : DeleteExpression +>UnaryExpression : UnaryExpression + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface TypeOfExpression extends UnaryExpression { +>TypeOfExpression : TypeOfExpression +>UnaryExpression : UnaryExpression + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface VoidExpression extends UnaryExpression { +>VoidExpression : VoidExpression +>UnaryExpression : UnaryExpression + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface YieldExpression extends Expression { +>YieldExpression : YieldExpression +>Expression : Expression + + asteriskToken?: Node; +>asteriskToken : Node +>Node : Node + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface BinaryExpression extends Expression { +>BinaryExpression : BinaryExpression +>Expression : Expression + + left: Expression; +>left : Expression +>Expression : Expression + + operator: SyntaxKind; +>operator : SyntaxKind +>SyntaxKind : SyntaxKind + + right: Expression; +>right : Expression +>Expression : Expression + } + interface ConditionalExpression extends Expression { +>ConditionalExpression : ConditionalExpression +>Expression : Expression + + condition: Expression; +>condition : Expression +>Expression : Expression + + whenTrue: Expression; +>whenTrue : Expression +>Expression : Expression + + whenFalse: Expression; +>whenFalse : Expression +>Expression : Expression + } + interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { +>FunctionExpression : FunctionExpression +>PrimaryExpression : PrimaryExpression +>FunctionLikeDeclaration : FunctionLikeDeclaration + + name?: Identifier; +>name : Identifier +>Identifier : Identifier + + body: Block | Expression; +>body : Expression | Block +>Block : Block +>Expression : Expression + } + interface LiteralExpression extends PrimaryExpression { +>LiteralExpression : LiteralExpression +>PrimaryExpression : PrimaryExpression + + text: string; +>text : string + } + interface TemplateExpression extends PrimaryExpression { +>TemplateExpression : TemplateExpression +>PrimaryExpression : PrimaryExpression + + head: LiteralExpression; +>head : LiteralExpression +>LiteralExpression : LiteralExpression + + templateSpans: NodeArray; +>templateSpans : NodeArray +>NodeArray : NodeArray +>TemplateSpan : TemplateSpan + } + interface TemplateSpan extends Node { +>TemplateSpan : TemplateSpan +>Node : Node + + expression: Expression; +>expression : Expression +>Expression : Expression + + literal: LiteralExpression; +>literal : LiteralExpression +>LiteralExpression : LiteralExpression + } + interface ParenthesizedExpression extends PrimaryExpression { +>ParenthesizedExpression : ParenthesizedExpression +>PrimaryExpression : PrimaryExpression + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface ArrayLiteralExpression extends PrimaryExpression { +>ArrayLiteralExpression : ArrayLiteralExpression +>PrimaryExpression : PrimaryExpression + + elements: NodeArray; +>elements : NodeArray +>NodeArray : NodeArray +>Expression : Expression + } + interface ObjectLiteralExpression extends PrimaryExpression, Declaration { +>ObjectLiteralExpression : ObjectLiteralExpression +>PrimaryExpression : PrimaryExpression +>Declaration : Declaration + + properties: NodeArray; +>properties : NodeArray +>NodeArray : NodeArray +>Declaration : Declaration + } + interface PropertyAccessExpression extends MemberExpression { +>PropertyAccessExpression : PropertyAccessExpression +>MemberExpression : MemberExpression + + expression: LeftHandSideExpression; +>expression : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + name: Identifier; +>name : Identifier +>Identifier : Identifier + } + interface ElementAccessExpression extends MemberExpression { +>ElementAccessExpression : ElementAccessExpression +>MemberExpression : MemberExpression + + expression: LeftHandSideExpression; +>expression : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + argumentExpression: Expression; +>argumentExpression : Expression +>Expression : Expression + } + interface CallExpression extends LeftHandSideExpression { +>CallExpression : CallExpression +>LeftHandSideExpression : LeftHandSideExpression + + expression: LeftHandSideExpression; +>expression : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + typeArguments?: NodeArray; +>typeArguments : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + + arguments: NodeArray; +>arguments : NodeArray +>NodeArray : NodeArray +>Expression : Expression + } + interface NewExpression extends CallExpression, PrimaryExpression { +>NewExpression : NewExpression +>CallExpression : CallExpression +>PrimaryExpression : PrimaryExpression + } + interface TaggedTemplateExpression extends MemberExpression { +>TaggedTemplateExpression : TaggedTemplateExpression +>MemberExpression : MemberExpression + + tag: LeftHandSideExpression; +>tag : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + template: LiteralExpression | TemplateExpression; +>template : LiteralExpression | TemplateExpression +>LiteralExpression : LiteralExpression +>TemplateExpression : TemplateExpression + } + type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression; +>CallLikeExpression : CallExpression | NewExpression | TaggedTemplateExpression +>CallExpression : CallExpression +>NewExpression : NewExpression +>TaggedTemplateExpression : TaggedTemplateExpression + + interface TypeAssertion extends UnaryExpression { +>TypeAssertion : TypeAssertion +>UnaryExpression : UnaryExpression + + type: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface Statement extends Node, ModuleElement { +>Statement : Statement +>Node : Node +>ModuleElement : ModuleElement + + _statementBrand: any; +>_statementBrand : any + } + interface Block extends Statement { +>Block : Block +>Statement : Statement + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>Statement : Statement + } + interface VariableStatement extends Statement { +>VariableStatement : VariableStatement +>Statement : Statement + + declarations: NodeArray; +>declarations : NodeArray +>NodeArray : NodeArray +>VariableDeclaration : VariableDeclaration + } + interface ExpressionStatement extends Statement { +>ExpressionStatement : ExpressionStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface IfStatement extends Statement { +>IfStatement : IfStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + + thenStatement: Statement; +>thenStatement : Statement +>Statement : Statement + + elseStatement?: Statement; +>elseStatement : Statement +>Statement : Statement + } + interface IterationStatement extends Statement { +>IterationStatement : IterationStatement +>Statement : Statement + + statement: Statement; +>statement : Statement +>Statement : Statement + } + interface DoStatement extends IterationStatement { +>DoStatement : DoStatement +>IterationStatement : IterationStatement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface WhileStatement extends IterationStatement { +>WhileStatement : WhileStatement +>IterationStatement : IterationStatement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface ForStatement extends IterationStatement { +>ForStatement : ForStatement +>IterationStatement : IterationStatement + + declarations?: NodeArray; +>declarations : NodeArray +>NodeArray : NodeArray +>VariableDeclaration : VariableDeclaration + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + + condition?: Expression; +>condition : Expression +>Expression : Expression + + iterator?: Expression; +>iterator : Expression +>Expression : Expression + } + interface ForInStatement extends IterationStatement { +>ForInStatement : ForInStatement +>IterationStatement : IterationStatement + + declarations?: NodeArray; +>declarations : NodeArray +>NodeArray : NodeArray +>VariableDeclaration : VariableDeclaration + + variable?: Expression; +>variable : Expression +>Expression : Expression + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface BreakOrContinueStatement extends Statement { +>BreakOrContinueStatement : BreakOrContinueStatement +>Statement : Statement + + label?: Identifier; +>label : Identifier +>Identifier : Identifier + } + interface ReturnStatement extends Statement { +>ReturnStatement : ReturnStatement +>Statement : Statement + + expression?: Expression; +>expression : Expression +>Expression : Expression + } + interface WithStatement extends Statement { +>WithStatement : WithStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + + statement: Statement; +>statement : Statement +>Statement : Statement + } + interface SwitchStatement extends Statement { +>SwitchStatement : SwitchStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + + clauses: NodeArray; +>clauses : NodeArray +>NodeArray : NodeArray +>CaseOrDefaultClause : CaseOrDefaultClause + } + interface CaseOrDefaultClause extends Node { +>CaseOrDefaultClause : CaseOrDefaultClause +>Node : Node + + expression?: Expression; +>expression : Expression +>Expression : Expression + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>Statement : Statement + } + interface LabeledStatement extends Statement { +>LabeledStatement : LabeledStatement +>Statement : Statement + + label: Identifier; +>label : Identifier +>Identifier : Identifier + + statement: Statement; +>statement : Statement +>Statement : Statement + } + interface ThrowStatement extends Statement { +>ThrowStatement : ThrowStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface TryStatement extends Statement { +>TryStatement : TryStatement +>Statement : Statement + + tryBlock: Block; +>tryBlock : Block +>Block : Block + + catchBlock?: CatchBlock; +>catchBlock : CatchBlock +>CatchBlock : CatchBlock + + finallyBlock?: Block; +>finallyBlock : Block +>Block : Block + } + interface CatchBlock extends Block, Declaration { +>CatchBlock : CatchBlock +>Block : Block +>Declaration : Declaration + + variable: Identifier; +>variable : Identifier +>Identifier : Identifier + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + } + interface ModuleElement extends Node { +>ModuleElement : ModuleElement +>Node : Node + + _moduleElementBrand: any; +>_moduleElementBrand : any + } + interface ClassDeclaration extends Declaration, ModuleElement { +>ClassDeclaration : ClassDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + typeParameters?: NodeArray; +>typeParameters : NodeArray +>NodeArray : NodeArray +>TypeParameterDeclaration : TypeParameterDeclaration + + heritageClauses?: NodeArray; +>heritageClauses : NodeArray +>NodeArray : NodeArray +>HeritageClause : HeritageClause + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>ClassElement : ClassElement + } + interface ClassElement extends Declaration { +>ClassElement : ClassElement +>Declaration : Declaration + + _classElementBrand: any; +>_classElementBrand : any + } + interface InterfaceDeclaration extends Declaration, ModuleElement { +>InterfaceDeclaration : InterfaceDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + typeParameters?: NodeArray; +>typeParameters : NodeArray +>NodeArray : NodeArray +>TypeParameterDeclaration : TypeParameterDeclaration + + heritageClauses?: NodeArray; +>heritageClauses : NodeArray +>NodeArray : NodeArray +>HeritageClause : HeritageClause + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>Declaration : Declaration + } + interface HeritageClause extends Node { +>HeritageClause : HeritageClause +>Node : Node + + token: SyntaxKind; +>token : SyntaxKind +>SyntaxKind : SyntaxKind + + types?: NodeArray; +>types : NodeArray +>NodeArray : NodeArray +>TypeReferenceNode : TypeReferenceNode + } + interface TypeAliasDeclaration extends Declaration, ModuleElement { +>TypeAliasDeclaration : TypeAliasDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + type: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + } + interface EnumMember extends Declaration { +>EnumMember : EnumMember +>Declaration : Declaration + + name: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + interface EnumDeclaration extends Declaration, ModuleElement { +>EnumDeclaration : EnumDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>EnumMember : EnumMember + } + interface ModuleDeclaration extends Declaration, ModuleElement { +>ModuleDeclaration : ModuleDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier | LiteralExpression; +>name : Identifier | LiteralExpression +>Identifier : Identifier +>LiteralExpression : LiteralExpression + + body: ModuleBlock | ModuleDeclaration; +>body : ModuleDeclaration | ModuleBlock +>ModuleBlock : ModuleBlock +>ModuleDeclaration : ModuleDeclaration + } + interface ModuleBlock extends Node, ModuleElement { +>ModuleBlock : ModuleBlock +>Node : Node +>ModuleElement : ModuleElement + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>ModuleElement : ModuleElement + } + interface ImportDeclaration extends Declaration, ModuleElement { +>ImportDeclaration : ImportDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + entityName?: EntityName; +>entityName : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName + + externalModuleName?: LiteralExpression; +>externalModuleName : LiteralExpression +>LiteralExpression : LiteralExpression + } + interface ExportAssignment extends Statement, ModuleElement { +>ExportAssignment : ExportAssignment +>Statement : Statement +>ModuleElement : ModuleElement + + exportName: Identifier; +>exportName : Identifier +>Identifier : Identifier + } + interface FileReference extends TextRange { +>FileReference : FileReference +>TextRange : TextRange + + filename: string; +>filename : string + } + interface CommentRange extends TextRange { +>CommentRange : CommentRange +>TextRange : TextRange + + hasTrailingNewLine?: boolean; +>hasTrailingNewLine : boolean + } + interface SourceFile extends Declaration { +>SourceFile : SourceFile +>Declaration : Declaration + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>ModuleElement : ModuleElement + + filename: string; +>filename : string + + text: string; +>text : string + + getLineAndCharacterFromPosition(position: number): LineAndCharacter; +>getLineAndCharacterFromPosition : (position: number) => LineAndCharacter +>position : number +>LineAndCharacter : LineAndCharacter + + getPositionFromLineAndCharacter(line: number, character: number): number; +>getPositionFromLineAndCharacter : (line: number, character: number) => number +>line : number +>character : number + + getLineStarts(): number[]; +>getLineStarts : () => number[] + + amdDependencies: string[]; +>amdDependencies : string[] + + amdModuleName: string; +>amdModuleName : string + + referencedFiles: FileReference[]; +>referencedFiles : FileReference[] +>FileReference : FileReference + + semanticDiagnostics: Diagnostic[]; +>semanticDiagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + parseDiagnostics: Diagnostic[]; +>parseDiagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + grammarDiagnostics: Diagnostic[]; +>grammarDiagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + getSyntacticDiagnostics(): Diagnostic[]; +>getSyntacticDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + hasNoDefaultLib: boolean; +>hasNoDefaultLib : boolean + + externalModuleIndicator: Node; +>externalModuleIndicator : Node +>Node : Node + + nodeCount: number; +>nodeCount : number + + identifierCount: number; +>identifierCount : number + + symbolCount: number; +>symbolCount : number + + isOpen: boolean; +>isOpen : boolean + + version: string; +>version : string + + languageVersion: ScriptTarget; +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget + + identifiers: Map; +>identifiers : Map +>Map : Map + } + interface Program { +>Program : Program + + getSourceFile(filename: string): SourceFile; +>getSourceFile : (filename: string) => SourceFile +>filename : string +>SourceFile : SourceFile + + getSourceFiles(): SourceFile[]; +>getSourceFiles : () => SourceFile[] +>SourceFile : SourceFile + + getCompilerOptions(): CompilerOptions; +>getCompilerOptions : () => CompilerOptions +>CompilerOptions : CompilerOptions + + getCompilerHost(): CompilerHost; +>getCompilerHost : () => CompilerHost +>CompilerHost : CompilerHost + + getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; +>getDiagnostics : (sourceFile?: SourceFile) => Diagnostic[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Diagnostic : Diagnostic + + getGlobalDiagnostics(): Diagnostic[]; +>getGlobalDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + getTypeChecker(fullTypeCheckMode: boolean): TypeChecker; +>getTypeChecker : (fullTypeCheckMode: boolean) => TypeChecker +>fullTypeCheckMode : boolean +>TypeChecker : TypeChecker + + getCommonSourceDirectory(): string; +>getCommonSourceDirectory : () => string + } + interface SourceMapSpan { +>SourceMapSpan : SourceMapSpan + + emittedLine: number; +>emittedLine : number + + emittedColumn: number; +>emittedColumn : number + + sourceLine: number; +>sourceLine : number + + sourceColumn: number; +>sourceColumn : number + + nameIndex?: number; +>nameIndex : number + + sourceIndex: number; +>sourceIndex : number + } + interface SourceMapData { +>SourceMapData : SourceMapData + + sourceMapFilePath: string; +>sourceMapFilePath : string + + jsSourceMappingURL: string; +>jsSourceMappingURL : string + + sourceMapFile: string; +>sourceMapFile : string + + sourceMapSourceRoot: string; +>sourceMapSourceRoot : string + + sourceMapSources: string[]; +>sourceMapSources : string[] + + inputSourceFileNames: string[]; +>inputSourceFileNames : string[] + + sourceMapNames?: string[]; +>sourceMapNames : string[] + + sourceMapMappings: string; +>sourceMapMappings : string + + sourceMapDecodedMappings: SourceMapSpan[]; +>sourceMapDecodedMappings : SourceMapSpan[] +>SourceMapSpan : SourceMapSpan + } + enum EmitReturnStatus { +>EmitReturnStatus : EmitReturnStatus + + Succeeded = 0, +>Succeeded : EmitReturnStatus + + AllOutputGenerationSkipped = 1, +>AllOutputGenerationSkipped : EmitReturnStatus + + JSGeneratedWithSemanticErrors = 2, +>JSGeneratedWithSemanticErrors : EmitReturnStatus + + DeclarationGenerationSkipped = 3, +>DeclarationGenerationSkipped : EmitReturnStatus + + EmitErrorsEncountered = 4, +>EmitErrorsEncountered : EmitReturnStatus + + CompilerOptionsErrors = 5, +>CompilerOptionsErrors : EmitReturnStatus + } + interface EmitResult { +>EmitResult : EmitResult + + emitResultStatus: EmitReturnStatus; +>emitResultStatus : EmitReturnStatus +>EmitReturnStatus : EmitReturnStatus + + diagnostics: Diagnostic[]; +>diagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + sourceMaps: SourceMapData[]; +>sourceMaps : SourceMapData[] +>SourceMapData : SourceMapData + } + interface TypeChecker { +>TypeChecker : TypeChecker + + getProgram(): Program; +>getProgram : () => Program +>Program : Program + + getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; +>getDiagnostics : (sourceFile?: SourceFile) => Diagnostic[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Diagnostic : Diagnostic + + getDeclarationDiagnostics(sourceFile: SourceFile): Diagnostic[]; +>getDeclarationDiagnostics : (sourceFile: SourceFile) => Diagnostic[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Diagnostic : Diagnostic + + getGlobalDiagnostics(): Diagnostic[]; +>getGlobalDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + getNodeCount(): number; +>getNodeCount : () => number + + getIdentifierCount(): number; +>getIdentifierCount : () => number + + getSymbolCount(): number; +>getSymbolCount : () => number + + getTypeCount(): number; +>getTypeCount : () => number + + checkProgram(): void; +>checkProgram : () => void + + emitFiles(targetSourceFile?: SourceFile): EmitResult; +>emitFiles : (targetSourceFile?: SourceFile) => EmitResult +>targetSourceFile : SourceFile +>SourceFile : SourceFile +>EmitResult : EmitResult + + getParentOfSymbol(symbol: Symbol): Symbol; +>getParentOfSymbol : (symbol: Symbol) => Symbol +>symbol : Symbol +>Symbol : Symbol +>Symbol : Symbol + + getNarrowedTypeOfSymbol(symbol: Symbol, node: Node): Type; +>getNarrowedTypeOfSymbol : (symbol: Symbol, node: Node) => Type +>symbol : Symbol +>Symbol : Symbol +>node : Node +>Node : Node +>Type : Type + + getDeclaredTypeOfSymbol(symbol: Symbol): Type; +>getDeclaredTypeOfSymbol : (symbol: Symbol) => Type +>symbol : Symbol +>Symbol : Symbol +>Type : Type + + getPropertiesOfType(type: Type): Symbol[]; +>getPropertiesOfType : (type: Type) => Symbol[] +>type : Type +>Type : Type +>Symbol : Symbol + + getPropertyOfType(type: Type, propertyName: string): Symbol; +>getPropertyOfType : (type: Type, propertyName: string) => Symbol +>type : Type +>Type : Type +>propertyName : string +>Symbol : Symbol + + getSignaturesOfType(type: Type, kind: SignatureKind): Signature[]; +>getSignaturesOfType : (type: Type, kind: SignatureKind) => Signature[] +>type : Type +>Type : Type +>kind : SignatureKind +>SignatureKind : SignatureKind +>Signature : Signature + + getIndexTypeOfType(type: Type, kind: IndexKind): Type; +>getIndexTypeOfType : (type: Type, kind: IndexKind) => Type +>type : Type +>Type : Type +>kind : IndexKind +>IndexKind : IndexKind +>Type : Type + + getReturnTypeOfSignature(signature: Signature): Type; +>getReturnTypeOfSignature : (signature: Signature) => Type +>signature : Signature +>Signature : Signature +>Type : Type + + getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; +>getSymbolsInScope : (location: Node, meaning: SymbolFlags) => Symbol[] +>location : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags +>Symbol : Symbol + + getSymbolInfo(node: Node): Symbol; +>getSymbolInfo : (node: Node) => Symbol +>node : Node +>Node : Node +>Symbol : Symbol + + getShorthandAssignmentValueSymbol(location: Node): Symbol; +>getShorthandAssignmentValueSymbol : (location: Node) => Symbol +>location : Node +>Node : Node +>Symbol : Symbol + + getTypeOfNode(node: Node): Type; +>getTypeOfNode : (node: Node) => Type +>node : Node +>Node : Node +>Type : Type + + typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; +>typeToString : (type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => string +>type : Type +>Type : Type +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; +>symbolToString : (symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) => string +>symbol : Symbol +>Symbol : Symbol +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags + + getSymbolDisplayBuilder(): SymbolDisplayBuilder; +>getSymbolDisplayBuilder : () => SymbolDisplayBuilder +>SymbolDisplayBuilder : SymbolDisplayBuilder + + getFullyQualifiedName(symbol: Symbol): string; +>getFullyQualifiedName : (symbol: Symbol) => string +>symbol : Symbol +>Symbol : Symbol + + getAugmentedPropertiesOfType(type: Type): Symbol[]; +>getAugmentedPropertiesOfType : (type: Type) => Symbol[] +>type : Type +>Type : Type +>Symbol : Symbol + + getRootSymbols(symbol: Symbol): Symbol[]; +>getRootSymbols : (symbol: Symbol) => Symbol[] +>symbol : Symbol +>Symbol : Symbol +>Symbol : Symbol + + getContextualType(node: Node): Type; +>getContextualType : (node: Node) => Type +>node : Node +>Node : Node +>Type : Type + + getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; +>getResolvedSignature : (node: CallExpression | NewExpression | TaggedTemplateExpression, candidatesOutArray?: Signature[]) => Signature +>node : CallExpression | NewExpression | TaggedTemplateExpression +>CallLikeExpression : CallExpression | NewExpression | TaggedTemplateExpression +>candidatesOutArray : Signature[] +>Signature : Signature +>Signature : Signature + + getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; +>getSignatureFromDeclaration : (declaration: SignatureDeclaration) => Signature +>declaration : SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration +>Signature : Signature + + isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; +>isImplementationOfOverload : (node: FunctionLikeDeclaration) => boolean +>node : FunctionLikeDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration + + isUndefinedSymbol(symbol: Symbol): boolean; +>isUndefinedSymbol : (symbol: Symbol) => boolean +>symbol : Symbol +>Symbol : Symbol + + isArgumentsSymbol(symbol: Symbol): boolean; +>isArgumentsSymbol : (symbol: Symbol) => boolean +>symbol : Symbol +>Symbol : Symbol + + isEmitBlocked(sourceFile?: SourceFile): boolean; +>isEmitBlocked : (sourceFile?: SourceFile) => boolean +>sourceFile : SourceFile +>SourceFile : SourceFile + + getEnumMemberValue(node: EnumMember): number; +>getEnumMemberValue : (node: EnumMember) => number +>node : EnumMember +>EnumMember : EnumMember + + isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; +>isValidPropertyAccess : (node: QualifiedName | PropertyAccessExpression, propertyName: string) => boolean +>node : QualifiedName | PropertyAccessExpression +>PropertyAccessExpression : PropertyAccessExpression +>QualifiedName : QualifiedName +>propertyName : string + + getAliasedSymbol(symbol: Symbol): Symbol; +>getAliasedSymbol : (symbol: Symbol) => Symbol +>symbol : Symbol +>Symbol : Symbol +>Symbol : Symbol + } + interface SymbolDisplayBuilder { +>SymbolDisplayBuilder : SymbolDisplayBuilder + + buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildTypeDisplay : (type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>type : Type +>Type : Type +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void; +>buildSymbolDisplay : (symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags) => void +>symbol : Symbol +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags +>flags : SymbolFormatFlags +>SymbolFormatFlags : SymbolFormatFlags + + buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildSignatureDisplay : (signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>signatures : Signature +>Signature : Signature +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildParameterDisplay : (parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>parameter : Symbol +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildTypeParameterDisplay : (tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>tp : TypeParameter +>TypeParameter : TypeParameter +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void; +>buildTypeParameterDisplayFromSymbol : (symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags) => void +>symbol : Symbol +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaraiton : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildDisplayForParametersAndDelimiters : (parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>parameters : Symbol[] +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildDisplayForTypeParametersAndDelimiters : (typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>typeParameters : TypeParameter[] +>TypeParameter : TypeParameter +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildReturnTypeDisplay : (signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>signature : Signature +>Signature : Signature +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + } + interface SymbolWriter { +>SymbolWriter : SymbolWriter + + writeKeyword(text: string): void; +>writeKeyword : (text: string) => void +>text : string + + writeOperator(text: string): void; +>writeOperator : (text: string) => void +>text : string + + writePunctuation(text: string): void; +>writePunctuation : (text: string) => void +>text : string + + writeSpace(text: string): void; +>writeSpace : (text: string) => void +>text : string + + writeStringLiteral(text: string): void; +>writeStringLiteral : (text: string) => void +>text : string + + writeParameter(text: string): void; +>writeParameter : (text: string) => void +>text : string + + writeSymbol(text: string, symbol: Symbol): void; +>writeSymbol : (text: string, symbol: Symbol) => void +>text : string +>symbol : Symbol +>Symbol : Symbol + + writeLine(): void; +>writeLine : () => void + + increaseIndent(): void; +>increaseIndent : () => void + + decreaseIndent(): void; +>decreaseIndent : () => void + + clear(): void; +>clear : () => void + + trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void; +>trackSymbol : (symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) => void +>symbol : Symbol +>Symbol : Symbol +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags + } + const enum TypeFormatFlags { +>TypeFormatFlags : TypeFormatFlags + + None = 0, +>None : TypeFormatFlags + + WriteArrayAsGenericType = 1, +>WriteArrayAsGenericType : TypeFormatFlags + + UseTypeOfFunction = 2, +>UseTypeOfFunction : TypeFormatFlags + + NoTruncation = 4, +>NoTruncation : TypeFormatFlags + + WriteArrowStyleSignature = 8, +>WriteArrowStyleSignature : TypeFormatFlags + + WriteOwnNameForAnyLike = 16, +>WriteOwnNameForAnyLike : TypeFormatFlags + + WriteTypeArgumentsOfSignature = 32, +>WriteTypeArgumentsOfSignature : TypeFormatFlags + + InElementType = 64, +>InElementType : TypeFormatFlags + } + const enum SymbolFormatFlags { +>SymbolFormatFlags : SymbolFormatFlags + + None = 0, +>None : SymbolFormatFlags + + WriteTypeParametersOrArguments = 1, +>WriteTypeParametersOrArguments : SymbolFormatFlags + + UseOnlyExternalAliasing = 2, +>UseOnlyExternalAliasing : SymbolFormatFlags + } + const enum SymbolAccessibility { +>SymbolAccessibility : SymbolAccessibility + + Accessible = 0, +>Accessible : SymbolAccessibility + + NotAccessible = 1, +>NotAccessible : SymbolAccessibility + + CannotBeNamed = 2, +>CannotBeNamed : SymbolAccessibility + } + interface SymbolVisibilityResult { +>SymbolVisibilityResult : SymbolVisibilityResult + + accessibility: SymbolAccessibility; +>accessibility : SymbolAccessibility +>SymbolAccessibility : SymbolAccessibility + + aliasesToMakeVisible?: ImportDeclaration[]; +>aliasesToMakeVisible : ImportDeclaration[] +>ImportDeclaration : ImportDeclaration + + errorSymbolName?: string; +>errorSymbolName : string + + errorNode?: Node; +>errorNode : Node +>Node : Node + } + interface SymbolAccessiblityResult extends SymbolVisibilityResult { +>SymbolAccessiblityResult : SymbolAccessiblityResult +>SymbolVisibilityResult : SymbolVisibilityResult + + errorModuleName?: string; +>errorModuleName : string + } + interface EmitResolver { +>EmitResolver : EmitResolver + + getProgram(): Program; +>getProgram : () => Program +>Program : Program + + getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; +>getLocalNameOfContainer : (container: EnumDeclaration | ModuleDeclaration) => string +>container : EnumDeclaration | ModuleDeclaration +>ModuleDeclaration : ModuleDeclaration +>EnumDeclaration : EnumDeclaration + + getExpressionNamePrefix(node: Identifier): string; +>getExpressionNamePrefix : (node: Identifier) => string +>node : Identifier +>Identifier : Identifier + + getExportAssignmentName(node: SourceFile): string; +>getExportAssignmentName : (node: SourceFile) => string +>node : SourceFile +>SourceFile : SourceFile + + isReferencedImportDeclaration(node: ImportDeclaration): boolean; +>isReferencedImportDeclaration : (node: ImportDeclaration) => boolean +>node : ImportDeclaration +>ImportDeclaration : ImportDeclaration + + isTopLevelValueImportWithEntityName(node: ImportDeclaration): boolean; +>isTopLevelValueImportWithEntityName : (node: ImportDeclaration) => boolean +>node : ImportDeclaration +>ImportDeclaration : ImportDeclaration + + getNodeCheckFlags(node: Node): NodeCheckFlags; +>getNodeCheckFlags : (node: Node) => NodeCheckFlags +>node : Node +>Node : Node +>NodeCheckFlags : NodeCheckFlags + + getEnumMemberValue(node: EnumMember): number; +>getEnumMemberValue : (node: EnumMember) => number +>node : EnumMember +>EnumMember : EnumMember + + hasSemanticErrors(): boolean; +>hasSemanticErrors : () => boolean + + isDeclarationVisible(node: Declaration): boolean; +>isDeclarationVisible : (node: Declaration) => boolean +>node : Declaration +>Declaration : Declaration + + isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; +>isImplementationOfOverload : (node: FunctionLikeDeclaration) => boolean +>node : FunctionLikeDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration + + writeTypeAtLocation(location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; +>writeTypeAtLocation : (location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void +>location : Node +>Node : Node +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags +>writer : SymbolWriter +>SymbolWriter : SymbolWriter + + writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; +>writeReturnTypeOfSignatureDeclaration : (signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void +>signatureDeclaration : SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags +>writer : SymbolWriter +>SymbolWriter : SymbolWriter + + isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; +>isSymbolAccessible : (symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags) => SymbolAccessiblityResult +>symbol : Symbol +>Symbol : Symbol +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags +>SymbolAccessiblityResult : SymbolAccessiblityResult + + isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; +>isEntityNameVisible : (entityName: Identifier | QualifiedName, enclosingDeclaration: Node) => SymbolVisibilityResult +>entityName : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName +>enclosingDeclaration : Node +>Node : Node +>SymbolVisibilityResult : SymbolVisibilityResult + + getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number; +>getConstantValue : (node: PropertyAccessExpression | ElementAccessExpression) => number +>node : PropertyAccessExpression | ElementAccessExpression +>PropertyAccessExpression : PropertyAccessExpression +>ElementAccessExpression : ElementAccessExpression + + isEmitBlocked(sourceFile?: SourceFile): boolean; +>isEmitBlocked : (sourceFile?: SourceFile) => boolean +>sourceFile : SourceFile +>SourceFile : SourceFile + } + const enum SymbolFlags { +>SymbolFlags : SymbolFlags + + FunctionScopedVariable = 1, +>FunctionScopedVariable : SymbolFlags + + BlockScopedVariable = 2, +>BlockScopedVariable : SymbolFlags + + Property = 4, +>Property : SymbolFlags + + EnumMember = 8, +>EnumMember : SymbolFlags + + Function = 16, +>Function : SymbolFlags + + Class = 32, +>Class : SymbolFlags + + Interface = 64, +>Interface : SymbolFlags + + ConstEnum = 128, +>ConstEnum : SymbolFlags + + RegularEnum = 256, +>RegularEnum : SymbolFlags + + ValueModule = 512, +>ValueModule : SymbolFlags + + NamespaceModule = 1024, +>NamespaceModule : SymbolFlags + + TypeLiteral = 2048, +>TypeLiteral : SymbolFlags + + ObjectLiteral = 4096, +>ObjectLiteral : SymbolFlags + + Method = 8192, +>Method : SymbolFlags + + Constructor = 16384, +>Constructor : SymbolFlags + + GetAccessor = 32768, +>GetAccessor : SymbolFlags + + SetAccessor = 65536, +>SetAccessor : SymbolFlags + + CallSignature = 131072, +>CallSignature : SymbolFlags + + ConstructSignature = 262144, +>ConstructSignature : SymbolFlags + + IndexSignature = 524288, +>IndexSignature : SymbolFlags + + TypeParameter = 1048576, +>TypeParameter : SymbolFlags + + TypeAlias = 2097152, +>TypeAlias : SymbolFlags + + ExportValue = 4194304, +>ExportValue : SymbolFlags + + ExportType = 8388608, +>ExportType : SymbolFlags + + ExportNamespace = 16777216, +>ExportNamespace : SymbolFlags + + Import = 33554432, +>Import : SymbolFlags + + Instantiated = 67108864, +>Instantiated : SymbolFlags + + Merged = 134217728, +>Merged : SymbolFlags + + Transient = 268435456, +>Transient : SymbolFlags + + Prototype = 536870912, +>Prototype : SymbolFlags + + UnionProperty = 1073741824, +>UnionProperty : SymbolFlags + + Enum = 384, +>Enum : SymbolFlags + + Variable = 3, +>Variable : SymbolFlags + + Value = 107455, +>Value : SymbolFlags + + Type = 3152352, +>Type : SymbolFlags + + Namespace = 1536, +>Namespace : SymbolFlags + + Module = 1536, +>Module : SymbolFlags + + Accessor = 98304, +>Accessor : SymbolFlags + + Signature = 917504, +>Signature : SymbolFlags + + FunctionScopedVariableExcludes = 107454, +>FunctionScopedVariableExcludes : SymbolFlags + + BlockScopedVariableExcludes = 107455, +>BlockScopedVariableExcludes : SymbolFlags + + ParameterExcludes = 107455, +>ParameterExcludes : SymbolFlags + + PropertyExcludes = 107455, +>PropertyExcludes : SymbolFlags + + EnumMemberExcludes = 107455, +>EnumMemberExcludes : SymbolFlags + + FunctionExcludes = 106927, +>FunctionExcludes : SymbolFlags + + ClassExcludes = 3258879, +>ClassExcludes : SymbolFlags + + InterfaceExcludes = 3152288, +>InterfaceExcludes : SymbolFlags + + RegularEnumExcludes = 3258623, +>RegularEnumExcludes : SymbolFlags + + ConstEnumExcludes = 3259263, +>ConstEnumExcludes : SymbolFlags + + ValueModuleExcludes = 106639, +>ValueModuleExcludes : SymbolFlags + + NamespaceModuleExcludes = 0, +>NamespaceModuleExcludes : SymbolFlags + + MethodExcludes = 99263, +>MethodExcludes : SymbolFlags + + GetAccessorExcludes = 41919, +>GetAccessorExcludes : SymbolFlags + + SetAccessorExcludes = 74687, +>SetAccessorExcludes : SymbolFlags + + TypeParameterExcludes = 2103776, +>TypeParameterExcludes : SymbolFlags + + TypeAliasExcludes = 3152352, +>TypeAliasExcludes : SymbolFlags + + ImportExcludes = 33554432, +>ImportExcludes : SymbolFlags + + ModuleMember = 35653619, +>ModuleMember : SymbolFlags + + ExportHasLocal = 944, +>ExportHasLocal : SymbolFlags + + HasLocals = 1041936, +>HasLocals : SymbolFlags + + HasExports = 1952, +>HasExports : SymbolFlags + + HasMembers = 6240, +>HasMembers : SymbolFlags + + IsContainer = 1048560, +>IsContainer : SymbolFlags + + PropertyOrAccessor = 98308, +>PropertyOrAccessor : SymbolFlags + + Export = 29360128, +>Export : SymbolFlags + } + interface Symbol { +>Symbol : Symbol + + flags: SymbolFlags; +>flags : SymbolFlags +>SymbolFlags : SymbolFlags + + name: string; +>name : string + + id?: number; +>id : number + + mergeId?: number; +>mergeId : number + + declarations?: Declaration[]; +>declarations : Declaration[] +>Declaration : Declaration + + parent?: Symbol; +>parent : Symbol +>Symbol : Symbol + + members?: SymbolTable; +>members : SymbolTable +>SymbolTable : SymbolTable + + exports?: SymbolTable; +>exports : SymbolTable +>SymbolTable : SymbolTable + + exportSymbol?: Symbol; +>exportSymbol : Symbol +>Symbol : Symbol + + valueDeclaration?: Declaration; +>valueDeclaration : Declaration +>Declaration : Declaration + + constEnumOnlyModule?: boolean; +>constEnumOnlyModule : boolean + } + interface SymbolLinks { +>SymbolLinks : SymbolLinks + + target?: Symbol; +>target : Symbol +>Symbol : Symbol + + type?: Type; +>type : Type +>Type : Type + + declaredType?: Type; +>declaredType : Type +>Type : Type + + mapper?: TypeMapper; +>mapper : TypeMapper +>TypeMapper : TypeMapper + + referenced?: boolean; +>referenced : boolean + + exportAssignSymbol?: Symbol; +>exportAssignSymbol : Symbol +>Symbol : Symbol + + unionType?: UnionType; +>unionType : UnionType +>UnionType : UnionType + } + interface TransientSymbol extends Symbol, SymbolLinks { +>TransientSymbol : TransientSymbol +>Symbol : Symbol +>SymbolLinks : SymbolLinks + } + interface SymbolTable { +>SymbolTable : SymbolTable + + [index: string]: Symbol; +>index : string +>Symbol : Symbol + } + const enum NodeCheckFlags { +>NodeCheckFlags : NodeCheckFlags + + TypeChecked = 1, +>TypeChecked : NodeCheckFlags + + LexicalThis = 2, +>LexicalThis : NodeCheckFlags + + CaptureThis = 4, +>CaptureThis : NodeCheckFlags + + EmitExtends = 8, +>EmitExtends : NodeCheckFlags + + SuperInstance = 16, +>SuperInstance : NodeCheckFlags + + SuperStatic = 32, +>SuperStatic : NodeCheckFlags + + ContextChecked = 64, +>ContextChecked : NodeCheckFlags + + EnumValuesComputed = 128, +>EnumValuesComputed : NodeCheckFlags + } + interface NodeLinks { +>NodeLinks : NodeLinks + + resolvedType?: Type; +>resolvedType : Type +>Type : Type + + resolvedSignature?: Signature; +>resolvedSignature : Signature +>Signature : Signature + + resolvedSymbol?: Symbol; +>resolvedSymbol : Symbol +>Symbol : Symbol + + flags?: NodeCheckFlags; +>flags : NodeCheckFlags +>NodeCheckFlags : NodeCheckFlags + + enumMemberValue?: number; +>enumMemberValue : number + + isIllegalTypeReferenceInConstraint?: boolean; +>isIllegalTypeReferenceInConstraint : boolean + + isVisible?: boolean; +>isVisible : boolean + + localModuleName?: string; +>localModuleName : string + + assignmentChecks?: Map; +>assignmentChecks : Map +>Map : Map + } + const enum TypeFlags { +>TypeFlags : TypeFlags + + Any = 1, +>Any : TypeFlags + + String = 2, +>String : TypeFlags + + Number = 4, +>Number : TypeFlags + + Boolean = 8, +>Boolean : TypeFlags + + Void = 16, +>Void : TypeFlags + + Undefined = 32, +>Undefined : TypeFlags + + Null = 64, +>Null : TypeFlags + + Enum = 128, +>Enum : TypeFlags + + StringLiteral = 256, +>StringLiteral : TypeFlags + + TypeParameter = 512, +>TypeParameter : TypeFlags + + Class = 1024, +>Class : TypeFlags + + Interface = 2048, +>Interface : TypeFlags + + Reference = 4096, +>Reference : TypeFlags + + Tuple = 8192, +>Tuple : TypeFlags + + Union = 16384, +>Union : TypeFlags + + Anonymous = 32768, +>Anonymous : TypeFlags + + FromSignature = 65536, +>FromSignature : TypeFlags + + Intrinsic = 127, +>Intrinsic : TypeFlags + + StringLike = 258, +>StringLike : TypeFlags + + NumberLike = 132, +>NumberLike : TypeFlags + + ObjectType = 48128, +>ObjectType : TypeFlags + + Structured = 65025, +>Structured : TypeFlags + } + interface Type { +>Type : Type + + flags: TypeFlags; +>flags : TypeFlags +>TypeFlags : TypeFlags + + id: number; +>id : number + + symbol?: Symbol; +>symbol : Symbol +>Symbol : Symbol + } + interface IntrinsicType extends Type { +>IntrinsicType : IntrinsicType +>Type : Type + + intrinsicName: string; +>intrinsicName : string + } + interface StringLiteralType extends Type { +>StringLiteralType : StringLiteralType +>Type : Type + + text: string; +>text : string + } + interface ObjectType extends Type { +>ObjectType : ObjectType +>Type : Type + } + interface InterfaceType extends ObjectType { +>InterfaceType : InterfaceType +>ObjectType : ObjectType + + typeParameters: TypeParameter[]; +>typeParameters : TypeParameter[] +>TypeParameter : TypeParameter + + baseTypes: ObjectType[]; +>baseTypes : ObjectType[] +>ObjectType : ObjectType + + declaredProperties: Symbol[]; +>declaredProperties : Symbol[] +>Symbol : Symbol + + declaredCallSignatures: Signature[]; +>declaredCallSignatures : Signature[] +>Signature : Signature + + declaredConstructSignatures: Signature[]; +>declaredConstructSignatures : Signature[] +>Signature : Signature + + declaredStringIndexType: Type; +>declaredStringIndexType : Type +>Type : Type + + declaredNumberIndexType: Type; +>declaredNumberIndexType : Type +>Type : Type + } + interface TypeReference extends ObjectType { +>TypeReference : TypeReference +>ObjectType : ObjectType + + target: GenericType; +>target : GenericType +>GenericType : GenericType + + typeArguments: Type[]; +>typeArguments : Type[] +>Type : Type + } + interface GenericType extends InterfaceType, TypeReference { +>GenericType : GenericType +>InterfaceType : InterfaceType +>TypeReference : TypeReference + + instantiations: Map; +>instantiations : Map +>Map : Map +>TypeReference : TypeReference + + openReferenceTargets: GenericType[]; +>openReferenceTargets : GenericType[] +>GenericType : GenericType + + openReferenceChecks: Map; +>openReferenceChecks : Map +>Map : Map + } + interface TupleType extends ObjectType { +>TupleType : TupleType +>ObjectType : ObjectType + + elementTypes: Type[]; +>elementTypes : Type[] +>Type : Type + + baseArrayType: TypeReference; +>baseArrayType : TypeReference +>TypeReference : TypeReference + } + interface UnionType extends Type { +>UnionType : UnionType +>Type : Type + + types: Type[]; +>types : Type[] +>Type : Type + + resolvedProperties: SymbolTable; +>resolvedProperties : SymbolTable +>SymbolTable : SymbolTable + } + interface ResolvedType extends ObjectType, UnionType { +>ResolvedType : ResolvedType +>ObjectType : ObjectType +>UnionType : UnionType + + members: SymbolTable; +>members : SymbolTable +>SymbolTable : SymbolTable + + properties: Symbol[]; +>properties : Symbol[] +>Symbol : Symbol + + callSignatures: Signature[]; +>callSignatures : Signature[] +>Signature : Signature + + constructSignatures: Signature[]; +>constructSignatures : Signature[] +>Signature : Signature + + stringIndexType: Type; +>stringIndexType : Type +>Type : Type + + numberIndexType: Type; +>numberIndexType : Type +>Type : Type + } + interface TypeParameter extends Type { +>TypeParameter : TypeParameter +>Type : Type + + constraint: Type; +>constraint : Type +>Type : Type + + target?: TypeParameter; +>target : TypeParameter +>TypeParameter : TypeParameter + + mapper?: TypeMapper; +>mapper : TypeMapper +>TypeMapper : TypeMapper + } + const enum SignatureKind { +>SignatureKind : SignatureKind + + Call = 0, +>Call : SignatureKind + + Construct = 1, +>Construct : SignatureKind + } + interface Signature { +>Signature : Signature + + declaration: SignatureDeclaration; +>declaration : SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration + + typeParameters: TypeParameter[]; +>typeParameters : TypeParameter[] +>TypeParameter : TypeParameter + + parameters: Symbol[]; +>parameters : Symbol[] +>Symbol : Symbol + + resolvedReturnType: Type; +>resolvedReturnType : Type +>Type : Type + + minArgumentCount: number; +>minArgumentCount : number + + hasRestParameter: boolean; +>hasRestParameter : boolean + + hasStringLiterals: boolean; +>hasStringLiterals : boolean + + target?: Signature; +>target : Signature +>Signature : Signature + + mapper?: TypeMapper; +>mapper : TypeMapper +>TypeMapper : TypeMapper + + unionSignatures?: Signature[]; +>unionSignatures : Signature[] +>Signature : Signature + + erasedSignatureCache?: Signature; +>erasedSignatureCache : Signature +>Signature : Signature + + isolatedSignatureType?: ObjectType; +>isolatedSignatureType : ObjectType +>ObjectType : ObjectType + } + const enum IndexKind { +>IndexKind : IndexKind + + String = 0, +>String : IndexKind + + Number = 1, +>Number : IndexKind + } + interface TypeMapper { +>TypeMapper : TypeMapper + + (t: Type): Type; +>t : Type +>Type : Type +>Type : Type + } + interface TypeInferences { +>TypeInferences : TypeInferences + + primary: Type[]; +>primary : Type[] +>Type : Type + + secondary: Type[]; +>secondary : Type[] +>Type : Type + } + interface InferenceContext { +>InferenceContext : InferenceContext + + typeParameters: TypeParameter[]; +>typeParameters : TypeParameter[] +>TypeParameter : TypeParameter + + inferUnionTypes: boolean; +>inferUnionTypes : boolean + + inferences: TypeInferences[]; +>inferences : TypeInferences[] +>TypeInferences : TypeInferences + + inferredTypes: Type[]; +>inferredTypes : Type[] +>Type : Type + + failedTypeParameterIndex?: number; +>failedTypeParameterIndex : number + } + interface DiagnosticMessage { +>DiagnosticMessage : DiagnosticMessage + + key: string; +>key : string + + category: DiagnosticCategory; +>category : DiagnosticCategory +>DiagnosticCategory : DiagnosticCategory + + code: number; +>code : number + + isEarly?: boolean; +>isEarly : boolean + } + interface DiagnosticMessageChain { +>DiagnosticMessageChain : DiagnosticMessageChain + + messageText: string; +>messageText : string + + category: DiagnosticCategory; +>category : DiagnosticCategory +>DiagnosticCategory : DiagnosticCategory + + code: number; +>code : number + + next?: DiagnosticMessageChain; +>next : DiagnosticMessageChain +>DiagnosticMessageChain : DiagnosticMessageChain + } + interface Diagnostic { +>Diagnostic : Diagnostic + + file: SourceFile; +>file : SourceFile +>SourceFile : SourceFile + + start: number; +>start : number + + length: number; +>length : number + + messageText: string; +>messageText : string + + category: DiagnosticCategory; +>category : DiagnosticCategory +>DiagnosticCategory : DiagnosticCategory + + code: number; +>code : number + + /** + * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit + */ + isEarly?: boolean; +>isEarly : boolean + + /** + * Parse error - error produced by parser when it scanner returns a token + * that parser does not understand in its current state + * (as opposed to grammar error when parser can interpret the token but interpretation is not legal from the grammar perespective) + */ + isParseError?: boolean; +>isParseError : boolean + } + enum DiagnosticCategory { +>DiagnosticCategory : DiagnosticCategory + + Warning = 0, +>Warning : DiagnosticCategory + + Error = 1, +>Error : DiagnosticCategory + + Message = 2, +>Message : DiagnosticCategory + } + interface CompilerOptions { +>CompilerOptions : CompilerOptions + + charset?: string; +>charset : string + + codepage?: number; +>codepage : number + + declaration?: boolean; +>declaration : boolean + + diagnostics?: boolean; +>diagnostics : boolean + + emitBOM?: boolean; +>emitBOM : boolean + + help?: boolean; +>help : boolean + + locale?: string; +>locale : string + + mapRoot?: string; +>mapRoot : string + + module?: ModuleKind; +>module : ModuleKind +>ModuleKind : ModuleKind + + noEmitOnError?: boolean; +>noEmitOnError : boolean + + noErrorTruncation?: boolean; +>noErrorTruncation : boolean + + noImplicitAny?: boolean; +>noImplicitAny : boolean + + noLib?: boolean; +>noLib : boolean + + noLibCheck?: boolean; +>noLibCheck : boolean + + noResolve?: boolean; +>noResolve : boolean + + out?: string; +>out : string + + outDir?: string; +>outDir : string + + removeComments?: boolean; +>removeComments : boolean + + sourceMap?: boolean; +>sourceMap : boolean + + sourceRoot?: string; +>sourceRoot : string + + target?: ScriptTarget; +>target : ScriptTarget +>ScriptTarget : ScriptTarget + + version?: boolean; +>version : boolean + + watch?: boolean; +>watch : boolean + + preserveConstEnums?: boolean; +>preserveConstEnums : boolean + + [option: string]: string | number | boolean; +>option : string + } + const enum ModuleKind { +>ModuleKind : ModuleKind + + None = 0, +>None : ModuleKind + + CommonJS = 1, +>CommonJS : ModuleKind + + AMD = 2, +>AMD : ModuleKind + } + interface LineAndCharacter { +>LineAndCharacter : LineAndCharacter + + line: number; +>line : number + + character: number; +>character : number + } + const enum ScriptTarget { +>ScriptTarget : ScriptTarget + + ES3 = 0, +>ES3 : ScriptTarget + + ES5 = 1, +>ES5 : ScriptTarget + + ES6 = 2, +>ES6 : ScriptTarget + + Latest = 2, +>Latest : ScriptTarget + } + interface ParsedCommandLine { +>ParsedCommandLine : ParsedCommandLine + + options: CompilerOptions; +>options : CompilerOptions +>CompilerOptions : CompilerOptions + + filenames: string[]; +>filenames : string[] + + errors: Diagnostic[]; +>errors : Diagnostic[] +>Diagnostic : Diagnostic + } + interface CommandLineOption { +>CommandLineOption : CommandLineOption + + name: string; +>name : string + + type: string | Map; +>type : string | Map +>Map : Map + + shortName?: string; +>shortName : string + + description?: DiagnosticMessage; +>description : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + + paramName?: DiagnosticMessage; +>paramName : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + + error?: DiagnosticMessage; +>error : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + } + const enum CharacterCodes { +>CharacterCodes : CharacterCodes + + nullCharacter = 0, +>nullCharacter : CharacterCodes + + maxAsciiCharacter = 127, +>maxAsciiCharacter : CharacterCodes + + lineFeed = 10, +>lineFeed : CharacterCodes + + carriageReturn = 13, +>carriageReturn : CharacterCodes + + lineSeparator = 8232, +>lineSeparator : CharacterCodes + + paragraphSeparator = 8233, +>paragraphSeparator : CharacterCodes + + nextLine = 133, +>nextLine : CharacterCodes + + space = 32, +>space : CharacterCodes + + nonBreakingSpace = 160, +>nonBreakingSpace : CharacterCodes + + enQuad = 8192, +>enQuad : CharacterCodes + + emQuad = 8193, +>emQuad : CharacterCodes + + enSpace = 8194, +>enSpace : CharacterCodes + + emSpace = 8195, +>emSpace : CharacterCodes + + threePerEmSpace = 8196, +>threePerEmSpace : CharacterCodes + + fourPerEmSpace = 8197, +>fourPerEmSpace : CharacterCodes + + sixPerEmSpace = 8198, +>sixPerEmSpace : CharacterCodes + + figureSpace = 8199, +>figureSpace : CharacterCodes + + punctuationSpace = 8200, +>punctuationSpace : CharacterCodes + + thinSpace = 8201, +>thinSpace : CharacterCodes + + hairSpace = 8202, +>hairSpace : CharacterCodes + + zeroWidthSpace = 8203, +>zeroWidthSpace : CharacterCodes + + narrowNoBreakSpace = 8239, +>narrowNoBreakSpace : CharacterCodes + + ideographicSpace = 12288, +>ideographicSpace : CharacterCodes + + mathematicalSpace = 8287, +>mathematicalSpace : CharacterCodes + + ogham = 5760, +>ogham : CharacterCodes + + _ = 95, +>_ : CharacterCodes + + $ = 36, +>$ : CharacterCodes + + _0 = 48, +>_0 : CharacterCodes + + _1 = 49, +>_1 : CharacterCodes + + _2 = 50, +>_2 : CharacterCodes + + _3 = 51, +>_3 : CharacterCodes + + _4 = 52, +>_4 : CharacterCodes + + _5 = 53, +>_5 : CharacterCodes + + _6 = 54, +>_6 : CharacterCodes + + _7 = 55, +>_7 : CharacterCodes + + _8 = 56, +>_8 : CharacterCodes + + _9 = 57, +>_9 : CharacterCodes + + a = 97, +>a : CharacterCodes + + b = 98, +>b : CharacterCodes + + c = 99, +>c : CharacterCodes + + d = 100, +>d : CharacterCodes + + e = 101, +>e : CharacterCodes + + f = 102, +>f : CharacterCodes + + g = 103, +>g : CharacterCodes + + h = 104, +>h : CharacterCodes + + i = 105, +>i : CharacterCodes + + j = 106, +>j : CharacterCodes + + k = 107, +>k : CharacterCodes + + l = 108, +>l : CharacterCodes + + m = 109, +>m : CharacterCodes + + n = 110, +>n : CharacterCodes + + o = 111, +>o : CharacterCodes + + p = 112, +>p : CharacterCodes + + q = 113, +>q : CharacterCodes + + r = 114, +>r : CharacterCodes + + s = 115, +>s : CharacterCodes + + t = 116, +>t : CharacterCodes + + u = 117, +>u : CharacterCodes + + v = 118, +>v : CharacterCodes + + w = 119, +>w : CharacterCodes + + x = 120, +>x : CharacterCodes + + y = 121, +>y : CharacterCodes + + z = 122, +>z : CharacterCodes + + A = 65, +>A : CharacterCodes + + B = 66, +>B : CharacterCodes + + C = 67, +>C : CharacterCodes + + D = 68, +>D : CharacterCodes + + E = 69, +>E : CharacterCodes + + F = 70, +>F : CharacterCodes + + G = 71, +>G : CharacterCodes + + H = 72, +>H : CharacterCodes + + I = 73, +>I : CharacterCodes + + J = 74, +>J : CharacterCodes + + K = 75, +>K : CharacterCodes + + L = 76, +>L : CharacterCodes + + M = 77, +>M : CharacterCodes + + N = 78, +>N : CharacterCodes + + O = 79, +>O : CharacterCodes + + P = 80, +>P : CharacterCodes + + Q = 81, +>Q : CharacterCodes + + R = 82, +>R : CharacterCodes + + S = 83, +>S : CharacterCodes + + T = 84, +>T : CharacterCodes + + U = 85, +>U : CharacterCodes + + V = 86, +>V : CharacterCodes + + W = 87, +>W : CharacterCodes + + X = 88, +>X : CharacterCodes + + Y = 89, +>Y : CharacterCodes + + Z = 90, +>Z : CharacterCodes + + ampersand = 38, +>ampersand : CharacterCodes + + asterisk = 42, +>asterisk : CharacterCodes + + at = 64, +>at : CharacterCodes + + backslash = 92, +>backslash : CharacterCodes + + backtick = 96, +>backtick : CharacterCodes + + bar = 124, +>bar : CharacterCodes + + caret = 94, +>caret : CharacterCodes + + closeBrace = 125, +>closeBrace : CharacterCodes + + closeBracket = 93, +>closeBracket : CharacterCodes + + closeParen = 41, +>closeParen : CharacterCodes + + colon = 58, +>colon : CharacterCodes + + comma = 44, +>comma : CharacterCodes + + dot = 46, +>dot : CharacterCodes + + doubleQuote = 34, +>doubleQuote : CharacterCodes + + equals = 61, +>equals : CharacterCodes + + exclamation = 33, +>exclamation : CharacterCodes + + greaterThan = 62, +>greaterThan : CharacterCodes + + lessThan = 60, +>lessThan : CharacterCodes + + minus = 45, +>minus : CharacterCodes + + openBrace = 123, +>openBrace : CharacterCodes + + openBracket = 91, +>openBracket : CharacterCodes + + openParen = 40, +>openParen : CharacterCodes + + percent = 37, +>percent : CharacterCodes + + plus = 43, +>plus : CharacterCodes + + question = 63, +>question : CharacterCodes + + semicolon = 59, +>semicolon : CharacterCodes + + singleQuote = 39, +>singleQuote : CharacterCodes + + slash = 47, +>slash : CharacterCodes + + tilde = 126, +>tilde : CharacterCodes + + backspace = 8, +>backspace : CharacterCodes + + formFeed = 12, +>formFeed : CharacterCodes + + byteOrderMark = 65279, +>byteOrderMark : CharacterCodes + + tab = 9, +>tab : CharacterCodes + + verticalTab = 11, +>verticalTab : CharacterCodes + } + interface CancellationToken { +>CancellationToken : CancellationToken + + isCancellationRequested(): boolean; +>isCancellationRequested : () => boolean + } + interface CompilerHost { +>CompilerHost : CompilerHost + + getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; +>getSourceFile : (filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void) => SourceFile +>filename : string +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget +>onError : (message: string) => void +>message : string +>SourceFile : SourceFile + + getDefaultLibFilename(): string; +>getDefaultLibFilename : () => string + + getCancellationToken?(): CancellationToken; +>getCancellationToken : () => CancellationToken +>CancellationToken : CancellationToken + + writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; +>writeFile : (filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void) => void +>filename : string +>data : string +>writeByteOrderMark : boolean +>onError : (message: string) => void +>message : string + + getCurrentDirectory(): string; +>getCurrentDirectory : () => string + + getCanonicalFileName(fileName: string): string; +>getCanonicalFileName : (fileName: string) => string +>fileName : string + + useCaseSensitiveFileNames(): boolean; +>useCaseSensitiveFileNames : () => boolean + + getNewLine(): string; +>getNewLine : () => string + } +} +declare module ts { +>ts : typeof ts + + interface ErrorCallback { +>ErrorCallback : ErrorCallback + + (message: DiagnosticMessage): void; +>message : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + } + interface CommentCallback { +>CommentCallback : CommentCallback + + (pos: number, end: number): void; +>pos : number +>end : number + } + interface Scanner { +>Scanner : Scanner + + getStartPos(): number; +>getStartPos : () => number + + getToken(): SyntaxKind; +>getToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + getTextPos(): number; +>getTextPos : () => number + + getTokenPos(): number; +>getTokenPos : () => number + + getTokenText(): string; +>getTokenText : () => string + + getTokenValue(): string; +>getTokenValue : () => string + + hasPrecedingLineBreak(): boolean; +>hasPrecedingLineBreak : () => boolean + + isIdentifier(): boolean; +>isIdentifier : () => boolean + + isReservedWord(): boolean; +>isReservedWord : () => boolean + + reScanGreaterToken(): SyntaxKind; +>reScanGreaterToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + reScanSlashToken(): SyntaxKind; +>reScanSlashToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + reScanTemplateToken(): SyntaxKind; +>reScanTemplateToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + scan(): SyntaxKind; +>scan : () => SyntaxKind +>SyntaxKind : SyntaxKind + + setText(text: string): void; +>setText : (text: string) => void +>text : string + + setTextPos(textPos: number): void; +>setTextPos : (textPos: number) => void +>textPos : number + + tryScan(callback: () => T): T; +>tryScan : (callback: () => T) => T +>T : T +>callback : () => T +>T : T +>T : T + } + function tokenToString(t: SyntaxKind): string; +>tokenToString : (t: SyntaxKind) => string +>t : SyntaxKind +>SyntaxKind : SyntaxKind + + function computeLineStarts(text: string): number[]; +>computeLineStarts : (text: string) => number[] +>text : string + + function getPositionFromLineAndCharacter(lineStarts: number[], line: number, character: number): number; +>getPositionFromLineAndCharacter : (lineStarts: number[], line: number, character: number) => number +>lineStarts : number[] +>line : number +>character : number + + function getLineAndCharacterOfPosition(lineStarts: number[], position: number): { +>getLineAndCharacterOfPosition : (lineStarts: number[], position: number) => { line: number; character: number; } +>lineStarts : number[] +>position : number + + line: number; +>line : number + + character: number; +>character : number + + }; + function positionToLineAndCharacter(text: string, pos: number): { +>positionToLineAndCharacter : (text: string, pos: number) => { line: number; character: number; } +>text : string +>pos : number + + line: number; +>line : number + + character: number; +>character : number + + }; + function isWhiteSpace(ch: number): boolean; +>isWhiteSpace : (ch: number) => boolean +>ch : number + + function isLineBreak(ch: number): boolean; +>isLineBreak : (ch: number) => boolean +>ch : number + + function isOctalDigit(ch: number): boolean; +>isOctalDigit : (ch: number) => boolean +>ch : number + + function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean): number; +>skipTrivia : (text: string, pos: number, stopAfterLineBreak?: boolean) => number +>text : string +>pos : number +>stopAfterLineBreak : boolean + + function getLeadingCommentRanges(text: string, pos: number): CommentRange[]; +>getLeadingCommentRanges : (text: string, pos: number) => CommentRange[] +>text : string +>pos : number +>CommentRange : CommentRange + + function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; +>getTrailingCommentRanges : (text: string, pos: number) => CommentRange[] +>text : string +>pos : number +>CommentRange : CommentRange + + function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; +>isIdentifierStart : (ch: number, languageVersion: ScriptTarget) => boolean +>ch : number +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget + + function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; +>isIdentifierPart : (ch: number, languageVersion: ScriptTarget) => boolean +>ch : number +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget + + function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback): Scanner; +>createScanner : (languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback) => Scanner +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget +>skipTrivia : boolean +>text : string +>onError : ErrorCallback +>ErrorCallback : ErrorCallback +>onComment : CommentCallback +>CommentCallback : CommentCallback +>Scanner : Scanner +} +declare module ts { +>ts : typeof ts + + interface ReferencePathMatchResult { +>ReferencePathMatchResult : ReferencePathMatchResult + + fileReference?: FileReference; +>fileReference : FileReference +>FileReference : FileReference + + diagnostic?: DiagnosticMessage; +>diagnostic : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + + isNoDefaultLib?: boolean; +>isNoDefaultLib : boolean + } + function getNodeConstructor(kind: SyntaxKind): new () => Node; +>getNodeConstructor : (kind: SyntaxKind) => new () => Node +>kind : SyntaxKind +>SyntaxKind : SyntaxKind +>Node : Node + + function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; +>forEachChild : (node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T) => T +>T : T +>node : Node +>Node : Node +>cbNode : (node: Node) => T +>node : Node +>Node : Node +>T : T +>cbNodes : (nodes: Node[]) => T +>nodes : Node[] +>Node : Node +>T : T +>T : T + + function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; +>createSourceFile : (filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean) => SourceFile +>filename : string +>sourceText : string +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget +>version : string +>isOpen : boolean +>SourceFile : SourceFile + + function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; +>createProgram : (rootNames: string[], options: CompilerOptions, host: CompilerHost) => Program +>rootNames : string[] +>options : CompilerOptions +>CompilerOptions : CompilerOptions +>host : CompilerHost +>CompilerHost : CompilerHost +>Program : Program +} +declare module ts { +>ts : typeof ts + + function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; +>createTypeChecker : (program: Program, fullTypeCheck: boolean) => TypeChecker +>program : Program +>Program : Program +>fullTypeCheck : boolean +>TypeChecker : TypeChecker +} +declare module ts { +>ts : typeof ts + + interface Node { +>Node : Node + + getSourceFile(): SourceFile; +>getSourceFile : () => SourceFile +>SourceFile : SourceFile + + getChildCount(sourceFile?: SourceFile): number; +>getChildCount : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getChildAt(index: number, sourceFile?: SourceFile): Node; +>getChildAt : (index: number, sourceFile?: SourceFile) => Node +>index : number +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + + getChildren(sourceFile?: SourceFile): Node[]; +>getChildren : (sourceFile?: SourceFile) => Node[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + + getStart(sourceFile?: SourceFile): number; +>getStart : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFullStart(): number; +>getFullStart : () => number + + getEnd(): number; +>getEnd : () => number + + getWidth(sourceFile?: SourceFile): number; +>getWidth : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFullWidth(): number; +>getFullWidth : () => number + + getLeadingTriviaWidth(sourceFile?: SourceFile): number; +>getLeadingTriviaWidth : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFullText(sourceFile?: SourceFile): string; +>getFullText : (sourceFile?: SourceFile) => string +>sourceFile : SourceFile +>SourceFile : SourceFile + + getText(sourceFile?: SourceFile): string; +>getText : (sourceFile?: SourceFile) => string +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFirstToken(sourceFile?: SourceFile): Node; +>getFirstToken : (sourceFile?: SourceFile) => Node +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + + getLastToken(sourceFile?: SourceFile): Node; +>getLastToken : (sourceFile?: SourceFile) => Node +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + } + interface Symbol { +>Symbol : Symbol + + getFlags(): SymbolFlags; +>getFlags : () => SymbolFlags +>SymbolFlags : SymbolFlags + + getName(): string; +>getName : () => string + + getDeclarations(): Declaration[]; +>getDeclarations : () => Declaration[] +>Declaration : Declaration + + getDocumentationComment(): SymbolDisplayPart[]; +>getDocumentationComment : () => SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface Type { +>Type : Type + + getFlags(): TypeFlags; +>getFlags : () => TypeFlags +>TypeFlags : TypeFlags + + getSymbol(): Symbol; +>getSymbol : () => Symbol +>Symbol : Symbol + + getProperties(): Symbol[]; +>getProperties : () => Symbol[] +>Symbol : Symbol + + getProperty(propertyName: string): Symbol; +>getProperty : (propertyName: string) => Symbol +>propertyName : string +>Symbol : Symbol + + getApparentProperties(): Symbol[]; +>getApparentProperties : () => Symbol[] +>Symbol : Symbol + + getCallSignatures(): Signature[]; +>getCallSignatures : () => Signature[] +>Signature : Signature + + getConstructSignatures(): Signature[]; +>getConstructSignatures : () => Signature[] +>Signature : Signature + + getStringIndexType(): Type; +>getStringIndexType : () => Type +>Type : Type + + getNumberIndexType(): Type; +>getNumberIndexType : () => Type +>Type : Type + } + interface Signature { +>Signature : Signature + + getDeclaration(): SignatureDeclaration; +>getDeclaration : () => SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration + + getTypeParameters(): Type[]; +>getTypeParameters : () => Type[] +>Type : Type + + getParameters(): Symbol[]; +>getParameters : () => Symbol[] +>Symbol : Symbol + + getReturnType(): Type; +>getReturnType : () => Type +>Type : Type + + getDocumentationComment(): SymbolDisplayPart[]; +>getDocumentationComment : () => SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface SourceFile { +>SourceFile : SourceFile + + getScriptSnapshot(): IScriptSnapshot; +>getScriptSnapshot : () => IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot + + getNamedDeclarations(): Declaration[]; +>getNamedDeclarations : () => Declaration[] +>Declaration : Declaration + + update(scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; +>update : (scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange) => SourceFile +>scriptSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>version : string +>isOpen : boolean +>textChangeRange : TextChangeRange +>TextChangeRange : TextChangeRange +>SourceFile : SourceFile + } + /** + * Represents an immutable snapshot of a script at a specified time.Once acquired, the + * snapshot is observably immutable. i.e. the same calls with the same parameters will return + * the same values. + */ + interface IScriptSnapshot { +>IScriptSnapshot : IScriptSnapshot + + /** Gets a portion of the script snapshot specified by [start, end). */ + getText(start: number, end: number): string; +>getText : (start: number, end: number) => string +>start : number +>end : number + + /** Gets the length of this script snapshot. */ + getLength(): number; +>getLength : () => number + + /** + * This call returns the array containing the start position of every line. + * i.e."[0, 10, 55]". TODO: consider making this optional. The language service could + * always determine this (albeit in a more expensive manner). + */ + getLineStartPositions(): number[]; +>getLineStartPositions : () => number[] + + /** + * Gets the TextChangeRange that describe how the text changed between this text and + * an older version. This information is used by the incremental parser to determine + * what sections of the script need to be re-parsed. 'undefined' can be returned if the + * change range cannot be determined. However, in that case, incremental parsing will + * not happen and the entire document will be re - parsed. + */ + getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; +>getChangeRange : (oldSnapshot: IScriptSnapshot) => TextChangeRange +>oldSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>TextChangeRange : TextChangeRange + } + module ScriptSnapshot { +>ScriptSnapshot : typeof ScriptSnapshot + + function fromString(text: string): IScriptSnapshot; +>fromString : (text: string) => IScriptSnapshot +>text : string +>IScriptSnapshot : IScriptSnapshot + } + interface PreProcessedFileInfo { +>PreProcessedFileInfo : PreProcessedFileInfo + + referencedFiles: FileReference[]; +>referencedFiles : FileReference[] +>FileReference : FileReference + + importedFiles: FileReference[]; +>importedFiles : FileReference[] +>FileReference : FileReference + + isLibFile: boolean; +>isLibFile : boolean + } + interface Logger { +>Logger : Logger + + log(s: string): void; +>log : (s: string) => void +>s : string + } + interface LanguageServiceHost extends Logger { +>LanguageServiceHost : LanguageServiceHost +>Logger : Logger + + getCompilationSettings(): CompilerOptions; +>getCompilationSettings : () => CompilerOptions +>CompilerOptions : CompilerOptions + + getScriptFileNames(): string[]; +>getScriptFileNames : () => string[] + + getScriptVersion(fileName: string): string; +>getScriptVersion : (fileName: string) => string +>fileName : string + + getScriptIsOpen(fileName: string): boolean; +>getScriptIsOpen : (fileName: string) => boolean +>fileName : string + + getScriptSnapshot(fileName: string): IScriptSnapshot; +>getScriptSnapshot : (fileName: string) => IScriptSnapshot +>fileName : string +>IScriptSnapshot : IScriptSnapshot + + getLocalizedDiagnosticMessages(): any; +>getLocalizedDiagnosticMessages : () => any + + getCancellationToken(): CancellationToken; +>getCancellationToken : () => CancellationToken +>CancellationToken : CancellationToken + + getCurrentDirectory(): string; +>getCurrentDirectory : () => string + + getDefaultLibFilename(): string; +>getDefaultLibFilename : () => string + } + interface LanguageService { +>LanguageService : LanguageService + + cleanupSemanticCache(): void; +>cleanupSemanticCache : () => void + + getSyntacticDiagnostics(fileName: string): Diagnostic[]; +>getSyntacticDiagnostics : (fileName: string) => Diagnostic[] +>fileName : string +>Diagnostic : Diagnostic + + getSemanticDiagnostics(fileName: string): Diagnostic[]; +>getSemanticDiagnostics : (fileName: string) => Diagnostic[] +>fileName : string +>Diagnostic : Diagnostic + + getCompilerOptionsDiagnostics(): Diagnostic[]; +>getCompilerOptionsDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; +>getSyntacticClassifications : (fileName: string, span: TextSpan) => ClassifiedSpan[] +>fileName : string +>span : TextSpan +>TextSpan : TextSpan +>ClassifiedSpan : ClassifiedSpan + + getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; +>getSemanticClassifications : (fileName: string, span: TextSpan) => ClassifiedSpan[] +>fileName : string +>span : TextSpan +>TextSpan : TextSpan +>ClassifiedSpan : ClassifiedSpan + + getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): CompletionInfo; +>getCompletionsAtPosition : (fileName: string, position: number, isMemberCompletion: boolean) => CompletionInfo +>fileName : string +>position : number +>isMemberCompletion : boolean +>CompletionInfo : CompletionInfo + + getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; +>getCompletionEntryDetails : (fileName: string, position: number, entryName: string) => CompletionEntryDetails +>fileName : string +>position : number +>entryName : string +>CompletionEntryDetails : CompletionEntryDetails + + getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; +>getQuickInfoAtPosition : (fileName: string, position: number) => QuickInfo +>fileName : string +>position : number +>QuickInfo : QuickInfo + + getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; +>getNameOrDottedNameSpan : (fileName: string, startPos: number, endPos: number) => TextSpan +>fileName : string +>startPos : number +>endPos : number +>TextSpan : TextSpan + + getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan; +>getBreakpointStatementAtPosition : (fileName: string, position: number) => TextSpan +>fileName : string +>position : number +>TextSpan : TextSpan + + getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems; +>getSignatureHelpItems : (fileName: string, position: number) => SignatureHelpItems +>fileName : string +>position : number +>SignatureHelpItems : SignatureHelpItems + + getRenameInfo(fileName: string, position: number): RenameInfo; +>getRenameInfo : (fileName: string, position: number) => RenameInfo +>fileName : string +>position : number +>RenameInfo : RenameInfo + + findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[]; +>findRenameLocations : (fileName: string, position: number, findInStrings: boolean, findInComments: boolean) => RenameLocation[] +>fileName : string +>position : number +>findInStrings : boolean +>findInComments : boolean +>RenameLocation : RenameLocation + + getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; +>getDefinitionAtPosition : (fileName: string, position: number) => DefinitionInfo[] +>fileName : string +>position : number +>DefinitionInfo : DefinitionInfo + + getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; +>getReferencesAtPosition : (fileName: string, position: number) => ReferenceEntry[] +>fileName : string +>position : number +>ReferenceEntry : ReferenceEntry + + getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; +>getOccurrencesAtPosition : (fileName: string, position: number) => ReferenceEntry[] +>fileName : string +>position : number +>ReferenceEntry : ReferenceEntry + + getNavigateToItems(searchValue: string): NavigateToItem[]; +>getNavigateToItems : (searchValue: string) => NavigateToItem[] +>searchValue : string +>NavigateToItem : NavigateToItem + + getNavigationBarItems(fileName: string): NavigationBarItem[]; +>getNavigationBarItems : (fileName: string) => NavigationBarItem[] +>fileName : string +>NavigationBarItem : NavigationBarItem + + getOutliningSpans(fileName: string): OutliningSpan[]; +>getOutliningSpans : (fileName: string) => OutliningSpan[] +>fileName : string +>OutliningSpan : OutliningSpan + + getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; +>getTodoComments : (fileName: string, descriptors: TodoCommentDescriptor[]) => TodoComment[] +>fileName : string +>descriptors : TodoCommentDescriptor[] +>TodoCommentDescriptor : TodoCommentDescriptor +>TodoComment : TodoComment + + getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; +>getBraceMatchingAtPosition : (fileName: string, position: number) => TextSpan[] +>fileName : string +>position : number +>TextSpan : TextSpan + + getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number; +>getIndentationAtPosition : (fileName: string, position: number, options: EditorOptions) => number +>fileName : string +>position : number +>options : EditorOptions +>EditorOptions : EditorOptions + + getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[]; +>getFormattingEditsForRange : (fileName: string, start: number, end: number, options: FormatCodeOptions) => TextChange[] +>fileName : string +>start : number +>end : number +>options : FormatCodeOptions +>FormatCodeOptions : FormatCodeOptions +>TextChange : TextChange + + getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; +>getFormattingEditsForDocument : (fileName: string, options: FormatCodeOptions) => TextChange[] +>fileName : string +>options : FormatCodeOptions +>FormatCodeOptions : FormatCodeOptions +>TextChange : TextChange + + getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[]; +>getFormattingEditsAfterKeystroke : (fileName: string, position: number, key: string, options: FormatCodeOptions) => TextChange[] +>fileName : string +>position : number +>key : string +>options : FormatCodeOptions +>FormatCodeOptions : FormatCodeOptions +>TextChange : TextChange + + getEmitOutput(fileName: string): EmitOutput; +>getEmitOutput : (fileName: string) => EmitOutput +>fileName : string +>EmitOutput : EmitOutput + + getSourceFile(filename: string): SourceFile; +>getSourceFile : (filename: string) => SourceFile +>filename : string +>SourceFile : SourceFile + + dispose(): void; +>dispose : () => void + } + class TextSpan { +>TextSpan : TextSpan + + private _start; +>_start : any + + private _length; +>_length : any + + /** + * Creates a TextSpan instance beginning with the position Start and having the Length + * specified with length. + */ + constructor(start: number, length: number); +>start : number +>length : number + + toJSON(key: any): any; +>toJSON : (key: any) => any +>key : any + + start(): number; +>start : () => number + + length(): number; +>length : () => number + + end(): number; +>end : () => number + + isEmpty(): boolean; +>isEmpty : () => boolean + + /** + * Determines whether the position lies within the span. Returns true if the position is greater than or equal to Start and strictly less + * than End, otherwise false. + * @param position The position to check. + */ + containsPosition(position: number): boolean; +>containsPosition : (position: number) => boolean +>position : number + + /** + * Determines whether span falls completely within this span. Returns true if the specified span falls completely within this span, otherwise false. + * @param span The span to check. + */ + containsTextSpan(span: TextSpan): boolean; +>containsTextSpan : (span: TextSpan) => boolean +>span : TextSpan +>TextSpan : TextSpan + + /** + * Determines whether the given span overlaps this span. Two spans are considered to overlap + * if they have positions in common and neither is empty. Empty spans do not overlap with any + * other span. Returns true if the spans overlap, false otherwise. + * @param span The span to check. + */ + overlapsWith(span: TextSpan): boolean; +>overlapsWith : (span: TextSpan) => boolean +>span : TextSpan +>TextSpan : TextSpan + + /** + * Returns the overlap with the given span, or undefined if there is no overlap. + * @param span The span to check. + */ + overlap(span: TextSpan): TextSpan; +>overlap : (span: TextSpan) => TextSpan +>span : TextSpan +>TextSpan : TextSpan +>TextSpan : TextSpan + + /** + * Determines whether span intersects this span. Two spans are considered to + * intersect if they have positions in common or the end of one span + * coincides with the start of the other span. Returns true if the spans intersect, false otherwise. + * @param The span to check. + */ + intersectsWithTextSpan(span: TextSpan): boolean; +>intersectsWithTextSpan : (span: TextSpan) => boolean +>span : TextSpan +>TextSpan : TextSpan + + intersectsWith(start: number, length: number): boolean; +>intersectsWith : (start: number, length: number) => boolean +>start : number +>length : number + + /** + * Determines whether the given position intersects this span. + * A position is considered to intersect if it is between the start and + * end positions (inclusive) of this span. Returns true if the position intersects, false otherwise. + * @param position The position to check. + */ + intersectsWithPosition(position: number): boolean; +>intersectsWithPosition : (position: number) => boolean +>position : number + + /** + * Returns the intersection with the given span, or undefined if there is no intersection. + * @param span The span to check. + */ + intersection(span: TextSpan): TextSpan; +>intersection : (span: TextSpan) => TextSpan +>span : TextSpan +>TextSpan : TextSpan +>TextSpan : TextSpan + + /** + * Creates a new TextSpan from the given start and end positions + * as opposed to a position and length. + */ + static fromBounds(start: number, end: number): TextSpan; +>fromBounds : (start: number, end: number) => TextSpan +>start : number +>end : number +>TextSpan : TextSpan + } + class TextChangeRange { +>TextChangeRange : TextChangeRange + + static unchanged: TextChangeRange; +>unchanged : TextChangeRange +>TextChangeRange : TextChangeRange + + private _span; +>_span : any + + private _newLength; +>_newLength : any + + /** + * Initializes a new instance of TextChangeRange. + */ + constructor(span: TextSpan, newLength: number); +>span : TextSpan +>TextSpan : TextSpan +>newLength : number + + /** + * The span of text before the edit which is being changed + */ + span(): TextSpan; +>span : () => TextSpan +>TextSpan : TextSpan + + /** + * Width of the span after the edit. A 0 here would represent a delete + */ + newLength(): number; +>newLength : () => number + + newSpan(): TextSpan; +>newSpan : () => TextSpan +>TextSpan : TextSpan + + isUnchanged(): boolean; +>isUnchanged : () => boolean + + /** + * Called to merge all the changes that occurred across several versions of a script snapshot + * into a single change. i.e. if a user keeps making successive edits to a script we will + * have a text change from V1 to V2, V2 to V3, ..., Vn. + * + * This function will then merge those changes into a single change range valid between V1 and + * Vn. + */ + static collapseChangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; +>collapseChangesAcrossMultipleVersions : (changes: TextChangeRange[]) => TextChangeRange +>changes : TextChangeRange[] +>TextChangeRange : TextChangeRange +>TextChangeRange : TextChangeRange + } + interface ClassifiedSpan { +>ClassifiedSpan : ClassifiedSpan + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + classificationType: string; +>classificationType : string + } + interface NavigationBarItem { +>NavigationBarItem : NavigationBarItem + + text: string; +>text : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + spans: TextSpan[]; +>spans : TextSpan[] +>TextSpan : TextSpan + + childItems: NavigationBarItem[]; +>childItems : NavigationBarItem[] +>NavigationBarItem : NavigationBarItem + + indent: number; +>indent : number + + bolded: boolean; +>bolded : boolean + + grayed: boolean; +>grayed : boolean + } + interface TodoCommentDescriptor { +>TodoCommentDescriptor : TodoCommentDescriptor + + text: string; +>text : string + + priority: number; +>priority : number + } + interface TodoComment { +>TodoComment : TodoComment + + descriptor: TodoCommentDescriptor; +>descriptor : TodoCommentDescriptor +>TodoCommentDescriptor : TodoCommentDescriptor + + message: string; +>message : string + + position: number; +>position : number + } + class TextChange { +>TextChange : TextChange + + span: TextSpan; +>span : TextSpan +>TextSpan : TextSpan + + newText: string; +>newText : string + } + interface RenameLocation { +>RenameLocation : RenameLocation + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + fileName: string; +>fileName : string + } + interface ReferenceEntry { +>ReferenceEntry : ReferenceEntry + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + fileName: string; +>fileName : string + + isWriteAccess: boolean; +>isWriteAccess : boolean + } + interface NavigateToItem { +>NavigateToItem : NavigateToItem + + name: string; +>name : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + matchKind: string; +>matchKind : string + + fileName: string; +>fileName : string + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + containerName: string; +>containerName : string + + containerKind: string; +>containerKind : string + } + interface EditorOptions { +>EditorOptions : EditorOptions + + IndentSize: number; +>IndentSize : number + + TabSize: number; +>TabSize : number + + NewLineCharacter: string; +>NewLineCharacter : string + + ConvertTabsToSpaces: boolean; +>ConvertTabsToSpaces : boolean + } + interface FormatCodeOptions extends EditorOptions { +>FormatCodeOptions : FormatCodeOptions +>EditorOptions : EditorOptions + + InsertSpaceAfterCommaDelimiter: boolean; +>InsertSpaceAfterCommaDelimiter : boolean + + InsertSpaceAfterSemicolonInForStatements: boolean; +>InsertSpaceAfterSemicolonInForStatements : boolean + + InsertSpaceBeforeAndAfterBinaryOperators: boolean; +>InsertSpaceBeforeAndAfterBinaryOperators : boolean + + InsertSpaceAfterKeywordsInControlFlowStatements: boolean; +>InsertSpaceAfterKeywordsInControlFlowStatements : boolean + + InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; +>InsertSpaceAfterFunctionKeywordForAnonymousFunctions : boolean + + InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; +>InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis : boolean + + PlaceOpenBraceOnNewLineForFunctions: boolean; +>PlaceOpenBraceOnNewLineForFunctions : boolean + + PlaceOpenBraceOnNewLineForControlBlocks: boolean; +>PlaceOpenBraceOnNewLineForControlBlocks : boolean + } + interface DefinitionInfo { +>DefinitionInfo : DefinitionInfo + + fileName: string; +>fileName : string + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + kind: string; +>kind : string + + name: string; +>name : string + + containerKind: string; +>containerKind : string + + containerName: string; +>containerName : string + } + enum SymbolDisplayPartKind { +>SymbolDisplayPartKind : SymbolDisplayPartKind + + aliasName = 0, +>aliasName : SymbolDisplayPartKind + + className = 1, +>className : SymbolDisplayPartKind + + enumName = 2, +>enumName : SymbolDisplayPartKind + + fieldName = 3, +>fieldName : SymbolDisplayPartKind + + interfaceName = 4, +>interfaceName : SymbolDisplayPartKind + + keyword = 5, +>keyword : SymbolDisplayPartKind + + lineBreak = 6, +>lineBreak : SymbolDisplayPartKind + + numericLiteral = 7, +>numericLiteral : SymbolDisplayPartKind + + stringLiteral = 8, +>stringLiteral : SymbolDisplayPartKind + + localName = 9, +>localName : SymbolDisplayPartKind + + methodName = 10, +>methodName : SymbolDisplayPartKind + + moduleName = 11, +>moduleName : SymbolDisplayPartKind + + operator = 12, +>operator : SymbolDisplayPartKind + + parameterName = 13, +>parameterName : SymbolDisplayPartKind + + propertyName = 14, +>propertyName : SymbolDisplayPartKind + + punctuation = 15, +>punctuation : SymbolDisplayPartKind + + space = 16, +>space : SymbolDisplayPartKind + + text = 17, +>text : SymbolDisplayPartKind + + typeParameterName = 18, +>typeParameterName : SymbolDisplayPartKind + + enumMemberName = 19, +>enumMemberName : SymbolDisplayPartKind + + functionName = 20, +>functionName : SymbolDisplayPartKind + + regularExpressionLiteral = 21, +>regularExpressionLiteral : SymbolDisplayPartKind + } + interface SymbolDisplayPart { +>SymbolDisplayPart : SymbolDisplayPart + + text: string; +>text : string + + kind: string; +>kind : string + } + interface QuickInfo { +>QuickInfo : QuickInfo + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + displayParts: SymbolDisplayPart[]; +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface RenameInfo { +>RenameInfo : RenameInfo + + canRename: boolean; +>canRename : boolean + + localizedErrorMessage: string; +>localizedErrorMessage : string + + displayName: string; +>displayName : string + + fullDisplayName: string; +>fullDisplayName : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + triggerSpan: TextSpan; +>triggerSpan : TextSpan +>TextSpan : TextSpan + } + interface SignatureHelpParameter { +>SignatureHelpParameter : SignatureHelpParameter + + name: string; +>name : string + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + displayParts: SymbolDisplayPart[]; +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + isOptional: boolean; +>isOptional : boolean + } + /** + * Represents a single signature to show in signature help. + * The id is used for subsequent calls into the language service to ask questions about the + * signature help item in the context of any documents that have been updated. i.e. after + * an edit has happened, while signature help is still active, the host can ask important + * questions like 'what parameter is the user currently contained within?'. + */ + interface SignatureHelpItem { +>SignatureHelpItem : SignatureHelpItem + + isVariadic: boolean; +>isVariadic : boolean + + prefixDisplayParts: SymbolDisplayPart[]; +>prefixDisplayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + suffixDisplayParts: SymbolDisplayPart[]; +>suffixDisplayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + separatorDisplayParts: SymbolDisplayPart[]; +>separatorDisplayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + parameters: SignatureHelpParameter[]; +>parameters : SignatureHelpParameter[] +>SignatureHelpParameter : SignatureHelpParameter + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + /** + * Represents a set of signature help items, and the preferred item that should be selected. + */ + interface SignatureHelpItems { +>SignatureHelpItems : SignatureHelpItems + + items: SignatureHelpItem[]; +>items : SignatureHelpItem[] +>SignatureHelpItem : SignatureHelpItem + + applicableSpan: TextSpan; +>applicableSpan : TextSpan +>TextSpan : TextSpan + + selectedItemIndex: number; +>selectedItemIndex : number + + argumentIndex: number; +>argumentIndex : number + + argumentCount: number; +>argumentCount : number + } + interface CompletionInfo { +>CompletionInfo : CompletionInfo + + isMemberCompletion: boolean; +>isMemberCompletion : boolean + + entries: CompletionEntry[]; +>entries : CompletionEntry[] +>CompletionEntry : CompletionEntry + } + interface CompletionEntry { +>CompletionEntry : CompletionEntry + + name: string; +>name : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + } + interface CompletionEntryDetails { +>CompletionEntryDetails : CompletionEntryDetails + + name: string; +>name : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + displayParts: SymbolDisplayPart[]; +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface OutliningSpan { +>OutliningSpan : OutliningSpan + + /** The span of the document to actually collapse. */ + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + /** The span of the document to display when the user hovers over the collapsed span. */ + hintSpan: TextSpan; +>hintSpan : TextSpan +>TextSpan : TextSpan + + /** The text to display in the editor for the collapsed region. */ + bannerText: string; +>bannerText : string + + /** + * Whether or not this region should be automatically collapsed when + * the 'Collapse to Definitions' command is invoked. + */ + autoCollapse: boolean; +>autoCollapse : boolean + } + interface EmitOutput { +>EmitOutput : EmitOutput + + outputFiles: OutputFile[]; +>outputFiles : OutputFile[] +>OutputFile : OutputFile + + emitOutputStatus: EmitReturnStatus; +>emitOutputStatus : EmitReturnStatus +>EmitReturnStatus : EmitReturnStatus + } + const enum OutputFileType { +>OutputFileType : OutputFileType + + JavaScript = 0, +>JavaScript : OutputFileType + + SourceMap = 1, +>SourceMap : OutputFileType + + Declaration = 2, +>Declaration : OutputFileType + } + interface OutputFile { +>OutputFile : OutputFile + + name: string; +>name : string + + writeByteOrderMark: boolean; +>writeByteOrderMark : boolean + + text: string; +>text : string + } + const enum EndOfLineState { +>EndOfLineState : EndOfLineState + + Start = 0, +>Start : EndOfLineState + + InMultiLineCommentTrivia = 1, +>InMultiLineCommentTrivia : EndOfLineState + + InSingleQuoteStringLiteral = 2, +>InSingleQuoteStringLiteral : EndOfLineState + + InDoubleQuoteStringLiteral = 3, +>InDoubleQuoteStringLiteral : EndOfLineState + } + enum TokenClass { +>TokenClass : TokenClass + + Punctuation = 0, +>Punctuation : TokenClass + + Keyword = 1, +>Keyword : TokenClass + + Operator = 2, +>Operator : TokenClass + + Comment = 3, +>Comment : TokenClass + + Whitespace = 4, +>Whitespace : TokenClass + + Identifier = 5, +>Identifier : TokenClass + + NumberLiteral = 6, +>NumberLiteral : TokenClass + + StringLiteral = 7, +>StringLiteral : TokenClass + + RegExpLiteral = 8, +>RegExpLiteral : TokenClass + } + interface ClassificationResult { +>ClassificationResult : ClassificationResult + + finalLexState: EndOfLineState; +>finalLexState : EndOfLineState +>EndOfLineState : EndOfLineState + + entries: ClassificationInfo[]; +>entries : ClassificationInfo[] +>ClassificationInfo : ClassificationInfo + } + interface ClassificationInfo { +>ClassificationInfo : ClassificationInfo + + length: number; +>length : number + + classification: TokenClass; +>classification : TokenClass +>TokenClass : TokenClass + } + interface Classifier { +>Classifier : Classifier + + getClassificationsForLine(text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean): ClassificationResult; +>getClassificationsForLine : (text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean) => ClassificationResult +>text : string +>lexState : EndOfLineState +>EndOfLineState : EndOfLineState +>classifyKeywordsInGenerics : boolean +>ClassificationResult : ClassificationResult + } + interface DocumentRegistry { +>DocumentRegistry : DocumentRegistry + + acquireDocument(filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean): SourceFile; +>acquireDocument : (filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean) => SourceFile +>filename : string +>compilationSettings : CompilerOptions +>CompilerOptions : CompilerOptions +>scriptSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>version : string +>isOpen : boolean +>SourceFile : SourceFile + + updateDocument(sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; +>updateDocument : (sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange) => SourceFile +>sourceFile : SourceFile +>SourceFile : SourceFile +>filename : string +>compilationSettings : CompilerOptions +>CompilerOptions : CompilerOptions +>scriptSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>version : string +>isOpen : boolean +>textChangeRange : TextChangeRange +>TextChangeRange : TextChangeRange +>SourceFile : SourceFile + + releaseDocument(filename: string, compilationSettings: CompilerOptions): void; +>releaseDocument : (filename: string, compilationSettings: CompilerOptions) => void +>filename : string +>compilationSettings : CompilerOptions +>CompilerOptions : CompilerOptions + } + class ScriptElementKind { +>ScriptElementKind : ScriptElementKind + + static unknown: string; +>unknown : string + + static keyword: string; +>keyword : string + + static scriptElement: string; +>scriptElement : string + + static moduleElement: string; +>moduleElement : string + + static classElement: string; +>classElement : string + + static interfaceElement: string; +>interfaceElement : string + + static typeElement: string; +>typeElement : string + + static enumElement: string; +>enumElement : string + + static variableElement: string; +>variableElement : string + + static localVariableElement: string; +>localVariableElement : string + + static functionElement: string; +>functionElement : string + + static localFunctionElement: string; +>localFunctionElement : string + + static memberFunctionElement: string; +>memberFunctionElement : string + + static memberGetAccessorElement: string; +>memberGetAccessorElement : string + + static memberSetAccessorElement: string; +>memberSetAccessorElement : string + + static memberVariableElement: string; +>memberVariableElement : string + + static constructorImplementationElement: string; +>constructorImplementationElement : string + + static callSignatureElement: string; +>callSignatureElement : string + + static indexSignatureElement: string; +>indexSignatureElement : string + + static constructSignatureElement: string; +>constructSignatureElement : string + + static parameterElement: string; +>parameterElement : string + + static typeParameterElement: string; +>typeParameterElement : string + + static primitiveType: string; +>primitiveType : string + + static label: string; +>label : string + + static alias: string; +>alias : string + + static constElement: string; +>constElement : string + + static letElement: string; +>letElement : string + } + class ScriptElementKindModifier { +>ScriptElementKindModifier : ScriptElementKindModifier + + static none: string; +>none : string + + static publicMemberModifier: string; +>publicMemberModifier : string + + static privateMemberModifier: string; +>privateMemberModifier : string + + static protectedMemberModifier: string; +>protectedMemberModifier : string + + static exportedModifier: string; +>exportedModifier : string + + static ambientModifier: string; +>ambientModifier : string + + static staticModifier: string; +>staticModifier : string + } + class ClassificationTypeNames { +>ClassificationTypeNames : ClassificationTypeNames + + static comment: string; +>comment : string + + static identifier: string; +>identifier : string + + static keyword: string; +>keyword : string + + static numericLiteral: string; +>numericLiteral : string + + static operator: string; +>operator : string + + static stringLiteral: string; +>stringLiteral : string + + static whiteSpace: string; +>whiteSpace : string + + static text: string; +>text : string + + static punctuation: string; +>punctuation : string + + static className: string; +>className : string + + static enumName: string; +>enumName : string + + static interfaceName: string; +>interfaceName : string + + static moduleName: string; +>moduleName : string + + static typeParameterName: string; +>typeParameterName : string + } + function displayPartsToString(displayParts: SymbolDisplayPart[]): string; +>displayPartsToString : (displayParts: SymbolDisplayPart[]) => string +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + interface DisplayPartsSymbolWriter extends SymbolWriter { +>DisplayPartsSymbolWriter : DisplayPartsSymbolWriter +>SymbolWriter : SymbolWriter + + displayParts(): SymbolDisplayPart[]; +>displayParts : () => SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + function getDefaultCompilerOptions(): CompilerOptions; +>getDefaultCompilerOptions : () => CompilerOptions +>CompilerOptions : CompilerOptions + + class OperationCanceledException { +>OperationCanceledException : OperationCanceledException + } + class CancellationTokenObject { +>CancellationTokenObject : CancellationTokenObject + + private cancellationToken; +>cancellationToken : any + + static None: CancellationTokenObject; +>None : CancellationTokenObject +>CancellationTokenObject : CancellationTokenObject + + constructor(cancellationToken: CancellationToken); +>cancellationToken : CancellationToken +>CancellationToken : CancellationToken + + isCancellationRequested(): boolean; +>isCancellationRequested : () => boolean + + throwIfCancellationRequested(): void; +>throwIfCancellationRequested : () => void + } + function createDocumentRegistry(): DocumentRegistry; +>createDocumentRegistry : () => DocumentRegistry +>DocumentRegistry : DocumentRegistry + + function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; +>preProcessFile : (sourceText: string, readImportFiles?: boolean) => PreProcessedFileInfo +>sourceText : string +>readImportFiles : boolean +>PreProcessedFileInfo : PreProcessedFileInfo + + function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry): LanguageService; +>createLanguageService : (host: LanguageServiceHost, documentRegistry: DocumentRegistry) => LanguageService +>host : LanguageServiceHost +>LanguageServiceHost : LanguageServiceHost +>documentRegistry : DocumentRegistry +>DocumentRegistry : DocumentRegistry +>LanguageService : LanguageService + + function createClassifier(host: Logger): Classifier; +>createClassifier : (host: Logger) => Classifier +>host : Logger +>Logger : Logger +>Classifier : Classifier +} + +export = ts; +>ts : typeof ts + diff --git a/tests/baselines/reference/APISample_standalone_compile.js b/tests/baselines/reference/APISample_standalone_compile.js new file mode 100644 index 00000000000..e1f55f8a4c2 --- /dev/null +++ b/tests/baselines/reference/APISample_standalone_compile.js @@ -0,0 +1,1836 @@ +//// [tests/cases/compiler/APISample_standalone_compile.ts] //// + +//// [APISample_standalone_compile.ts] + +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); + +var program = ts.createProgram(["file1.ts"], {}, undefined); +//// [typescriptServices.d.ts] +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + +declare module ts { + interface Map { + [index: string]: T; + } + interface TextRange { + pos: number; + end: number; + } + const enum SyntaxKind { + Unknown = 0, + EndOfFileToken = 1, + SingleLineCommentTrivia = 2, + MultiLineCommentTrivia = 3, + NewLineTrivia = 4, + WhitespaceTrivia = 5, + NumericLiteral = 6, + StringLiteral = 7, + RegularExpressionLiteral = 8, + NoSubstitutionTemplateLiteral = 9, + TemplateHead = 10, + TemplateMiddle = 11, + TemplateTail = 12, + OpenBraceToken = 13, + CloseBraceToken = 14, + OpenParenToken = 15, + CloseParenToken = 16, + OpenBracketToken = 17, + CloseBracketToken = 18, + DotToken = 19, + DotDotDotToken = 20, + SemicolonToken = 21, + CommaToken = 22, + LessThanToken = 23, + GreaterThanToken = 24, + LessThanEqualsToken = 25, + GreaterThanEqualsToken = 26, + EqualsEqualsToken = 27, + ExclamationEqualsToken = 28, + EqualsEqualsEqualsToken = 29, + ExclamationEqualsEqualsToken = 30, + EqualsGreaterThanToken = 31, + PlusToken = 32, + MinusToken = 33, + AsteriskToken = 34, + SlashToken = 35, + PercentToken = 36, + PlusPlusToken = 37, + MinusMinusToken = 38, + LessThanLessThanToken = 39, + GreaterThanGreaterThanToken = 40, + GreaterThanGreaterThanGreaterThanToken = 41, + AmpersandToken = 42, + BarToken = 43, + CaretToken = 44, + ExclamationToken = 45, + TildeToken = 46, + AmpersandAmpersandToken = 47, + BarBarToken = 48, + QuestionToken = 49, + ColonToken = 50, + EqualsToken = 51, + PlusEqualsToken = 52, + MinusEqualsToken = 53, + AsteriskEqualsToken = 54, + SlashEqualsToken = 55, + PercentEqualsToken = 56, + LessThanLessThanEqualsToken = 57, + GreaterThanGreaterThanEqualsToken = 58, + GreaterThanGreaterThanGreaterThanEqualsToken = 59, + AmpersandEqualsToken = 60, + BarEqualsToken = 61, + CaretEqualsToken = 62, + Identifier = 63, + BreakKeyword = 64, + CaseKeyword = 65, + CatchKeyword = 66, + ClassKeyword = 67, + ConstKeyword = 68, + ContinueKeyword = 69, + DebuggerKeyword = 70, + DefaultKeyword = 71, + DeleteKeyword = 72, + DoKeyword = 73, + ElseKeyword = 74, + EnumKeyword = 75, + ExportKeyword = 76, + ExtendsKeyword = 77, + FalseKeyword = 78, + FinallyKeyword = 79, + ForKeyword = 80, + FunctionKeyword = 81, + IfKeyword = 82, + ImportKeyword = 83, + InKeyword = 84, + InstanceOfKeyword = 85, + NewKeyword = 86, + NullKeyword = 87, + ReturnKeyword = 88, + SuperKeyword = 89, + SwitchKeyword = 90, + ThisKeyword = 91, + ThrowKeyword = 92, + TrueKeyword = 93, + TryKeyword = 94, + TypeOfKeyword = 95, + VarKeyword = 96, + VoidKeyword = 97, + WhileKeyword = 98, + WithKeyword = 99, + ImplementsKeyword = 100, + InterfaceKeyword = 101, + LetKeyword = 102, + PackageKeyword = 103, + PrivateKeyword = 104, + ProtectedKeyword = 105, + PublicKeyword = 106, + StaticKeyword = 107, + YieldKeyword = 108, + AnyKeyword = 109, + BooleanKeyword = 110, + ConstructorKeyword = 111, + DeclareKeyword = 112, + GetKeyword = 113, + ModuleKeyword = 114, + RequireKeyword = 115, + NumberKeyword = 116, + SetKeyword = 117, + StringKeyword = 118, + TypeKeyword = 119, + Missing = 120, + QualifiedName = 121, + ComputedPropertyName = 122, + TypeParameter = 123, + Parameter = 124, + Property = 125, + Method = 126, + Constructor = 127, + GetAccessor = 128, + SetAccessor = 129, + CallSignature = 130, + ConstructSignature = 131, + IndexSignature = 132, + TypeReference = 133, + FunctionType = 134, + ConstructorType = 135, + TypeQuery = 136, + TypeLiteral = 137, + ArrayType = 138, + TupleType = 139, + UnionType = 140, + ParenthesizedType = 141, + ArrayLiteralExpression = 142, + ObjectLiteralExpression = 143, + PropertyAccessExpression = 144, + ElementAccessExpression = 145, + CallExpression = 146, + NewExpression = 147, + TaggedTemplateExpression = 148, + TypeAssertionExpression = 149, + ParenthesizedExpression = 150, + FunctionExpression = 151, + ArrowFunction = 152, + DeleteExpression = 153, + TypeOfExpression = 154, + VoidExpression = 155, + PrefixUnaryExpression = 156, + PostfixUnaryExpression = 157, + BinaryExpression = 158, + ConditionalExpression = 159, + TemplateExpression = 160, + YieldExpression = 161, + OmittedExpression = 162, + TemplateSpan = 163, + Block = 164, + VariableStatement = 165, + EmptyStatement = 166, + ExpressionStatement = 167, + IfStatement = 168, + DoStatement = 169, + WhileStatement = 170, + ForStatement = 171, + ForInStatement = 172, + ContinueStatement = 173, + BreakStatement = 174, + ReturnStatement = 175, + WithStatement = 176, + SwitchStatement = 177, + LabeledStatement = 178, + ThrowStatement = 179, + TryStatement = 180, + TryBlock = 181, + CatchBlock = 182, + FinallyBlock = 183, + DebuggerStatement = 184, + VariableDeclaration = 185, + FunctionDeclaration = 186, + FunctionBlock = 187, + ClassDeclaration = 188, + InterfaceDeclaration = 189, + TypeAliasDeclaration = 190, + EnumDeclaration = 191, + ModuleDeclaration = 192, + ModuleBlock = 193, + ImportDeclaration = 194, + ExportAssignment = 195, + CaseClause = 196, + DefaultClause = 197, + HeritageClause = 198, + PropertyAssignment = 199, + ShorthandPropertyAssignment = 200, + EnumMember = 201, + SourceFile = 202, + Program = 203, + SyntaxList = 204, + Count = 205, + FirstAssignment = 51, + LastAssignment = 62, + FirstReservedWord = 64, + LastReservedWord = 99, + FirstKeyword = 64, + LastKeyword = 119, + FirstFutureReservedWord = 100, + LastFutureReservedWord = 108, + FirstTypeNode = 133, + LastTypeNode = 141, + FirstPunctuation = 13, + LastPunctuation = 62, + FirstToken = 1, + LastToken = 119, + FirstTriviaToken = 2, + LastTriviaToken = 5, + FirstLiteralToken = 6, + LastLiteralToken = 9, + FirstTemplateToken = 9, + LastTemplateToken = 12, + FirstOperator = 21, + LastOperator = 62, + FirstBinaryOperator = 23, + LastBinaryOperator = 62, + } + const enum NodeFlags { + Export = 1, + Ambient = 2, + QuestionMark = 4, + Rest = 8, + Public = 16, + Private = 32, + Protected = 64, + Static = 128, + MultiLine = 256, + Synthetic = 512, + DeclarationFile = 1024, + Let = 2048, + Const = 4096, + OctalLiteral = 8192, + Modifier = 243, + AccessibilityModifier = 112, + BlockScoped = 6144, + } + const enum ParserContextFlags { + StrictMode = 1, + DisallowIn = 2, + Yield = 4, + GeneratorParameter = 8, + } + interface Node extends TextRange { + kind: SyntaxKind; + flags: NodeFlags; + parserContextFlags?: ParserContextFlags; + id?: number; + parent?: Node; + symbol?: Symbol; + locals?: SymbolTable; + nextContainer?: Node; + localSymbol?: Symbol; + modifiers?: ModifiersArray; + } + interface NodeArray extends Array, TextRange { + hasTrailingComma?: boolean; + } + interface ModifiersArray extends Array { + flags: number; + } + interface Identifier extends PrimaryExpression { + text: string; + } + interface QualifiedName extends Node { + left: EntityName; + right: Identifier; + } + type EntityName = Identifier | QualifiedName; + interface ParsedSignature { + typeParameters?: NodeArray; + parameters: NodeArray; + type?: TypeNode; + } + type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; + interface Declaration extends Node { + _declarationBrand: any; + name?: DeclarationName; + } + interface ComputedPropertyName extends Node { + expression: Expression; + } + interface TypeParameterDeclaration extends Declaration { + name: Identifier; + constraint?: TypeNode; + expression?: Expression; + } + interface SignatureDeclaration extends Declaration, ParsedSignature { + } + interface VariableDeclaration extends Declaration { + name: Identifier; + type?: TypeNode; + initializer?: Expression; + } + interface PropertyDeclaration extends Declaration, ClassElement { + type?: TypeNode; + initializer?: Expression; + } + interface ShortHandPropertyDeclaration extends Declaration { + name: Identifier; + } + interface ParameterDeclaration extends VariableDeclaration { + } + /** + * Several node kinds share function-like features such as a signature, + * a name, and a body. These nodes should extend FunctionLikeDeclaration. + * Examples: + * FunctionDeclaration + * MethodDeclaration + * AccessorDeclaration + */ + interface FunctionLikeDeclaration extends SignatureDeclaration { + _functionLikeDeclarationBrand: any; + asteriskToken?: Node; + body?: Block | Expression; + } + interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { + name: Identifier; + body?: Block; + } + interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement { + body?: Block; + } + interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { + body?: Block; + } + interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement { + body?: Block; + } + interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { + _indexSignatureDeclarationBrand: any; + } + interface TypeNode extends Node { + } + interface TypeReferenceNode extends TypeNode { + typeName: EntityName; + typeArguments?: NodeArray; + } + interface TypeQueryNode extends TypeNode { + exprName: EntityName; + } + interface TypeLiteralNode extends TypeNode, Declaration { + members: NodeArray; + } + interface ArrayTypeNode extends TypeNode { + elementType: TypeNode; + } + interface TupleTypeNode extends TypeNode { + elementTypes: NodeArray; + } + interface UnionTypeNode extends TypeNode { + types: NodeArray; + } + interface ParenthesizedTypeNode extends TypeNode { + type: TypeNode; + } + interface StringLiteralTypeNode extends TypeNode { + text: string; + } + interface Expression extends Node { + _expressionBrand: any; + contextualType?: Type; + } + interface UnaryExpression extends Expression { + _unaryExpressionBrand: any; + } + interface PrefixUnaryExpression extends UnaryExpression { + operator: SyntaxKind; + operand: UnaryExpression; + } + interface PostfixUnaryExpression extends PostfixExpression { + operand: LeftHandSideExpression; + operator: SyntaxKind; + } + interface PostfixExpression extends UnaryExpression { + _postfixExpressionBrand: any; + } + interface LeftHandSideExpression extends PostfixExpression { + _leftHandSideExpressionBrand: any; + } + interface MemberExpression extends LeftHandSideExpression { + _memberExpressionBrand: any; + } + interface PrimaryExpression extends MemberExpression { + _primaryExpressionBrand: any; + } + interface DeleteExpression extends UnaryExpression { + expression: UnaryExpression; + } + interface TypeOfExpression extends UnaryExpression { + expression: UnaryExpression; + } + interface VoidExpression extends UnaryExpression { + expression: UnaryExpression; + } + interface YieldExpression extends Expression { + asteriskToken?: Node; + expression: Expression; + } + interface BinaryExpression extends Expression { + left: Expression; + operator: SyntaxKind; + right: Expression; + } + interface ConditionalExpression extends Expression { + condition: Expression; + whenTrue: Expression; + whenFalse: Expression; + } + interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { + name?: Identifier; + body: Block | Expression; + } + interface LiteralExpression extends PrimaryExpression { + text: string; + } + interface TemplateExpression extends PrimaryExpression { + head: LiteralExpression; + templateSpans: NodeArray; + } + interface TemplateSpan extends Node { + expression: Expression; + literal: LiteralExpression; + } + interface ParenthesizedExpression extends PrimaryExpression { + expression: Expression; + } + interface ArrayLiteralExpression extends PrimaryExpression { + elements: NodeArray; + } + interface ObjectLiteralExpression extends PrimaryExpression, Declaration { + properties: NodeArray; + } + interface PropertyAccessExpression extends MemberExpression { + expression: LeftHandSideExpression; + name: Identifier; + } + interface ElementAccessExpression extends MemberExpression { + expression: LeftHandSideExpression; + argumentExpression: Expression; + } + interface CallExpression extends LeftHandSideExpression { + expression: LeftHandSideExpression; + typeArguments?: NodeArray; + arguments: NodeArray; + } + interface NewExpression extends CallExpression, PrimaryExpression { + } + interface TaggedTemplateExpression extends MemberExpression { + tag: LeftHandSideExpression; + template: LiteralExpression | TemplateExpression; + } + type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression; + interface TypeAssertion extends UnaryExpression { + type: TypeNode; + expression: UnaryExpression; + } + interface Statement extends Node, ModuleElement { + _statementBrand: any; + } + interface Block extends Statement { + statements: NodeArray; + } + interface VariableStatement extends Statement { + declarations: NodeArray; + } + interface ExpressionStatement extends Statement { + expression: Expression; + } + interface IfStatement extends Statement { + expression: Expression; + thenStatement: Statement; + elseStatement?: Statement; + } + interface IterationStatement extends Statement { + statement: Statement; + } + interface DoStatement extends IterationStatement { + expression: Expression; + } + interface WhileStatement extends IterationStatement { + expression: Expression; + } + interface ForStatement extends IterationStatement { + declarations?: NodeArray; + initializer?: Expression; + condition?: Expression; + iterator?: Expression; + } + interface ForInStatement extends IterationStatement { + declarations?: NodeArray; + variable?: Expression; + expression: Expression; + } + interface BreakOrContinueStatement extends Statement { + label?: Identifier; + } + interface ReturnStatement extends Statement { + expression?: Expression; + } + interface WithStatement extends Statement { + expression: Expression; + statement: Statement; + } + interface SwitchStatement extends Statement { + expression: Expression; + clauses: NodeArray; + } + interface CaseOrDefaultClause extends Node { + expression?: Expression; + statements: NodeArray; + } + interface LabeledStatement extends Statement { + label: Identifier; + statement: Statement; + } + interface ThrowStatement extends Statement { + expression: Expression; + } + interface TryStatement extends Statement { + tryBlock: Block; + catchBlock?: CatchBlock; + finallyBlock?: Block; + } + interface CatchBlock extends Block, Declaration { + variable: Identifier; + type?: TypeNode; + } + interface ModuleElement extends Node { + _moduleElementBrand: any; + } + interface ClassDeclaration extends Declaration, ModuleElement { + name: Identifier; + typeParameters?: NodeArray; + heritageClauses?: NodeArray; + members: NodeArray; + } + interface ClassElement extends Declaration { + _classElementBrand: any; + } + interface InterfaceDeclaration extends Declaration, ModuleElement { + name: Identifier; + typeParameters?: NodeArray; + heritageClauses?: NodeArray; + members: NodeArray; + } + interface HeritageClause extends Node { + token: SyntaxKind; + types?: NodeArray; + } + interface TypeAliasDeclaration extends Declaration, ModuleElement { + name: Identifier; + type: TypeNode; + } + interface EnumMember extends Declaration { + name: DeclarationName; + initializer?: Expression; + } + interface EnumDeclaration extends Declaration, ModuleElement { + name: Identifier; + members: NodeArray; + } + interface ModuleDeclaration extends Declaration, ModuleElement { + name: Identifier | LiteralExpression; + body: ModuleBlock | ModuleDeclaration; + } + interface ModuleBlock extends Node, ModuleElement { + statements: NodeArray; + } + interface ImportDeclaration extends Declaration, ModuleElement { + name: Identifier; + entityName?: EntityName; + externalModuleName?: LiteralExpression; + } + interface ExportAssignment extends Statement, ModuleElement { + exportName: Identifier; + } + interface FileReference extends TextRange { + filename: string; + } + interface CommentRange extends TextRange { + hasTrailingNewLine?: boolean; + } + interface SourceFile extends Declaration { + statements: NodeArray; + filename: string; + text: string; + getLineAndCharacterFromPosition(position: number): LineAndCharacter; + getPositionFromLineAndCharacter(line: number, character: number): number; + getLineStarts(): number[]; + amdDependencies: string[]; + amdModuleName: string; + referencedFiles: FileReference[]; + semanticDiagnostics: Diagnostic[]; + parseDiagnostics: Diagnostic[]; + grammarDiagnostics: Diagnostic[]; + getSyntacticDiagnostics(): Diagnostic[]; + hasNoDefaultLib: boolean; + externalModuleIndicator: Node; + nodeCount: number; + identifierCount: number; + symbolCount: number; + isOpen: boolean; + version: string; + languageVersion: ScriptTarget; + identifiers: Map; + } + interface Program { + getSourceFile(filename: string): SourceFile; + getSourceFiles(): SourceFile[]; + getCompilerOptions(): CompilerOptions; + getCompilerHost(): CompilerHost; + getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; + getGlobalDiagnostics(): Diagnostic[]; + getTypeChecker(fullTypeCheckMode: boolean): TypeChecker; + getCommonSourceDirectory(): string; + } + interface SourceMapSpan { + emittedLine: number; + emittedColumn: number; + sourceLine: number; + sourceColumn: number; + nameIndex?: number; + sourceIndex: number; + } + interface SourceMapData { + sourceMapFilePath: string; + jsSourceMappingURL: string; + sourceMapFile: string; + sourceMapSourceRoot: string; + sourceMapSources: string[]; + inputSourceFileNames: string[]; + sourceMapNames?: string[]; + sourceMapMappings: string; + sourceMapDecodedMappings: SourceMapSpan[]; + } + enum EmitReturnStatus { + Succeeded = 0, + AllOutputGenerationSkipped = 1, + JSGeneratedWithSemanticErrors = 2, + DeclarationGenerationSkipped = 3, + EmitErrorsEncountered = 4, + CompilerOptionsErrors = 5, + } + interface EmitResult { + emitResultStatus: EmitReturnStatus; + diagnostics: Diagnostic[]; + sourceMaps: SourceMapData[]; + } + interface TypeChecker { + getProgram(): Program; + getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; + getDeclarationDiagnostics(sourceFile: SourceFile): Diagnostic[]; + getGlobalDiagnostics(): Diagnostic[]; + getNodeCount(): number; + getIdentifierCount(): number; + getSymbolCount(): number; + getTypeCount(): number; + checkProgram(): void; + emitFiles(targetSourceFile?: SourceFile): EmitResult; + getParentOfSymbol(symbol: Symbol): Symbol; + getNarrowedTypeOfSymbol(symbol: Symbol, node: Node): Type; + getDeclaredTypeOfSymbol(symbol: Symbol): Type; + getPropertiesOfType(type: Type): Symbol[]; + getPropertyOfType(type: Type, propertyName: string): Symbol; + getSignaturesOfType(type: Type, kind: SignatureKind): Signature[]; + getIndexTypeOfType(type: Type, kind: IndexKind): Type; + getReturnTypeOfSignature(signature: Signature): Type; + getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; + getSymbolInfo(node: Node): Symbol; + getShorthandAssignmentValueSymbol(location: Node): Symbol; + getTypeOfNode(node: Node): Type; + typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; + symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; + getSymbolDisplayBuilder(): SymbolDisplayBuilder; + getFullyQualifiedName(symbol: Symbol): string; + getAugmentedPropertiesOfType(type: Type): Symbol[]; + getRootSymbols(symbol: Symbol): Symbol[]; + getContextualType(node: Node): Type; + getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; + getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; + isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; + isUndefinedSymbol(symbol: Symbol): boolean; + isArgumentsSymbol(symbol: Symbol): boolean; + isEmitBlocked(sourceFile?: SourceFile): boolean; + getEnumMemberValue(node: EnumMember): number; + isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; + getAliasedSymbol(symbol: Symbol): Symbol; + } + interface SymbolDisplayBuilder { + buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void; + buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void; + buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + } + interface SymbolWriter { + writeKeyword(text: string): void; + writeOperator(text: string): void; + writePunctuation(text: string): void; + writeSpace(text: string): void; + writeStringLiteral(text: string): void; + writeParameter(text: string): void; + writeSymbol(text: string, symbol: Symbol): void; + writeLine(): void; + increaseIndent(): void; + decreaseIndent(): void; + clear(): void; + trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void; + } + const enum TypeFormatFlags { + None = 0, + WriteArrayAsGenericType = 1, + UseTypeOfFunction = 2, + NoTruncation = 4, + WriteArrowStyleSignature = 8, + WriteOwnNameForAnyLike = 16, + WriteTypeArgumentsOfSignature = 32, + InElementType = 64, + } + const enum SymbolFormatFlags { + None = 0, + WriteTypeParametersOrArguments = 1, + UseOnlyExternalAliasing = 2, + } + const enum SymbolAccessibility { + Accessible = 0, + NotAccessible = 1, + CannotBeNamed = 2, + } + interface SymbolVisibilityResult { + accessibility: SymbolAccessibility; + aliasesToMakeVisible?: ImportDeclaration[]; + errorSymbolName?: string; + errorNode?: Node; + } + interface SymbolAccessiblityResult extends SymbolVisibilityResult { + errorModuleName?: string; + } + interface EmitResolver { + getProgram(): Program; + getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; + getExpressionNamePrefix(node: Identifier): string; + getExportAssignmentName(node: SourceFile): string; + isReferencedImportDeclaration(node: ImportDeclaration): boolean; + isTopLevelValueImportWithEntityName(node: ImportDeclaration): boolean; + getNodeCheckFlags(node: Node): NodeCheckFlags; + getEnumMemberValue(node: EnumMember): number; + hasSemanticErrors(): boolean; + isDeclarationVisible(node: Declaration): boolean; + isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; + writeTypeAtLocation(location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; + writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; + isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; + isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; + getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number; + isEmitBlocked(sourceFile?: SourceFile): boolean; + } + const enum SymbolFlags { + FunctionScopedVariable = 1, + BlockScopedVariable = 2, + Property = 4, + EnumMember = 8, + Function = 16, + Class = 32, + Interface = 64, + ConstEnum = 128, + RegularEnum = 256, + ValueModule = 512, + NamespaceModule = 1024, + TypeLiteral = 2048, + ObjectLiteral = 4096, + Method = 8192, + Constructor = 16384, + GetAccessor = 32768, + SetAccessor = 65536, + CallSignature = 131072, + ConstructSignature = 262144, + IndexSignature = 524288, + TypeParameter = 1048576, + TypeAlias = 2097152, + ExportValue = 4194304, + ExportType = 8388608, + ExportNamespace = 16777216, + Import = 33554432, + Instantiated = 67108864, + Merged = 134217728, + Transient = 268435456, + Prototype = 536870912, + UnionProperty = 1073741824, + Enum = 384, + Variable = 3, + Value = 107455, + Type = 3152352, + Namespace = 1536, + Module = 1536, + Accessor = 98304, + Signature = 917504, + FunctionScopedVariableExcludes = 107454, + BlockScopedVariableExcludes = 107455, + ParameterExcludes = 107455, + PropertyExcludes = 107455, + EnumMemberExcludes = 107455, + FunctionExcludes = 106927, + ClassExcludes = 3258879, + InterfaceExcludes = 3152288, + RegularEnumExcludes = 3258623, + ConstEnumExcludes = 3259263, + ValueModuleExcludes = 106639, + NamespaceModuleExcludes = 0, + MethodExcludes = 99263, + GetAccessorExcludes = 41919, + SetAccessorExcludes = 74687, + TypeParameterExcludes = 2103776, + TypeAliasExcludes = 3152352, + ImportExcludes = 33554432, + ModuleMember = 35653619, + ExportHasLocal = 944, + HasLocals = 1041936, + HasExports = 1952, + HasMembers = 6240, + IsContainer = 1048560, + PropertyOrAccessor = 98308, + Export = 29360128, + } + interface Symbol { + flags: SymbolFlags; + name: string; + id?: number; + mergeId?: number; + declarations?: Declaration[]; + parent?: Symbol; + members?: SymbolTable; + exports?: SymbolTable; + exportSymbol?: Symbol; + valueDeclaration?: Declaration; + constEnumOnlyModule?: boolean; + } + interface SymbolLinks { + target?: Symbol; + type?: Type; + declaredType?: Type; + mapper?: TypeMapper; + referenced?: boolean; + exportAssignSymbol?: Symbol; + unionType?: UnionType; + } + interface TransientSymbol extends Symbol, SymbolLinks { + } + interface SymbolTable { + [index: string]: Symbol; + } + const enum NodeCheckFlags { + TypeChecked = 1, + LexicalThis = 2, + CaptureThis = 4, + EmitExtends = 8, + SuperInstance = 16, + SuperStatic = 32, + ContextChecked = 64, + EnumValuesComputed = 128, + } + interface NodeLinks { + resolvedType?: Type; + resolvedSignature?: Signature; + resolvedSymbol?: Symbol; + flags?: NodeCheckFlags; + enumMemberValue?: number; + isIllegalTypeReferenceInConstraint?: boolean; + isVisible?: boolean; + localModuleName?: string; + assignmentChecks?: Map; + } + const enum TypeFlags { + Any = 1, + String = 2, + Number = 4, + Boolean = 8, + Void = 16, + Undefined = 32, + Null = 64, + Enum = 128, + StringLiteral = 256, + TypeParameter = 512, + Class = 1024, + Interface = 2048, + Reference = 4096, + Tuple = 8192, + Union = 16384, + Anonymous = 32768, + FromSignature = 65536, + Intrinsic = 127, + StringLike = 258, + NumberLike = 132, + ObjectType = 48128, + Structured = 65025, + } + interface Type { + flags: TypeFlags; + id: number; + symbol?: Symbol; + } + interface IntrinsicType extends Type { + intrinsicName: string; + } + interface StringLiteralType extends Type { + text: string; + } + interface ObjectType extends Type { + } + interface InterfaceType extends ObjectType { + typeParameters: TypeParameter[]; + baseTypes: ObjectType[]; + declaredProperties: Symbol[]; + declaredCallSignatures: Signature[]; + declaredConstructSignatures: Signature[]; + declaredStringIndexType: Type; + declaredNumberIndexType: Type; + } + interface TypeReference extends ObjectType { + target: GenericType; + typeArguments: Type[]; + } + interface GenericType extends InterfaceType, TypeReference { + instantiations: Map; + openReferenceTargets: GenericType[]; + openReferenceChecks: Map; + } + interface TupleType extends ObjectType { + elementTypes: Type[]; + baseArrayType: TypeReference; + } + interface UnionType extends Type { + types: Type[]; + resolvedProperties: SymbolTable; + } + interface ResolvedType extends ObjectType, UnionType { + members: SymbolTable; + properties: Symbol[]; + callSignatures: Signature[]; + constructSignatures: Signature[]; + stringIndexType: Type; + numberIndexType: Type; + } + interface TypeParameter extends Type { + constraint: Type; + target?: TypeParameter; + mapper?: TypeMapper; + } + const enum SignatureKind { + Call = 0, + Construct = 1, + } + interface Signature { + declaration: SignatureDeclaration; + typeParameters: TypeParameter[]; + parameters: Symbol[]; + resolvedReturnType: Type; + minArgumentCount: number; + hasRestParameter: boolean; + hasStringLiterals: boolean; + target?: Signature; + mapper?: TypeMapper; + unionSignatures?: Signature[]; + erasedSignatureCache?: Signature; + isolatedSignatureType?: ObjectType; + } + const enum IndexKind { + String = 0, + Number = 1, + } + interface TypeMapper { + (t: Type): Type; + } + interface TypeInferences { + primary: Type[]; + secondary: Type[]; + } + interface InferenceContext { + typeParameters: TypeParameter[]; + inferUnionTypes: boolean; + inferences: TypeInferences[]; + inferredTypes: Type[]; + failedTypeParameterIndex?: number; + } + interface DiagnosticMessage { + key: string; + category: DiagnosticCategory; + code: number; + isEarly?: boolean; + } + interface DiagnosticMessageChain { + messageText: string; + category: DiagnosticCategory; + code: number; + next?: DiagnosticMessageChain; + } + interface Diagnostic { + file: SourceFile; + start: number; + length: number; + messageText: string; + category: DiagnosticCategory; + code: number; + /** + * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit + */ + isEarly?: boolean; + /** + * Parse error - error produced by parser when it scanner returns a token + * that parser does not understand in its current state + * (as opposed to grammar error when parser can interpret the token but interpretation is not legal from the grammar perespective) + */ + isParseError?: boolean; + } + enum DiagnosticCategory { + Warning = 0, + Error = 1, + Message = 2, + } + interface CompilerOptions { + charset?: string; + codepage?: number; + declaration?: boolean; + diagnostics?: boolean; + emitBOM?: boolean; + help?: boolean; + locale?: string; + mapRoot?: string; + module?: ModuleKind; + noEmitOnError?: boolean; + noErrorTruncation?: boolean; + noImplicitAny?: boolean; + noLib?: boolean; + noLibCheck?: boolean; + noResolve?: boolean; + out?: string; + outDir?: string; + removeComments?: boolean; + sourceMap?: boolean; + sourceRoot?: string; + target?: ScriptTarget; + version?: boolean; + watch?: boolean; + preserveConstEnums?: boolean; + [option: string]: string | number | boolean; + } + const enum ModuleKind { + None = 0, + CommonJS = 1, + AMD = 2, + } + interface LineAndCharacter { + line: number; + character: number; + } + const enum ScriptTarget { + ES3 = 0, + ES5 = 1, + ES6 = 2, + Latest = 2, + } + interface ParsedCommandLine { + options: CompilerOptions; + filenames: string[]; + errors: Diagnostic[]; + } + interface CommandLineOption { + name: string; + type: string | Map; + shortName?: string; + description?: DiagnosticMessage; + paramName?: DiagnosticMessage; + error?: DiagnosticMessage; + } + const enum CharacterCodes { + nullCharacter = 0, + maxAsciiCharacter = 127, + lineFeed = 10, + carriageReturn = 13, + lineSeparator = 8232, + paragraphSeparator = 8233, + nextLine = 133, + space = 32, + nonBreakingSpace = 160, + enQuad = 8192, + emQuad = 8193, + enSpace = 8194, + emSpace = 8195, + threePerEmSpace = 8196, + fourPerEmSpace = 8197, + sixPerEmSpace = 8198, + figureSpace = 8199, + punctuationSpace = 8200, + thinSpace = 8201, + hairSpace = 8202, + zeroWidthSpace = 8203, + narrowNoBreakSpace = 8239, + ideographicSpace = 12288, + mathematicalSpace = 8287, + ogham = 5760, + _ = 95, + $ = 36, + _0 = 48, + _1 = 49, + _2 = 50, + _3 = 51, + _4 = 52, + _5 = 53, + _6 = 54, + _7 = 55, + _8 = 56, + _9 = 57, + a = 97, + b = 98, + c = 99, + d = 100, + e = 101, + f = 102, + g = 103, + h = 104, + i = 105, + j = 106, + k = 107, + l = 108, + m = 109, + n = 110, + o = 111, + p = 112, + q = 113, + r = 114, + s = 115, + t = 116, + u = 117, + v = 118, + w = 119, + x = 120, + y = 121, + z = 122, + A = 65, + B = 66, + C = 67, + D = 68, + E = 69, + F = 70, + G = 71, + H = 72, + I = 73, + J = 74, + K = 75, + L = 76, + M = 77, + N = 78, + O = 79, + P = 80, + Q = 81, + R = 82, + S = 83, + T = 84, + U = 85, + V = 86, + W = 87, + X = 88, + Y = 89, + Z = 90, + ampersand = 38, + asterisk = 42, + at = 64, + backslash = 92, + backtick = 96, + bar = 124, + caret = 94, + closeBrace = 125, + closeBracket = 93, + closeParen = 41, + colon = 58, + comma = 44, + dot = 46, + doubleQuote = 34, + equals = 61, + exclamation = 33, + greaterThan = 62, + lessThan = 60, + minus = 45, + openBrace = 123, + openBracket = 91, + openParen = 40, + percent = 37, + plus = 43, + question = 63, + semicolon = 59, + singleQuote = 39, + slash = 47, + tilde = 126, + backspace = 8, + formFeed = 12, + byteOrderMark = 65279, + tab = 9, + verticalTab = 11, + } + interface CancellationToken { + isCancellationRequested(): boolean; + } + interface CompilerHost { + getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; + getDefaultLibFilename(): string; + getCancellationToken?(): CancellationToken; + writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; + getCurrentDirectory(): string; + getCanonicalFileName(fileName: string): string; + useCaseSensitiveFileNames(): boolean; + getNewLine(): string; + } +} +declare module ts { + interface ErrorCallback { + (message: DiagnosticMessage): void; + } + interface CommentCallback { + (pos: number, end: number): void; + } + interface Scanner { + getStartPos(): number; + getToken(): SyntaxKind; + getTextPos(): number; + getTokenPos(): number; + getTokenText(): string; + getTokenValue(): string; + hasPrecedingLineBreak(): boolean; + isIdentifier(): boolean; + isReservedWord(): boolean; + reScanGreaterToken(): SyntaxKind; + reScanSlashToken(): SyntaxKind; + reScanTemplateToken(): SyntaxKind; + scan(): SyntaxKind; + setText(text: string): void; + setTextPos(textPos: number): void; + tryScan(callback: () => T): T; + } + function tokenToString(t: SyntaxKind): string; + function computeLineStarts(text: string): number[]; + function getPositionFromLineAndCharacter(lineStarts: number[], line: number, character: number): number; + function getLineAndCharacterOfPosition(lineStarts: number[], position: number): { + line: number; + character: number; + }; + function positionToLineAndCharacter(text: string, pos: number): { + line: number; + character: number; + }; + function isWhiteSpace(ch: number): boolean; + function isLineBreak(ch: number): boolean; + function isOctalDigit(ch: number): boolean; + function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean): number; + function getLeadingCommentRanges(text: string, pos: number): CommentRange[]; + function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; + function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; + function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; + function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback): Scanner; +} +declare module ts { + interface ReferencePathMatchResult { + fileReference?: FileReference; + diagnostic?: DiagnosticMessage; + isNoDefaultLib?: boolean; + } + function getNodeConstructor(kind: SyntaxKind): new () => Node; + function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; + function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; + function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; +} +declare module ts { + function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; +} +declare module ts { + interface Node { + getSourceFile(): SourceFile; + getChildCount(sourceFile?: SourceFile): number; + getChildAt(index: number, sourceFile?: SourceFile): Node; + getChildren(sourceFile?: SourceFile): Node[]; + getStart(sourceFile?: SourceFile): number; + getFullStart(): number; + getEnd(): number; + getWidth(sourceFile?: SourceFile): number; + getFullWidth(): number; + getLeadingTriviaWidth(sourceFile?: SourceFile): number; + getFullText(sourceFile?: SourceFile): string; + getText(sourceFile?: SourceFile): string; + getFirstToken(sourceFile?: SourceFile): Node; + getLastToken(sourceFile?: SourceFile): Node; + } + interface Symbol { + getFlags(): SymbolFlags; + getName(): string; + getDeclarations(): Declaration[]; + getDocumentationComment(): SymbolDisplayPart[]; + } + interface Type { + getFlags(): TypeFlags; + getSymbol(): Symbol; + getProperties(): Symbol[]; + getProperty(propertyName: string): Symbol; + getApparentProperties(): Symbol[]; + getCallSignatures(): Signature[]; + getConstructSignatures(): Signature[]; + getStringIndexType(): Type; + getNumberIndexType(): Type; + } + interface Signature { + getDeclaration(): SignatureDeclaration; + getTypeParameters(): Type[]; + getParameters(): Symbol[]; + getReturnType(): Type; + getDocumentationComment(): SymbolDisplayPart[]; + } + interface SourceFile { + getScriptSnapshot(): IScriptSnapshot; + getNamedDeclarations(): Declaration[]; + update(scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; + } + /** + * Represents an immutable snapshot of a script at a specified time.Once acquired, the + * snapshot is observably immutable. i.e. the same calls with the same parameters will return + * the same values. + */ + interface IScriptSnapshot { + /** Gets a portion of the script snapshot specified by [start, end). */ + getText(start: number, end: number): string; + /** Gets the length of this script snapshot. */ + getLength(): number; + /** + * This call returns the array containing the start position of every line. + * i.e."[0, 10, 55]". TODO: consider making this optional. The language service could + * always determine this (albeit in a more expensive manner). + */ + getLineStartPositions(): number[]; + /** + * Gets the TextChangeRange that describe how the text changed between this text and + * an older version. This information is used by the incremental parser to determine + * what sections of the script need to be re-parsed. 'undefined' can be returned if the + * change range cannot be determined. However, in that case, incremental parsing will + * not happen and the entire document will be re - parsed. + */ + getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; + } + module ScriptSnapshot { + function fromString(text: string): IScriptSnapshot; + } + interface PreProcessedFileInfo { + referencedFiles: FileReference[]; + importedFiles: FileReference[]; + isLibFile: boolean; + } + interface Logger { + log(s: string): void; + } + interface LanguageServiceHost extends Logger { + getCompilationSettings(): CompilerOptions; + getScriptFileNames(): string[]; + getScriptVersion(fileName: string): string; + getScriptIsOpen(fileName: string): boolean; + getScriptSnapshot(fileName: string): IScriptSnapshot; + getLocalizedDiagnosticMessages(): any; + getCancellationToken(): CancellationToken; + getCurrentDirectory(): string; + getDefaultLibFilename(): string; + } + interface LanguageService { + cleanupSemanticCache(): void; + getSyntacticDiagnostics(fileName: string): Diagnostic[]; + getSemanticDiagnostics(fileName: string): Diagnostic[]; + getCompilerOptionsDiagnostics(): Diagnostic[]; + getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; + getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; + getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): CompletionInfo; + getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; + getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; + getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; + getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan; + getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems; + getRenameInfo(fileName: string, position: number): RenameInfo; + findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[]; + getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; + getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; + getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; + getNavigateToItems(searchValue: string): NavigateToItem[]; + getNavigationBarItems(fileName: string): NavigationBarItem[]; + getOutliningSpans(fileName: string): OutliningSpan[]; + getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; + getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; + getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number; + getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[]; + getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; + getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[]; + getEmitOutput(fileName: string): EmitOutput; + getSourceFile(filename: string): SourceFile; + dispose(): void; + } + class TextSpan { + private _start; + private _length; + /** + * Creates a TextSpan instance beginning with the position Start and having the Length + * specified with length. + */ + constructor(start: number, length: number); + toJSON(key: any): any; + start(): number; + length(): number; + end(): number; + isEmpty(): boolean; + /** + * Determines whether the position lies within the span. Returns true if the position is greater than or equal to Start and strictly less + * than End, otherwise false. + * @param position The position to check. + */ + containsPosition(position: number): boolean; + /** + * Determines whether span falls completely within this span. Returns true if the specified span falls completely within this span, otherwise false. + * @param span The span to check. + */ + containsTextSpan(span: TextSpan): boolean; + /** + * Determines whether the given span overlaps this span. Two spans are considered to overlap + * if they have positions in common and neither is empty. Empty spans do not overlap with any + * other span. Returns true if the spans overlap, false otherwise. + * @param span The span to check. + */ + overlapsWith(span: TextSpan): boolean; + /** + * Returns the overlap with the given span, or undefined if there is no overlap. + * @param span The span to check. + */ + overlap(span: TextSpan): TextSpan; + /** + * Determines whether span intersects this span. Two spans are considered to + * intersect if they have positions in common or the end of one span + * coincides with the start of the other span. Returns true if the spans intersect, false otherwise. + * @param The span to check. + */ + intersectsWithTextSpan(span: TextSpan): boolean; + intersectsWith(start: number, length: number): boolean; + /** + * Determines whether the given position intersects this span. + * A position is considered to intersect if it is between the start and + * end positions (inclusive) of this span. Returns true if the position intersects, false otherwise. + * @param position The position to check. + */ + intersectsWithPosition(position: number): boolean; + /** + * Returns the intersection with the given span, or undefined if there is no intersection. + * @param span The span to check. + */ + intersection(span: TextSpan): TextSpan; + /** + * Creates a new TextSpan from the given start and end positions + * as opposed to a position and length. + */ + static fromBounds(start: number, end: number): TextSpan; + } + class TextChangeRange { + static unchanged: TextChangeRange; + private _span; + private _newLength; + /** + * Initializes a new instance of TextChangeRange. + */ + constructor(span: TextSpan, newLength: number); + /** + * The span of text before the edit which is being changed + */ + span(): TextSpan; + /** + * Width of the span after the edit. A 0 here would represent a delete + */ + newLength(): number; + newSpan(): TextSpan; + isUnchanged(): boolean; + /** + * Called to merge all the changes that occurred across several versions of a script snapshot + * into a single change. i.e. if a user keeps making successive edits to a script we will + * have a text change from V1 to V2, V2 to V3, ..., Vn. + * + * This function will then merge those changes into a single change range valid between V1 and + * Vn. + */ + static collapseChangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; + } + interface ClassifiedSpan { + textSpan: TextSpan; + classificationType: string; + } + interface NavigationBarItem { + text: string; + kind: string; + kindModifiers: string; + spans: TextSpan[]; + childItems: NavigationBarItem[]; + indent: number; + bolded: boolean; + grayed: boolean; + } + interface TodoCommentDescriptor { + text: string; + priority: number; + } + interface TodoComment { + descriptor: TodoCommentDescriptor; + message: string; + position: number; + } + class TextChange { + span: TextSpan; + newText: string; + } + interface RenameLocation { + textSpan: TextSpan; + fileName: string; + } + interface ReferenceEntry { + textSpan: TextSpan; + fileName: string; + isWriteAccess: boolean; + } + interface NavigateToItem { + name: string; + kind: string; + kindModifiers: string; + matchKind: string; + fileName: string; + textSpan: TextSpan; + containerName: string; + containerKind: string; + } + interface EditorOptions { + IndentSize: number; + TabSize: number; + NewLineCharacter: string; + ConvertTabsToSpaces: boolean; + } + interface FormatCodeOptions extends EditorOptions { + InsertSpaceAfterCommaDelimiter: boolean; + InsertSpaceAfterSemicolonInForStatements: boolean; + InsertSpaceBeforeAndAfterBinaryOperators: boolean; + InsertSpaceAfterKeywordsInControlFlowStatements: boolean; + InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; + InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; + PlaceOpenBraceOnNewLineForFunctions: boolean; + PlaceOpenBraceOnNewLineForControlBlocks: boolean; + } + interface DefinitionInfo { + fileName: string; + textSpan: TextSpan; + kind: string; + name: string; + containerKind: string; + containerName: string; + } + enum SymbolDisplayPartKind { + aliasName = 0, + className = 1, + enumName = 2, + fieldName = 3, + interfaceName = 4, + keyword = 5, + lineBreak = 6, + numericLiteral = 7, + stringLiteral = 8, + localName = 9, + methodName = 10, + moduleName = 11, + operator = 12, + parameterName = 13, + propertyName = 14, + punctuation = 15, + space = 16, + text = 17, + typeParameterName = 18, + enumMemberName = 19, + functionName = 20, + regularExpressionLiteral = 21, + } + interface SymbolDisplayPart { + text: string; + kind: string; + } + interface QuickInfo { + kind: string; + kindModifiers: string; + textSpan: TextSpan; + displayParts: SymbolDisplayPart[]; + documentation: SymbolDisplayPart[]; + } + interface RenameInfo { + canRename: boolean; + localizedErrorMessage: string; + displayName: string; + fullDisplayName: string; + kind: string; + kindModifiers: string; + triggerSpan: TextSpan; + } + interface SignatureHelpParameter { + name: string; + documentation: SymbolDisplayPart[]; + displayParts: SymbolDisplayPart[]; + isOptional: boolean; + } + /** + * Represents a single signature to show in signature help. + * The id is used for subsequent calls into the language service to ask questions about the + * signature help item in the context of any documents that have been updated. i.e. after + * an edit has happened, while signature help is still active, the host can ask important + * questions like 'what parameter is the user currently contained within?'. + */ + interface SignatureHelpItem { + isVariadic: boolean; + prefixDisplayParts: SymbolDisplayPart[]; + suffixDisplayParts: SymbolDisplayPart[]; + separatorDisplayParts: SymbolDisplayPart[]; + parameters: SignatureHelpParameter[]; + documentation: SymbolDisplayPart[]; + } + /** + * Represents a set of signature help items, and the preferred item that should be selected. + */ + interface SignatureHelpItems { + items: SignatureHelpItem[]; + applicableSpan: TextSpan; + selectedItemIndex: number; + argumentIndex: number; + argumentCount: number; + } + interface CompletionInfo { + isMemberCompletion: boolean; + entries: CompletionEntry[]; + } + interface CompletionEntry { + name: string; + kind: string; + kindModifiers: string; + } + interface CompletionEntryDetails { + name: string; + kind: string; + kindModifiers: string; + displayParts: SymbolDisplayPart[]; + documentation: SymbolDisplayPart[]; + } + interface OutliningSpan { + /** The span of the document to actually collapse. */ + textSpan: TextSpan; + /** The span of the document to display when the user hovers over the collapsed span. */ + hintSpan: TextSpan; + /** The text to display in the editor for the collapsed region. */ + bannerText: string; + /** + * Whether or not this region should be automatically collapsed when + * the 'Collapse to Definitions' command is invoked. + */ + autoCollapse: boolean; + } + interface EmitOutput { + outputFiles: OutputFile[]; + emitOutputStatus: EmitReturnStatus; + } + const enum OutputFileType { + JavaScript = 0, + SourceMap = 1, + Declaration = 2, + } + interface OutputFile { + name: string; + writeByteOrderMark: boolean; + text: string; + } + const enum EndOfLineState { + Start = 0, + InMultiLineCommentTrivia = 1, + InSingleQuoteStringLiteral = 2, + InDoubleQuoteStringLiteral = 3, + } + enum TokenClass { + Punctuation = 0, + Keyword = 1, + Operator = 2, + Comment = 3, + Whitespace = 4, + Identifier = 5, + NumberLiteral = 6, + StringLiteral = 7, + RegExpLiteral = 8, + } + interface ClassificationResult { + finalLexState: EndOfLineState; + entries: ClassificationInfo[]; + } + interface ClassificationInfo { + length: number; + classification: TokenClass; + } + interface Classifier { + getClassificationsForLine(text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean): ClassificationResult; + } + interface DocumentRegistry { + acquireDocument(filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean): SourceFile; + updateDocument(sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; + releaseDocument(filename: string, compilationSettings: CompilerOptions): void; + } + class ScriptElementKind { + static unknown: string; + static keyword: string; + static scriptElement: string; + static moduleElement: string; + static classElement: string; + static interfaceElement: string; + static typeElement: string; + static enumElement: string; + static variableElement: string; + static localVariableElement: string; + static functionElement: string; + static localFunctionElement: string; + static memberFunctionElement: string; + static memberGetAccessorElement: string; + static memberSetAccessorElement: string; + static memberVariableElement: string; + static constructorImplementationElement: string; + static callSignatureElement: string; + static indexSignatureElement: string; + static constructSignatureElement: string; + static parameterElement: string; + static typeParameterElement: string; + static primitiveType: string; + static label: string; + static alias: string; + static constElement: string; + static letElement: string; + } + class ScriptElementKindModifier { + static none: string; + static publicMemberModifier: string; + static privateMemberModifier: string; + static protectedMemberModifier: string; + static exportedModifier: string; + static ambientModifier: string; + static staticModifier: string; + } + class ClassificationTypeNames { + static comment: string; + static identifier: string; + static keyword: string; + static numericLiteral: string; + static operator: string; + static stringLiteral: string; + static whiteSpace: string; + static text: string; + static punctuation: string; + static className: string; + static enumName: string; + static interfaceName: string; + static moduleName: string; + static typeParameterName: string; + } + function displayPartsToString(displayParts: SymbolDisplayPart[]): string; + interface DisplayPartsSymbolWriter extends SymbolWriter { + displayParts(): SymbolDisplayPart[]; + } + function getDefaultCompilerOptions(): CompilerOptions; + class OperationCanceledException { + } + class CancellationTokenObject { + private cancellationToken; + static None: CancellationTokenObject; + constructor(cancellationToken: CancellationToken); + isCancellationRequested(): boolean; + throwIfCancellationRequested(): void; + } + function createDocumentRegistry(): DocumentRegistry; + function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; + function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry): LanguageService; + function createClassifier(host: Logger): Classifier; +} + + +//// [APISample_standalone_compile.js] +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", 2 /* Latest */, "0.0"); +var program = ts.createProgram(["file1.ts"], {}, undefined); diff --git a/tests/baselines/reference/APISample_standalone_compile.types b/tests/baselines/reference/APISample_standalone_compile.types new file mode 100644 index 00000000000..ebde76e4aa4 --- /dev/null +++ b/tests/baselines/reference/APISample_standalone_compile.types @@ -0,0 +1,5641 @@ +=== tests/cases/compiler/APISample_standalone_compile.ts === + +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); +>sourceFile : ts.SourceFile +>ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0") : ts.SourceFile +>ts.createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, version: string, isOpen?: boolean) => ts.SourceFile +>ts : typeof ts +>createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, version: string, isOpen?: boolean) => ts.SourceFile +>ts.ScriptTarget.Latest : ts.ScriptTarget +>ts.ScriptTarget : typeof ts.ScriptTarget +>ts : typeof ts +>ScriptTarget : typeof ts.ScriptTarget +>Latest : ts.ScriptTarget + +var program = ts.createProgram(["file1.ts"], {}, undefined); +>program : ts.Program +>ts.createProgram(["file1.ts"], {}, undefined) : ts.Program +>ts.createProgram : (rootNames: string[], options: ts.CompilerOptions, host: ts.CompilerHost) => ts.Program +>ts : typeof ts +>createProgram : (rootNames: string[], options: ts.CompilerOptions, host: ts.CompilerHost) => ts.Program +>["file1.ts"] : string[] +>{} : { [x: string]: undefined; } +>undefined : undefined + +=== typescriptServices.d.ts === +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + +declare module ts { +>ts : typeof ts + + interface Map { +>Map : Map +>T : T + + [index: string]: T; +>index : string +>T : T + } + interface TextRange { +>TextRange : TextRange + + pos: number; +>pos : number + + end: number; +>end : number + } + const enum SyntaxKind { +>SyntaxKind : SyntaxKind + + Unknown = 0, +>Unknown : SyntaxKind + + EndOfFileToken = 1, +>EndOfFileToken : SyntaxKind + + SingleLineCommentTrivia = 2, +>SingleLineCommentTrivia : SyntaxKind + + MultiLineCommentTrivia = 3, +>MultiLineCommentTrivia : SyntaxKind + + NewLineTrivia = 4, +>NewLineTrivia : SyntaxKind + + WhitespaceTrivia = 5, +>WhitespaceTrivia : SyntaxKind + + NumericLiteral = 6, +>NumericLiteral : SyntaxKind + + StringLiteral = 7, +>StringLiteral : SyntaxKind + + RegularExpressionLiteral = 8, +>RegularExpressionLiteral : SyntaxKind + + NoSubstitutionTemplateLiteral = 9, +>NoSubstitutionTemplateLiteral : SyntaxKind + + TemplateHead = 10, +>TemplateHead : SyntaxKind + + TemplateMiddle = 11, +>TemplateMiddle : SyntaxKind + + TemplateTail = 12, +>TemplateTail : SyntaxKind + + OpenBraceToken = 13, +>OpenBraceToken : SyntaxKind + + CloseBraceToken = 14, +>CloseBraceToken : SyntaxKind + + OpenParenToken = 15, +>OpenParenToken : SyntaxKind + + CloseParenToken = 16, +>CloseParenToken : SyntaxKind + + OpenBracketToken = 17, +>OpenBracketToken : SyntaxKind + + CloseBracketToken = 18, +>CloseBracketToken : SyntaxKind + + DotToken = 19, +>DotToken : SyntaxKind + + DotDotDotToken = 20, +>DotDotDotToken : SyntaxKind + + SemicolonToken = 21, +>SemicolonToken : SyntaxKind + + CommaToken = 22, +>CommaToken : SyntaxKind + + LessThanToken = 23, +>LessThanToken : SyntaxKind + + GreaterThanToken = 24, +>GreaterThanToken : SyntaxKind + + LessThanEqualsToken = 25, +>LessThanEqualsToken : SyntaxKind + + GreaterThanEqualsToken = 26, +>GreaterThanEqualsToken : SyntaxKind + + EqualsEqualsToken = 27, +>EqualsEqualsToken : SyntaxKind + + ExclamationEqualsToken = 28, +>ExclamationEqualsToken : SyntaxKind + + EqualsEqualsEqualsToken = 29, +>EqualsEqualsEqualsToken : SyntaxKind + + ExclamationEqualsEqualsToken = 30, +>ExclamationEqualsEqualsToken : SyntaxKind + + EqualsGreaterThanToken = 31, +>EqualsGreaterThanToken : SyntaxKind + + PlusToken = 32, +>PlusToken : SyntaxKind + + MinusToken = 33, +>MinusToken : SyntaxKind + + AsteriskToken = 34, +>AsteriskToken : SyntaxKind + + SlashToken = 35, +>SlashToken : SyntaxKind + + PercentToken = 36, +>PercentToken : SyntaxKind + + PlusPlusToken = 37, +>PlusPlusToken : SyntaxKind + + MinusMinusToken = 38, +>MinusMinusToken : SyntaxKind + + LessThanLessThanToken = 39, +>LessThanLessThanToken : SyntaxKind + + GreaterThanGreaterThanToken = 40, +>GreaterThanGreaterThanToken : SyntaxKind + + GreaterThanGreaterThanGreaterThanToken = 41, +>GreaterThanGreaterThanGreaterThanToken : SyntaxKind + + AmpersandToken = 42, +>AmpersandToken : SyntaxKind + + BarToken = 43, +>BarToken : SyntaxKind + + CaretToken = 44, +>CaretToken : SyntaxKind + + ExclamationToken = 45, +>ExclamationToken : SyntaxKind + + TildeToken = 46, +>TildeToken : SyntaxKind + + AmpersandAmpersandToken = 47, +>AmpersandAmpersandToken : SyntaxKind + + BarBarToken = 48, +>BarBarToken : SyntaxKind + + QuestionToken = 49, +>QuestionToken : SyntaxKind + + ColonToken = 50, +>ColonToken : SyntaxKind + + EqualsToken = 51, +>EqualsToken : SyntaxKind + + PlusEqualsToken = 52, +>PlusEqualsToken : SyntaxKind + + MinusEqualsToken = 53, +>MinusEqualsToken : SyntaxKind + + AsteriskEqualsToken = 54, +>AsteriskEqualsToken : SyntaxKind + + SlashEqualsToken = 55, +>SlashEqualsToken : SyntaxKind + + PercentEqualsToken = 56, +>PercentEqualsToken : SyntaxKind + + LessThanLessThanEqualsToken = 57, +>LessThanLessThanEqualsToken : SyntaxKind + + GreaterThanGreaterThanEqualsToken = 58, +>GreaterThanGreaterThanEqualsToken : SyntaxKind + + GreaterThanGreaterThanGreaterThanEqualsToken = 59, +>GreaterThanGreaterThanGreaterThanEqualsToken : SyntaxKind + + AmpersandEqualsToken = 60, +>AmpersandEqualsToken : SyntaxKind + + BarEqualsToken = 61, +>BarEqualsToken : SyntaxKind + + CaretEqualsToken = 62, +>CaretEqualsToken : SyntaxKind + + Identifier = 63, +>Identifier : SyntaxKind + + BreakKeyword = 64, +>BreakKeyword : SyntaxKind + + CaseKeyword = 65, +>CaseKeyword : SyntaxKind + + CatchKeyword = 66, +>CatchKeyword : SyntaxKind + + ClassKeyword = 67, +>ClassKeyword : SyntaxKind + + ConstKeyword = 68, +>ConstKeyword : SyntaxKind + + ContinueKeyword = 69, +>ContinueKeyword : SyntaxKind + + DebuggerKeyword = 70, +>DebuggerKeyword : SyntaxKind + + DefaultKeyword = 71, +>DefaultKeyword : SyntaxKind + + DeleteKeyword = 72, +>DeleteKeyword : SyntaxKind + + DoKeyword = 73, +>DoKeyword : SyntaxKind + + ElseKeyword = 74, +>ElseKeyword : SyntaxKind + + EnumKeyword = 75, +>EnumKeyword : SyntaxKind + + ExportKeyword = 76, +>ExportKeyword : SyntaxKind + + ExtendsKeyword = 77, +>ExtendsKeyword : SyntaxKind + + FalseKeyword = 78, +>FalseKeyword : SyntaxKind + + FinallyKeyword = 79, +>FinallyKeyword : SyntaxKind + + ForKeyword = 80, +>ForKeyword : SyntaxKind + + FunctionKeyword = 81, +>FunctionKeyword : SyntaxKind + + IfKeyword = 82, +>IfKeyword : SyntaxKind + + ImportKeyword = 83, +>ImportKeyword : SyntaxKind + + InKeyword = 84, +>InKeyword : SyntaxKind + + InstanceOfKeyword = 85, +>InstanceOfKeyword : SyntaxKind + + NewKeyword = 86, +>NewKeyword : SyntaxKind + + NullKeyword = 87, +>NullKeyword : SyntaxKind + + ReturnKeyword = 88, +>ReturnKeyword : SyntaxKind + + SuperKeyword = 89, +>SuperKeyword : SyntaxKind + + SwitchKeyword = 90, +>SwitchKeyword : SyntaxKind + + ThisKeyword = 91, +>ThisKeyword : SyntaxKind + + ThrowKeyword = 92, +>ThrowKeyword : SyntaxKind + + TrueKeyword = 93, +>TrueKeyword : SyntaxKind + + TryKeyword = 94, +>TryKeyword : SyntaxKind + + TypeOfKeyword = 95, +>TypeOfKeyword : SyntaxKind + + VarKeyword = 96, +>VarKeyword : SyntaxKind + + VoidKeyword = 97, +>VoidKeyword : SyntaxKind + + WhileKeyword = 98, +>WhileKeyword : SyntaxKind + + WithKeyword = 99, +>WithKeyword : SyntaxKind + + ImplementsKeyword = 100, +>ImplementsKeyword : SyntaxKind + + InterfaceKeyword = 101, +>InterfaceKeyword : SyntaxKind + + LetKeyword = 102, +>LetKeyword : SyntaxKind + + PackageKeyword = 103, +>PackageKeyword : SyntaxKind + + PrivateKeyword = 104, +>PrivateKeyword : SyntaxKind + + ProtectedKeyword = 105, +>ProtectedKeyword : SyntaxKind + + PublicKeyword = 106, +>PublicKeyword : SyntaxKind + + StaticKeyword = 107, +>StaticKeyword : SyntaxKind + + YieldKeyword = 108, +>YieldKeyword : SyntaxKind + + AnyKeyword = 109, +>AnyKeyword : SyntaxKind + + BooleanKeyword = 110, +>BooleanKeyword : SyntaxKind + + ConstructorKeyword = 111, +>ConstructorKeyword : SyntaxKind + + DeclareKeyword = 112, +>DeclareKeyword : SyntaxKind + + GetKeyword = 113, +>GetKeyword : SyntaxKind + + ModuleKeyword = 114, +>ModuleKeyword : SyntaxKind + + RequireKeyword = 115, +>RequireKeyword : SyntaxKind + + NumberKeyword = 116, +>NumberKeyword : SyntaxKind + + SetKeyword = 117, +>SetKeyword : SyntaxKind + + StringKeyword = 118, +>StringKeyword : SyntaxKind + + TypeKeyword = 119, +>TypeKeyword : SyntaxKind + + Missing = 120, +>Missing : SyntaxKind + + QualifiedName = 121, +>QualifiedName : SyntaxKind + + ComputedPropertyName = 122, +>ComputedPropertyName : SyntaxKind + + TypeParameter = 123, +>TypeParameter : SyntaxKind + + Parameter = 124, +>Parameter : SyntaxKind + + Property = 125, +>Property : SyntaxKind + + Method = 126, +>Method : SyntaxKind + + Constructor = 127, +>Constructor : SyntaxKind + + GetAccessor = 128, +>GetAccessor : SyntaxKind + + SetAccessor = 129, +>SetAccessor : SyntaxKind + + CallSignature = 130, +>CallSignature : SyntaxKind + + ConstructSignature = 131, +>ConstructSignature : SyntaxKind + + IndexSignature = 132, +>IndexSignature : SyntaxKind + + TypeReference = 133, +>TypeReference : SyntaxKind + + FunctionType = 134, +>FunctionType : SyntaxKind + + ConstructorType = 135, +>ConstructorType : SyntaxKind + + TypeQuery = 136, +>TypeQuery : SyntaxKind + + TypeLiteral = 137, +>TypeLiteral : SyntaxKind + + ArrayType = 138, +>ArrayType : SyntaxKind + + TupleType = 139, +>TupleType : SyntaxKind + + UnionType = 140, +>UnionType : SyntaxKind + + ParenthesizedType = 141, +>ParenthesizedType : SyntaxKind + + ArrayLiteralExpression = 142, +>ArrayLiteralExpression : SyntaxKind + + ObjectLiteralExpression = 143, +>ObjectLiteralExpression : SyntaxKind + + PropertyAccessExpression = 144, +>PropertyAccessExpression : SyntaxKind + + ElementAccessExpression = 145, +>ElementAccessExpression : SyntaxKind + + CallExpression = 146, +>CallExpression : SyntaxKind + + NewExpression = 147, +>NewExpression : SyntaxKind + + TaggedTemplateExpression = 148, +>TaggedTemplateExpression : SyntaxKind + + TypeAssertionExpression = 149, +>TypeAssertionExpression : SyntaxKind + + ParenthesizedExpression = 150, +>ParenthesizedExpression : SyntaxKind + + FunctionExpression = 151, +>FunctionExpression : SyntaxKind + + ArrowFunction = 152, +>ArrowFunction : SyntaxKind + + DeleteExpression = 153, +>DeleteExpression : SyntaxKind + + TypeOfExpression = 154, +>TypeOfExpression : SyntaxKind + + VoidExpression = 155, +>VoidExpression : SyntaxKind + + PrefixUnaryExpression = 156, +>PrefixUnaryExpression : SyntaxKind + + PostfixUnaryExpression = 157, +>PostfixUnaryExpression : SyntaxKind + + BinaryExpression = 158, +>BinaryExpression : SyntaxKind + + ConditionalExpression = 159, +>ConditionalExpression : SyntaxKind + + TemplateExpression = 160, +>TemplateExpression : SyntaxKind + + YieldExpression = 161, +>YieldExpression : SyntaxKind + + OmittedExpression = 162, +>OmittedExpression : SyntaxKind + + TemplateSpan = 163, +>TemplateSpan : SyntaxKind + + Block = 164, +>Block : SyntaxKind + + VariableStatement = 165, +>VariableStatement : SyntaxKind + + EmptyStatement = 166, +>EmptyStatement : SyntaxKind + + ExpressionStatement = 167, +>ExpressionStatement : SyntaxKind + + IfStatement = 168, +>IfStatement : SyntaxKind + + DoStatement = 169, +>DoStatement : SyntaxKind + + WhileStatement = 170, +>WhileStatement : SyntaxKind + + ForStatement = 171, +>ForStatement : SyntaxKind + + ForInStatement = 172, +>ForInStatement : SyntaxKind + + ContinueStatement = 173, +>ContinueStatement : SyntaxKind + + BreakStatement = 174, +>BreakStatement : SyntaxKind + + ReturnStatement = 175, +>ReturnStatement : SyntaxKind + + WithStatement = 176, +>WithStatement : SyntaxKind + + SwitchStatement = 177, +>SwitchStatement : SyntaxKind + + LabeledStatement = 178, +>LabeledStatement : SyntaxKind + + ThrowStatement = 179, +>ThrowStatement : SyntaxKind + + TryStatement = 180, +>TryStatement : SyntaxKind + + TryBlock = 181, +>TryBlock : SyntaxKind + + CatchBlock = 182, +>CatchBlock : SyntaxKind + + FinallyBlock = 183, +>FinallyBlock : SyntaxKind + + DebuggerStatement = 184, +>DebuggerStatement : SyntaxKind + + VariableDeclaration = 185, +>VariableDeclaration : SyntaxKind + + FunctionDeclaration = 186, +>FunctionDeclaration : SyntaxKind + + FunctionBlock = 187, +>FunctionBlock : SyntaxKind + + ClassDeclaration = 188, +>ClassDeclaration : SyntaxKind + + InterfaceDeclaration = 189, +>InterfaceDeclaration : SyntaxKind + + TypeAliasDeclaration = 190, +>TypeAliasDeclaration : SyntaxKind + + EnumDeclaration = 191, +>EnumDeclaration : SyntaxKind + + ModuleDeclaration = 192, +>ModuleDeclaration : SyntaxKind + + ModuleBlock = 193, +>ModuleBlock : SyntaxKind + + ImportDeclaration = 194, +>ImportDeclaration : SyntaxKind + + ExportAssignment = 195, +>ExportAssignment : SyntaxKind + + CaseClause = 196, +>CaseClause : SyntaxKind + + DefaultClause = 197, +>DefaultClause : SyntaxKind + + HeritageClause = 198, +>HeritageClause : SyntaxKind + + PropertyAssignment = 199, +>PropertyAssignment : SyntaxKind + + ShorthandPropertyAssignment = 200, +>ShorthandPropertyAssignment : SyntaxKind + + EnumMember = 201, +>EnumMember : SyntaxKind + + SourceFile = 202, +>SourceFile : SyntaxKind + + Program = 203, +>Program : SyntaxKind + + SyntaxList = 204, +>SyntaxList : SyntaxKind + + Count = 205, +>Count : SyntaxKind + + FirstAssignment = 51, +>FirstAssignment : SyntaxKind + + LastAssignment = 62, +>LastAssignment : SyntaxKind + + FirstReservedWord = 64, +>FirstReservedWord : SyntaxKind + + LastReservedWord = 99, +>LastReservedWord : SyntaxKind + + FirstKeyword = 64, +>FirstKeyword : SyntaxKind + + LastKeyword = 119, +>LastKeyword : SyntaxKind + + FirstFutureReservedWord = 100, +>FirstFutureReservedWord : SyntaxKind + + LastFutureReservedWord = 108, +>LastFutureReservedWord : SyntaxKind + + FirstTypeNode = 133, +>FirstTypeNode : SyntaxKind + + LastTypeNode = 141, +>LastTypeNode : SyntaxKind + + FirstPunctuation = 13, +>FirstPunctuation : SyntaxKind + + LastPunctuation = 62, +>LastPunctuation : SyntaxKind + + FirstToken = 1, +>FirstToken : SyntaxKind + + LastToken = 119, +>LastToken : SyntaxKind + + FirstTriviaToken = 2, +>FirstTriviaToken : SyntaxKind + + LastTriviaToken = 5, +>LastTriviaToken : SyntaxKind + + FirstLiteralToken = 6, +>FirstLiteralToken : SyntaxKind + + LastLiteralToken = 9, +>LastLiteralToken : SyntaxKind + + FirstTemplateToken = 9, +>FirstTemplateToken : SyntaxKind + + LastTemplateToken = 12, +>LastTemplateToken : SyntaxKind + + FirstOperator = 21, +>FirstOperator : SyntaxKind + + LastOperator = 62, +>LastOperator : SyntaxKind + + FirstBinaryOperator = 23, +>FirstBinaryOperator : SyntaxKind + + LastBinaryOperator = 62, +>LastBinaryOperator : SyntaxKind + } + const enum NodeFlags { +>NodeFlags : NodeFlags + + Export = 1, +>Export : NodeFlags + + Ambient = 2, +>Ambient : NodeFlags + + QuestionMark = 4, +>QuestionMark : NodeFlags + + Rest = 8, +>Rest : NodeFlags + + Public = 16, +>Public : NodeFlags + + Private = 32, +>Private : NodeFlags + + Protected = 64, +>Protected : NodeFlags + + Static = 128, +>Static : NodeFlags + + MultiLine = 256, +>MultiLine : NodeFlags + + Synthetic = 512, +>Synthetic : NodeFlags + + DeclarationFile = 1024, +>DeclarationFile : NodeFlags + + Let = 2048, +>Let : NodeFlags + + Const = 4096, +>Const : NodeFlags + + OctalLiteral = 8192, +>OctalLiteral : NodeFlags + + Modifier = 243, +>Modifier : NodeFlags + + AccessibilityModifier = 112, +>AccessibilityModifier : NodeFlags + + BlockScoped = 6144, +>BlockScoped : NodeFlags + } + const enum ParserContextFlags { +>ParserContextFlags : ParserContextFlags + + StrictMode = 1, +>StrictMode : ParserContextFlags + + DisallowIn = 2, +>DisallowIn : ParserContextFlags + + Yield = 4, +>Yield : ParserContextFlags + + GeneratorParameter = 8, +>GeneratorParameter : ParserContextFlags + } + interface Node extends TextRange { +>Node : Node +>TextRange : TextRange + + kind: SyntaxKind; +>kind : SyntaxKind +>SyntaxKind : SyntaxKind + + flags: NodeFlags; +>flags : NodeFlags +>NodeFlags : NodeFlags + + parserContextFlags?: ParserContextFlags; +>parserContextFlags : ParserContextFlags +>ParserContextFlags : ParserContextFlags + + id?: number; +>id : number + + parent?: Node; +>parent : Node +>Node : Node + + symbol?: Symbol; +>symbol : Symbol +>Symbol : Symbol + + locals?: SymbolTable; +>locals : SymbolTable +>SymbolTable : SymbolTable + + nextContainer?: Node; +>nextContainer : Node +>Node : Node + + localSymbol?: Symbol; +>localSymbol : Symbol +>Symbol : Symbol + + modifiers?: ModifiersArray; +>modifiers : ModifiersArray +>ModifiersArray : ModifiersArray + } + interface NodeArray extends Array, TextRange { +>NodeArray : NodeArray +>T : T +>Array : T[] +>T : T +>TextRange : TextRange + + hasTrailingComma?: boolean; +>hasTrailingComma : boolean + } + interface ModifiersArray extends Array { +>ModifiersArray : ModifiersArray +>Array : T[] +>Node : Node + + flags: number; +>flags : number + } + interface Identifier extends PrimaryExpression { +>Identifier : Identifier +>PrimaryExpression : PrimaryExpression + + text: string; +>text : string + } + interface QualifiedName extends Node { +>QualifiedName : QualifiedName +>Node : Node + + left: EntityName; +>left : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName + + right: Identifier; +>right : Identifier +>Identifier : Identifier + } + type EntityName = Identifier | QualifiedName; +>EntityName : Identifier | QualifiedName +>Identifier : Identifier +>QualifiedName : QualifiedName + + interface ParsedSignature { +>ParsedSignature : ParsedSignature + + typeParameters?: NodeArray; +>typeParameters : NodeArray +>NodeArray : NodeArray +>TypeParameterDeclaration : TypeParameterDeclaration + + parameters: NodeArray; +>parameters : NodeArray +>NodeArray : NodeArray +>ParameterDeclaration : ParameterDeclaration + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + } + type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName +>Identifier : Identifier +>LiteralExpression : LiteralExpression +>ComputedPropertyName : ComputedPropertyName + + interface Declaration extends Node { +>Declaration : Declaration +>Node : Node + + _declarationBrand: any; +>_declarationBrand : any + + name?: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName + } + interface ComputedPropertyName extends Node { +>ComputedPropertyName : ComputedPropertyName +>Node : Node + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface TypeParameterDeclaration extends Declaration { +>TypeParameterDeclaration : TypeParameterDeclaration +>Declaration : Declaration + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + constraint?: TypeNode; +>constraint : TypeNode +>TypeNode : TypeNode + + expression?: Expression; +>expression : Expression +>Expression : Expression + } + interface SignatureDeclaration extends Declaration, ParsedSignature { +>SignatureDeclaration : SignatureDeclaration +>Declaration : Declaration +>ParsedSignature : ParsedSignature + } + interface VariableDeclaration extends Declaration { +>VariableDeclaration : VariableDeclaration +>Declaration : Declaration + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + interface PropertyDeclaration extends Declaration, ClassElement { +>PropertyDeclaration : PropertyDeclaration +>Declaration : Declaration +>ClassElement : ClassElement + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + interface ShortHandPropertyDeclaration extends Declaration { +>ShortHandPropertyDeclaration : ShortHandPropertyDeclaration +>Declaration : Declaration + + name: Identifier; +>name : Identifier +>Identifier : Identifier + } + interface ParameterDeclaration extends VariableDeclaration { +>ParameterDeclaration : ParameterDeclaration +>VariableDeclaration : VariableDeclaration + } + /** + * Several node kinds share function-like features such as a signature, + * a name, and a body. These nodes should extend FunctionLikeDeclaration. + * Examples: + * FunctionDeclaration + * MethodDeclaration + * AccessorDeclaration + */ + interface FunctionLikeDeclaration extends SignatureDeclaration { +>FunctionLikeDeclaration : FunctionLikeDeclaration +>SignatureDeclaration : SignatureDeclaration + + _functionLikeDeclarationBrand: any; +>_functionLikeDeclarationBrand : any + + asteriskToken?: Node; +>asteriskToken : Node +>Node : Node + + body?: Block | Expression; +>body : Expression | Block +>Block : Block +>Expression : Expression + } + interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { +>FunctionDeclaration : FunctionDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>Statement : Statement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + body?: Block; +>body : Block +>Block : Block + } + interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement { +>MethodDeclaration : MethodDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>ClassElement : ClassElement + + body?: Block; +>body : Block +>Block : Block + } + interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { +>ConstructorDeclaration : ConstructorDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>ClassElement : ClassElement + + body?: Block; +>body : Block +>Block : Block + } + interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement { +>AccessorDeclaration : AccessorDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>ClassElement : ClassElement + + body?: Block; +>body : Block +>Block : Block + } + interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { +>IndexSignatureDeclaration : IndexSignatureDeclaration +>SignatureDeclaration : SignatureDeclaration +>ClassElement : ClassElement + + _indexSignatureDeclarationBrand: any; +>_indexSignatureDeclarationBrand : any + } + interface TypeNode extends Node { +>TypeNode : TypeNode +>Node : Node + } + interface TypeReferenceNode extends TypeNode { +>TypeReferenceNode : TypeReferenceNode +>TypeNode : TypeNode + + typeName: EntityName; +>typeName : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName + + typeArguments?: NodeArray; +>typeArguments : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + } + interface TypeQueryNode extends TypeNode { +>TypeQueryNode : TypeQueryNode +>TypeNode : TypeNode + + exprName: EntityName; +>exprName : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName + } + interface TypeLiteralNode extends TypeNode, Declaration { +>TypeLiteralNode : TypeLiteralNode +>TypeNode : TypeNode +>Declaration : Declaration + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>Node : Node + } + interface ArrayTypeNode extends TypeNode { +>ArrayTypeNode : ArrayTypeNode +>TypeNode : TypeNode + + elementType: TypeNode; +>elementType : TypeNode +>TypeNode : TypeNode + } + interface TupleTypeNode extends TypeNode { +>TupleTypeNode : TupleTypeNode +>TypeNode : TypeNode + + elementTypes: NodeArray; +>elementTypes : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + } + interface UnionTypeNode extends TypeNode { +>UnionTypeNode : UnionTypeNode +>TypeNode : TypeNode + + types: NodeArray; +>types : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + } + interface ParenthesizedTypeNode extends TypeNode { +>ParenthesizedTypeNode : ParenthesizedTypeNode +>TypeNode : TypeNode + + type: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + } + interface StringLiteralTypeNode extends TypeNode { +>StringLiteralTypeNode : StringLiteralTypeNode +>TypeNode : TypeNode + + text: string; +>text : string + } + interface Expression extends Node { +>Expression : Expression +>Node : Node + + _expressionBrand: any; +>_expressionBrand : any + + contextualType?: Type; +>contextualType : Type +>Type : Type + } + interface UnaryExpression extends Expression { +>UnaryExpression : UnaryExpression +>Expression : Expression + + _unaryExpressionBrand: any; +>_unaryExpressionBrand : any + } + interface PrefixUnaryExpression extends UnaryExpression { +>PrefixUnaryExpression : PrefixUnaryExpression +>UnaryExpression : UnaryExpression + + operator: SyntaxKind; +>operator : SyntaxKind +>SyntaxKind : SyntaxKind + + operand: UnaryExpression; +>operand : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface PostfixUnaryExpression extends PostfixExpression { +>PostfixUnaryExpression : PostfixUnaryExpression +>PostfixExpression : PostfixExpression + + operand: LeftHandSideExpression; +>operand : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + operator: SyntaxKind; +>operator : SyntaxKind +>SyntaxKind : SyntaxKind + } + interface PostfixExpression extends UnaryExpression { +>PostfixExpression : PostfixExpression +>UnaryExpression : UnaryExpression + + _postfixExpressionBrand: any; +>_postfixExpressionBrand : any + } + interface LeftHandSideExpression extends PostfixExpression { +>LeftHandSideExpression : LeftHandSideExpression +>PostfixExpression : PostfixExpression + + _leftHandSideExpressionBrand: any; +>_leftHandSideExpressionBrand : any + } + interface MemberExpression extends LeftHandSideExpression { +>MemberExpression : MemberExpression +>LeftHandSideExpression : LeftHandSideExpression + + _memberExpressionBrand: any; +>_memberExpressionBrand : any + } + interface PrimaryExpression extends MemberExpression { +>PrimaryExpression : PrimaryExpression +>MemberExpression : MemberExpression + + _primaryExpressionBrand: any; +>_primaryExpressionBrand : any + } + interface DeleteExpression extends UnaryExpression { +>DeleteExpression : DeleteExpression +>UnaryExpression : UnaryExpression + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface TypeOfExpression extends UnaryExpression { +>TypeOfExpression : TypeOfExpression +>UnaryExpression : UnaryExpression + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface VoidExpression extends UnaryExpression { +>VoidExpression : VoidExpression +>UnaryExpression : UnaryExpression + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface YieldExpression extends Expression { +>YieldExpression : YieldExpression +>Expression : Expression + + asteriskToken?: Node; +>asteriskToken : Node +>Node : Node + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface BinaryExpression extends Expression { +>BinaryExpression : BinaryExpression +>Expression : Expression + + left: Expression; +>left : Expression +>Expression : Expression + + operator: SyntaxKind; +>operator : SyntaxKind +>SyntaxKind : SyntaxKind + + right: Expression; +>right : Expression +>Expression : Expression + } + interface ConditionalExpression extends Expression { +>ConditionalExpression : ConditionalExpression +>Expression : Expression + + condition: Expression; +>condition : Expression +>Expression : Expression + + whenTrue: Expression; +>whenTrue : Expression +>Expression : Expression + + whenFalse: Expression; +>whenFalse : Expression +>Expression : Expression + } + interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { +>FunctionExpression : FunctionExpression +>PrimaryExpression : PrimaryExpression +>FunctionLikeDeclaration : FunctionLikeDeclaration + + name?: Identifier; +>name : Identifier +>Identifier : Identifier + + body: Block | Expression; +>body : Expression | Block +>Block : Block +>Expression : Expression + } + interface LiteralExpression extends PrimaryExpression { +>LiteralExpression : LiteralExpression +>PrimaryExpression : PrimaryExpression + + text: string; +>text : string + } + interface TemplateExpression extends PrimaryExpression { +>TemplateExpression : TemplateExpression +>PrimaryExpression : PrimaryExpression + + head: LiteralExpression; +>head : LiteralExpression +>LiteralExpression : LiteralExpression + + templateSpans: NodeArray; +>templateSpans : NodeArray +>NodeArray : NodeArray +>TemplateSpan : TemplateSpan + } + interface TemplateSpan extends Node { +>TemplateSpan : TemplateSpan +>Node : Node + + expression: Expression; +>expression : Expression +>Expression : Expression + + literal: LiteralExpression; +>literal : LiteralExpression +>LiteralExpression : LiteralExpression + } + interface ParenthesizedExpression extends PrimaryExpression { +>ParenthesizedExpression : ParenthesizedExpression +>PrimaryExpression : PrimaryExpression + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface ArrayLiteralExpression extends PrimaryExpression { +>ArrayLiteralExpression : ArrayLiteralExpression +>PrimaryExpression : PrimaryExpression + + elements: NodeArray; +>elements : NodeArray +>NodeArray : NodeArray +>Expression : Expression + } + interface ObjectLiteralExpression extends PrimaryExpression, Declaration { +>ObjectLiteralExpression : ObjectLiteralExpression +>PrimaryExpression : PrimaryExpression +>Declaration : Declaration + + properties: NodeArray; +>properties : NodeArray +>NodeArray : NodeArray +>Declaration : Declaration + } + interface PropertyAccessExpression extends MemberExpression { +>PropertyAccessExpression : PropertyAccessExpression +>MemberExpression : MemberExpression + + expression: LeftHandSideExpression; +>expression : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + name: Identifier; +>name : Identifier +>Identifier : Identifier + } + interface ElementAccessExpression extends MemberExpression { +>ElementAccessExpression : ElementAccessExpression +>MemberExpression : MemberExpression + + expression: LeftHandSideExpression; +>expression : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + argumentExpression: Expression; +>argumentExpression : Expression +>Expression : Expression + } + interface CallExpression extends LeftHandSideExpression { +>CallExpression : CallExpression +>LeftHandSideExpression : LeftHandSideExpression + + expression: LeftHandSideExpression; +>expression : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + typeArguments?: NodeArray; +>typeArguments : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + + arguments: NodeArray; +>arguments : NodeArray +>NodeArray : NodeArray +>Expression : Expression + } + interface NewExpression extends CallExpression, PrimaryExpression { +>NewExpression : NewExpression +>CallExpression : CallExpression +>PrimaryExpression : PrimaryExpression + } + interface TaggedTemplateExpression extends MemberExpression { +>TaggedTemplateExpression : TaggedTemplateExpression +>MemberExpression : MemberExpression + + tag: LeftHandSideExpression; +>tag : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + template: LiteralExpression | TemplateExpression; +>template : LiteralExpression | TemplateExpression +>LiteralExpression : LiteralExpression +>TemplateExpression : TemplateExpression + } + type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression; +>CallLikeExpression : CallExpression | NewExpression | TaggedTemplateExpression +>CallExpression : CallExpression +>NewExpression : NewExpression +>TaggedTemplateExpression : TaggedTemplateExpression + + interface TypeAssertion extends UnaryExpression { +>TypeAssertion : TypeAssertion +>UnaryExpression : UnaryExpression + + type: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface Statement extends Node, ModuleElement { +>Statement : Statement +>Node : Node +>ModuleElement : ModuleElement + + _statementBrand: any; +>_statementBrand : any + } + interface Block extends Statement { +>Block : Block +>Statement : Statement + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>Statement : Statement + } + interface VariableStatement extends Statement { +>VariableStatement : VariableStatement +>Statement : Statement + + declarations: NodeArray; +>declarations : NodeArray +>NodeArray : NodeArray +>VariableDeclaration : VariableDeclaration + } + interface ExpressionStatement extends Statement { +>ExpressionStatement : ExpressionStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface IfStatement extends Statement { +>IfStatement : IfStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + + thenStatement: Statement; +>thenStatement : Statement +>Statement : Statement + + elseStatement?: Statement; +>elseStatement : Statement +>Statement : Statement + } + interface IterationStatement extends Statement { +>IterationStatement : IterationStatement +>Statement : Statement + + statement: Statement; +>statement : Statement +>Statement : Statement + } + interface DoStatement extends IterationStatement { +>DoStatement : DoStatement +>IterationStatement : IterationStatement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface WhileStatement extends IterationStatement { +>WhileStatement : WhileStatement +>IterationStatement : IterationStatement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface ForStatement extends IterationStatement { +>ForStatement : ForStatement +>IterationStatement : IterationStatement + + declarations?: NodeArray; +>declarations : NodeArray +>NodeArray : NodeArray +>VariableDeclaration : VariableDeclaration + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + + condition?: Expression; +>condition : Expression +>Expression : Expression + + iterator?: Expression; +>iterator : Expression +>Expression : Expression + } + interface ForInStatement extends IterationStatement { +>ForInStatement : ForInStatement +>IterationStatement : IterationStatement + + declarations?: NodeArray; +>declarations : NodeArray +>NodeArray : NodeArray +>VariableDeclaration : VariableDeclaration + + variable?: Expression; +>variable : Expression +>Expression : Expression + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface BreakOrContinueStatement extends Statement { +>BreakOrContinueStatement : BreakOrContinueStatement +>Statement : Statement + + label?: Identifier; +>label : Identifier +>Identifier : Identifier + } + interface ReturnStatement extends Statement { +>ReturnStatement : ReturnStatement +>Statement : Statement + + expression?: Expression; +>expression : Expression +>Expression : Expression + } + interface WithStatement extends Statement { +>WithStatement : WithStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + + statement: Statement; +>statement : Statement +>Statement : Statement + } + interface SwitchStatement extends Statement { +>SwitchStatement : SwitchStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + + clauses: NodeArray; +>clauses : NodeArray +>NodeArray : NodeArray +>CaseOrDefaultClause : CaseOrDefaultClause + } + interface CaseOrDefaultClause extends Node { +>CaseOrDefaultClause : CaseOrDefaultClause +>Node : Node + + expression?: Expression; +>expression : Expression +>Expression : Expression + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>Statement : Statement + } + interface LabeledStatement extends Statement { +>LabeledStatement : LabeledStatement +>Statement : Statement + + label: Identifier; +>label : Identifier +>Identifier : Identifier + + statement: Statement; +>statement : Statement +>Statement : Statement + } + interface ThrowStatement extends Statement { +>ThrowStatement : ThrowStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface TryStatement extends Statement { +>TryStatement : TryStatement +>Statement : Statement + + tryBlock: Block; +>tryBlock : Block +>Block : Block + + catchBlock?: CatchBlock; +>catchBlock : CatchBlock +>CatchBlock : CatchBlock + + finallyBlock?: Block; +>finallyBlock : Block +>Block : Block + } + interface CatchBlock extends Block, Declaration { +>CatchBlock : CatchBlock +>Block : Block +>Declaration : Declaration + + variable: Identifier; +>variable : Identifier +>Identifier : Identifier + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + } + interface ModuleElement extends Node { +>ModuleElement : ModuleElement +>Node : Node + + _moduleElementBrand: any; +>_moduleElementBrand : any + } + interface ClassDeclaration extends Declaration, ModuleElement { +>ClassDeclaration : ClassDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + typeParameters?: NodeArray; +>typeParameters : NodeArray +>NodeArray : NodeArray +>TypeParameterDeclaration : TypeParameterDeclaration + + heritageClauses?: NodeArray; +>heritageClauses : NodeArray +>NodeArray : NodeArray +>HeritageClause : HeritageClause + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>ClassElement : ClassElement + } + interface ClassElement extends Declaration { +>ClassElement : ClassElement +>Declaration : Declaration + + _classElementBrand: any; +>_classElementBrand : any + } + interface InterfaceDeclaration extends Declaration, ModuleElement { +>InterfaceDeclaration : InterfaceDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + typeParameters?: NodeArray; +>typeParameters : NodeArray +>NodeArray : NodeArray +>TypeParameterDeclaration : TypeParameterDeclaration + + heritageClauses?: NodeArray; +>heritageClauses : NodeArray +>NodeArray : NodeArray +>HeritageClause : HeritageClause + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>Declaration : Declaration + } + interface HeritageClause extends Node { +>HeritageClause : HeritageClause +>Node : Node + + token: SyntaxKind; +>token : SyntaxKind +>SyntaxKind : SyntaxKind + + types?: NodeArray; +>types : NodeArray +>NodeArray : NodeArray +>TypeReferenceNode : TypeReferenceNode + } + interface TypeAliasDeclaration extends Declaration, ModuleElement { +>TypeAliasDeclaration : TypeAliasDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + type: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + } + interface EnumMember extends Declaration { +>EnumMember : EnumMember +>Declaration : Declaration + + name: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + interface EnumDeclaration extends Declaration, ModuleElement { +>EnumDeclaration : EnumDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>EnumMember : EnumMember + } + interface ModuleDeclaration extends Declaration, ModuleElement { +>ModuleDeclaration : ModuleDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier | LiteralExpression; +>name : Identifier | LiteralExpression +>Identifier : Identifier +>LiteralExpression : LiteralExpression + + body: ModuleBlock | ModuleDeclaration; +>body : ModuleDeclaration | ModuleBlock +>ModuleBlock : ModuleBlock +>ModuleDeclaration : ModuleDeclaration + } + interface ModuleBlock extends Node, ModuleElement { +>ModuleBlock : ModuleBlock +>Node : Node +>ModuleElement : ModuleElement + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>ModuleElement : ModuleElement + } + interface ImportDeclaration extends Declaration, ModuleElement { +>ImportDeclaration : ImportDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + entityName?: EntityName; +>entityName : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName + + externalModuleName?: LiteralExpression; +>externalModuleName : LiteralExpression +>LiteralExpression : LiteralExpression + } + interface ExportAssignment extends Statement, ModuleElement { +>ExportAssignment : ExportAssignment +>Statement : Statement +>ModuleElement : ModuleElement + + exportName: Identifier; +>exportName : Identifier +>Identifier : Identifier + } + interface FileReference extends TextRange { +>FileReference : FileReference +>TextRange : TextRange + + filename: string; +>filename : string + } + interface CommentRange extends TextRange { +>CommentRange : CommentRange +>TextRange : TextRange + + hasTrailingNewLine?: boolean; +>hasTrailingNewLine : boolean + } + interface SourceFile extends Declaration { +>SourceFile : SourceFile +>Declaration : Declaration + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>ModuleElement : ModuleElement + + filename: string; +>filename : string + + text: string; +>text : string + + getLineAndCharacterFromPosition(position: number): LineAndCharacter; +>getLineAndCharacterFromPosition : (position: number) => LineAndCharacter +>position : number +>LineAndCharacter : LineAndCharacter + + getPositionFromLineAndCharacter(line: number, character: number): number; +>getPositionFromLineAndCharacter : (line: number, character: number) => number +>line : number +>character : number + + getLineStarts(): number[]; +>getLineStarts : () => number[] + + amdDependencies: string[]; +>amdDependencies : string[] + + amdModuleName: string; +>amdModuleName : string + + referencedFiles: FileReference[]; +>referencedFiles : FileReference[] +>FileReference : FileReference + + semanticDiagnostics: Diagnostic[]; +>semanticDiagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + parseDiagnostics: Diagnostic[]; +>parseDiagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + grammarDiagnostics: Diagnostic[]; +>grammarDiagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + getSyntacticDiagnostics(): Diagnostic[]; +>getSyntacticDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + hasNoDefaultLib: boolean; +>hasNoDefaultLib : boolean + + externalModuleIndicator: Node; +>externalModuleIndicator : Node +>Node : Node + + nodeCount: number; +>nodeCount : number + + identifierCount: number; +>identifierCount : number + + symbolCount: number; +>symbolCount : number + + isOpen: boolean; +>isOpen : boolean + + version: string; +>version : string + + languageVersion: ScriptTarget; +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget + + identifiers: Map; +>identifiers : Map +>Map : Map + } + interface Program { +>Program : Program + + getSourceFile(filename: string): SourceFile; +>getSourceFile : (filename: string) => SourceFile +>filename : string +>SourceFile : SourceFile + + getSourceFiles(): SourceFile[]; +>getSourceFiles : () => SourceFile[] +>SourceFile : SourceFile + + getCompilerOptions(): CompilerOptions; +>getCompilerOptions : () => CompilerOptions +>CompilerOptions : CompilerOptions + + getCompilerHost(): CompilerHost; +>getCompilerHost : () => CompilerHost +>CompilerHost : CompilerHost + + getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; +>getDiagnostics : (sourceFile?: SourceFile) => Diagnostic[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Diagnostic : Diagnostic + + getGlobalDiagnostics(): Diagnostic[]; +>getGlobalDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + getTypeChecker(fullTypeCheckMode: boolean): TypeChecker; +>getTypeChecker : (fullTypeCheckMode: boolean) => TypeChecker +>fullTypeCheckMode : boolean +>TypeChecker : TypeChecker + + getCommonSourceDirectory(): string; +>getCommonSourceDirectory : () => string + } + interface SourceMapSpan { +>SourceMapSpan : SourceMapSpan + + emittedLine: number; +>emittedLine : number + + emittedColumn: number; +>emittedColumn : number + + sourceLine: number; +>sourceLine : number + + sourceColumn: number; +>sourceColumn : number + + nameIndex?: number; +>nameIndex : number + + sourceIndex: number; +>sourceIndex : number + } + interface SourceMapData { +>SourceMapData : SourceMapData + + sourceMapFilePath: string; +>sourceMapFilePath : string + + jsSourceMappingURL: string; +>jsSourceMappingURL : string + + sourceMapFile: string; +>sourceMapFile : string + + sourceMapSourceRoot: string; +>sourceMapSourceRoot : string + + sourceMapSources: string[]; +>sourceMapSources : string[] + + inputSourceFileNames: string[]; +>inputSourceFileNames : string[] + + sourceMapNames?: string[]; +>sourceMapNames : string[] + + sourceMapMappings: string; +>sourceMapMappings : string + + sourceMapDecodedMappings: SourceMapSpan[]; +>sourceMapDecodedMappings : SourceMapSpan[] +>SourceMapSpan : SourceMapSpan + } + enum EmitReturnStatus { +>EmitReturnStatus : EmitReturnStatus + + Succeeded = 0, +>Succeeded : EmitReturnStatus + + AllOutputGenerationSkipped = 1, +>AllOutputGenerationSkipped : EmitReturnStatus + + JSGeneratedWithSemanticErrors = 2, +>JSGeneratedWithSemanticErrors : EmitReturnStatus + + DeclarationGenerationSkipped = 3, +>DeclarationGenerationSkipped : EmitReturnStatus + + EmitErrorsEncountered = 4, +>EmitErrorsEncountered : EmitReturnStatus + + CompilerOptionsErrors = 5, +>CompilerOptionsErrors : EmitReturnStatus + } + interface EmitResult { +>EmitResult : EmitResult + + emitResultStatus: EmitReturnStatus; +>emitResultStatus : EmitReturnStatus +>EmitReturnStatus : EmitReturnStatus + + diagnostics: Diagnostic[]; +>diagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + sourceMaps: SourceMapData[]; +>sourceMaps : SourceMapData[] +>SourceMapData : SourceMapData + } + interface TypeChecker { +>TypeChecker : TypeChecker + + getProgram(): Program; +>getProgram : () => Program +>Program : Program + + getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; +>getDiagnostics : (sourceFile?: SourceFile) => Diagnostic[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Diagnostic : Diagnostic + + getDeclarationDiagnostics(sourceFile: SourceFile): Diagnostic[]; +>getDeclarationDiagnostics : (sourceFile: SourceFile) => Diagnostic[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Diagnostic : Diagnostic + + getGlobalDiagnostics(): Diagnostic[]; +>getGlobalDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + getNodeCount(): number; +>getNodeCount : () => number + + getIdentifierCount(): number; +>getIdentifierCount : () => number + + getSymbolCount(): number; +>getSymbolCount : () => number + + getTypeCount(): number; +>getTypeCount : () => number + + checkProgram(): void; +>checkProgram : () => void + + emitFiles(targetSourceFile?: SourceFile): EmitResult; +>emitFiles : (targetSourceFile?: SourceFile) => EmitResult +>targetSourceFile : SourceFile +>SourceFile : SourceFile +>EmitResult : EmitResult + + getParentOfSymbol(symbol: Symbol): Symbol; +>getParentOfSymbol : (symbol: Symbol) => Symbol +>symbol : Symbol +>Symbol : Symbol +>Symbol : Symbol + + getNarrowedTypeOfSymbol(symbol: Symbol, node: Node): Type; +>getNarrowedTypeOfSymbol : (symbol: Symbol, node: Node) => Type +>symbol : Symbol +>Symbol : Symbol +>node : Node +>Node : Node +>Type : Type + + getDeclaredTypeOfSymbol(symbol: Symbol): Type; +>getDeclaredTypeOfSymbol : (symbol: Symbol) => Type +>symbol : Symbol +>Symbol : Symbol +>Type : Type + + getPropertiesOfType(type: Type): Symbol[]; +>getPropertiesOfType : (type: Type) => Symbol[] +>type : Type +>Type : Type +>Symbol : Symbol + + getPropertyOfType(type: Type, propertyName: string): Symbol; +>getPropertyOfType : (type: Type, propertyName: string) => Symbol +>type : Type +>Type : Type +>propertyName : string +>Symbol : Symbol + + getSignaturesOfType(type: Type, kind: SignatureKind): Signature[]; +>getSignaturesOfType : (type: Type, kind: SignatureKind) => Signature[] +>type : Type +>Type : Type +>kind : SignatureKind +>SignatureKind : SignatureKind +>Signature : Signature + + getIndexTypeOfType(type: Type, kind: IndexKind): Type; +>getIndexTypeOfType : (type: Type, kind: IndexKind) => Type +>type : Type +>Type : Type +>kind : IndexKind +>IndexKind : IndexKind +>Type : Type + + getReturnTypeOfSignature(signature: Signature): Type; +>getReturnTypeOfSignature : (signature: Signature) => Type +>signature : Signature +>Signature : Signature +>Type : Type + + getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; +>getSymbolsInScope : (location: Node, meaning: SymbolFlags) => Symbol[] +>location : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags +>Symbol : Symbol + + getSymbolInfo(node: Node): Symbol; +>getSymbolInfo : (node: Node) => Symbol +>node : Node +>Node : Node +>Symbol : Symbol + + getShorthandAssignmentValueSymbol(location: Node): Symbol; +>getShorthandAssignmentValueSymbol : (location: Node) => Symbol +>location : Node +>Node : Node +>Symbol : Symbol + + getTypeOfNode(node: Node): Type; +>getTypeOfNode : (node: Node) => Type +>node : Node +>Node : Node +>Type : Type + + typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; +>typeToString : (type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => string +>type : Type +>Type : Type +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; +>symbolToString : (symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) => string +>symbol : Symbol +>Symbol : Symbol +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags + + getSymbolDisplayBuilder(): SymbolDisplayBuilder; +>getSymbolDisplayBuilder : () => SymbolDisplayBuilder +>SymbolDisplayBuilder : SymbolDisplayBuilder + + getFullyQualifiedName(symbol: Symbol): string; +>getFullyQualifiedName : (symbol: Symbol) => string +>symbol : Symbol +>Symbol : Symbol + + getAugmentedPropertiesOfType(type: Type): Symbol[]; +>getAugmentedPropertiesOfType : (type: Type) => Symbol[] +>type : Type +>Type : Type +>Symbol : Symbol + + getRootSymbols(symbol: Symbol): Symbol[]; +>getRootSymbols : (symbol: Symbol) => Symbol[] +>symbol : Symbol +>Symbol : Symbol +>Symbol : Symbol + + getContextualType(node: Node): Type; +>getContextualType : (node: Node) => Type +>node : Node +>Node : Node +>Type : Type + + getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; +>getResolvedSignature : (node: CallExpression | NewExpression | TaggedTemplateExpression, candidatesOutArray?: Signature[]) => Signature +>node : CallExpression | NewExpression | TaggedTemplateExpression +>CallLikeExpression : CallExpression | NewExpression | TaggedTemplateExpression +>candidatesOutArray : Signature[] +>Signature : Signature +>Signature : Signature + + getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; +>getSignatureFromDeclaration : (declaration: SignatureDeclaration) => Signature +>declaration : SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration +>Signature : Signature + + isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; +>isImplementationOfOverload : (node: FunctionLikeDeclaration) => boolean +>node : FunctionLikeDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration + + isUndefinedSymbol(symbol: Symbol): boolean; +>isUndefinedSymbol : (symbol: Symbol) => boolean +>symbol : Symbol +>Symbol : Symbol + + isArgumentsSymbol(symbol: Symbol): boolean; +>isArgumentsSymbol : (symbol: Symbol) => boolean +>symbol : Symbol +>Symbol : Symbol + + isEmitBlocked(sourceFile?: SourceFile): boolean; +>isEmitBlocked : (sourceFile?: SourceFile) => boolean +>sourceFile : SourceFile +>SourceFile : SourceFile + + getEnumMemberValue(node: EnumMember): number; +>getEnumMemberValue : (node: EnumMember) => number +>node : EnumMember +>EnumMember : EnumMember + + isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; +>isValidPropertyAccess : (node: QualifiedName | PropertyAccessExpression, propertyName: string) => boolean +>node : QualifiedName | PropertyAccessExpression +>PropertyAccessExpression : PropertyAccessExpression +>QualifiedName : QualifiedName +>propertyName : string + + getAliasedSymbol(symbol: Symbol): Symbol; +>getAliasedSymbol : (symbol: Symbol) => Symbol +>symbol : Symbol +>Symbol : Symbol +>Symbol : Symbol + } + interface SymbolDisplayBuilder { +>SymbolDisplayBuilder : SymbolDisplayBuilder + + buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildTypeDisplay : (type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>type : Type +>Type : Type +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void; +>buildSymbolDisplay : (symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags) => void +>symbol : Symbol +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags +>flags : SymbolFormatFlags +>SymbolFormatFlags : SymbolFormatFlags + + buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildSignatureDisplay : (signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>signatures : Signature +>Signature : Signature +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildParameterDisplay : (parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>parameter : Symbol +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildTypeParameterDisplay : (tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>tp : TypeParameter +>TypeParameter : TypeParameter +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void; +>buildTypeParameterDisplayFromSymbol : (symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags) => void +>symbol : Symbol +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaraiton : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildDisplayForParametersAndDelimiters : (parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>parameters : Symbol[] +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildDisplayForTypeParametersAndDelimiters : (typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>typeParameters : TypeParameter[] +>TypeParameter : TypeParameter +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildReturnTypeDisplay : (signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>signature : Signature +>Signature : Signature +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + } + interface SymbolWriter { +>SymbolWriter : SymbolWriter + + writeKeyword(text: string): void; +>writeKeyword : (text: string) => void +>text : string + + writeOperator(text: string): void; +>writeOperator : (text: string) => void +>text : string + + writePunctuation(text: string): void; +>writePunctuation : (text: string) => void +>text : string + + writeSpace(text: string): void; +>writeSpace : (text: string) => void +>text : string + + writeStringLiteral(text: string): void; +>writeStringLiteral : (text: string) => void +>text : string + + writeParameter(text: string): void; +>writeParameter : (text: string) => void +>text : string + + writeSymbol(text: string, symbol: Symbol): void; +>writeSymbol : (text: string, symbol: Symbol) => void +>text : string +>symbol : Symbol +>Symbol : Symbol + + writeLine(): void; +>writeLine : () => void + + increaseIndent(): void; +>increaseIndent : () => void + + decreaseIndent(): void; +>decreaseIndent : () => void + + clear(): void; +>clear : () => void + + trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void; +>trackSymbol : (symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) => void +>symbol : Symbol +>Symbol : Symbol +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags + } + const enum TypeFormatFlags { +>TypeFormatFlags : TypeFormatFlags + + None = 0, +>None : TypeFormatFlags + + WriteArrayAsGenericType = 1, +>WriteArrayAsGenericType : TypeFormatFlags + + UseTypeOfFunction = 2, +>UseTypeOfFunction : TypeFormatFlags + + NoTruncation = 4, +>NoTruncation : TypeFormatFlags + + WriteArrowStyleSignature = 8, +>WriteArrowStyleSignature : TypeFormatFlags + + WriteOwnNameForAnyLike = 16, +>WriteOwnNameForAnyLike : TypeFormatFlags + + WriteTypeArgumentsOfSignature = 32, +>WriteTypeArgumentsOfSignature : TypeFormatFlags + + InElementType = 64, +>InElementType : TypeFormatFlags + } + const enum SymbolFormatFlags { +>SymbolFormatFlags : SymbolFormatFlags + + None = 0, +>None : SymbolFormatFlags + + WriteTypeParametersOrArguments = 1, +>WriteTypeParametersOrArguments : SymbolFormatFlags + + UseOnlyExternalAliasing = 2, +>UseOnlyExternalAliasing : SymbolFormatFlags + } + const enum SymbolAccessibility { +>SymbolAccessibility : SymbolAccessibility + + Accessible = 0, +>Accessible : SymbolAccessibility + + NotAccessible = 1, +>NotAccessible : SymbolAccessibility + + CannotBeNamed = 2, +>CannotBeNamed : SymbolAccessibility + } + interface SymbolVisibilityResult { +>SymbolVisibilityResult : SymbolVisibilityResult + + accessibility: SymbolAccessibility; +>accessibility : SymbolAccessibility +>SymbolAccessibility : SymbolAccessibility + + aliasesToMakeVisible?: ImportDeclaration[]; +>aliasesToMakeVisible : ImportDeclaration[] +>ImportDeclaration : ImportDeclaration + + errorSymbolName?: string; +>errorSymbolName : string + + errorNode?: Node; +>errorNode : Node +>Node : Node + } + interface SymbolAccessiblityResult extends SymbolVisibilityResult { +>SymbolAccessiblityResult : SymbolAccessiblityResult +>SymbolVisibilityResult : SymbolVisibilityResult + + errorModuleName?: string; +>errorModuleName : string + } + interface EmitResolver { +>EmitResolver : EmitResolver + + getProgram(): Program; +>getProgram : () => Program +>Program : Program + + getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; +>getLocalNameOfContainer : (container: EnumDeclaration | ModuleDeclaration) => string +>container : EnumDeclaration | ModuleDeclaration +>ModuleDeclaration : ModuleDeclaration +>EnumDeclaration : EnumDeclaration + + getExpressionNamePrefix(node: Identifier): string; +>getExpressionNamePrefix : (node: Identifier) => string +>node : Identifier +>Identifier : Identifier + + getExportAssignmentName(node: SourceFile): string; +>getExportAssignmentName : (node: SourceFile) => string +>node : SourceFile +>SourceFile : SourceFile + + isReferencedImportDeclaration(node: ImportDeclaration): boolean; +>isReferencedImportDeclaration : (node: ImportDeclaration) => boolean +>node : ImportDeclaration +>ImportDeclaration : ImportDeclaration + + isTopLevelValueImportWithEntityName(node: ImportDeclaration): boolean; +>isTopLevelValueImportWithEntityName : (node: ImportDeclaration) => boolean +>node : ImportDeclaration +>ImportDeclaration : ImportDeclaration + + getNodeCheckFlags(node: Node): NodeCheckFlags; +>getNodeCheckFlags : (node: Node) => NodeCheckFlags +>node : Node +>Node : Node +>NodeCheckFlags : NodeCheckFlags + + getEnumMemberValue(node: EnumMember): number; +>getEnumMemberValue : (node: EnumMember) => number +>node : EnumMember +>EnumMember : EnumMember + + hasSemanticErrors(): boolean; +>hasSemanticErrors : () => boolean + + isDeclarationVisible(node: Declaration): boolean; +>isDeclarationVisible : (node: Declaration) => boolean +>node : Declaration +>Declaration : Declaration + + isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; +>isImplementationOfOverload : (node: FunctionLikeDeclaration) => boolean +>node : FunctionLikeDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration + + writeTypeAtLocation(location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; +>writeTypeAtLocation : (location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void +>location : Node +>Node : Node +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags +>writer : SymbolWriter +>SymbolWriter : SymbolWriter + + writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; +>writeReturnTypeOfSignatureDeclaration : (signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void +>signatureDeclaration : SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags +>writer : SymbolWriter +>SymbolWriter : SymbolWriter + + isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; +>isSymbolAccessible : (symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags) => SymbolAccessiblityResult +>symbol : Symbol +>Symbol : Symbol +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags +>SymbolAccessiblityResult : SymbolAccessiblityResult + + isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; +>isEntityNameVisible : (entityName: Identifier | QualifiedName, enclosingDeclaration: Node) => SymbolVisibilityResult +>entityName : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName +>enclosingDeclaration : Node +>Node : Node +>SymbolVisibilityResult : SymbolVisibilityResult + + getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number; +>getConstantValue : (node: PropertyAccessExpression | ElementAccessExpression) => number +>node : PropertyAccessExpression | ElementAccessExpression +>PropertyAccessExpression : PropertyAccessExpression +>ElementAccessExpression : ElementAccessExpression + + isEmitBlocked(sourceFile?: SourceFile): boolean; +>isEmitBlocked : (sourceFile?: SourceFile) => boolean +>sourceFile : SourceFile +>SourceFile : SourceFile + } + const enum SymbolFlags { +>SymbolFlags : SymbolFlags + + FunctionScopedVariable = 1, +>FunctionScopedVariable : SymbolFlags + + BlockScopedVariable = 2, +>BlockScopedVariable : SymbolFlags + + Property = 4, +>Property : SymbolFlags + + EnumMember = 8, +>EnumMember : SymbolFlags + + Function = 16, +>Function : SymbolFlags + + Class = 32, +>Class : SymbolFlags + + Interface = 64, +>Interface : SymbolFlags + + ConstEnum = 128, +>ConstEnum : SymbolFlags + + RegularEnum = 256, +>RegularEnum : SymbolFlags + + ValueModule = 512, +>ValueModule : SymbolFlags + + NamespaceModule = 1024, +>NamespaceModule : SymbolFlags + + TypeLiteral = 2048, +>TypeLiteral : SymbolFlags + + ObjectLiteral = 4096, +>ObjectLiteral : SymbolFlags + + Method = 8192, +>Method : SymbolFlags + + Constructor = 16384, +>Constructor : SymbolFlags + + GetAccessor = 32768, +>GetAccessor : SymbolFlags + + SetAccessor = 65536, +>SetAccessor : SymbolFlags + + CallSignature = 131072, +>CallSignature : SymbolFlags + + ConstructSignature = 262144, +>ConstructSignature : SymbolFlags + + IndexSignature = 524288, +>IndexSignature : SymbolFlags + + TypeParameter = 1048576, +>TypeParameter : SymbolFlags + + TypeAlias = 2097152, +>TypeAlias : SymbolFlags + + ExportValue = 4194304, +>ExportValue : SymbolFlags + + ExportType = 8388608, +>ExportType : SymbolFlags + + ExportNamespace = 16777216, +>ExportNamespace : SymbolFlags + + Import = 33554432, +>Import : SymbolFlags + + Instantiated = 67108864, +>Instantiated : SymbolFlags + + Merged = 134217728, +>Merged : SymbolFlags + + Transient = 268435456, +>Transient : SymbolFlags + + Prototype = 536870912, +>Prototype : SymbolFlags + + UnionProperty = 1073741824, +>UnionProperty : SymbolFlags + + Enum = 384, +>Enum : SymbolFlags + + Variable = 3, +>Variable : SymbolFlags + + Value = 107455, +>Value : SymbolFlags + + Type = 3152352, +>Type : SymbolFlags + + Namespace = 1536, +>Namespace : SymbolFlags + + Module = 1536, +>Module : SymbolFlags + + Accessor = 98304, +>Accessor : SymbolFlags + + Signature = 917504, +>Signature : SymbolFlags + + FunctionScopedVariableExcludes = 107454, +>FunctionScopedVariableExcludes : SymbolFlags + + BlockScopedVariableExcludes = 107455, +>BlockScopedVariableExcludes : SymbolFlags + + ParameterExcludes = 107455, +>ParameterExcludes : SymbolFlags + + PropertyExcludes = 107455, +>PropertyExcludes : SymbolFlags + + EnumMemberExcludes = 107455, +>EnumMemberExcludes : SymbolFlags + + FunctionExcludes = 106927, +>FunctionExcludes : SymbolFlags + + ClassExcludes = 3258879, +>ClassExcludes : SymbolFlags + + InterfaceExcludes = 3152288, +>InterfaceExcludes : SymbolFlags + + RegularEnumExcludes = 3258623, +>RegularEnumExcludes : SymbolFlags + + ConstEnumExcludes = 3259263, +>ConstEnumExcludes : SymbolFlags + + ValueModuleExcludes = 106639, +>ValueModuleExcludes : SymbolFlags + + NamespaceModuleExcludes = 0, +>NamespaceModuleExcludes : SymbolFlags + + MethodExcludes = 99263, +>MethodExcludes : SymbolFlags + + GetAccessorExcludes = 41919, +>GetAccessorExcludes : SymbolFlags + + SetAccessorExcludes = 74687, +>SetAccessorExcludes : SymbolFlags + + TypeParameterExcludes = 2103776, +>TypeParameterExcludes : SymbolFlags + + TypeAliasExcludes = 3152352, +>TypeAliasExcludes : SymbolFlags + + ImportExcludes = 33554432, +>ImportExcludes : SymbolFlags + + ModuleMember = 35653619, +>ModuleMember : SymbolFlags + + ExportHasLocal = 944, +>ExportHasLocal : SymbolFlags + + HasLocals = 1041936, +>HasLocals : SymbolFlags + + HasExports = 1952, +>HasExports : SymbolFlags + + HasMembers = 6240, +>HasMembers : SymbolFlags + + IsContainer = 1048560, +>IsContainer : SymbolFlags + + PropertyOrAccessor = 98308, +>PropertyOrAccessor : SymbolFlags + + Export = 29360128, +>Export : SymbolFlags + } + interface Symbol { +>Symbol : Symbol + + flags: SymbolFlags; +>flags : SymbolFlags +>SymbolFlags : SymbolFlags + + name: string; +>name : string + + id?: number; +>id : number + + mergeId?: number; +>mergeId : number + + declarations?: Declaration[]; +>declarations : Declaration[] +>Declaration : Declaration + + parent?: Symbol; +>parent : Symbol +>Symbol : Symbol + + members?: SymbolTable; +>members : SymbolTable +>SymbolTable : SymbolTable + + exports?: SymbolTable; +>exports : SymbolTable +>SymbolTable : SymbolTable + + exportSymbol?: Symbol; +>exportSymbol : Symbol +>Symbol : Symbol + + valueDeclaration?: Declaration; +>valueDeclaration : Declaration +>Declaration : Declaration + + constEnumOnlyModule?: boolean; +>constEnumOnlyModule : boolean + } + interface SymbolLinks { +>SymbolLinks : SymbolLinks + + target?: Symbol; +>target : Symbol +>Symbol : Symbol + + type?: Type; +>type : Type +>Type : Type + + declaredType?: Type; +>declaredType : Type +>Type : Type + + mapper?: TypeMapper; +>mapper : TypeMapper +>TypeMapper : TypeMapper + + referenced?: boolean; +>referenced : boolean + + exportAssignSymbol?: Symbol; +>exportAssignSymbol : Symbol +>Symbol : Symbol + + unionType?: UnionType; +>unionType : UnionType +>UnionType : UnionType + } + interface TransientSymbol extends Symbol, SymbolLinks { +>TransientSymbol : TransientSymbol +>Symbol : Symbol +>SymbolLinks : SymbolLinks + } + interface SymbolTable { +>SymbolTable : SymbolTable + + [index: string]: Symbol; +>index : string +>Symbol : Symbol + } + const enum NodeCheckFlags { +>NodeCheckFlags : NodeCheckFlags + + TypeChecked = 1, +>TypeChecked : NodeCheckFlags + + LexicalThis = 2, +>LexicalThis : NodeCheckFlags + + CaptureThis = 4, +>CaptureThis : NodeCheckFlags + + EmitExtends = 8, +>EmitExtends : NodeCheckFlags + + SuperInstance = 16, +>SuperInstance : NodeCheckFlags + + SuperStatic = 32, +>SuperStatic : NodeCheckFlags + + ContextChecked = 64, +>ContextChecked : NodeCheckFlags + + EnumValuesComputed = 128, +>EnumValuesComputed : NodeCheckFlags + } + interface NodeLinks { +>NodeLinks : NodeLinks + + resolvedType?: Type; +>resolvedType : Type +>Type : Type + + resolvedSignature?: Signature; +>resolvedSignature : Signature +>Signature : Signature + + resolvedSymbol?: Symbol; +>resolvedSymbol : Symbol +>Symbol : Symbol + + flags?: NodeCheckFlags; +>flags : NodeCheckFlags +>NodeCheckFlags : NodeCheckFlags + + enumMemberValue?: number; +>enumMemberValue : number + + isIllegalTypeReferenceInConstraint?: boolean; +>isIllegalTypeReferenceInConstraint : boolean + + isVisible?: boolean; +>isVisible : boolean + + localModuleName?: string; +>localModuleName : string + + assignmentChecks?: Map; +>assignmentChecks : Map +>Map : Map + } + const enum TypeFlags { +>TypeFlags : TypeFlags + + Any = 1, +>Any : TypeFlags + + String = 2, +>String : TypeFlags + + Number = 4, +>Number : TypeFlags + + Boolean = 8, +>Boolean : TypeFlags + + Void = 16, +>Void : TypeFlags + + Undefined = 32, +>Undefined : TypeFlags + + Null = 64, +>Null : TypeFlags + + Enum = 128, +>Enum : TypeFlags + + StringLiteral = 256, +>StringLiteral : TypeFlags + + TypeParameter = 512, +>TypeParameter : TypeFlags + + Class = 1024, +>Class : TypeFlags + + Interface = 2048, +>Interface : TypeFlags + + Reference = 4096, +>Reference : TypeFlags + + Tuple = 8192, +>Tuple : TypeFlags + + Union = 16384, +>Union : TypeFlags + + Anonymous = 32768, +>Anonymous : TypeFlags + + FromSignature = 65536, +>FromSignature : TypeFlags + + Intrinsic = 127, +>Intrinsic : TypeFlags + + StringLike = 258, +>StringLike : TypeFlags + + NumberLike = 132, +>NumberLike : TypeFlags + + ObjectType = 48128, +>ObjectType : TypeFlags + + Structured = 65025, +>Structured : TypeFlags + } + interface Type { +>Type : Type + + flags: TypeFlags; +>flags : TypeFlags +>TypeFlags : TypeFlags + + id: number; +>id : number + + symbol?: Symbol; +>symbol : Symbol +>Symbol : Symbol + } + interface IntrinsicType extends Type { +>IntrinsicType : IntrinsicType +>Type : Type + + intrinsicName: string; +>intrinsicName : string + } + interface StringLiteralType extends Type { +>StringLiteralType : StringLiteralType +>Type : Type + + text: string; +>text : string + } + interface ObjectType extends Type { +>ObjectType : ObjectType +>Type : Type + } + interface InterfaceType extends ObjectType { +>InterfaceType : InterfaceType +>ObjectType : ObjectType + + typeParameters: TypeParameter[]; +>typeParameters : TypeParameter[] +>TypeParameter : TypeParameter + + baseTypes: ObjectType[]; +>baseTypes : ObjectType[] +>ObjectType : ObjectType + + declaredProperties: Symbol[]; +>declaredProperties : Symbol[] +>Symbol : Symbol + + declaredCallSignatures: Signature[]; +>declaredCallSignatures : Signature[] +>Signature : Signature + + declaredConstructSignatures: Signature[]; +>declaredConstructSignatures : Signature[] +>Signature : Signature + + declaredStringIndexType: Type; +>declaredStringIndexType : Type +>Type : Type + + declaredNumberIndexType: Type; +>declaredNumberIndexType : Type +>Type : Type + } + interface TypeReference extends ObjectType { +>TypeReference : TypeReference +>ObjectType : ObjectType + + target: GenericType; +>target : GenericType +>GenericType : GenericType + + typeArguments: Type[]; +>typeArguments : Type[] +>Type : Type + } + interface GenericType extends InterfaceType, TypeReference { +>GenericType : GenericType +>InterfaceType : InterfaceType +>TypeReference : TypeReference + + instantiations: Map; +>instantiations : Map +>Map : Map +>TypeReference : TypeReference + + openReferenceTargets: GenericType[]; +>openReferenceTargets : GenericType[] +>GenericType : GenericType + + openReferenceChecks: Map; +>openReferenceChecks : Map +>Map : Map + } + interface TupleType extends ObjectType { +>TupleType : TupleType +>ObjectType : ObjectType + + elementTypes: Type[]; +>elementTypes : Type[] +>Type : Type + + baseArrayType: TypeReference; +>baseArrayType : TypeReference +>TypeReference : TypeReference + } + interface UnionType extends Type { +>UnionType : UnionType +>Type : Type + + types: Type[]; +>types : Type[] +>Type : Type + + resolvedProperties: SymbolTable; +>resolvedProperties : SymbolTable +>SymbolTable : SymbolTable + } + interface ResolvedType extends ObjectType, UnionType { +>ResolvedType : ResolvedType +>ObjectType : ObjectType +>UnionType : UnionType + + members: SymbolTable; +>members : SymbolTable +>SymbolTable : SymbolTable + + properties: Symbol[]; +>properties : Symbol[] +>Symbol : Symbol + + callSignatures: Signature[]; +>callSignatures : Signature[] +>Signature : Signature + + constructSignatures: Signature[]; +>constructSignatures : Signature[] +>Signature : Signature + + stringIndexType: Type; +>stringIndexType : Type +>Type : Type + + numberIndexType: Type; +>numberIndexType : Type +>Type : Type + } + interface TypeParameter extends Type { +>TypeParameter : TypeParameter +>Type : Type + + constraint: Type; +>constraint : Type +>Type : Type + + target?: TypeParameter; +>target : TypeParameter +>TypeParameter : TypeParameter + + mapper?: TypeMapper; +>mapper : TypeMapper +>TypeMapper : TypeMapper + } + const enum SignatureKind { +>SignatureKind : SignatureKind + + Call = 0, +>Call : SignatureKind + + Construct = 1, +>Construct : SignatureKind + } + interface Signature { +>Signature : Signature + + declaration: SignatureDeclaration; +>declaration : SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration + + typeParameters: TypeParameter[]; +>typeParameters : TypeParameter[] +>TypeParameter : TypeParameter + + parameters: Symbol[]; +>parameters : Symbol[] +>Symbol : Symbol + + resolvedReturnType: Type; +>resolvedReturnType : Type +>Type : Type + + minArgumentCount: number; +>minArgumentCount : number + + hasRestParameter: boolean; +>hasRestParameter : boolean + + hasStringLiterals: boolean; +>hasStringLiterals : boolean + + target?: Signature; +>target : Signature +>Signature : Signature + + mapper?: TypeMapper; +>mapper : TypeMapper +>TypeMapper : TypeMapper + + unionSignatures?: Signature[]; +>unionSignatures : Signature[] +>Signature : Signature + + erasedSignatureCache?: Signature; +>erasedSignatureCache : Signature +>Signature : Signature + + isolatedSignatureType?: ObjectType; +>isolatedSignatureType : ObjectType +>ObjectType : ObjectType + } + const enum IndexKind { +>IndexKind : IndexKind + + String = 0, +>String : IndexKind + + Number = 1, +>Number : IndexKind + } + interface TypeMapper { +>TypeMapper : TypeMapper + + (t: Type): Type; +>t : Type +>Type : Type +>Type : Type + } + interface TypeInferences { +>TypeInferences : TypeInferences + + primary: Type[]; +>primary : Type[] +>Type : Type + + secondary: Type[]; +>secondary : Type[] +>Type : Type + } + interface InferenceContext { +>InferenceContext : InferenceContext + + typeParameters: TypeParameter[]; +>typeParameters : TypeParameter[] +>TypeParameter : TypeParameter + + inferUnionTypes: boolean; +>inferUnionTypes : boolean + + inferences: TypeInferences[]; +>inferences : TypeInferences[] +>TypeInferences : TypeInferences + + inferredTypes: Type[]; +>inferredTypes : Type[] +>Type : Type + + failedTypeParameterIndex?: number; +>failedTypeParameterIndex : number + } + interface DiagnosticMessage { +>DiagnosticMessage : DiagnosticMessage + + key: string; +>key : string + + category: DiagnosticCategory; +>category : DiagnosticCategory +>DiagnosticCategory : DiagnosticCategory + + code: number; +>code : number + + isEarly?: boolean; +>isEarly : boolean + } + interface DiagnosticMessageChain { +>DiagnosticMessageChain : DiagnosticMessageChain + + messageText: string; +>messageText : string + + category: DiagnosticCategory; +>category : DiagnosticCategory +>DiagnosticCategory : DiagnosticCategory + + code: number; +>code : number + + next?: DiagnosticMessageChain; +>next : DiagnosticMessageChain +>DiagnosticMessageChain : DiagnosticMessageChain + } + interface Diagnostic { +>Diagnostic : Diagnostic + + file: SourceFile; +>file : SourceFile +>SourceFile : SourceFile + + start: number; +>start : number + + length: number; +>length : number + + messageText: string; +>messageText : string + + category: DiagnosticCategory; +>category : DiagnosticCategory +>DiagnosticCategory : DiagnosticCategory + + code: number; +>code : number + + /** + * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit + */ + isEarly?: boolean; +>isEarly : boolean + + /** + * Parse error - error produced by parser when it scanner returns a token + * that parser does not understand in its current state + * (as opposed to grammar error when parser can interpret the token but interpretation is not legal from the grammar perespective) + */ + isParseError?: boolean; +>isParseError : boolean + } + enum DiagnosticCategory { +>DiagnosticCategory : DiagnosticCategory + + Warning = 0, +>Warning : DiagnosticCategory + + Error = 1, +>Error : DiagnosticCategory + + Message = 2, +>Message : DiagnosticCategory + } + interface CompilerOptions { +>CompilerOptions : CompilerOptions + + charset?: string; +>charset : string + + codepage?: number; +>codepage : number + + declaration?: boolean; +>declaration : boolean + + diagnostics?: boolean; +>diagnostics : boolean + + emitBOM?: boolean; +>emitBOM : boolean + + help?: boolean; +>help : boolean + + locale?: string; +>locale : string + + mapRoot?: string; +>mapRoot : string + + module?: ModuleKind; +>module : ModuleKind +>ModuleKind : ModuleKind + + noEmitOnError?: boolean; +>noEmitOnError : boolean + + noErrorTruncation?: boolean; +>noErrorTruncation : boolean + + noImplicitAny?: boolean; +>noImplicitAny : boolean + + noLib?: boolean; +>noLib : boolean + + noLibCheck?: boolean; +>noLibCheck : boolean + + noResolve?: boolean; +>noResolve : boolean + + out?: string; +>out : string + + outDir?: string; +>outDir : string + + removeComments?: boolean; +>removeComments : boolean + + sourceMap?: boolean; +>sourceMap : boolean + + sourceRoot?: string; +>sourceRoot : string + + target?: ScriptTarget; +>target : ScriptTarget +>ScriptTarget : ScriptTarget + + version?: boolean; +>version : boolean + + watch?: boolean; +>watch : boolean + + preserveConstEnums?: boolean; +>preserveConstEnums : boolean + + [option: string]: string | number | boolean; +>option : string + } + const enum ModuleKind { +>ModuleKind : ModuleKind + + None = 0, +>None : ModuleKind + + CommonJS = 1, +>CommonJS : ModuleKind + + AMD = 2, +>AMD : ModuleKind + } + interface LineAndCharacter { +>LineAndCharacter : LineAndCharacter + + line: number; +>line : number + + character: number; +>character : number + } + const enum ScriptTarget { +>ScriptTarget : ScriptTarget + + ES3 = 0, +>ES3 : ScriptTarget + + ES5 = 1, +>ES5 : ScriptTarget + + ES6 = 2, +>ES6 : ScriptTarget + + Latest = 2, +>Latest : ScriptTarget + } + interface ParsedCommandLine { +>ParsedCommandLine : ParsedCommandLine + + options: CompilerOptions; +>options : CompilerOptions +>CompilerOptions : CompilerOptions + + filenames: string[]; +>filenames : string[] + + errors: Diagnostic[]; +>errors : Diagnostic[] +>Diagnostic : Diagnostic + } + interface CommandLineOption { +>CommandLineOption : CommandLineOption + + name: string; +>name : string + + type: string | Map; +>type : string | Map +>Map : Map + + shortName?: string; +>shortName : string + + description?: DiagnosticMessage; +>description : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + + paramName?: DiagnosticMessage; +>paramName : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + + error?: DiagnosticMessage; +>error : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + } + const enum CharacterCodes { +>CharacterCodes : CharacterCodes + + nullCharacter = 0, +>nullCharacter : CharacterCodes + + maxAsciiCharacter = 127, +>maxAsciiCharacter : CharacterCodes + + lineFeed = 10, +>lineFeed : CharacterCodes + + carriageReturn = 13, +>carriageReturn : CharacterCodes + + lineSeparator = 8232, +>lineSeparator : CharacterCodes + + paragraphSeparator = 8233, +>paragraphSeparator : CharacterCodes + + nextLine = 133, +>nextLine : CharacterCodes + + space = 32, +>space : CharacterCodes + + nonBreakingSpace = 160, +>nonBreakingSpace : CharacterCodes + + enQuad = 8192, +>enQuad : CharacterCodes + + emQuad = 8193, +>emQuad : CharacterCodes + + enSpace = 8194, +>enSpace : CharacterCodes + + emSpace = 8195, +>emSpace : CharacterCodes + + threePerEmSpace = 8196, +>threePerEmSpace : CharacterCodes + + fourPerEmSpace = 8197, +>fourPerEmSpace : CharacterCodes + + sixPerEmSpace = 8198, +>sixPerEmSpace : CharacterCodes + + figureSpace = 8199, +>figureSpace : CharacterCodes + + punctuationSpace = 8200, +>punctuationSpace : CharacterCodes + + thinSpace = 8201, +>thinSpace : CharacterCodes + + hairSpace = 8202, +>hairSpace : CharacterCodes + + zeroWidthSpace = 8203, +>zeroWidthSpace : CharacterCodes + + narrowNoBreakSpace = 8239, +>narrowNoBreakSpace : CharacterCodes + + ideographicSpace = 12288, +>ideographicSpace : CharacterCodes + + mathematicalSpace = 8287, +>mathematicalSpace : CharacterCodes + + ogham = 5760, +>ogham : CharacterCodes + + _ = 95, +>_ : CharacterCodes + + $ = 36, +>$ : CharacterCodes + + _0 = 48, +>_0 : CharacterCodes + + _1 = 49, +>_1 : CharacterCodes + + _2 = 50, +>_2 : CharacterCodes + + _3 = 51, +>_3 : CharacterCodes + + _4 = 52, +>_4 : CharacterCodes + + _5 = 53, +>_5 : CharacterCodes + + _6 = 54, +>_6 : CharacterCodes + + _7 = 55, +>_7 : CharacterCodes + + _8 = 56, +>_8 : CharacterCodes + + _9 = 57, +>_9 : CharacterCodes + + a = 97, +>a : CharacterCodes + + b = 98, +>b : CharacterCodes + + c = 99, +>c : CharacterCodes + + d = 100, +>d : CharacterCodes + + e = 101, +>e : CharacterCodes + + f = 102, +>f : CharacterCodes + + g = 103, +>g : CharacterCodes + + h = 104, +>h : CharacterCodes + + i = 105, +>i : CharacterCodes + + j = 106, +>j : CharacterCodes + + k = 107, +>k : CharacterCodes + + l = 108, +>l : CharacterCodes + + m = 109, +>m : CharacterCodes + + n = 110, +>n : CharacterCodes + + o = 111, +>o : CharacterCodes + + p = 112, +>p : CharacterCodes + + q = 113, +>q : CharacterCodes + + r = 114, +>r : CharacterCodes + + s = 115, +>s : CharacterCodes + + t = 116, +>t : CharacterCodes + + u = 117, +>u : CharacterCodes + + v = 118, +>v : CharacterCodes + + w = 119, +>w : CharacterCodes + + x = 120, +>x : CharacterCodes + + y = 121, +>y : CharacterCodes + + z = 122, +>z : CharacterCodes + + A = 65, +>A : CharacterCodes + + B = 66, +>B : CharacterCodes + + C = 67, +>C : CharacterCodes + + D = 68, +>D : CharacterCodes + + E = 69, +>E : CharacterCodes + + F = 70, +>F : CharacterCodes + + G = 71, +>G : CharacterCodes + + H = 72, +>H : CharacterCodes + + I = 73, +>I : CharacterCodes + + J = 74, +>J : CharacterCodes + + K = 75, +>K : CharacterCodes + + L = 76, +>L : CharacterCodes + + M = 77, +>M : CharacterCodes + + N = 78, +>N : CharacterCodes + + O = 79, +>O : CharacterCodes + + P = 80, +>P : CharacterCodes + + Q = 81, +>Q : CharacterCodes + + R = 82, +>R : CharacterCodes + + S = 83, +>S : CharacterCodes + + T = 84, +>T : CharacterCodes + + U = 85, +>U : CharacterCodes + + V = 86, +>V : CharacterCodes + + W = 87, +>W : CharacterCodes + + X = 88, +>X : CharacterCodes + + Y = 89, +>Y : CharacterCodes + + Z = 90, +>Z : CharacterCodes + + ampersand = 38, +>ampersand : CharacterCodes + + asterisk = 42, +>asterisk : CharacterCodes + + at = 64, +>at : CharacterCodes + + backslash = 92, +>backslash : CharacterCodes + + backtick = 96, +>backtick : CharacterCodes + + bar = 124, +>bar : CharacterCodes + + caret = 94, +>caret : CharacterCodes + + closeBrace = 125, +>closeBrace : CharacterCodes + + closeBracket = 93, +>closeBracket : CharacterCodes + + closeParen = 41, +>closeParen : CharacterCodes + + colon = 58, +>colon : CharacterCodes + + comma = 44, +>comma : CharacterCodes + + dot = 46, +>dot : CharacterCodes + + doubleQuote = 34, +>doubleQuote : CharacterCodes + + equals = 61, +>equals : CharacterCodes + + exclamation = 33, +>exclamation : CharacterCodes + + greaterThan = 62, +>greaterThan : CharacterCodes + + lessThan = 60, +>lessThan : CharacterCodes + + minus = 45, +>minus : CharacterCodes + + openBrace = 123, +>openBrace : CharacterCodes + + openBracket = 91, +>openBracket : CharacterCodes + + openParen = 40, +>openParen : CharacterCodes + + percent = 37, +>percent : CharacterCodes + + plus = 43, +>plus : CharacterCodes + + question = 63, +>question : CharacterCodes + + semicolon = 59, +>semicolon : CharacterCodes + + singleQuote = 39, +>singleQuote : CharacterCodes + + slash = 47, +>slash : CharacterCodes + + tilde = 126, +>tilde : CharacterCodes + + backspace = 8, +>backspace : CharacterCodes + + formFeed = 12, +>formFeed : CharacterCodes + + byteOrderMark = 65279, +>byteOrderMark : CharacterCodes + + tab = 9, +>tab : CharacterCodes + + verticalTab = 11, +>verticalTab : CharacterCodes + } + interface CancellationToken { +>CancellationToken : CancellationToken + + isCancellationRequested(): boolean; +>isCancellationRequested : () => boolean + } + interface CompilerHost { +>CompilerHost : CompilerHost + + getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; +>getSourceFile : (filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void) => SourceFile +>filename : string +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget +>onError : (message: string) => void +>message : string +>SourceFile : SourceFile + + getDefaultLibFilename(): string; +>getDefaultLibFilename : () => string + + getCancellationToken?(): CancellationToken; +>getCancellationToken : () => CancellationToken +>CancellationToken : CancellationToken + + writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; +>writeFile : (filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void) => void +>filename : string +>data : string +>writeByteOrderMark : boolean +>onError : (message: string) => void +>message : string + + getCurrentDirectory(): string; +>getCurrentDirectory : () => string + + getCanonicalFileName(fileName: string): string; +>getCanonicalFileName : (fileName: string) => string +>fileName : string + + useCaseSensitiveFileNames(): boolean; +>useCaseSensitiveFileNames : () => boolean + + getNewLine(): string; +>getNewLine : () => string + } +} +declare module ts { +>ts : typeof ts + + interface ErrorCallback { +>ErrorCallback : ErrorCallback + + (message: DiagnosticMessage): void; +>message : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + } + interface CommentCallback { +>CommentCallback : CommentCallback + + (pos: number, end: number): void; +>pos : number +>end : number + } + interface Scanner { +>Scanner : Scanner + + getStartPos(): number; +>getStartPos : () => number + + getToken(): SyntaxKind; +>getToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + getTextPos(): number; +>getTextPos : () => number + + getTokenPos(): number; +>getTokenPos : () => number + + getTokenText(): string; +>getTokenText : () => string + + getTokenValue(): string; +>getTokenValue : () => string + + hasPrecedingLineBreak(): boolean; +>hasPrecedingLineBreak : () => boolean + + isIdentifier(): boolean; +>isIdentifier : () => boolean + + isReservedWord(): boolean; +>isReservedWord : () => boolean + + reScanGreaterToken(): SyntaxKind; +>reScanGreaterToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + reScanSlashToken(): SyntaxKind; +>reScanSlashToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + reScanTemplateToken(): SyntaxKind; +>reScanTemplateToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + scan(): SyntaxKind; +>scan : () => SyntaxKind +>SyntaxKind : SyntaxKind + + setText(text: string): void; +>setText : (text: string) => void +>text : string + + setTextPos(textPos: number): void; +>setTextPos : (textPos: number) => void +>textPos : number + + tryScan(callback: () => T): T; +>tryScan : (callback: () => T) => T +>T : T +>callback : () => T +>T : T +>T : T + } + function tokenToString(t: SyntaxKind): string; +>tokenToString : (t: SyntaxKind) => string +>t : SyntaxKind +>SyntaxKind : SyntaxKind + + function computeLineStarts(text: string): number[]; +>computeLineStarts : (text: string) => number[] +>text : string + + function getPositionFromLineAndCharacter(lineStarts: number[], line: number, character: number): number; +>getPositionFromLineAndCharacter : (lineStarts: number[], line: number, character: number) => number +>lineStarts : number[] +>line : number +>character : number + + function getLineAndCharacterOfPosition(lineStarts: number[], position: number): { +>getLineAndCharacterOfPosition : (lineStarts: number[], position: number) => { line: number; character: number; } +>lineStarts : number[] +>position : number + + line: number; +>line : number + + character: number; +>character : number + + }; + function positionToLineAndCharacter(text: string, pos: number): { +>positionToLineAndCharacter : (text: string, pos: number) => { line: number; character: number; } +>text : string +>pos : number + + line: number; +>line : number + + character: number; +>character : number + + }; + function isWhiteSpace(ch: number): boolean; +>isWhiteSpace : (ch: number) => boolean +>ch : number + + function isLineBreak(ch: number): boolean; +>isLineBreak : (ch: number) => boolean +>ch : number + + function isOctalDigit(ch: number): boolean; +>isOctalDigit : (ch: number) => boolean +>ch : number + + function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean): number; +>skipTrivia : (text: string, pos: number, stopAfterLineBreak?: boolean) => number +>text : string +>pos : number +>stopAfterLineBreak : boolean + + function getLeadingCommentRanges(text: string, pos: number): CommentRange[]; +>getLeadingCommentRanges : (text: string, pos: number) => CommentRange[] +>text : string +>pos : number +>CommentRange : CommentRange + + function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; +>getTrailingCommentRanges : (text: string, pos: number) => CommentRange[] +>text : string +>pos : number +>CommentRange : CommentRange + + function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; +>isIdentifierStart : (ch: number, languageVersion: ScriptTarget) => boolean +>ch : number +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget + + function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; +>isIdentifierPart : (ch: number, languageVersion: ScriptTarget) => boolean +>ch : number +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget + + function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback): Scanner; +>createScanner : (languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback) => Scanner +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget +>skipTrivia : boolean +>text : string +>onError : ErrorCallback +>ErrorCallback : ErrorCallback +>onComment : CommentCallback +>CommentCallback : CommentCallback +>Scanner : Scanner +} +declare module ts { +>ts : typeof ts + + interface ReferencePathMatchResult { +>ReferencePathMatchResult : ReferencePathMatchResult + + fileReference?: FileReference; +>fileReference : FileReference +>FileReference : FileReference + + diagnostic?: DiagnosticMessage; +>diagnostic : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + + isNoDefaultLib?: boolean; +>isNoDefaultLib : boolean + } + function getNodeConstructor(kind: SyntaxKind): new () => Node; +>getNodeConstructor : (kind: SyntaxKind) => new () => Node +>kind : SyntaxKind +>SyntaxKind : SyntaxKind +>Node : Node + + function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; +>forEachChild : (node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T) => T +>T : T +>node : Node +>Node : Node +>cbNode : (node: Node) => T +>node : Node +>Node : Node +>T : T +>cbNodes : (nodes: Node[]) => T +>nodes : Node[] +>Node : Node +>T : T +>T : T + + function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; +>createSourceFile : (filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean) => SourceFile +>filename : string +>sourceText : string +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget +>version : string +>isOpen : boolean +>SourceFile : SourceFile + + function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; +>createProgram : (rootNames: string[], options: CompilerOptions, host: CompilerHost) => Program +>rootNames : string[] +>options : CompilerOptions +>CompilerOptions : CompilerOptions +>host : CompilerHost +>CompilerHost : CompilerHost +>Program : Program +} +declare module ts { +>ts : typeof ts + + function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; +>createTypeChecker : (program: Program, fullTypeCheck: boolean) => TypeChecker +>program : Program +>Program : Program +>fullTypeCheck : boolean +>TypeChecker : TypeChecker +} +declare module ts { +>ts : typeof ts + + interface Node { +>Node : Node + + getSourceFile(): SourceFile; +>getSourceFile : () => SourceFile +>SourceFile : SourceFile + + getChildCount(sourceFile?: SourceFile): number; +>getChildCount : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getChildAt(index: number, sourceFile?: SourceFile): Node; +>getChildAt : (index: number, sourceFile?: SourceFile) => Node +>index : number +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + + getChildren(sourceFile?: SourceFile): Node[]; +>getChildren : (sourceFile?: SourceFile) => Node[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + + getStart(sourceFile?: SourceFile): number; +>getStart : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFullStart(): number; +>getFullStart : () => number + + getEnd(): number; +>getEnd : () => number + + getWidth(sourceFile?: SourceFile): number; +>getWidth : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFullWidth(): number; +>getFullWidth : () => number + + getLeadingTriviaWidth(sourceFile?: SourceFile): number; +>getLeadingTriviaWidth : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFullText(sourceFile?: SourceFile): string; +>getFullText : (sourceFile?: SourceFile) => string +>sourceFile : SourceFile +>SourceFile : SourceFile + + getText(sourceFile?: SourceFile): string; +>getText : (sourceFile?: SourceFile) => string +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFirstToken(sourceFile?: SourceFile): Node; +>getFirstToken : (sourceFile?: SourceFile) => Node +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + + getLastToken(sourceFile?: SourceFile): Node; +>getLastToken : (sourceFile?: SourceFile) => Node +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + } + interface Symbol { +>Symbol : Symbol + + getFlags(): SymbolFlags; +>getFlags : () => SymbolFlags +>SymbolFlags : SymbolFlags + + getName(): string; +>getName : () => string + + getDeclarations(): Declaration[]; +>getDeclarations : () => Declaration[] +>Declaration : Declaration + + getDocumentationComment(): SymbolDisplayPart[]; +>getDocumentationComment : () => SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface Type { +>Type : Type + + getFlags(): TypeFlags; +>getFlags : () => TypeFlags +>TypeFlags : TypeFlags + + getSymbol(): Symbol; +>getSymbol : () => Symbol +>Symbol : Symbol + + getProperties(): Symbol[]; +>getProperties : () => Symbol[] +>Symbol : Symbol + + getProperty(propertyName: string): Symbol; +>getProperty : (propertyName: string) => Symbol +>propertyName : string +>Symbol : Symbol + + getApparentProperties(): Symbol[]; +>getApparentProperties : () => Symbol[] +>Symbol : Symbol + + getCallSignatures(): Signature[]; +>getCallSignatures : () => Signature[] +>Signature : Signature + + getConstructSignatures(): Signature[]; +>getConstructSignatures : () => Signature[] +>Signature : Signature + + getStringIndexType(): Type; +>getStringIndexType : () => Type +>Type : Type + + getNumberIndexType(): Type; +>getNumberIndexType : () => Type +>Type : Type + } + interface Signature { +>Signature : Signature + + getDeclaration(): SignatureDeclaration; +>getDeclaration : () => SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration + + getTypeParameters(): Type[]; +>getTypeParameters : () => Type[] +>Type : Type + + getParameters(): Symbol[]; +>getParameters : () => Symbol[] +>Symbol : Symbol + + getReturnType(): Type; +>getReturnType : () => Type +>Type : Type + + getDocumentationComment(): SymbolDisplayPart[]; +>getDocumentationComment : () => SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface SourceFile { +>SourceFile : SourceFile + + getScriptSnapshot(): IScriptSnapshot; +>getScriptSnapshot : () => IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot + + getNamedDeclarations(): Declaration[]; +>getNamedDeclarations : () => Declaration[] +>Declaration : Declaration + + update(scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; +>update : (scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange) => SourceFile +>scriptSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>version : string +>isOpen : boolean +>textChangeRange : TextChangeRange +>TextChangeRange : TextChangeRange +>SourceFile : SourceFile + } + /** + * Represents an immutable snapshot of a script at a specified time.Once acquired, the + * snapshot is observably immutable. i.e. the same calls with the same parameters will return + * the same values. + */ + interface IScriptSnapshot { +>IScriptSnapshot : IScriptSnapshot + + /** Gets a portion of the script snapshot specified by [start, end). */ + getText(start: number, end: number): string; +>getText : (start: number, end: number) => string +>start : number +>end : number + + /** Gets the length of this script snapshot. */ + getLength(): number; +>getLength : () => number + + /** + * This call returns the array containing the start position of every line. + * i.e."[0, 10, 55]". TODO: consider making this optional. The language service could + * always determine this (albeit in a more expensive manner). + */ + getLineStartPositions(): number[]; +>getLineStartPositions : () => number[] + + /** + * Gets the TextChangeRange that describe how the text changed between this text and + * an older version. This information is used by the incremental parser to determine + * what sections of the script need to be re-parsed. 'undefined' can be returned if the + * change range cannot be determined. However, in that case, incremental parsing will + * not happen and the entire document will be re - parsed. + */ + getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; +>getChangeRange : (oldSnapshot: IScriptSnapshot) => TextChangeRange +>oldSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>TextChangeRange : TextChangeRange + } + module ScriptSnapshot { +>ScriptSnapshot : typeof ScriptSnapshot + + function fromString(text: string): IScriptSnapshot; +>fromString : (text: string) => IScriptSnapshot +>text : string +>IScriptSnapshot : IScriptSnapshot + } + interface PreProcessedFileInfo { +>PreProcessedFileInfo : PreProcessedFileInfo + + referencedFiles: FileReference[]; +>referencedFiles : FileReference[] +>FileReference : FileReference + + importedFiles: FileReference[]; +>importedFiles : FileReference[] +>FileReference : FileReference + + isLibFile: boolean; +>isLibFile : boolean + } + interface Logger { +>Logger : Logger + + log(s: string): void; +>log : (s: string) => void +>s : string + } + interface LanguageServiceHost extends Logger { +>LanguageServiceHost : LanguageServiceHost +>Logger : Logger + + getCompilationSettings(): CompilerOptions; +>getCompilationSettings : () => CompilerOptions +>CompilerOptions : CompilerOptions + + getScriptFileNames(): string[]; +>getScriptFileNames : () => string[] + + getScriptVersion(fileName: string): string; +>getScriptVersion : (fileName: string) => string +>fileName : string + + getScriptIsOpen(fileName: string): boolean; +>getScriptIsOpen : (fileName: string) => boolean +>fileName : string + + getScriptSnapshot(fileName: string): IScriptSnapshot; +>getScriptSnapshot : (fileName: string) => IScriptSnapshot +>fileName : string +>IScriptSnapshot : IScriptSnapshot + + getLocalizedDiagnosticMessages(): any; +>getLocalizedDiagnosticMessages : () => any + + getCancellationToken(): CancellationToken; +>getCancellationToken : () => CancellationToken +>CancellationToken : CancellationToken + + getCurrentDirectory(): string; +>getCurrentDirectory : () => string + + getDefaultLibFilename(): string; +>getDefaultLibFilename : () => string + } + interface LanguageService { +>LanguageService : LanguageService + + cleanupSemanticCache(): void; +>cleanupSemanticCache : () => void + + getSyntacticDiagnostics(fileName: string): Diagnostic[]; +>getSyntacticDiagnostics : (fileName: string) => Diagnostic[] +>fileName : string +>Diagnostic : Diagnostic + + getSemanticDiagnostics(fileName: string): Diagnostic[]; +>getSemanticDiagnostics : (fileName: string) => Diagnostic[] +>fileName : string +>Diagnostic : Diagnostic + + getCompilerOptionsDiagnostics(): Diagnostic[]; +>getCompilerOptionsDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; +>getSyntacticClassifications : (fileName: string, span: TextSpan) => ClassifiedSpan[] +>fileName : string +>span : TextSpan +>TextSpan : TextSpan +>ClassifiedSpan : ClassifiedSpan + + getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; +>getSemanticClassifications : (fileName: string, span: TextSpan) => ClassifiedSpan[] +>fileName : string +>span : TextSpan +>TextSpan : TextSpan +>ClassifiedSpan : ClassifiedSpan + + getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): CompletionInfo; +>getCompletionsAtPosition : (fileName: string, position: number, isMemberCompletion: boolean) => CompletionInfo +>fileName : string +>position : number +>isMemberCompletion : boolean +>CompletionInfo : CompletionInfo + + getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; +>getCompletionEntryDetails : (fileName: string, position: number, entryName: string) => CompletionEntryDetails +>fileName : string +>position : number +>entryName : string +>CompletionEntryDetails : CompletionEntryDetails + + getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; +>getQuickInfoAtPosition : (fileName: string, position: number) => QuickInfo +>fileName : string +>position : number +>QuickInfo : QuickInfo + + getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; +>getNameOrDottedNameSpan : (fileName: string, startPos: number, endPos: number) => TextSpan +>fileName : string +>startPos : number +>endPos : number +>TextSpan : TextSpan + + getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan; +>getBreakpointStatementAtPosition : (fileName: string, position: number) => TextSpan +>fileName : string +>position : number +>TextSpan : TextSpan + + getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems; +>getSignatureHelpItems : (fileName: string, position: number) => SignatureHelpItems +>fileName : string +>position : number +>SignatureHelpItems : SignatureHelpItems + + getRenameInfo(fileName: string, position: number): RenameInfo; +>getRenameInfo : (fileName: string, position: number) => RenameInfo +>fileName : string +>position : number +>RenameInfo : RenameInfo + + findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[]; +>findRenameLocations : (fileName: string, position: number, findInStrings: boolean, findInComments: boolean) => RenameLocation[] +>fileName : string +>position : number +>findInStrings : boolean +>findInComments : boolean +>RenameLocation : RenameLocation + + getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; +>getDefinitionAtPosition : (fileName: string, position: number) => DefinitionInfo[] +>fileName : string +>position : number +>DefinitionInfo : DefinitionInfo + + getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; +>getReferencesAtPosition : (fileName: string, position: number) => ReferenceEntry[] +>fileName : string +>position : number +>ReferenceEntry : ReferenceEntry + + getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; +>getOccurrencesAtPosition : (fileName: string, position: number) => ReferenceEntry[] +>fileName : string +>position : number +>ReferenceEntry : ReferenceEntry + + getNavigateToItems(searchValue: string): NavigateToItem[]; +>getNavigateToItems : (searchValue: string) => NavigateToItem[] +>searchValue : string +>NavigateToItem : NavigateToItem + + getNavigationBarItems(fileName: string): NavigationBarItem[]; +>getNavigationBarItems : (fileName: string) => NavigationBarItem[] +>fileName : string +>NavigationBarItem : NavigationBarItem + + getOutliningSpans(fileName: string): OutliningSpan[]; +>getOutliningSpans : (fileName: string) => OutliningSpan[] +>fileName : string +>OutliningSpan : OutliningSpan + + getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; +>getTodoComments : (fileName: string, descriptors: TodoCommentDescriptor[]) => TodoComment[] +>fileName : string +>descriptors : TodoCommentDescriptor[] +>TodoCommentDescriptor : TodoCommentDescriptor +>TodoComment : TodoComment + + getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; +>getBraceMatchingAtPosition : (fileName: string, position: number) => TextSpan[] +>fileName : string +>position : number +>TextSpan : TextSpan + + getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number; +>getIndentationAtPosition : (fileName: string, position: number, options: EditorOptions) => number +>fileName : string +>position : number +>options : EditorOptions +>EditorOptions : EditorOptions + + getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[]; +>getFormattingEditsForRange : (fileName: string, start: number, end: number, options: FormatCodeOptions) => TextChange[] +>fileName : string +>start : number +>end : number +>options : FormatCodeOptions +>FormatCodeOptions : FormatCodeOptions +>TextChange : TextChange + + getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; +>getFormattingEditsForDocument : (fileName: string, options: FormatCodeOptions) => TextChange[] +>fileName : string +>options : FormatCodeOptions +>FormatCodeOptions : FormatCodeOptions +>TextChange : TextChange + + getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[]; +>getFormattingEditsAfterKeystroke : (fileName: string, position: number, key: string, options: FormatCodeOptions) => TextChange[] +>fileName : string +>position : number +>key : string +>options : FormatCodeOptions +>FormatCodeOptions : FormatCodeOptions +>TextChange : TextChange + + getEmitOutput(fileName: string): EmitOutput; +>getEmitOutput : (fileName: string) => EmitOutput +>fileName : string +>EmitOutput : EmitOutput + + getSourceFile(filename: string): SourceFile; +>getSourceFile : (filename: string) => SourceFile +>filename : string +>SourceFile : SourceFile + + dispose(): void; +>dispose : () => void + } + class TextSpan { +>TextSpan : TextSpan + + private _start; +>_start : any + + private _length; +>_length : any + + /** + * Creates a TextSpan instance beginning with the position Start and having the Length + * specified with length. + */ + constructor(start: number, length: number); +>start : number +>length : number + + toJSON(key: any): any; +>toJSON : (key: any) => any +>key : any + + start(): number; +>start : () => number + + length(): number; +>length : () => number + + end(): number; +>end : () => number + + isEmpty(): boolean; +>isEmpty : () => boolean + + /** + * Determines whether the position lies within the span. Returns true if the position is greater than or equal to Start and strictly less + * than End, otherwise false. + * @param position The position to check. + */ + containsPosition(position: number): boolean; +>containsPosition : (position: number) => boolean +>position : number + + /** + * Determines whether span falls completely within this span. Returns true if the specified span falls completely within this span, otherwise false. + * @param span The span to check. + */ + containsTextSpan(span: TextSpan): boolean; +>containsTextSpan : (span: TextSpan) => boolean +>span : TextSpan +>TextSpan : TextSpan + + /** + * Determines whether the given span overlaps this span. Two spans are considered to overlap + * if they have positions in common and neither is empty. Empty spans do not overlap with any + * other span. Returns true if the spans overlap, false otherwise. + * @param span The span to check. + */ + overlapsWith(span: TextSpan): boolean; +>overlapsWith : (span: TextSpan) => boolean +>span : TextSpan +>TextSpan : TextSpan + + /** + * Returns the overlap with the given span, or undefined if there is no overlap. + * @param span The span to check. + */ + overlap(span: TextSpan): TextSpan; +>overlap : (span: TextSpan) => TextSpan +>span : TextSpan +>TextSpan : TextSpan +>TextSpan : TextSpan + + /** + * Determines whether span intersects this span. Two spans are considered to + * intersect if they have positions in common or the end of one span + * coincides with the start of the other span. Returns true if the spans intersect, false otherwise. + * @param The span to check. + */ + intersectsWithTextSpan(span: TextSpan): boolean; +>intersectsWithTextSpan : (span: TextSpan) => boolean +>span : TextSpan +>TextSpan : TextSpan + + intersectsWith(start: number, length: number): boolean; +>intersectsWith : (start: number, length: number) => boolean +>start : number +>length : number + + /** + * Determines whether the given position intersects this span. + * A position is considered to intersect if it is between the start and + * end positions (inclusive) of this span. Returns true if the position intersects, false otherwise. + * @param position The position to check. + */ + intersectsWithPosition(position: number): boolean; +>intersectsWithPosition : (position: number) => boolean +>position : number + + /** + * Returns the intersection with the given span, or undefined if there is no intersection. + * @param span The span to check. + */ + intersection(span: TextSpan): TextSpan; +>intersection : (span: TextSpan) => TextSpan +>span : TextSpan +>TextSpan : TextSpan +>TextSpan : TextSpan + + /** + * Creates a new TextSpan from the given start and end positions + * as opposed to a position and length. + */ + static fromBounds(start: number, end: number): TextSpan; +>fromBounds : (start: number, end: number) => TextSpan +>start : number +>end : number +>TextSpan : TextSpan + } + class TextChangeRange { +>TextChangeRange : TextChangeRange + + static unchanged: TextChangeRange; +>unchanged : TextChangeRange +>TextChangeRange : TextChangeRange + + private _span; +>_span : any + + private _newLength; +>_newLength : any + + /** + * Initializes a new instance of TextChangeRange. + */ + constructor(span: TextSpan, newLength: number); +>span : TextSpan +>TextSpan : TextSpan +>newLength : number + + /** + * The span of text before the edit which is being changed + */ + span(): TextSpan; +>span : () => TextSpan +>TextSpan : TextSpan + + /** + * Width of the span after the edit. A 0 here would represent a delete + */ + newLength(): number; +>newLength : () => number + + newSpan(): TextSpan; +>newSpan : () => TextSpan +>TextSpan : TextSpan + + isUnchanged(): boolean; +>isUnchanged : () => boolean + + /** + * Called to merge all the changes that occurred across several versions of a script snapshot + * into a single change. i.e. if a user keeps making successive edits to a script we will + * have a text change from V1 to V2, V2 to V3, ..., Vn. + * + * This function will then merge those changes into a single change range valid between V1 and + * Vn. + */ + static collapseChangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; +>collapseChangesAcrossMultipleVersions : (changes: TextChangeRange[]) => TextChangeRange +>changes : TextChangeRange[] +>TextChangeRange : TextChangeRange +>TextChangeRange : TextChangeRange + } + interface ClassifiedSpan { +>ClassifiedSpan : ClassifiedSpan + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + classificationType: string; +>classificationType : string + } + interface NavigationBarItem { +>NavigationBarItem : NavigationBarItem + + text: string; +>text : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + spans: TextSpan[]; +>spans : TextSpan[] +>TextSpan : TextSpan + + childItems: NavigationBarItem[]; +>childItems : NavigationBarItem[] +>NavigationBarItem : NavigationBarItem + + indent: number; +>indent : number + + bolded: boolean; +>bolded : boolean + + grayed: boolean; +>grayed : boolean + } + interface TodoCommentDescriptor { +>TodoCommentDescriptor : TodoCommentDescriptor + + text: string; +>text : string + + priority: number; +>priority : number + } + interface TodoComment { +>TodoComment : TodoComment + + descriptor: TodoCommentDescriptor; +>descriptor : TodoCommentDescriptor +>TodoCommentDescriptor : TodoCommentDescriptor + + message: string; +>message : string + + position: number; +>position : number + } + class TextChange { +>TextChange : TextChange + + span: TextSpan; +>span : TextSpan +>TextSpan : TextSpan + + newText: string; +>newText : string + } + interface RenameLocation { +>RenameLocation : RenameLocation + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + fileName: string; +>fileName : string + } + interface ReferenceEntry { +>ReferenceEntry : ReferenceEntry + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + fileName: string; +>fileName : string + + isWriteAccess: boolean; +>isWriteAccess : boolean + } + interface NavigateToItem { +>NavigateToItem : NavigateToItem + + name: string; +>name : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + matchKind: string; +>matchKind : string + + fileName: string; +>fileName : string + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + containerName: string; +>containerName : string + + containerKind: string; +>containerKind : string + } + interface EditorOptions { +>EditorOptions : EditorOptions + + IndentSize: number; +>IndentSize : number + + TabSize: number; +>TabSize : number + + NewLineCharacter: string; +>NewLineCharacter : string + + ConvertTabsToSpaces: boolean; +>ConvertTabsToSpaces : boolean + } + interface FormatCodeOptions extends EditorOptions { +>FormatCodeOptions : FormatCodeOptions +>EditorOptions : EditorOptions + + InsertSpaceAfterCommaDelimiter: boolean; +>InsertSpaceAfterCommaDelimiter : boolean + + InsertSpaceAfterSemicolonInForStatements: boolean; +>InsertSpaceAfterSemicolonInForStatements : boolean + + InsertSpaceBeforeAndAfterBinaryOperators: boolean; +>InsertSpaceBeforeAndAfterBinaryOperators : boolean + + InsertSpaceAfterKeywordsInControlFlowStatements: boolean; +>InsertSpaceAfterKeywordsInControlFlowStatements : boolean + + InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; +>InsertSpaceAfterFunctionKeywordForAnonymousFunctions : boolean + + InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; +>InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis : boolean + + PlaceOpenBraceOnNewLineForFunctions: boolean; +>PlaceOpenBraceOnNewLineForFunctions : boolean + + PlaceOpenBraceOnNewLineForControlBlocks: boolean; +>PlaceOpenBraceOnNewLineForControlBlocks : boolean + } + interface DefinitionInfo { +>DefinitionInfo : DefinitionInfo + + fileName: string; +>fileName : string + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + kind: string; +>kind : string + + name: string; +>name : string + + containerKind: string; +>containerKind : string + + containerName: string; +>containerName : string + } + enum SymbolDisplayPartKind { +>SymbolDisplayPartKind : SymbolDisplayPartKind + + aliasName = 0, +>aliasName : SymbolDisplayPartKind + + className = 1, +>className : SymbolDisplayPartKind + + enumName = 2, +>enumName : SymbolDisplayPartKind + + fieldName = 3, +>fieldName : SymbolDisplayPartKind + + interfaceName = 4, +>interfaceName : SymbolDisplayPartKind + + keyword = 5, +>keyword : SymbolDisplayPartKind + + lineBreak = 6, +>lineBreak : SymbolDisplayPartKind + + numericLiteral = 7, +>numericLiteral : SymbolDisplayPartKind + + stringLiteral = 8, +>stringLiteral : SymbolDisplayPartKind + + localName = 9, +>localName : SymbolDisplayPartKind + + methodName = 10, +>methodName : SymbolDisplayPartKind + + moduleName = 11, +>moduleName : SymbolDisplayPartKind + + operator = 12, +>operator : SymbolDisplayPartKind + + parameterName = 13, +>parameterName : SymbolDisplayPartKind + + propertyName = 14, +>propertyName : SymbolDisplayPartKind + + punctuation = 15, +>punctuation : SymbolDisplayPartKind + + space = 16, +>space : SymbolDisplayPartKind + + text = 17, +>text : SymbolDisplayPartKind + + typeParameterName = 18, +>typeParameterName : SymbolDisplayPartKind + + enumMemberName = 19, +>enumMemberName : SymbolDisplayPartKind + + functionName = 20, +>functionName : SymbolDisplayPartKind + + regularExpressionLiteral = 21, +>regularExpressionLiteral : SymbolDisplayPartKind + } + interface SymbolDisplayPart { +>SymbolDisplayPart : SymbolDisplayPart + + text: string; +>text : string + + kind: string; +>kind : string + } + interface QuickInfo { +>QuickInfo : QuickInfo + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + displayParts: SymbolDisplayPart[]; +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface RenameInfo { +>RenameInfo : RenameInfo + + canRename: boolean; +>canRename : boolean + + localizedErrorMessage: string; +>localizedErrorMessage : string + + displayName: string; +>displayName : string + + fullDisplayName: string; +>fullDisplayName : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + triggerSpan: TextSpan; +>triggerSpan : TextSpan +>TextSpan : TextSpan + } + interface SignatureHelpParameter { +>SignatureHelpParameter : SignatureHelpParameter + + name: string; +>name : string + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + displayParts: SymbolDisplayPart[]; +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + isOptional: boolean; +>isOptional : boolean + } + /** + * Represents a single signature to show in signature help. + * The id is used for subsequent calls into the language service to ask questions about the + * signature help item in the context of any documents that have been updated. i.e. after + * an edit has happened, while signature help is still active, the host can ask important + * questions like 'what parameter is the user currently contained within?'. + */ + interface SignatureHelpItem { +>SignatureHelpItem : SignatureHelpItem + + isVariadic: boolean; +>isVariadic : boolean + + prefixDisplayParts: SymbolDisplayPart[]; +>prefixDisplayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + suffixDisplayParts: SymbolDisplayPart[]; +>suffixDisplayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + separatorDisplayParts: SymbolDisplayPart[]; +>separatorDisplayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + parameters: SignatureHelpParameter[]; +>parameters : SignatureHelpParameter[] +>SignatureHelpParameter : SignatureHelpParameter + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + /** + * Represents a set of signature help items, and the preferred item that should be selected. + */ + interface SignatureHelpItems { +>SignatureHelpItems : SignatureHelpItems + + items: SignatureHelpItem[]; +>items : SignatureHelpItem[] +>SignatureHelpItem : SignatureHelpItem + + applicableSpan: TextSpan; +>applicableSpan : TextSpan +>TextSpan : TextSpan + + selectedItemIndex: number; +>selectedItemIndex : number + + argumentIndex: number; +>argumentIndex : number + + argumentCount: number; +>argumentCount : number + } + interface CompletionInfo { +>CompletionInfo : CompletionInfo + + isMemberCompletion: boolean; +>isMemberCompletion : boolean + + entries: CompletionEntry[]; +>entries : CompletionEntry[] +>CompletionEntry : CompletionEntry + } + interface CompletionEntry { +>CompletionEntry : CompletionEntry + + name: string; +>name : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + } + interface CompletionEntryDetails { +>CompletionEntryDetails : CompletionEntryDetails + + name: string; +>name : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + displayParts: SymbolDisplayPart[]; +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface OutliningSpan { +>OutliningSpan : OutliningSpan + + /** The span of the document to actually collapse. */ + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + /** The span of the document to display when the user hovers over the collapsed span. */ + hintSpan: TextSpan; +>hintSpan : TextSpan +>TextSpan : TextSpan + + /** The text to display in the editor for the collapsed region. */ + bannerText: string; +>bannerText : string + + /** + * Whether or not this region should be automatically collapsed when + * the 'Collapse to Definitions' command is invoked. + */ + autoCollapse: boolean; +>autoCollapse : boolean + } + interface EmitOutput { +>EmitOutput : EmitOutput + + outputFiles: OutputFile[]; +>outputFiles : OutputFile[] +>OutputFile : OutputFile + + emitOutputStatus: EmitReturnStatus; +>emitOutputStatus : EmitReturnStatus +>EmitReturnStatus : EmitReturnStatus + } + const enum OutputFileType { +>OutputFileType : OutputFileType + + JavaScript = 0, +>JavaScript : OutputFileType + + SourceMap = 1, +>SourceMap : OutputFileType + + Declaration = 2, +>Declaration : OutputFileType + } + interface OutputFile { +>OutputFile : OutputFile + + name: string; +>name : string + + writeByteOrderMark: boolean; +>writeByteOrderMark : boolean + + text: string; +>text : string + } + const enum EndOfLineState { +>EndOfLineState : EndOfLineState + + Start = 0, +>Start : EndOfLineState + + InMultiLineCommentTrivia = 1, +>InMultiLineCommentTrivia : EndOfLineState + + InSingleQuoteStringLiteral = 2, +>InSingleQuoteStringLiteral : EndOfLineState + + InDoubleQuoteStringLiteral = 3, +>InDoubleQuoteStringLiteral : EndOfLineState + } + enum TokenClass { +>TokenClass : TokenClass + + Punctuation = 0, +>Punctuation : TokenClass + + Keyword = 1, +>Keyword : TokenClass + + Operator = 2, +>Operator : TokenClass + + Comment = 3, +>Comment : TokenClass + + Whitespace = 4, +>Whitespace : TokenClass + + Identifier = 5, +>Identifier : TokenClass + + NumberLiteral = 6, +>NumberLiteral : TokenClass + + StringLiteral = 7, +>StringLiteral : TokenClass + + RegExpLiteral = 8, +>RegExpLiteral : TokenClass + } + interface ClassificationResult { +>ClassificationResult : ClassificationResult + + finalLexState: EndOfLineState; +>finalLexState : EndOfLineState +>EndOfLineState : EndOfLineState + + entries: ClassificationInfo[]; +>entries : ClassificationInfo[] +>ClassificationInfo : ClassificationInfo + } + interface ClassificationInfo { +>ClassificationInfo : ClassificationInfo + + length: number; +>length : number + + classification: TokenClass; +>classification : TokenClass +>TokenClass : TokenClass + } + interface Classifier { +>Classifier : Classifier + + getClassificationsForLine(text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean): ClassificationResult; +>getClassificationsForLine : (text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean) => ClassificationResult +>text : string +>lexState : EndOfLineState +>EndOfLineState : EndOfLineState +>classifyKeywordsInGenerics : boolean +>ClassificationResult : ClassificationResult + } + interface DocumentRegistry { +>DocumentRegistry : DocumentRegistry + + acquireDocument(filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean): SourceFile; +>acquireDocument : (filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean) => SourceFile +>filename : string +>compilationSettings : CompilerOptions +>CompilerOptions : CompilerOptions +>scriptSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>version : string +>isOpen : boolean +>SourceFile : SourceFile + + updateDocument(sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; +>updateDocument : (sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange) => SourceFile +>sourceFile : SourceFile +>SourceFile : SourceFile +>filename : string +>compilationSettings : CompilerOptions +>CompilerOptions : CompilerOptions +>scriptSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>version : string +>isOpen : boolean +>textChangeRange : TextChangeRange +>TextChangeRange : TextChangeRange +>SourceFile : SourceFile + + releaseDocument(filename: string, compilationSettings: CompilerOptions): void; +>releaseDocument : (filename: string, compilationSettings: CompilerOptions) => void +>filename : string +>compilationSettings : CompilerOptions +>CompilerOptions : CompilerOptions + } + class ScriptElementKind { +>ScriptElementKind : ScriptElementKind + + static unknown: string; +>unknown : string + + static keyword: string; +>keyword : string + + static scriptElement: string; +>scriptElement : string + + static moduleElement: string; +>moduleElement : string + + static classElement: string; +>classElement : string + + static interfaceElement: string; +>interfaceElement : string + + static typeElement: string; +>typeElement : string + + static enumElement: string; +>enumElement : string + + static variableElement: string; +>variableElement : string + + static localVariableElement: string; +>localVariableElement : string + + static functionElement: string; +>functionElement : string + + static localFunctionElement: string; +>localFunctionElement : string + + static memberFunctionElement: string; +>memberFunctionElement : string + + static memberGetAccessorElement: string; +>memberGetAccessorElement : string + + static memberSetAccessorElement: string; +>memberSetAccessorElement : string + + static memberVariableElement: string; +>memberVariableElement : string + + static constructorImplementationElement: string; +>constructorImplementationElement : string + + static callSignatureElement: string; +>callSignatureElement : string + + static indexSignatureElement: string; +>indexSignatureElement : string + + static constructSignatureElement: string; +>constructSignatureElement : string + + static parameterElement: string; +>parameterElement : string + + static typeParameterElement: string; +>typeParameterElement : string + + static primitiveType: string; +>primitiveType : string + + static label: string; +>label : string + + static alias: string; +>alias : string + + static constElement: string; +>constElement : string + + static letElement: string; +>letElement : string + } + class ScriptElementKindModifier { +>ScriptElementKindModifier : ScriptElementKindModifier + + static none: string; +>none : string + + static publicMemberModifier: string; +>publicMemberModifier : string + + static privateMemberModifier: string; +>privateMemberModifier : string + + static protectedMemberModifier: string; +>protectedMemberModifier : string + + static exportedModifier: string; +>exportedModifier : string + + static ambientModifier: string; +>ambientModifier : string + + static staticModifier: string; +>staticModifier : string + } + class ClassificationTypeNames { +>ClassificationTypeNames : ClassificationTypeNames + + static comment: string; +>comment : string + + static identifier: string; +>identifier : string + + static keyword: string; +>keyword : string + + static numericLiteral: string; +>numericLiteral : string + + static operator: string; +>operator : string + + static stringLiteral: string; +>stringLiteral : string + + static whiteSpace: string; +>whiteSpace : string + + static text: string; +>text : string + + static punctuation: string; +>punctuation : string + + static className: string; +>className : string + + static enumName: string; +>enumName : string + + static interfaceName: string; +>interfaceName : string + + static moduleName: string; +>moduleName : string + + static typeParameterName: string; +>typeParameterName : string + } + function displayPartsToString(displayParts: SymbolDisplayPart[]): string; +>displayPartsToString : (displayParts: SymbolDisplayPart[]) => string +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + interface DisplayPartsSymbolWriter extends SymbolWriter { +>DisplayPartsSymbolWriter : DisplayPartsSymbolWriter +>SymbolWriter : SymbolWriter + + displayParts(): SymbolDisplayPart[]; +>displayParts : () => SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + function getDefaultCompilerOptions(): CompilerOptions; +>getDefaultCompilerOptions : () => CompilerOptions +>CompilerOptions : CompilerOptions + + class OperationCanceledException { +>OperationCanceledException : OperationCanceledException + } + class CancellationTokenObject { +>CancellationTokenObject : CancellationTokenObject + + private cancellationToken; +>cancellationToken : any + + static None: CancellationTokenObject; +>None : CancellationTokenObject +>CancellationTokenObject : CancellationTokenObject + + constructor(cancellationToken: CancellationToken); +>cancellationToken : CancellationToken +>CancellationToken : CancellationToken + + isCancellationRequested(): boolean; +>isCancellationRequested : () => boolean + + throwIfCancellationRequested(): void; +>throwIfCancellationRequested : () => void + } + function createDocumentRegistry(): DocumentRegistry; +>createDocumentRegistry : () => DocumentRegistry +>DocumentRegistry : DocumentRegistry + + function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; +>preProcessFile : (sourceText: string, readImportFiles?: boolean) => PreProcessedFileInfo +>sourceText : string +>readImportFiles : boolean +>PreProcessedFileInfo : PreProcessedFileInfo + + function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry): LanguageService; +>createLanguageService : (host: LanguageServiceHost, documentRegistry: DocumentRegistry) => LanguageService +>host : LanguageServiceHost +>LanguageServiceHost : LanguageServiceHost +>documentRegistry : DocumentRegistry +>DocumentRegistry : DocumentRegistry +>LanguageService : LanguageService + + function createClassifier(host: Logger): Classifier; +>createClassifier : (host: Logger) => Classifier +>host : Logger +>Logger : Logger +>Classifier : Classifier +} + diff --git a/tests/cases/compiler/APISample_node_compile.ts b/tests/cases/compiler/APISample_node_compile.ts new file mode 100644 index 00000000000..b138ce2b44c --- /dev/null +++ b/tests/cases/compiler/APISample_node_compile.ts @@ -0,0 +1,11 @@ +// @includeBuiltFile: typescript.d.ts +// @noImplicitAny: true +// @target: ES3 +// @module: CommonJs +// @noresolve: true + +import ts = require("typescript"); + +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); + +var program = ts.createProgram(["file1.ts"], {}, undefined); \ No newline at end of file diff --git a/tests/cases/compiler/APISample_standalone_compile.ts b/tests/cases/compiler/APISample_standalone_compile.ts new file mode 100644 index 00000000000..049aae5523f --- /dev/null +++ b/tests/cases/compiler/APISample_standalone_compile.ts @@ -0,0 +1,7 @@ +// @includeBuiltFile: typescriptServices.d.ts +// @noImplicitAny: true +// @target: ES3 + +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); + +var program = ts.createProgram(["file1.ts"], {}, undefined); \ No newline at end of file From 77d5d40d2047de51bd50e21aff7774b42c1778f3 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 10 Dec 2014 16:57:02 -0800 Subject: [PATCH 120/141] Fixed up baselines. --- .../reference/APISample_node_compile.js | 321 +++++----- .../reference/APISample_node_compile.types | 583 ++++++++++-------- .../reference/APISample_standalone_compile.js | 310 +++++----- .../APISample_standalone_compile.types | 562 ++++++++++------- 4 files changed, 1011 insertions(+), 765 deletions(-) diff --git a/tests/baselines/reference/APISample_node_compile.js b/tests/baselines/reference/APISample_node_compile.js index 2329e7be57c..6807d97db84 100644 --- a/tests/baselines/reference/APISample_node_compile.js +++ b/tests/baselines/reference/APISample_node_compile.js @@ -23,7 +23,7 @@ See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ -declare module ts { +declare module "typescript" { interface Map { [index: string]: T; } @@ -152,92 +152,91 @@ declare module ts { SetKeyword = 117, StringKeyword = 118, TypeKeyword = 119, - Missing = 120, - QualifiedName = 121, - ComputedPropertyName = 122, - TypeParameter = 123, - Parameter = 124, - Property = 125, - Method = 126, - Constructor = 127, - GetAccessor = 128, - SetAccessor = 129, - CallSignature = 130, - ConstructSignature = 131, - IndexSignature = 132, - TypeReference = 133, - FunctionType = 134, - ConstructorType = 135, - TypeQuery = 136, - TypeLiteral = 137, - ArrayType = 138, - TupleType = 139, - UnionType = 140, - ParenthesizedType = 141, - ArrayLiteralExpression = 142, - ObjectLiteralExpression = 143, - PropertyAccessExpression = 144, - ElementAccessExpression = 145, - CallExpression = 146, - NewExpression = 147, - TaggedTemplateExpression = 148, - TypeAssertionExpression = 149, - ParenthesizedExpression = 150, - FunctionExpression = 151, - ArrowFunction = 152, - DeleteExpression = 153, - TypeOfExpression = 154, - VoidExpression = 155, - PrefixUnaryExpression = 156, - PostfixUnaryExpression = 157, - BinaryExpression = 158, - ConditionalExpression = 159, - TemplateExpression = 160, - YieldExpression = 161, - OmittedExpression = 162, - TemplateSpan = 163, - Block = 164, - VariableStatement = 165, - EmptyStatement = 166, - ExpressionStatement = 167, - IfStatement = 168, - DoStatement = 169, - WhileStatement = 170, - ForStatement = 171, - ForInStatement = 172, - ContinueStatement = 173, - BreakStatement = 174, - ReturnStatement = 175, - WithStatement = 176, - SwitchStatement = 177, - LabeledStatement = 178, - ThrowStatement = 179, - TryStatement = 180, - TryBlock = 181, - CatchBlock = 182, - FinallyBlock = 183, - DebuggerStatement = 184, - VariableDeclaration = 185, - FunctionDeclaration = 186, - FunctionBlock = 187, - ClassDeclaration = 188, - InterfaceDeclaration = 189, - TypeAliasDeclaration = 190, - EnumDeclaration = 191, - ModuleDeclaration = 192, - ModuleBlock = 193, - ImportDeclaration = 194, - ExportAssignment = 195, - CaseClause = 196, - DefaultClause = 197, - HeritageClause = 198, - PropertyAssignment = 199, - ShorthandPropertyAssignment = 200, - EnumMember = 201, - SourceFile = 202, - Program = 203, - SyntaxList = 204, - Count = 205, + QualifiedName = 120, + ComputedPropertyName = 121, + TypeParameter = 122, + Parameter = 123, + Property = 124, + Method = 125, + Constructor = 126, + GetAccessor = 127, + SetAccessor = 128, + CallSignature = 129, + ConstructSignature = 130, + IndexSignature = 131, + TypeReference = 132, + FunctionType = 133, + ConstructorType = 134, + TypeQuery = 135, + TypeLiteral = 136, + ArrayType = 137, + TupleType = 138, + UnionType = 139, + ParenthesizedType = 140, + ArrayLiteralExpression = 141, + ObjectLiteralExpression = 142, + PropertyAccessExpression = 143, + ElementAccessExpression = 144, + CallExpression = 145, + NewExpression = 146, + TaggedTemplateExpression = 147, + TypeAssertionExpression = 148, + ParenthesizedExpression = 149, + FunctionExpression = 150, + ArrowFunction = 151, + DeleteExpression = 152, + TypeOfExpression = 153, + VoidExpression = 154, + PrefixUnaryExpression = 155, + PostfixUnaryExpression = 156, + BinaryExpression = 157, + ConditionalExpression = 158, + TemplateExpression = 159, + YieldExpression = 160, + OmittedExpression = 161, + TemplateSpan = 162, + Block = 163, + VariableStatement = 164, + EmptyStatement = 165, + ExpressionStatement = 166, + IfStatement = 167, + DoStatement = 168, + WhileStatement = 169, + ForStatement = 170, + ForInStatement = 171, + ContinueStatement = 172, + BreakStatement = 173, + ReturnStatement = 174, + WithStatement = 175, + SwitchStatement = 176, + LabeledStatement = 177, + ThrowStatement = 178, + TryStatement = 179, + TryBlock = 180, + FinallyBlock = 181, + DebuggerStatement = 182, + VariableDeclaration = 183, + FunctionDeclaration = 184, + ClassDeclaration = 185, + InterfaceDeclaration = 186, + TypeAliasDeclaration = 187, + EnumDeclaration = 188, + ModuleDeclaration = 189, + ModuleBlock = 190, + ImportDeclaration = 191, + ExportAssignment = 192, + ExternalModuleReference = 193, + CaseClause = 194, + DefaultClause = 195, + HeritageClause = 196, + CatchClause = 197, + PropertyAssignment = 198, + ShorthandPropertyAssignment = 199, + EnumMember = 200, + SourceFile = 201, + Program = 202, + SyntaxList = 203, + Count = 204, FirstAssignment = 51, LastAssignment = 62, FirstReservedWord = 64, @@ -246,11 +245,11 @@ declare module ts { LastKeyword = 119, FirstFutureReservedWord = 100, LastFutureReservedWord = 108, - FirstTypeNode = 133, - LastTypeNode = 141, + FirstTypeNode = 132, + LastTypeNode = 140, FirstPunctuation = 13, LastPunctuation = 62, - FirstToken = 1, + FirstToken = 0, LastToken = 119, FirstTriviaToken = 2, LastTriviaToken = 5, @@ -262,12 +261,11 @@ declare module ts { LastOperator = 62, FirstBinaryOperator = 23, LastBinaryOperator = 62, + FirstNode = 120, } const enum NodeFlags { Export = 1, Ambient = 2, - QuestionMark = 4, - Rest = 8, Public = 16, Private = 32, Protected = 64, @@ -287,6 +285,8 @@ declare module ts { DisallowIn = 2, Yield = 4, GeneratorParameter = 8, + ContainsError = 16, + HasPropagatedChildContainsErrorFlag = 32, } interface Node extends TextRange { kind: SyntaxKind; @@ -303,7 +303,7 @@ declare module ts { interface NodeArray extends Array, TextRange { hasTrailingComma?: boolean; } - interface ModifiersArray extends Array { + interface ModifiersArray extends NodeArray { flags: number; } interface Identifier extends PrimaryExpression { @@ -314,11 +314,6 @@ declare module ts { right: Identifier; } type EntityName = Identifier | QualifiedName; - interface ParsedSignature { - typeParameters?: NodeArray; - parameters: NodeArray; - type?: TypeNode; - } type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; interface Declaration extends Node { _declarationBrand: any; @@ -332,21 +327,43 @@ declare module ts { constraint?: TypeNode; expression?: Expression; } - interface SignatureDeclaration extends Declaration, ParsedSignature { + interface SignatureDeclaration extends Declaration { + typeParameters?: NodeArray; + parameters: NodeArray; + type?: TypeNode; } interface VariableDeclaration extends Declaration { name: Identifier; type?: TypeNode; initializer?: Expression; } + interface ParameterDeclaration extends Declaration { + dotDotDotToken?: Node; + name: Identifier; + questionToken?: Node; + type?: TypeNode | StringLiteralExpression; + initializer?: Expression; + } interface PropertyDeclaration extends Declaration, ClassElement { + _propertyDeclarationBrand: any; + questionToken?: Node; type?: TypeNode; initializer?: Expression; } - interface ShortHandPropertyDeclaration extends Declaration { - name: Identifier; + type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; + type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; + interface ObjectLiteralElement extends Declaration { + _objectLiteralBrandBrand: any; } - interface ParameterDeclaration extends VariableDeclaration { + interface ShorthandPropertyAssignment extends ObjectLiteralElement { + name: Identifier; + questionToken?: Node; + } + interface PropertyAssignment extends ObjectLiteralElement { + _propertyAssignmentBrand: any; + name: DeclarationName; + questionToken?: Node; + initializer: Expression; } /** * Several node kinds share function-like features such as a signature, @@ -359,25 +376,31 @@ declare module ts { interface FunctionLikeDeclaration extends SignatureDeclaration { _functionLikeDeclarationBrand: any; asteriskToken?: Node; + questionToken?: Node; body?: Block | Expression; } interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { name: Identifier; body?: Block; } - interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement { + interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { body?: Block; } interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { body?: Block; } - interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement { - body?: Block; + interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { + _accessorDeclarationBrand: any; + body: Block; } interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { _indexSignatureDeclarationBrand: any; } interface TypeNode extends Node { + _typeNodeBrand: any; + } + interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { + _functionOrConstructorTypeNodeBrand: any; } interface TypeReferenceNode extends TypeNode { typeName: EntityName; @@ -401,9 +424,6 @@ declare module ts { interface ParenthesizedTypeNode extends TypeNode { type: TypeNode; } - interface StringLiteralTypeNode extends TypeNode { - text: string; - } interface Expression extends Node { _expressionBrand: any; contextualType?: Type; @@ -460,6 +480,10 @@ declare module ts { } interface LiteralExpression extends PrimaryExpression { text: string; + isUnterminated?: boolean; + } + interface StringLiteralExpression extends LiteralExpression { + _stringLiteralExpressionBrand: any; } interface TemplateExpression extends PrimaryExpression { head: LiteralExpression; @@ -476,7 +500,7 @@ declare module ts { elements: NodeArray; } interface ObjectLiteralExpression extends PrimaryExpression, Declaration { - properties: NodeArray; + properties: NodeArray; } interface PropertyAccessExpression extends MemberExpression { expression: LeftHandSideExpression; @@ -484,7 +508,7 @@ declare module ts { } interface ElementAccessExpression extends MemberExpression { expression: LeftHandSideExpression; - argumentExpression: Expression; + argumentExpression?: Expression; } interface CallExpression extends LeftHandSideExpression { expression: LeftHandSideExpression; @@ -553,10 +577,14 @@ declare module ts { expression: Expression; clauses: NodeArray; } - interface CaseOrDefaultClause extends Node { + interface CaseClause extends Node { expression?: Expression; statements: NodeArray; } + interface DefaultClause extends Node { + statements: NodeArray; + } + type CaseOrDefaultClause = CaseClause | DefaultClause; interface LabeledStatement extends Statement { label: Identifier; statement: Statement; @@ -566,12 +594,13 @@ declare module ts { } interface TryStatement extends Statement { tryBlock: Block; - catchBlock?: CatchBlock; + catchClause?: CatchClause; finallyBlock?: Block; } - interface CatchBlock extends Block, Declaration { - variable: Identifier; + interface CatchClause extends Declaration { + name: Identifier; type?: TypeNode; + block: Block; } interface ModuleElement extends Node { _moduleElementBrand: any; @@ -616,8 +645,10 @@ declare module ts { } interface ImportDeclaration extends Declaration, ModuleElement { name: Identifier; - entityName?: EntityName; - externalModuleName?: LiteralExpression; + moduleReference: EntityName | ExternalModuleReference; + } + interface ExternalModuleReference extends Node { + expression?: Expression; } interface ExportAssignment extends Statement, ModuleElement { exportName: Identifier; @@ -630,6 +661,7 @@ declare module ts { } interface SourceFile extends Declaration { statements: NodeArray; + endOfFileToken: Node; filename: string; text: string; getLineAndCharacterFromPosition(position: number): LineAndCharacter; @@ -638,10 +670,11 @@ declare module ts { amdDependencies: string[]; amdModuleName: string; referencedFiles: FileReference[]; - semanticDiagnostics: Diagnostic[]; + referenceDiagnostics: Diagnostic[]; parseDiagnostics: Diagnostic[]; grammarDiagnostics: Diagnostic[]; getSyntacticDiagnostics(): Diagnostic[]; + semanticDiagnostics: Diagnostic[]; hasNoDefaultLib: boolean; externalModuleIndicator: Node; nodeCount: number; @@ -703,10 +736,8 @@ declare module ts { getIdentifierCount(): number; getSymbolCount(): number; getTypeCount(): number; - checkProgram(): void; emitFiles(targetSourceFile?: SourceFile): EmitResult; - getParentOfSymbol(symbol: Symbol): Symbol; - getNarrowedTypeOfSymbol(symbol: Symbol, node: Node): Type; + getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; getDeclaredTypeOfSymbol(symbol: Symbol): Type; getPropertiesOfType(type: Type): Symbol[]; getPropertyOfType(type: Type, propertyName: string): Symbol; @@ -714,16 +745,16 @@ declare module ts { getIndexTypeOfType(type: Type, kind: IndexKind): Type; getReturnTypeOfSignature(signature: Signature): Type; getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; - getSymbolInfo(node: Node): Symbol; + getSymbolAtLocation(node: Node): Symbol; getShorthandAssignmentValueSymbol(location: Node): Symbol; - getTypeOfNode(node: Node): Type; + getTypeAtLocation(node: Node): Type; typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; getSymbolDisplayBuilder(): SymbolDisplayBuilder; getFullyQualifiedName(symbol: Symbol): string; getAugmentedPropertiesOfType(type: Type): Symbol[]; getRootSymbols(symbol: Symbol): Symbol[]; - getContextualType(node: Node): Type; + getContextualType(node: Expression): Type; getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; @@ -797,10 +828,10 @@ declare module ts { isTopLevelValueImportWithEntityName(node: ImportDeclaration): boolean; getNodeCheckFlags(node: Node): NodeCheckFlags; getEnumMemberValue(node: EnumMember): number; - hasSemanticErrors(): boolean; + hasSemanticErrors(sourceFile?: SourceFile): boolean; isDeclarationVisible(node: Declaration): boolean; isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; - writeTypeAtLocation(location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; + writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; @@ -944,7 +975,6 @@ declare module ts { StringLike = 258, NumberLike = 132, ObjectType = 48128, - Structured = 65025, } interface Type { flags: TypeFlags; @@ -1057,12 +1087,6 @@ declare module ts { * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit */ isEarly?: boolean; - /** - * Parse error - error produced by parser when it scanner returns a token - * that parser does not understand in its current state - * (as opposed to grammar error when parser can interpret the token but interpretation is not legal from the grammar perespective) - */ - isParseError?: boolean; } enum DiagnosticCategory { Warning = 0, @@ -1094,6 +1118,7 @@ declare module ts { version?: boolean; watch?: boolean; preserveConstEnums?: boolean; + allowNonTsExtensions?: boolean; [option: string]: string | number | boolean; } const enum ModuleKind { @@ -1254,7 +1279,7 @@ declare module ts { } interface CompilerHost { getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; - getDefaultLibFilename(): string; + getDefaultLibFilename(options: CompilerOptions): string; getCancellationToken?(): CancellationToken; writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; getCurrentDirectory(): string; @@ -1263,7 +1288,7 @@ declare module ts { getNewLine(): string; } } -declare module ts { +declare module "typescript" { interface ErrorCallback { (message: DiagnosticMessage): void; } @@ -1280,12 +1305,14 @@ declare module ts { hasPrecedingLineBreak(): boolean; isIdentifier(): boolean; isReservedWord(): boolean; + isUnterminated(): boolean; reScanGreaterToken(): SyntaxKind; reScanSlashToken(): SyntaxKind; reScanTemplateToken(): SyntaxKind; scan(): SyntaxKind; setText(text: string): void; setTextPos(textPos: number): void; + lookAhead(callback: () => T): T; tryScan(callback: () => T): T; } function tokenToString(t: SyntaxKind): string; @@ -1307,23 +1334,19 @@ declare module ts { function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; - function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback): Scanner; + function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner; } -declare module ts { - interface ReferencePathMatchResult { - fileReference?: FileReference; - diagnostic?: DiagnosticMessage; - isNoDefaultLib?: boolean; - } +declare module "typescript" { function getNodeConstructor(kind: SyntaxKind): new () => Node; function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; } -declare module ts { +declare module "typescript" { function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; } -declare module ts { +declare module "typescript" { + var servicesVersion: string; interface Node { getSourceFile(): SourceFile; getChildCount(sourceFile?: SourceFile): number; @@ -1411,10 +1434,10 @@ declare module ts { getScriptVersion(fileName: string): string; getScriptIsOpen(fileName: string): boolean; getScriptSnapshot(fileName: string): IScriptSnapshot; - getLocalizedDiagnosticMessages(): any; - getCancellationToken(): CancellationToken; + getLocalizedDiagnosticMessages?(): any; + getCancellationToken?(): CancellationToken; getCurrentDirectory(): string; - getDefaultLibFilename(): string; + getDefaultLibFilename(options: CompilerOptions): string; } interface LanguageService { cleanupSemanticCache(): void; @@ -1423,7 +1446,7 @@ declare module ts { getCompilerOptionsDiagnostics(): Diagnostic[]; getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; - getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): CompletionInfo; + getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; @@ -1811,11 +1834,12 @@ declare module ts { static interfaceName: string; static moduleName: string; static typeParameterName: string; + static typeAlias: string; } - function displayPartsToString(displayParts: SymbolDisplayPart[]): string; interface DisplayPartsSymbolWriter extends SymbolWriter { displayParts(): SymbolDisplayPart[]; } + function displayPartsToString(displayParts: SymbolDisplayPart[]): string; function getDefaultCompilerOptions(): CompilerOptions; class OperationCanceledException { } @@ -1832,7 +1856,6 @@ declare module ts { function createClassifier(host: Logger): Classifier; } -export = ts; //// [APISample_node_compile.js] var ts = require("typescript"); diff --git a/tests/baselines/reference/APISample_node_compile.types b/tests/baselines/reference/APISample_node_compile.types index 15aa4b13a2e..4331fb28c72 100644 --- a/tests/baselines/reference/APISample_node_compile.types +++ b/tests/baselines/reference/APISample_node_compile.types @@ -41,9 +41,7 @@ See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ -declare module ts { ->ts : typeof ts - +declare module "typescript" { interface Map { >Map : Map >T : T @@ -424,262 +422,259 @@ declare module ts { TypeKeyword = 119, >TypeKeyword : SyntaxKind - Missing = 120, ->Missing : SyntaxKind - - QualifiedName = 121, + QualifiedName = 120, >QualifiedName : SyntaxKind - ComputedPropertyName = 122, + ComputedPropertyName = 121, >ComputedPropertyName : SyntaxKind - TypeParameter = 123, + TypeParameter = 122, >TypeParameter : SyntaxKind - Parameter = 124, + Parameter = 123, >Parameter : SyntaxKind - Property = 125, + Property = 124, >Property : SyntaxKind - Method = 126, + Method = 125, >Method : SyntaxKind - Constructor = 127, + Constructor = 126, >Constructor : SyntaxKind - GetAccessor = 128, + GetAccessor = 127, >GetAccessor : SyntaxKind - SetAccessor = 129, + SetAccessor = 128, >SetAccessor : SyntaxKind - CallSignature = 130, + CallSignature = 129, >CallSignature : SyntaxKind - ConstructSignature = 131, + ConstructSignature = 130, >ConstructSignature : SyntaxKind - IndexSignature = 132, + IndexSignature = 131, >IndexSignature : SyntaxKind - TypeReference = 133, + TypeReference = 132, >TypeReference : SyntaxKind - FunctionType = 134, + FunctionType = 133, >FunctionType : SyntaxKind - ConstructorType = 135, + ConstructorType = 134, >ConstructorType : SyntaxKind - TypeQuery = 136, + TypeQuery = 135, >TypeQuery : SyntaxKind - TypeLiteral = 137, + TypeLiteral = 136, >TypeLiteral : SyntaxKind - ArrayType = 138, + ArrayType = 137, >ArrayType : SyntaxKind - TupleType = 139, + TupleType = 138, >TupleType : SyntaxKind - UnionType = 140, + UnionType = 139, >UnionType : SyntaxKind - ParenthesizedType = 141, + ParenthesizedType = 140, >ParenthesizedType : SyntaxKind - ArrayLiteralExpression = 142, + ArrayLiteralExpression = 141, >ArrayLiteralExpression : SyntaxKind - ObjectLiteralExpression = 143, + ObjectLiteralExpression = 142, >ObjectLiteralExpression : SyntaxKind - PropertyAccessExpression = 144, + PropertyAccessExpression = 143, >PropertyAccessExpression : SyntaxKind - ElementAccessExpression = 145, + ElementAccessExpression = 144, >ElementAccessExpression : SyntaxKind - CallExpression = 146, + CallExpression = 145, >CallExpression : SyntaxKind - NewExpression = 147, + NewExpression = 146, >NewExpression : SyntaxKind - TaggedTemplateExpression = 148, + TaggedTemplateExpression = 147, >TaggedTemplateExpression : SyntaxKind - TypeAssertionExpression = 149, + TypeAssertionExpression = 148, >TypeAssertionExpression : SyntaxKind - ParenthesizedExpression = 150, + ParenthesizedExpression = 149, >ParenthesizedExpression : SyntaxKind - FunctionExpression = 151, + FunctionExpression = 150, >FunctionExpression : SyntaxKind - ArrowFunction = 152, + ArrowFunction = 151, >ArrowFunction : SyntaxKind - DeleteExpression = 153, + DeleteExpression = 152, >DeleteExpression : SyntaxKind - TypeOfExpression = 154, + TypeOfExpression = 153, >TypeOfExpression : SyntaxKind - VoidExpression = 155, + VoidExpression = 154, >VoidExpression : SyntaxKind - PrefixUnaryExpression = 156, + PrefixUnaryExpression = 155, >PrefixUnaryExpression : SyntaxKind - PostfixUnaryExpression = 157, + PostfixUnaryExpression = 156, >PostfixUnaryExpression : SyntaxKind - BinaryExpression = 158, + BinaryExpression = 157, >BinaryExpression : SyntaxKind - ConditionalExpression = 159, + ConditionalExpression = 158, >ConditionalExpression : SyntaxKind - TemplateExpression = 160, + TemplateExpression = 159, >TemplateExpression : SyntaxKind - YieldExpression = 161, + YieldExpression = 160, >YieldExpression : SyntaxKind - OmittedExpression = 162, + OmittedExpression = 161, >OmittedExpression : SyntaxKind - TemplateSpan = 163, + TemplateSpan = 162, >TemplateSpan : SyntaxKind - Block = 164, + Block = 163, >Block : SyntaxKind - VariableStatement = 165, + VariableStatement = 164, >VariableStatement : SyntaxKind - EmptyStatement = 166, + EmptyStatement = 165, >EmptyStatement : SyntaxKind - ExpressionStatement = 167, + ExpressionStatement = 166, >ExpressionStatement : SyntaxKind - IfStatement = 168, + IfStatement = 167, >IfStatement : SyntaxKind - DoStatement = 169, + DoStatement = 168, >DoStatement : SyntaxKind - WhileStatement = 170, + WhileStatement = 169, >WhileStatement : SyntaxKind - ForStatement = 171, + ForStatement = 170, >ForStatement : SyntaxKind - ForInStatement = 172, + ForInStatement = 171, >ForInStatement : SyntaxKind - ContinueStatement = 173, + ContinueStatement = 172, >ContinueStatement : SyntaxKind - BreakStatement = 174, + BreakStatement = 173, >BreakStatement : SyntaxKind - ReturnStatement = 175, + ReturnStatement = 174, >ReturnStatement : SyntaxKind - WithStatement = 176, + WithStatement = 175, >WithStatement : SyntaxKind - SwitchStatement = 177, + SwitchStatement = 176, >SwitchStatement : SyntaxKind - LabeledStatement = 178, + LabeledStatement = 177, >LabeledStatement : SyntaxKind - ThrowStatement = 179, + ThrowStatement = 178, >ThrowStatement : SyntaxKind - TryStatement = 180, + TryStatement = 179, >TryStatement : SyntaxKind - TryBlock = 181, + TryBlock = 180, >TryBlock : SyntaxKind - CatchBlock = 182, ->CatchBlock : SyntaxKind - - FinallyBlock = 183, + FinallyBlock = 181, >FinallyBlock : SyntaxKind - DebuggerStatement = 184, + DebuggerStatement = 182, >DebuggerStatement : SyntaxKind - VariableDeclaration = 185, + VariableDeclaration = 183, >VariableDeclaration : SyntaxKind - FunctionDeclaration = 186, + FunctionDeclaration = 184, >FunctionDeclaration : SyntaxKind - FunctionBlock = 187, ->FunctionBlock : SyntaxKind - - ClassDeclaration = 188, + ClassDeclaration = 185, >ClassDeclaration : SyntaxKind - InterfaceDeclaration = 189, + InterfaceDeclaration = 186, >InterfaceDeclaration : SyntaxKind - TypeAliasDeclaration = 190, + TypeAliasDeclaration = 187, >TypeAliasDeclaration : SyntaxKind - EnumDeclaration = 191, + EnumDeclaration = 188, >EnumDeclaration : SyntaxKind - ModuleDeclaration = 192, + ModuleDeclaration = 189, >ModuleDeclaration : SyntaxKind - ModuleBlock = 193, + ModuleBlock = 190, >ModuleBlock : SyntaxKind - ImportDeclaration = 194, + ImportDeclaration = 191, >ImportDeclaration : SyntaxKind - ExportAssignment = 195, + ExportAssignment = 192, >ExportAssignment : SyntaxKind - CaseClause = 196, + ExternalModuleReference = 193, +>ExternalModuleReference : SyntaxKind + + CaseClause = 194, >CaseClause : SyntaxKind - DefaultClause = 197, + DefaultClause = 195, >DefaultClause : SyntaxKind - HeritageClause = 198, + HeritageClause = 196, >HeritageClause : SyntaxKind - PropertyAssignment = 199, + CatchClause = 197, +>CatchClause : SyntaxKind + + PropertyAssignment = 198, >PropertyAssignment : SyntaxKind - ShorthandPropertyAssignment = 200, + ShorthandPropertyAssignment = 199, >ShorthandPropertyAssignment : SyntaxKind - EnumMember = 201, + EnumMember = 200, >EnumMember : SyntaxKind - SourceFile = 202, + SourceFile = 201, >SourceFile : SyntaxKind - Program = 203, + Program = 202, >Program : SyntaxKind - SyntaxList = 204, + SyntaxList = 203, >SyntaxList : SyntaxKind - Count = 205, + Count = 204, >Count : SyntaxKind FirstAssignment = 51, @@ -706,10 +701,10 @@ declare module ts { LastFutureReservedWord = 108, >LastFutureReservedWord : SyntaxKind - FirstTypeNode = 133, + FirstTypeNode = 132, >FirstTypeNode : SyntaxKind - LastTypeNode = 141, + LastTypeNode = 140, >LastTypeNode : SyntaxKind FirstPunctuation = 13, @@ -718,7 +713,7 @@ declare module ts { LastPunctuation = 62, >LastPunctuation : SyntaxKind - FirstToken = 1, + FirstToken = 0, >FirstToken : SyntaxKind LastToken = 119, @@ -753,6 +748,9 @@ declare module ts { LastBinaryOperator = 62, >LastBinaryOperator : SyntaxKind + + FirstNode = 120, +>FirstNode : SyntaxKind } const enum NodeFlags { >NodeFlags : NodeFlags @@ -763,12 +761,6 @@ declare module ts { Ambient = 2, >Ambient : NodeFlags - QuestionMark = 4, ->QuestionMark : NodeFlags - - Rest = 8, ->Rest : NodeFlags - Public = 16, >Public : NodeFlags @@ -822,6 +814,12 @@ declare module ts { GeneratorParameter = 8, >GeneratorParameter : ParserContextFlags + + ContainsError = 16, +>ContainsError : ParserContextFlags + + HasPropagatedChildContainsErrorFlag = 32, +>HasPropagatedChildContainsErrorFlag : ParserContextFlags } interface Node extends TextRange { >Node : Node @@ -876,9 +874,9 @@ declare module ts { hasTrailingComma?: boolean; >hasTrailingComma : boolean } - interface ModifiersArray extends Array { + interface ModifiersArray extends NodeArray { >ModifiersArray : ModifiersArray ->Array : T[] +>NodeArray : NodeArray >Node : Node flags: number; @@ -908,23 +906,6 @@ declare module ts { >Identifier : Identifier >QualifiedName : QualifiedName - interface ParsedSignature { ->ParsedSignature : ParsedSignature - - typeParameters?: NodeArray; ->typeParameters : NodeArray ->NodeArray : NodeArray ->TypeParameterDeclaration : TypeParameterDeclaration - - parameters: NodeArray; ->parameters : NodeArray ->NodeArray : NodeArray ->ParameterDeclaration : ParameterDeclaration - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - } type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; >DeclarationName : Identifier | LiteralExpression | ComputedPropertyName >Identifier : Identifier @@ -966,10 +947,23 @@ declare module ts { >expression : Expression >Expression : Expression } - interface SignatureDeclaration extends Declaration, ParsedSignature { + interface SignatureDeclaration extends Declaration { >SignatureDeclaration : SignatureDeclaration >Declaration : Declaration ->ParsedSignature : ParsedSignature + + typeParameters?: NodeArray; +>typeParameters : NodeArray +>NodeArray : NodeArray +>TypeParameterDeclaration : TypeParameterDeclaration + + parameters: NodeArray; +>parameters : NodeArray +>NodeArray : NodeArray +>ParameterDeclaration : ParameterDeclaration + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode } interface VariableDeclaration extends Declaration { >VariableDeclaration : VariableDeclaration @@ -985,6 +979,31 @@ declare module ts { initializer?: Expression; >initializer : Expression +>Expression : Expression + } + interface ParameterDeclaration extends Declaration { +>ParameterDeclaration : ParameterDeclaration +>Declaration : Declaration + + dotDotDotToken?: Node; +>dotDotDotToken : Node +>Node : Node + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + questionToken?: Node; +>questionToken : Node +>Node : Node + + type?: TypeNode | StringLiteralExpression; +>type : TypeNode | StringLiteralExpression +>TypeNode : TypeNode +>StringLiteralExpression : StringLiteralExpression + + initializer?: Expression; +>initializer : Expression >Expression : Expression } interface PropertyDeclaration extends Declaration, ClassElement { @@ -992,6 +1011,13 @@ declare module ts { >Declaration : Declaration >ClassElement : ClassElement + _propertyDeclarationBrand: any; +>_propertyDeclarationBrand : any + + questionToken?: Node; +>questionToken : Node +>Node : Node + type?: TypeNode; >type : TypeNode >TypeNode : TypeNode @@ -1000,17 +1026,53 @@ declare module ts { >initializer : Expression >Expression : Expression } - interface ShortHandPropertyDeclaration extends Declaration { ->ShortHandPropertyDeclaration : ShortHandPropertyDeclaration + type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; +>VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration +>VariableDeclaration : VariableDeclaration +>ParameterDeclaration : ParameterDeclaration + + type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; +>VariableOrParameterOrPropertyDeclaration : ParameterDeclaration | VariableDeclaration | PropertyDeclaration +>VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration +>PropertyDeclaration : PropertyDeclaration + + interface ObjectLiteralElement extends Declaration { +>ObjectLiteralElement : ObjectLiteralElement >Declaration : Declaration + _objectLiteralBrandBrand: any; +>_objectLiteralBrandBrand : any + } + interface ShorthandPropertyAssignment extends ObjectLiteralElement { +>ShorthandPropertyAssignment : ShorthandPropertyAssignment +>ObjectLiteralElement : ObjectLiteralElement + name: Identifier; >name : Identifier >Identifier : Identifier + + questionToken?: Node; +>questionToken : Node +>Node : Node } - interface ParameterDeclaration extends VariableDeclaration { ->ParameterDeclaration : ParameterDeclaration ->VariableDeclaration : VariableDeclaration + interface PropertyAssignment extends ObjectLiteralElement { +>PropertyAssignment : PropertyAssignment +>ObjectLiteralElement : ObjectLiteralElement + + _propertyAssignmentBrand: any; +>_propertyAssignmentBrand : any + + name: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName + + questionToken?: Node; +>questionToken : Node +>Node : Node + + initializer: Expression; +>initializer : Expression +>Expression : Expression } /** * Several node kinds share function-like features such as a signature, @@ -1029,6 +1091,10 @@ declare module ts { asteriskToken?: Node; >asteriskToken : Node +>Node : Node + + questionToken?: Node; +>questionToken : Node >Node : Node body?: Block | Expression; @@ -1049,10 +1115,11 @@ declare module ts { >body : Block >Block : Block } - interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement { + interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { >MethodDeclaration : MethodDeclaration >FunctionLikeDeclaration : FunctionLikeDeclaration >ClassElement : ClassElement +>ObjectLiteralElement : ObjectLiteralElement body?: Block; >body : Block @@ -1067,12 +1134,16 @@ declare module ts { >body : Block >Block : Block } - interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement { + interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { >AccessorDeclaration : AccessorDeclaration >FunctionLikeDeclaration : FunctionLikeDeclaration >ClassElement : ClassElement +>ObjectLiteralElement : ObjectLiteralElement - body?: Block; + _accessorDeclarationBrand: any; +>_accessorDeclarationBrand : any + + body: Block; >body : Block >Block : Block } @@ -1087,6 +1158,17 @@ declare module ts { interface TypeNode extends Node { >TypeNode : TypeNode >Node : Node + + _typeNodeBrand: any; +>_typeNodeBrand : any + } + interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { +>FunctionOrConstructorTypeNode : FunctionOrConstructorTypeNode +>TypeNode : TypeNode +>SignatureDeclaration : SignatureDeclaration + + _functionOrConstructorTypeNodeBrand: any; +>_functionOrConstructorTypeNodeBrand : any } interface TypeReferenceNode extends TypeNode { >TypeReferenceNode : TypeReferenceNode @@ -1152,13 +1234,6 @@ declare module ts { type: TypeNode; >type : TypeNode >TypeNode : TypeNode - } - interface StringLiteralTypeNode extends TypeNode { ->StringLiteralTypeNode : StringLiteralTypeNode ->TypeNode : TypeNode - - text: string; ->text : string } interface Expression extends Node { >Expression : Expression @@ -1318,6 +1393,16 @@ declare module ts { text: string; >text : string + + isUnterminated?: boolean; +>isUnterminated : boolean + } + interface StringLiteralExpression extends LiteralExpression { +>StringLiteralExpression : StringLiteralExpression +>LiteralExpression : LiteralExpression + + _stringLiteralExpressionBrand: any; +>_stringLiteralExpressionBrand : any } interface TemplateExpression extends PrimaryExpression { >TemplateExpression : TemplateExpression @@ -1366,10 +1451,10 @@ declare module ts { >PrimaryExpression : PrimaryExpression >Declaration : Declaration - properties: NodeArray; ->properties : NodeArray + properties: NodeArray; +>properties : NodeArray >NodeArray : NodeArray ->Declaration : Declaration +>ObjectLiteralElement : ObjectLiteralElement } interface PropertyAccessExpression extends MemberExpression { >PropertyAccessExpression : PropertyAccessExpression @@ -1391,7 +1476,7 @@ declare module ts { >expression : LeftHandSideExpression >LeftHandSideExpression : LeftHandSideExpression - argumentExpression: Expression; + argumentExpression?: Expression; >argumentExpression : Expression >Expression : Expression } @@ -1598,12 +1683,12 @@ declare module ts { >Expression : Expression clauses: NodeArray; ->clauses : NodeArray +>clauses : NodeArray >NodeArray : NodeArray ->CaseOrDefaultClause : CaseOrDefaultClause +>CaseOrDefaultClause : CaseClause | DefaultClause } - interface CaseOrDefaultClause extends Node { ->CaseOrDefaultClause : CaseOrDefaultClause + interface CaseClause extends Node { +>CaseClause : CaseClause >Node : Node expression?: Expression; @@ -1615,6 +1700,20 @@ declare module ts { >NodeArray : NodeArray >Statement : Statement } + interface DefaultClause extends Node { +>DefaultClause : DefaultClause +>Node : Node + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>Statement : Statement + } + type CaseOrDefaultClause = CaseClause | DefaultClause; +>CaseOrDefaultClause : CaseClause | DefaultClause +>CaseClause : CaseClause +>DefaultClause : DefaultClause + interface LabeledStatement extends Statement { >LabeledStatement : LabeledStatement >Statement : Statement @@ -1643,26 +1742,29 @@ declare module ts { >tryBlock : Block >Block : Block - catchBlock?: CatchBlock; ->catchBlock : CatchBlock ->CatchBlock : CatchBlock + catchClause?: CatchClause; +>catchClause : CatchClause +>CatchClause : CatchClause finallyBlock?: Block; >finallyBlock : Block >Block : Block } - interface CatchBlock extends Block, Declaration { ->CatchBlock : CatchBlock ->Block : Block + interface CatchClause extends Declaration { +>CatchClause : CatchClause >Declaration : Declaration - variable: Identifier; ->variable : Identifier + name: Identifier; +>name : Identifier >Identifier : Identifier type?: TypeNode; >type : TypeNode >TypeNode : TypeNode + + block: Block; +>block : Block +>Block : Block } interface ModuleElement extends Node { >ModuleElement : ModuleElement @@ -1812,13 +1914,18 @@ declare module ts { >name : Identifier >Identifier : Identifier - entityName?: EntityName; ->entityName : Identifier | QualifiedName + moduleReference: EntityName | ExternalModuleReference; +>moduleReference : Identifier | QualifiedName | ExternalModuleReference >EntityName : Identifier | QualifiedName +>ExternalModuleReference : ExternalModuleReference + } + interface ExternalModuleReference extends Node { +>ExternalModuleReference : ExternalModuleReference +>Node : Node - externalModuleName?: LiteralExpression; ->externalModuleName : LiteralExpression ->LiteralExpression : LiteralExpression + expression?: Expression; +>expression : Expression +>Expression : Expression } interface ExportAssignment extends Statement, ModuleElement { >ExportAssignment : ExportAssignment @@ -1852,6 +1959,10 @@ declare module ts { >NodeArray : NodeArray >ModuleElement : ModuleElement + endOfFileToken: Node; +>endOfFileToken : Node +>Node : Node + filename: string; >filename : string @@ -1881,8 +1992,8 @@ declare module ts { >referencedFiles : FileReference[] >FileReference : FileReference - semanticDiagnostics: Diagnostic[]; ->semanticDiagnostics : Diagnostic[] + referenceDiagnostics: Diagnostic[]; +>referenceDiagnostics : Diagnostic[] >Diagnostic : Diagnostic parseDiagnostics: Diagnostic[]; @@ -1895,6 +2006,10 @@ declare module ts { getSyntacticDiagnostics(): Diagnostic[]; >getSyntacticDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + semanticDiagnostics: Diagnostic[]; +>semanticDiagnostics : Diagnostic[] >Diagnostic : Diagnostic hasNoDefaultLib: boolean; @@ -2088,23 +2203,14 @@ declare module ts { getTypeCount(): number; >getTypeCount : () => number - checkProgram(): void; ->checkProgram : () => void - emitFiles(targetSourceFile?: SourceFile): EmitResult; >emitFiles : (targetSourceFile?: SourceFile) => EmitResult >targetSourceFile : SourceFile >SourceFile : SourceFile >EmitResult : EmitResult - getParentOfSymbol(symbol: Symbol): Symbol; ->getParentOfSymbol : (symbol: Symbol) => Symbol ->symbol : Symbol ->Symbol : Symbol ->Symbol : Symbol - - getNarrowedTypeOfSymbol(symbol: Symbol, node: Node): Type; ->getNarrowedTypeOfSymbol : (symbol: Symbol, node: Node) => Type + getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; +>getTypeOfSymbolAtLocation : (symbol: Symbol, node: Node) => Type >symbol : Symbol >Symbol : Symbol >node : Node @@ -2160,8 +2266,8 @@ declare module ts { >SymbolFlags : SymbolFlags >Symbol : Symbol - getSymbolInfo(node: Node): Symbol; ->getSymbolInfo : (node: Node) => Symbol + getSymbolAtLocation(node: Node): Symbol; +>getSymbolAtLocation : (node: Node) => Symbol >node : Node >Node : Node >Symbol : Symbol @@ -2172,8 +2278,8 @@ declare module ts { >Node : Node >Symbol : Symbol - getTypeOfNode(node: Node): Type; ->getTypeOfNode : (node: Node) => Type + getTypeAtLocation(node: Node): Type; +>getTypeAtLocation : (node: Node) => Type >node : Node >Node : Node >Type : Type @@ -2217,10 +2323,10 @@ declare module ts { >Symbol : Symbol >Symbol : Symbol - getContextualType(node: Node): Type; ->getContextualType : (node: Node) => Type ->node : Node ->Node : Node + getContextualType(node: Expression): Type; +>getContextualType : (node: Expression) => Type +>node : Expression +>Expression : Expression >Type : Type getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; @@ -2553,8 +2659,10 @@ declare module ts { >node : EnumMember >EnumMember : EnumMember - hasSemanticErrors(): boolean; ->hasSemanticErrors : () => boolean + hasSemanticErrors(sourceFile?: SourceFile): boolean; +>hasSemanticErrors : (sourceFile?: SourceFile) => boolean +>sourceFile : SourceFile +>SourceFile : SourceFile isDeclarationVisible(node: Declaration): boolean; >isDeclarationVisible : (node: Declaration) => boolean @@ -2566,10 +2674,11 @@ declare module ts { >node : FunctionLikeDeclaration >FunctionLikeDeclaration : FunctionLikeDeclaration - writeTypeAtLocation(location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; ->writeTypeAtLocation : (location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void ->location : Node ->Node : Node + writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; +>writeTypeOfDeclaration : (declaration: ParameterDeclaration | VariableDeclaration | AccessorDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void +>declaration : ParameterDeclaration | VariableDeclaration | AccessorDeclaration +>AccessorDeclaration : AccessorDeclaration +>VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration >enclosingDeclaration : Node >Node : Node >flags : TypeFormatFlags @@ -3027,9 +3136,6 @@ declare module ts { ObjectType = 48128, >ObjectType : TypeFlags - - Structured = 65025, ->Structured : TypeFlags } interface Type { >Type : Type @@ -3361,14 +3467,6 @@ declare module ts { */ isEarly?: boolean; >isEarly : boolean - - /** - * Parse error - error produced by parser when it scanner returns a token - * that parser does not understand in its current state - * (as opposed to grammar error when parser can interpret the token but interpretation is not legal from the grammar perespective) - */ - isParseError?: boolean; ->isParseError : boolean } enum DiagnosticCategory { >DiagnosticCategory : DiagnosticCategory @@ -3459,6 +3557,9 @@ declare module ts { preserveConstEnums?: boolean; >preserveConstEnums : boolean + allowNonTsExtensions?: boolean; +>allowNonTsExtensions : boolean + [option: string]: string | number | boolean; >option : string } @@ -3927,8 +4028,10 @@ declare module ts { >message : string >SourceFile : SourceFile - getDefaultLibFilename(): string; ->getDefaultLibFilename : () => string + getDefaultLibFilename(options: CompilerOptions): string; +>getDefaultLibFilename : (options: CompilerOptions) => string +>options : CompilerOptions +>CompilerOptions : CompilerOptions getCancellationToken?(): CancellationToken; >getCancellationToken : () => CancellationToken @@ -3956,9 +4059,7 @@ declare module ts { >getNewLine : () => string } } -declare module ts { ->ts : typeof ts - +declare module "typescript" { interface ErrorCallback { >ErrorCallback : ErrorCallback @@ -4004,6 +4105,9 @@ declare module ts { isReservedWord(): boolean; >isReservedWord : () => boolean + isUnterminated(): boolean; +>isUnterminated : () => boolean + reScanGreaterToken(): SyntaxKind; >reScanGreaterToken : () => SyntaxKind >SyntaxKind : SyntaxKind @@ -4028,6 +4132,13 @@ declare module ts { >setTextPos : (textPos: number) => void >textPos : number + lookAhead(callback: () => T): T; +>lookAhead : (callback: () => T) => T +>T : T +>callback : () => T +>T : T +>T : T + tryScan(callback: () => T): T; >tryScan : (callback: () => T) => T >T : T @@ -4116,35 +4227,17 @@ declare module ts { >languageVersion : ScriptTarget >ScriptTarget : ScriptTarget - function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback): Scanner; ->createScanner : (languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback) => Scanner + function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner; +>createScanner : (languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback) => Scanner >languageVersion : ScriptTarget >ScriptTarget : ScriptTarget >skipTrivia : boolean >text : string >onError : ErrorCallback >ErrorCallback : ErrorCallback ->onComment : CommentCallback ->CommentCallback : CommentCallback >Scanner : Scanner } -declare module ts { ->ts : typeof ts - - interface ReferencePathMatchResult { ->ReferencePathMatchResult : ReferencePathMatchResult - - fileReference?: FileReference; ->fileReference : FileReference ->FileReference : FileReference - - diagnostic?: DiagnosticMessage; ->diagnostic : DiagnosticMessage ->DiagnosticMessage : DiagnosticMessage - - isNoDefaultLib?: boolean; ->isNoDefaultLib : boolean - } +declare module "typescript" { function getNodeConstructor(kind: SyntaxKind): new () => Node; >getNodeConstructor : (kind: SyntaxKind) => new () => Node >kind : SyntaxKind @@ -4185,9 +4278,7 @@ declare module ts { >CompilerHost : CompilerHost >Program : Program } -declare module ts { ->ts : typeof ts - +declare module "typescript" { function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; >createTypeChecker : (program: Program, fullTypeCheck: boolean) => TypeChecker >program : Program @@ -4195,8 +4286,9 @@ declare module ts { >fullTypeCheck : boolean >TypeChecker : TypeChecker } -declare module ts { ->ts : typeof ts +declare module "typescript" { + var servicesVersion: string; +>servicesVersion : string interface Node { >Node : Node @@ -4463,18 +4555,20 @@ declare module ts { >fileName : string >IScriptSnapshot : IScriptSnapshot - getLocalizedDiagnosticMessages(): any; + getLocalizedDiagnosticMessages?(): any; >getLocalizedDiagnosticMessages : () => any - getCancellationToken(): CancellationToken; + getCancellationToken?(): CancellationToken; >getCancellationToken : () => CancellationToken >CancellationToken : CancellationToken getCurrentDirectory(): string; >getCurrentDirectory : () => string - getDefaultLibFilename(): string; ->getDefaultLibFilename : () => string + getDefaultLibFilename(options: CompilerOptions): string; +>getDefaultLibFilename : (options: CompilerOptions) => string +>options : CompilerOptions +>CompilerOptions : CompilerOptions } interface LanguageService { >LanguageService : LanguageService @@ -4510,11 +4604,10 @@ declare module ts { >TextSpan : TextSpan >ClassifiedSpan : ClassifiedSpan - getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): CompletionInfo; ->getCompletionsAtPosition : (fileName: string, position: number, isMemberCompletion: boolean) => CompletionInfo + getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; +>getCompletionsAtPosition : (fileName: string, position: number) => CompletionInfo >fileName : string >position : number ->isMemberCompletion : boolean >CompletionInfo : CompletionInfo getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; @@ -5576,12 +5669,10 @@ declare module ts { static typeParameterName: string; >typeParameterName : string - } - function displayPartsToString(displayParts: SymbolDisplayPart[]): string; ->displayPartsToString : (displayParts: SymbolDisplayPart[]) => string ->displayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart + static typeAlias: string; +>typeAlias : string + } interface DisplayPartsSymbolWriter extends SymbolWriter { >DisplayPartsSymbolWriter : DisplayPartsSymbolWriter >SymbolWriter : SymbolWriter @@ -5590,6 +5681,11 @@ declare module ts { >displayParts : () => SymbolDisplayPart[] >SymbolDisplayPart : SymbolDisplayPart } + function displayPartsToString(displayParts: SymbolDisplayPart[]): string; +>displayPartsToString : (displayParts: SymbolDisplayPart[]) => string +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + function getDefaultCompilerOptions(): CompilerOptions; >getDefaultCompilerOptions : () => CompilerOptions >CompilerOptions : CompilerOptions @@ -5641,7 +5737,4 @@ declare module ts { >Logger : Logger >Classifier : Classifier } - -export = ts; ->ts : typeof ts diff --git a/tests/baselines/reference/APISample_standalone_compile.js b/tests/baselines/reference/APISample_standalone_compile.js index e1f55f8a4c2..fff2226f320 100644 --- a/tests/baselines/reference/APISample_standalone_compile.js +++ b/tests/baselines/reference/APISample_standalone_compile.js @@ -150,92 +150,91 @@ declare module ts { SetKeyword = 117, StringKeyword = 118, TypeKeyword = 119, - Missing = 120, - QualifiedName = 121, - ComputedPropertyName = 122, - TypeParameter = 123, - Parameter = 124, - Property = 125, - Method = 126, - Constructor = 127, - GetAccessor = 128, - SetAccessor = 129, - CallSignature = 130, - ConstructSignature = 131, - IndexSignature = 132, - TypeReference = 133, - FunctionType = 134, - ConstructorType = 135, - TypeQuery = 136, - TypeLiteral = 137, - ArrayType = 138, - TupleType = 139, - UnionType = 140, - ParenthesizedType = 141, - ArrayLiteralExpression = 142, - ObjectLiteralExpression = 143, - PropertyAccessExpression = 144, - ElementAccessExpression = 145, - CallExpression = 146, - NewExpression = 147, - TaggedTemplateExpression = 148, - TypeAssertionExpression = 149, - ParenthesizedExpression = 150, - FunctionExpression = 151, - ArrowFunction = 152, - DeleteExpression = 153, - TypeOfExpression = 154, - VoidExpression = 155, - PrefixUnaryExpression = 156, - PostfixUnaryExpression = 157, - BinaryExpression = 158, - ConditionalExpression = 159, - TemplateExpression = 160, - YieldExpression = 161, - OmittedExpression = 162, - TemplateSpan = 163, - Block = 164, - VariableStatement = 165, - EmptyStatement = 166, - ExpressionStatement = 167, - IfStatement = 168, - DoStatement = 169, - WhileStatement = 170, - ForStatement = 171, - ForInStatement = 172, - ContinueStatement = 173, - BreakStatement = 174, - ReturnStatement = 175, - WithStatement = 176, - SwitchStatement = 177, - LabeledStatement = 178, - ThrowStatement = 179, - TryStatement = 180, - TryBlock = 181, - CatchBlock = 182, - FinallyBlock = 183, - DebuggerStatement = 184, - VariableDeclaration = 185, - FunctionDeclaration = 186, - FunctionBlock = 187, - ClassDeclaration = 188, - InterfaceDeclaration = 189, - TypeAliasDeclaration = 190, - EnumDeclaration = 191, - ModuleDeclaration = 192, - ModuleBlock = 193, - ImportDeclaration = 194, - ExportAssignment = 195, - CaseClause = 196, - DefaultClause = 197, - HeritageClause = 198, - PropertyAssignment = 199, - ShorthandPropertyAssignment = 200, - EnumMember = 201, - SourceFile = 202, - Program = 203, - SyntaxList = 204, - Count = 205, + QualifiedName = 120, + ComputedPropertyName = 121, + TypeParameter = 122, + Parameter = 123, + Property = 124, + Method = 125, + Constructor = 126, + GetAccessor = 127, + SetAccessor = 128, + CallSignature = 129, + ConstructSignature = 130, + IndexSignature = 131, + TypeReference = 132, + FunctionType = 133, + ConstructorType = 134, + TypeQuery = 135, + TypeLiteral = 136, + ArrayType = 137, + TupleType = 138, + UnionType = 139, + ParenthesizedType = 140, + ArrayLiteralExpression = 141, + ObjectLiteralExpression = 142, + PropertyAccessExpression = 143, + ElementAccessExpression = 144, + CallExpression = 145, + NewExpression = 146, + TaggedTemplateExpression = 147, + TypeAssertionExpression = 148, + ParenthesizedExpression = 149, + FunctionExpression = 150, + ArrowFunction = 151, + DeleteExpression = 152, + TypeOfExpression = 153, + VoidExpression = 154, + PrefixUnaryExpression = 155, + PostfixUnaryExpression = 156, + BinaryExpression = 157, + ConditionalExpression = 158, + TemplateExpression = 159, + YieldExpression = 160, + OmittedExpression = 161, + TemplateSpan = 162, + Block = 163, + VariableStatement = 164, + EmptyStatement = 165, + ExpressionStatement = 166, + IfStatement = 167, + DoStatement = 168, + WhileStatement = 169, + ForStatement = 170, + ForInStatement = 171, + ContinueStatement = 172, + BreakStatement = 173, + ReturnStatement = 174, + WithStatement = 175, + SwitchStatement = 176, + LabeledStatement = 177, + ThrowStatement = 178, + TryStatement = 179, + TryBlock = 180, + FinallyBlock = 181, + DebuggerStatement = 182, + VariableDeclaration = 183, + FunctionDeclaration = 184, + ClassDeclaration = 185, + InterfaceDeclaration = 186, + TypeAliasDeclaration = 187, + EnumDeclaration = 188, + ModuleDeclaration = 189, + ModuleBlock = 190, + ImportDeclaration = 191, + ExportAssignment = 192, + ExternalModuleReference = 193, + CaseClause = 194, + DefaultClause = 195, + HeritageClause = 196, + CatchClause = 197, + PropertyAssignment = 198, + ShorthandPropertyAssignment = 199, + EnumMember = 200, + SourceFile = 201, + Program = 202, + SyntaxList = 203, + Count = 204, FirstAssignment = 51, LastAssignment = 62, FirstReservedWord = 64, @@ -244,11 +243,11 @@ declare module ts { LastKeyword = 119, FirstFutureReservedWord = 100, LastFutureReservedWord = 108, - FirstTypeNode = 133, - LastTypeNode = 141, + FirstTypeNode = 132, + LastTypeNode = 140, FirstPunctuation = 13, LastPunctuation = 62, - FirstToken = 1, + FirstToken = 0, LastToken = 119, FirstTriviaToken = 2, LastTriviaToken = 5, @@ -260,12 +259,11 @@ declare module ts { LastOperator = 62, FirstBinaryOperator = 23, LastBinaryOperator = 62, + FirstNode = 120, } const enum NodeFlags { Export = 1, Ambient = 2, - QuestionMark = 4, - Rest = 8, Public = 16, Private = 32, Protected = 64, @@ -285,6 +283,8 @@ declare module ts { DisallowIn = 2, Yield = 4, GeneratorParameter = 8, + ContainsError = 16, + HasPropagatedChildContainsErrorFlag = 32, } interface Node extends TextRange { kind: SyntaxKind; @@ -301,7 +301,7 @@ declare module ts { interface NodeArray extends Array, TextRange { hasTrailingComma?: boolean; } - interface ModifiersArray extends Array { + interface ModifiersArray extends NodeArray { flags: number; } interface Identifier extends PrimaryExpression { @@ -312,11 +312,6 @@ declare module ts { right: Identifier; } type EntityName = Identifier | QualifiedName; - interface ParsedSignature { - typeParameters?: NodeArray; - parameters: NodeArray; - type?: TypeNode; - } type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; interface Declaration extends Node { _declarationBrand: any; @@ -330,21 +325,43 @@ declare module ts { constraint?: TypeNode; expression?: Expression; } - interface SignatureDeclaration extends Declaration, ParsedSignature { + interface SignatureDeclaration extends Declaration { + typeParameters?: NodeArray; + parameters: NodeArray; + type?: TypeNode; } interface VariableDeclaration extends Declaration { name: Identifier; type?: TypeNode; initializer?: Expression; } + interface ParameterDeclaration extends Declaration { + dotDotDotToken?: Node; + name: Identifier; + questionToken?: Node; + type?: TypeNode | StringLiteralExpression; + initializer?: Expression; + } interface PropertyDeclaration extends Declaration, ClassElement { + _propertyDeclarationBrand: any; + questionToken?: Node; type?: TypeNode; initializer?: Expression; } - interface ShortHandPropertyDeclaration extends Declaration { - name: Identifier; + type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; + type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; + interface ObjectLiteralElement extends Declaration { + _objectLiteralBrandBrand: any; } - interface ParameterDeclaration extends VariableDeclaration { + interface ShorthandPropertyAssignment extends ObjectLiteralElement { + name: Identifier; + questionToken?: Node; + } + interface PropertyAssignment extends ObjectLiteralElement { + _propertyAssignmentBrand: any; + name: DeclarationName; + questionToken?: Node; + initializer: Expression; } /** * Several node kinds share function-like features such as a signature, @@ -357,25 +374,31 @@ declare module ts { interface FunctionLikeDeclaration extends SignatureDeclaration { _functionLikeDeclarationBrand: any; asteriskToken?: Node; + questionToken?: Node; body?: Block | Expression; } interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { name: Identifier; body?: Block; } - interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement { + interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { body?: Block; } interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { body?: Block; } - interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement { - body?: Block; + interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { + _accessorDeclarationBrand: any; + body: Block; } interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { _indexSignatureDeclarationBrand: any; } interface TypeNode extends Node { + _typeNodeBrand: any; + } + interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { + _functionOrConstructorTypeNodeBrand: any; } interface TypeReferenceNode extends TypeNode { typeName: EntityName; @@ -399,9 +422,6 @@ declare module ts { interface ParenthesizedTypeNode extends TypeNode { type: TypeNode; } - interface StringLiteralTypeNode extends TypeNode { - text: string; - } interface Expression extends Node { _expressionBrand: any; contextualType?: Type; @@ -458,6 +478,10 @@ declare module ts { } interface LiteralExpression extends PrimaryExpression { text: string; + isUnterminated?: boolean; + } + interface StringLiteralExpression extends LiteralExpression { + _stringLiteralExpressionBrand: any; } interface TemplateExpression extends PrimaryExpression { head: LiteralExpression; @@ -474,7 +498,7 @@ declare module ts { elements: NodeArray; } interface ObjectLiteralExpression extends PrimaryExpression, Declaration { - properties: NodeArray; + properties: NodeArray; } interface PropertyAccessExpression extends MemberExpression { expression: LeftHandSideExpression; @@ -482,7 +506,7 @@ declare module ts { } interface ElementAccessExpression extends MemberExpression { expression: LeftHandSideExpression; - argumentExpression: Expression; + argumentExpression?: Expression; } interface CallExpression extends LeftHandSideExpression { expression: LeftHandSideExpression; @@ -551,10 +575,14 @@ declare module ts { expression: Expression; clauses: NodeArray; } - interface CaseOrDefaultClause extends Node { + interface CaseClause extends Node { expression?: Expression; statements: NodeArray; } + interface DefaultClause extends Node { + statements: NodeArray; + } + type CaseOrDefaultClause = CaseClause | DefaultClause; interface LabeledStatement extends Statement { label: Identifier; statement: Statement; @@ -564,12 +592,13 @@ declare module ts { } interface TryStatement extends Statement { tryBlock: Block; - catchBlock?: CatchBlock; + catchClause?: CatchClause; finallyBlock?: Block; } - interface CatchBlock extends Block, Declaration { - variable: Identifier; + interface CatchClause extends Declaration { + name: Identifier; type?: TypeNode; + block: Block; } interface ModuleElement extends Node { _moduleElementBrand: any; @@ -614,8 +643,10 @@ declare module ts { } interface ImportDeclaration extends Declaration, ModuleElement { name: Identifier; - entityName?: EntityName; - externalModuleName?: LiteralExpression; + moduleReference: EntityName | ExternalModuleReference; + } + interface ExternalModuleReference extends Node { + expression?: Expression; } interface ExportAssignment extends Statement, ModuleElement { exportName: Identifier; @@ -628,6 +659,7 @@ declare module ts { } interface SourceFile extends Declaration { statements: NodeArray; + endOfFileToken: Node; filename: string; text: string; getLineAndCharacterFromPosition(position: number): LineAndCharacter; @@ -636,10 +668,11 @@ declare module ts { amdDependencies: string[]; amdModuleName: string; referencedFiles: FileReference[]; - semanticDiagnostics: Diagnostic[]; + referenceDiagnostics: Diagnostic[]; parseDiagnostics: Diagnostic[]; grammarDiagnostics: Diagnostic[]; getSyntacticDiagnostics(): Diagnostic[]; + semanticDiagnostics: Diagnostic[]; hasNoDefaultLib: boolean; externalModuleIndicator: Node; nodeCount: number; @@ -701,10 +734,8 @@ declare module ts { getIdentifierCount(): number; getSymbolCount(): number; getTypeCount(): number; - checkProgram(): void; emitFiles(targetSourceFile?: SourceFile): EmitResult; - getParentOfSymbol(symbol: Symbol): Symbol; - getNarrowedTypeOfSymbol(symbol: Symbol, node: Node): Type; + getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; getDeclaredTypeOfSymbol(symbol: Symbol): Type; getPropertiesOfType(type: Type): Symbol[]; getPropertyOfType(type: Type, propertyName: string): Symbol; @@ -712,16 +743,16 @@ declare module ts { getIndexTypeOfType(type: Type, kind: IndexKind): Type; getReturnTypeOfSignature(signature: Signature): Type; getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; - getSymbolInfo(node: Node): Symbol; + getSymbolAtLocation(node: Node): Symbol; getShorthandAssignmentValueSymbol(location: Node): Symbol; - getTypeOfNode(node: Node): Type; + getTypeAtLocation(node: Node): Type; typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; getSymbolDisplayBuilder(): SymbolDisplayBuilder; getFullyQualifiedName(symbol: Symbol): string; getAugmentedPropertiesOfType(type: Type): Symbol[]; getRootSymbols(symbol: Symbol): Symbol[]; - getContextualType(node: Node): Type; + getContextualType(node: Expression): Type; getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; @@ -795,10 +826,10 @@ declare module ts { isTopLevelValueImportWithEntityName(node: ImportDeclaration): boolean; getNodeCheckFlags(node: Node): NodeCheckFlags; getEnumMemberValue(node: EnumMember): number; - hasSemanticErrors(): boolean; + hasSemanticErrors(sourceFile?: SourceFile): boolean; isDeclarationVisible(node: Declaration): boolean; isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; - writeTypeAtLocation(location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; + writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; @@ -942,7 +973,6 @@ declare module ts { StringLike = 258, NumberLike = 132, ObjectType = 48128, - Structured = 65025, } interface Type { flags: TypeFlags; @@ -1055,12 +1085,6 @@ declare module ts { * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit */ isEarly?: boolean; - /** - * Parse error - error produced by parser when it scanner returns a token - * that parser does not understand in its current state - * (as opposed to grammar error when parser can interpret the token but interpretation is not legal from the grammar perespective) - */ - isParseError?: boolean; } enum DiagnosticCategory { Warning = 0, @@ -1092,6 +1116,7 @@ declare module ts { version?: boolean; watch?: boolean; preserveConstEnums?: boolean; + allowNonTsExtensions?: boolean; [option: string]: string | number | boolean; } const enum ModuleKind { @@ -1252,7 +1277,7 @@ declare module ts { } interface CompilerHost { getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; - getDefaultLibFilename(): string; + getDefaultLibFilename(options: CompilerOptions): string; getCancellationToken?(): CancellationToken; writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; getCurrentDirectory(): string; @@ -1278,12 +1303,14 @@ declare module ts { hasPrecedingLineBreak(): boolean; isIdentifier(): boolean; isReservedWord(): boolean; + isUnterminated(): boolean; reScanGreaterToken(): SyntaxKind; reScanSlashToken(): SyntaxKind; reScanTemplateToken(): SyntaxKind; scan(): SyntaxKind; setText(text: string): void; setTextPos(textPos: number): void; + lookAhead(callback: () => T): T; tryScan(callback: () => T): T; } function tokenToString(t: SyntaxKind): string; @@ -1305,14 +1332,9 @@ declare module ts { function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; - function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback): Scanner; + function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner; } declare module ts { - interface ReferencePathMatchResult { - fileReference?: FileReference; - diagnostic?: DiagnosticMessage; - isNoDefaultLib?: boolean; - } function getNodeConstructor(kind: SyntaxKind): new () => Node; function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; @@ -1322,6 +1344,7 @@ declare module ts { function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; } declare module ts { + var servicesVersion: string; interface Node { getSourceFile(): SourceFile; getChildCount(sourceFile?: SourceFile): number; @@ -1409,10 +1432,10 @@ declare module ts { getScriptVersion(fileName: string): string; getScriptIsOpen(fileName: string): boolean; getScriptSnapshot(fileName: string): IScriptSnapshot; - getLocalizedDiagnosticMessages(): any; - getCancellationToken(): CancellationToken; + getLocalizedDiagnosticMessages?(): any; + getCancellationToken?(): CancellationToken; getCurrentDirectory(): string; - getDefaultLibFilename(): string; + getDefaultLibFilename(options: CompilerOptions): string; } interface LanguageService { cleanupSemanticCache(): void; @@ -1421,7 +1444,7 @@ declare module ts { getCompilerOptionsDiagnostics(): Diagnostic[]; getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; - getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): CompletionInfo; + getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; @@ -1809,11 +1832,12 @@ declare module ts { static interfaceName: string; static moduleName: string; static typeParameterName: string; + static typeAlias: string; } - function displayPartsToString(displayParts: SymbolDisplayPart[]): string; interface DisplayPartsSymbolWriter extends SymbolWriter { displayParts(): SymbolDisplayPart[]; } + function displayPartsToString(displayParts: SymbolDisplayPart[]): string; function getDefaultCompilerOptions(): CompilerOptions; class OperationCanceledException { } diff --git a/tests/baselines/reference/APISample_standalone_compile.types b/tests/baselines/reference/APISample_standalone_compile.types index ebde76e4aa4..c69e655aec1 100644 --- a/tests/baselines/reference/APISample_standalone_compile.types +++ b/tests/baselines/reference/APISample_standalone_compile.types @@ -421,262 +421,259 @@ declare module ts { TypeKeyword = 119, >TypeKeyword : SyntaxKind - Missing = 120, ->Missing : SyntaxKind - - QualifiedName = 121, + QualifiedName = 120, >QualifiedName : SyntaxKind - ComputedPropertyName = 122, + ComputedPropertyName = 121, >ComputedPropertyName : SyntaxKind - TypeParameter = 123, + TypeParameter = 122, >TypeParameter : SyntaxKind - Parameter = 124, + Parameter = 123, >Parameter : SyntaxKind - Property = 125, + Property = 124, >Property : SyntaxKind - Method = 126, + Method = 125, >Method : SyntaxKind - Constructor = 127, + Constructor = 126, >Constructor : SyntaxKind - GetAccessor = 128, + GetAccessor = 127, >GetAccessor : SyntaxKind - SetAccessor = 129, + SetAccessor = 128, >SetAccessor : SyntaxKind - CallSignature = 130, + CallSignature = 129, >CallSignature : SyntaxKind - ConstructSignature = 131, + ConstructSignature = 130, >ConstructSignature : SyntaxKind - IndexSignature = 132, + IndexSignature = 131, >IndexSignature : SyntaxKind - TypeReference = 133, + TypeReference = 132, >TypeReference : SyntaxKind - FunctionType = 134, + FunctionType = 133, >FunctionType : SyntaxKind - ConstructorType = 135, + ConstructorType = 134, >ConstructorType : SyntaxKind - TypeQuery = 136, + TypeQuery = 135, >TypeQuery : SyntaxKind - TypeLiteral = 137, + TypeLiteral = 136, >TypeLiteral : SyntaxKind - ArrayType = 138, + ArrayType = 137, >ArrayType : SyntaxKind - TupleType = 139, + TupleType = 138, >TupleType : SyntaxKind - UnionType = 140, + UnionType = 139, >UnionType : SyntaxKind - ParenthesizedType = 141, + ParenthesizedType = 140, >ParenthesizedType : SyntaxKind - ArrayLiteralExpression = 142, + ArrayLiteralExpression = 141, >ArrayLiteralExpression : SyntaxKind - ObjectLiteralExpression = 143, + ObjectLiteralExpression = 142, >ObjectLiteralExpression : SyntaxKind - PropertyAccessExpression = 144, + PropertyAccessExpression = 143, >PropertyAccessExpression : SyntaxKind - ElementAccessExpression = 145, + ElementAccessExpression = 144, >ElementAccessExpression : SyntaxKind - CallExpression = 146, + CallExpression = 145, >CallExpression : SyntaxKind - NewExpression = 147, + NewExpression = 146, >NewExpression : SyntaxKind - TaggedTemplateExpression = 148, + TaggedTemplateExpression = 147, >TaggedTemplateExpression : SyntaxKind - TypeAssertionExpression = 149, + TypeAssertionExpression = 148, >TypeAssertionExpression : SyntaxKind - ParenthesizedExpression = 150, + ParenthesizedExpression = 149, >ParenthesizedExpression : SyntaxKind - FunctionExpression = 151, + FunctionExpression = 150, >FunctionExpression : SyntaxKind - ArrowFunction = 152, + ArrowFunction = 151, >ArrowFunction : SyntaxKind - DeleteExpression = 153, + DeleteExpression = 152, >DeleteExpression : SyntaxKind - TypeOfExpression = 154, + TypeOfExpression = 153, >TypeOfExpression : SyntaxKind - VoidExpression = 155, + VoidExpression = 154, >VoidExpression : SyntaxKind - PrefixUnaryExpression = 156, + PrefixUnaryExpression = 155, >PrefixUnaryExpression : SyntaxKind - PostfixUnaryExpression = 157, + PostfixUnaryExpression = 156, >PostfixUnaryExpression : SyntaxKind - BinaryExpression = 158, + BinaryExpression = 157, >BinaryExpression : SyntaxKind - ConditionalExpression = 159, + ConditionalExpression = 158, >ConditionalExpression : SyntaxKind - TemplateExpression = 160, + TemplateExpression = 159, >TemplateExpression : SyntaxKind - YieldExpression = 161, + YieldExpression = 160, >YieldExpression : SyntaxKind - OmittedExpression = 162, + OmittedExpression = 161, >OmittedExpression : SyntaxKind - TemplateSpan = 163, + TemplateSpan = 162, >TemplateSpan : SyntaxKind - Block = 164, + Block = 163, >Block : SyntaxKind - VariableStatement = 165, + VariableStatement = 164, >VariableStatement : SyntaxKind - EmptyStatement = 166, + EmptyStatement = 165, >EmptyStatement : SyntaxKind - ExpressionStatement = 167, + ExpressionStatement = 166, >ExpressionStatement : SyntaxKind - IfStatement = 168, + IfStatement = 167, >IfStatement : SyntaxKind - DoStatement = 169, + DoStatement = 168, >DoStatement : SyntaxKind - WhileStatement = 170, + WhileStatement = 169, >WhileStatement : SyntaxKind - ForStatement = 171, + ForStatement = 170, >ForStatement : SyntaxKind - ForInStatement = 172, + ForInStatement = 171, >ForInStatement : SyntaxKind - ContinueStatement = 173, + ContinueStatement = 172, >ContinueStatement : SyntaxKind - BreakStatement = 174, + BreakStatement = 173, >BreakStatement : SyntaxKind - ReturnStatement = 175, + ReturnStatement = 174, >ReturnStatement : SyntaxKind - WithStatement = 176, + WithStatement = 175, >WithStatement : SyntaxKind - SwitchStatement = 177, + SwitchStatement = 176, >SwitchStatement : SyntaxKind - LabeledStatement = 178, + LabeledStatement = 177, >LabeledStatement : SyntaxKind - ThrowStatement = 179, + ThrowStatement = 178, >ThrowStatement : SyntaxKind - TryStatement = 180, + TryStatement = 179, >TryStatement : SyntaxKind - TryBlock = 181, + TryBlock = 180, >TryBlock : SyntaxKind - CatchBlock = 182, ->CatchBlock : SyntaxKind - - FinallyBlock = 183, + FinallyBlock = 181, >FinallyBlock : SyntaxKind - DebuggerStatement = 184, + DebuggerStatement = 182, >DebuggerStatement : SyntaxKind - VariableDeclaration = 185, + VariableDeclaration = 183, >VariableDeclaration : SyntaxKind - FunctionDeclaration = 186, + FunctionDeclaration = 184, >FunctionDeclaration : SyntaxKind - FunctionBlock = 187, ->FunctionBlock : SyntaxKind - - ClassDeclaration = 188, + ClassDeclaration = 185, >ClassDeclaration : SyntaxKind - InterfaceDeclaration = 189, + InterfaceDeclaration = 186, >InterfaceDeclaration : SyntaxKind - TypeAliasDeclaration = 190, + TypeAliasDeclaration = 187, >TypeAliasDeclaration : SyntaxKind - EnumDeclaration = 191, + EnumDeclaration = 188, >EnumDeclaration : SyntaxKind - ModuleDeclaration = 192, + ModuleDeclaration = 189, >ModuleDeclaration : SyntaxKind - ModuleBlock = 193, + ModuleBlock = 190, >ModuleBlock : SyntaxKind - ImportDeclaration = 194, + ImportDeclaration = 191, >ImportDeclaration : SyntaxKind - ExportAssignment = 195, + ExportAssignment = 192, >ExportAssignment : SyntaxKind - CaseClause = 196, + ExternalModuleReference = 193, +>ExternalModuleReference : SyntaxKind + + CaseClause = 194, >CaseClause : SyntaxKind - DefaultClause = 197, + DefaultClause = 195, >DefaultClause : SyntaxKind - HeritageClause = 198, + HeritageClause = 196, >HeritageClause : SyntaxKind - PropertyAssignment = 199, + CatchClause = 197, +>CatchClause : SyntaxKind + + PropertyAssignment = 198, >PropertyAssignment : SyntaxKind - ShorthandPropertyAssignment = 200, + ShorthandPropertyAssignment = 199, >ShorthandPropertyAssignment : SyntaxKind - EnumMember = 201, + EnumMember = 200, >EnumMember : SyntaxKind - SourceFile = 202, + SourceFile = 201, >SourceFile : SyntaxKind - Program = 203, + Program = 202, >Program : SyntaxKind - SyntaxList = 204, + SyntaxList = 203, >SyntaxList : SyntaxKind - Count = 205, + Count = 204, >Count : SyntaxKind FirstAssignment = 51, @@ -703,10 +700,10 @@ declare module ts { LastFutureReservedWord = 108, >LastFutureReservedWord : SyntaxKind - FirstTypeNode = 133, + FirstTypeNode = 132, >FirstTypeNode : SyntaxKind - LastTypeNode = 141, + LastTypeNode = 140, >LastTypeNode : SyntaxKind FirstPunctuation = 13, @@ -715,7 +712,7 @@ declare module ts { LastPunctuation = 62, >LastPunctuation : SyntaxKind - FirstToken = 1, + FirstToken = 0, >FirstToken : SyntaxKind LastToken = 119, @@ -750,6 +747,9 @@ declare module ts { LastBinaryOperator = 62, >LastBinaryOperator : SyntaxKind + + FirstNode = 120, +>FirstNode : SyntaxKind } const enum NodeFlags { >NodeFlags : NodeFlags @@ -760,12 +760,6 @@ declare module ts { Ambient = 2, >Ambient : NodeFlags - QuestionMark = 4, ->QuestionMark : NodeFlags - - Rest = 8, ->Rest : NodeFlags - Public = 16, >Public : NodeFlags @@ -819,6 +813,12 @@ declare module ts { GeneratorParameter = 8, >GeneratorParameter : ParserContextFlags + + ContainsError = 16, +>ContainsError : ParserContextFlags + + HasPropagatedChildContainsErrorFlag = 32, +>HasPropagatedChildContainsErrorFlag : ParserContextFlags } interface Node extends TextRange { >Node : Node @@ -873,9 +873,9 @@ declare module ts { hasTrailingComma?: boolean; >hasTrailingComma : boolean } - interface ModifiersArray extends Array { + interface ModifiersArray extends NodeArray { >ModifiersArray : ModifiersArray ->Array : T[] +>NodeArray : NodeArray >Node : Node flags: number; @@ -905,23 +905,6 @@ declare module ts { >Identifier : Identifier >QualifiedName : QualifiedName - interface ParsedSignature { ->ParsedSignature : ParsedSignature - - typeParameters?: NodeArray; ->typeParameters : NodeArray ->NodeArray : NodeArray ->TypeParameterDeclaration : TypeParameterDeclaration - - parameters: NodeArray; ->parameters : NodeArray ->NodeArray : NodeArray ->ParameterDeclaration : ParameterDeclaration - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - } type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; >DeclarationName : Identifier | LiteralExpression | ComputedPropertyName >Identifier : Identifier @@ -963,10 +946,23 @@ declare module ts { >expression : Expression >Expression : Expression } - interface SignatureDeclaration extends Declaration, ParsedSignature { + interface SignatureDeclaration extends Declaration { >SignatureDeclaration : SignatureDeclaration >Declaration : Declaration ->ParsedSignature : ParsedSignature + + typeParameters?: NodeArray; +>typeParameters : NodeArray +>NodeArray : NodeArray +>TypeParameterDeclaration : TypeParameterDeclaration + + parameters: NodeArray; +>parameters : NodeArray +>NodeArray : NodeArray +>ParameterDeclaration : ParameterDeclaration + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode } interface VariableDeclaration extends Declaration { >VariableDeclaration : VariableDeclaration @@ -982,6 +978,31 @@ declare module ts { initializer?: Expression; >initializer : Expression +>Expression : Expression + } + interface ParameterDeclaration extends Declaration { +>ParameterDeclaration : ParameterDeclaration +>Declaration : Declaration + + dotDotDotToken?: Node; +>dotDotDotToken : Node +>Node : Node + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + questionToken?: Node; +>questionToken : Node +>Node : Node + + type?: TypeNode | StringLiteralExpression; +>type : TypeNode | StringLiteralExpression +>TypeNode : TypeNode +>StringLiteralExpression : StringLiteralExpression + + initializer?: Expression; +>initializer : Expression >Expression : Expression } interface PropertyDeclaration extends Declaration, ClassElement { @@ -989,6 +1010,13 @@ declare module ts { >Declaration : Declaration >ClassElement : ClassElement + _propertyDeclarationBrand: any; +>_propertyDeclarationBrand : any + + questionToken?: Node; +>questionToken : Node +>Node : Node + type?: TypeNode; >type : TypeNode >TypeNode : TypeNode @@ -997,17 +1025,53 @@ declare module ts { >initializer : Expression >Expression : Expression } - interface ShortHandPropertyDeclaration extends Declaration { ->ShortHandPropertyDeclaration : ShortHandPropertyDeclaration + type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; +>VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration +>VariableDeclaration : VariableDeclaration +>ParameterDeclaration : ParameterDeclaration + + type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; +>VariableOrParameterOrPropertyDeclaration : ParameterDeclaration | VariableDeclaration | PropertyDeclaration +>VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration +>PropertyDeclaration : PropertyDeclaration + + interface ObjectLiteralElement extends Declaration { +>ObjectLiteralElement : ObjectLiteralElement >Declaration : Declaration + _objectLiteralBrandBrand: any; +>_objectLiteralBrandBrand : any + } + interface ShorthandPropertyAssignment extends ObjectLiteralElement { +>ShorthandPropertyAssignment : ShorthandPropertyAssignment +>ObjectLiteralElement : ObjectLiteralElement + name: Identifier; >name : Identifier >Identifier : Identifier + + questionToken?: Node; +>questionToken : Node +>Node : Node } - interface ParameterDeclaration extends VariableDeclaration { ->ParameterDeclaration : ParameterDeclaration ->VariableDeclaration : VariableDeclaration + interface PropertyAssignment extends ObjectLiteralElement { +>PropertyAssignment : PropertyAssignment +>ObjectLiteralElement : ObjectLiteralElement + + _propertyAssignmentBrand: any; +>_propertyAssignmentBrand : any + + name: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName + + questionToken?: Node; +>questionToken : Node +>Node : Node + + initializer: Expression; +>initializer : Expression +>Expression : Expression } /** * Several node kinds share function-like features such as a signature, @@ -1026,6 +1090,10 @@ declare module ts { asteriskToken?: Node; >asteriskToken : Node +>Node : Node + + questionToken?: Node; +>questionToken : Node >Node : Node body?: Block | Expression; @@ -1046,10 +1114,11 @@ declare module ts { >body : Block >Block : Block } - interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement { + interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { >MethodDeclaration : MethodDeclaration >FunctionLikeDeclaration : FunctionLikeDeclaration >ClassElement : ClassElement +>ObjectLiteralElement : ObjectLiteralElement body?: Block; >body : Block @@ -1064,12 +1133,16 @@ declare module ts { >body : Block >Block : Block } - interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement { + interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { >AccessorDeclaration : AccessorDeclaration >FunctionLikeDeclaration : FunctionLikeDeclaration >ClassElement : ClassElement +>ObjectLiteralElement : ObjectLiteralElement - body?: Block; + _accessorDeclarationBrand: any; +>_accessorDeclarationBrand : any + + body: Block; >body : Block >Block : Block } @@ -1084,6 +1157,17 @@ declare module ts { interface TypeNode extends Node { >TypeNode : TypeNode >Node : Node + + _typeNodeBrand: any; +>_typeNodeBrand : any + } + interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { +>FunctionOrConstructorTypeNode : FunctionOrConstructorTypeNode +>TypeNode : TypeNode +>SignatureDeclaration : SignatureDeclaration + + _functionOrConstructorTypeNodeBrand: any; +>_functionOrConstructorTypeNodeBrand : any } interface TypeReferenceNode extends TypeNode { >TypeReferenceNode : TypeReferenceNode @@ -1149,13 +1233,6 @@ declare module ts { type: TypeNode; >type : TypeNode >TypeNode : TypeNode - } - interface StringLiteralTypeNode extends TypeNode { ->StringLiteralTypeNode : StringLiteralTypeNode ->TypeNode : TypeNode - - text: string; ->text : string } interface Expression extends Node { >Expression : Expression @@ -1315,6 +1392,16 @@ declare module ts { text: string; >text : string + + isUnterminated?: boolean; +>isUnterminated : boolean + } + interface StringLiteralExpression extends LiteralExpression { +>StringLiteralExpression : StringLiteralExpression +>LiteralExpression : LiteralExpression + + _stringLiteralExpressionBrand: any; +>_stringLiteralExpressionBrand : any } interface TemplateExpression extends PrimaryExpression { >TemplateExpression : TemplateExpression @@ -1363,10 +1450,10 @@ declare module ts { >PrimaryExpression : PrimaryExpression >Declaration : Declaration - properties: NodeArray; ->properties : NodeArray + properties: NodeArray; +>properties : NodeArray >NodeArray : NodeArray ->Declaration : Declaration +>ObjectLiteralElement : ObjectLiteralElement } interface PropertyAccessExpression extends MemberExpression { >PropertyAccessExpression : PropertyAccessExpression @@ -1388,7 +1475,7 @@ declare module ts { >expression : LeftHandSideExpression >LeftHandSideExpression : LeftHandSideExpression - argumentExpression: Expression; + argumentExpression?: Expression; >argumentExpression : Expression >Expression : Expression } @@ -1595,12 +1682,12 @@ declare module ts { >Expression : Expression clauses: NodeArray; ->clauses : NodeArray +>clauses : NodeArray >NodeArray : NodeArray ->CaseOrDefaultClause : CaseOrDefaultClause +>CaseOrDefaultClause : CaseClause | DefaultClause } - interface CaseOrDefaultClause extends Node { ->CaseOrDefaultClause : CaseOrDefaultClause + interface CaseClause extends Node { +>CaseClause : CaseClause >Node : Node expression?: Expression; @@ -1612,6 +1699,20 @@ declare module ts { >NodeArray : NodeArray >Statement : Statement } + interface DefaultClause extends Node { +>DefaultClause : DefaultClause +>Node : Node + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>Statement : Statement + } + type CaseOrDefaultClause = CaseClause | DefaultClause; +>CaseOrDefaultClause : CaseClause | DefaultClause +>CaseClause : CaseClause +>DefaultClause : DefaultClause + interface LabeledStatement extends Statement { >LabeledStatement : LabeledStatement >Statement : Statement @@ -1640,26 +1741,29 @@ declare module ts { >tryBlock : Block >Block : Block - catchBlock?: CatchBlock; ->catchBlock : CatchBlock ->CatchBlock : CatchBlock + catchClause?: CatchClause; +>catchClause : CatchClause +>CatchClause : CatchClause finallyBlock?: Block; >finallyBlock : Block >Block : Block } - interface CatchBlock extends Block, Declaration { ->CatchBlock : CatchBlock ->Block : Block + interface CatchClause extends Declaration { +>CatchClause : CatchClause >Declaration : Declaration - variable: Identifier; ->variable : Identifier + name: Identifier; +>name : Identifier >Identifier : Identifier type?: TypeNode; >type : TypeNode >TypeNode : TypeNode + + block: Block; +>block : Block +>Block : Block } interface ModuleElement extends Node { >ModuleElement : ModuleElement @@ -1809,13 +1913,18 @@ declare module ts { >name : Identifier >Identifier : Identifier - entityName?: EntityName; ->entityName : Identifier | QualifiedName + moduleReference: EntityName | ExternalModuleReference; +>moduleReference : Identifier | QualifiedName | ExternalModuleReference >EntityName : Identifier | QualifiedName +>ExternalModuleReference : ExternalModuleReference + } + interface ExternalModuleReference extends Node { +>ExternalModuleReference : ExternalModuleReference +>Node : Node - externalModuleName?: LiteralExpression; ->externalModuleName : LiteralExpression ->LiteralExpression : LiteralExpression + expression?: Expression; +>expression : Expression +>Expression : Expression } interface ExportAssignment extends Statement, ModuleElement { >ExportAssignment : ExportAssignment @@ -1849,6 +1958,10 @@ declare module ts { >NodeArray : NodeArray >ModuleElement : ModuleElement + endOfFileToken: Node; +>endOfFileToken : Node +>Node : Node + filename: string; >filename : string @@ -1878,8 +1991,8 @@ declare module ts { >referencedFiles : FileReference[] >FileReference : FileReference - semanticDiagnostics: Diagnostic[]; ->semanticDiagnostics : Diagnostic[] + referenceDiagnostics: Diagnostic[]; +>referenceDiagnostics : Diagnostic[] >Diagnostic : Diagnostic parseDiagnostics: Diagnostic[]; @@ -1892,6 +2005,10 @@ declare module ts { getSyntacticDiagnostics(): Diagnostic[]; >getSyntacticDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + semanticDiagnostics: Diagnostic[]; +>semanticDiagnostics : Diagnostic[] >Diagnostic : Diagnostic hasNoDefaultLib: boolean; @@ -2085,23 +2202,14 @@ declare module ts { getTypeCount(): number; >getTypeCount : () => number - checkProgram(): void; ->checkProgram : () => void - emitFiles(targetSourceFile?: SourceFile): EmitResult; >emitFiles : (targetSourceFile?: SourceFile) => EmitResult >targetSourceFile : SourceFile >SourceFile : SourceFile >EmitResult : EmitResult - getParentOfSymbol(symbol: Symbol): Symbol; ->getParentOfSymbol : (symbol: Symbol) => Symbol ->symbol : Symbol ->Symbol : Symbol ->Symbol : Symbol - - getNarrowedTypeOfSymbol(symbol: Symbol, node: Node): Type; ->getNarrowedTypeOfSymbol : (symbol: Symbol, node: Node) => Type + getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; +>getTypeOfSymbolAtLocation : (symbol: Symbol, node: Node) => Type >symbol : Symbol >Symbol : Symbol >node : Node @@ -2157,8 +2265,8 @@ declare module ts { >SymbolFlags : SymbolFlags >Symbol : Symbol - getSymbolInfo(node: Node): Symbol; ->getSymbolInfo : (node: Node) => Symbol + getSymbolAtLocation(node: Node): Symbol; +>getSymbolAtLocation : (node: Node) => Symbol >node : Node >Node : Node >Symbol : Symbol @@ -2169,8 +2277,8 @@ declare module ts { >Node : Node >Symbol : Symbol - getTypeOfNode(node: Node): Type; ->getTypeOfNode : (node: Node) => Type + getTypeAtLocation(node: Node): Type; +>getTypeAtLocation : (node: Node) => Type >node : Node >Node : Node >Type : Type @@ -2214,10 +2322,10 @@ declare module ts { >Symbol : Symbol >Symbol : Symbol - getContextualType(node: Node): Type; ->getContextualType : (node: Node) => Type ->node : Node ->Node : Node + getContextualType(node: Expression): Type; +>getContextualType : (node: Expression) => Type +>node : Expression +>Expression : Expression >Type : Type getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; @@ -2550,8 +2658,10 @@ declare module ts { >node : EnumMember >EnumMember : EnumMember - hasSemanticErrors(): boolean; ->hasSemanticErrors : () => boolean + hasSemanticErrors(sourceFile?: SourceFile): boolean; +>hasSemanticErrors : (sourceFile?: SourceFile) => boolean +>sourceFile : SourceFile +>SourceFile : SourceFile isDeclarationVisible(node: Declaration): boolean; >isDeclarationVisible : (node: Declaration) => boolean @@ -2563,10 +2673,11 @@ declare module ts { >node : FunctionLikeDeclaration >FunctionLikeDeclaration : FunctionLikeDeclaration - writeTypeAtLocation(location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; ->writeTypeAtLocation : (location: Node, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void ->location : Node ->Node : Node + writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; +>writeTypeOfDeclaration : (declaration: ParameterDeclaration | VariableDeclaration | AccessorDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void +>declaration : ParameterDeclaration | VariableDeclaration | AccessorDeclaration +>AccessorDeclaration : AccessorDeclaration +>VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration >enclosingDeclaration : Node >Node : Node >flags : TypeFormatFlags @@ -3024,9 +3135,6 @@ declare module ts { ObjectType = 48128, >ObjectType : TypeFlags - - Structured = 65025, ->Structured : TypeFlags } interface Type { >Type : Type @@ -3358,14 +3466,6 @@ declare module ts { */ isEarly?: boolean; >isEarly : boolean - - /** - * Parse error - error produced by parser when it scanner returns a token - * that parser does not understand in its current state - * (as opposed to grammar error when parser can interpret the token but interpretation is not legal from the grammar perespective) - */ - isParseError?: boolean; ->isParseError : boolean } enum DiagnosticCategory { >DiagnosticCategory : DiagnosticCategory @@ -3456,6 +3556,9 @@ declare module ts { preserveConstEnums?: boolean; >preserveConstEnums : boolean + allowNonTsExtensions?: boolean; +>allowNonTsExtensions : boolean + [option: string]: string | number | boolean; >option : string } @@ -3924,8 +4027,10 @@ declare module ts { >message : string >SourceFile : SourceFile - getDefaultLibFilename(): string; ->getDefaultLibFilename : () => string + getDefaultLibFilename(options: CompilerOptions): string; +>getDefaultLibFilename : (options: CompilerOptions) => string +>options : CompilerOptions +>CompilerOptions : CompilerOptions getCancellationToken?(): CancellationToken; >getCancellationToken : () => CancellationToken @@ -4001,6 +4106,9 @@ declare module ts { isReservedWord(): boolean; >isReservedWord : () => boolean + isUnterminated(): boolean; +>isUnterminated : () => boolean + reScanGreaterToken(): SyntaxKind; >reScanGreaterToken : () => SyntaxKind >SyntaxKind : SyntaxKind @@ -4025,6 +4133,13 @@ declare module ts { >setTextPos : (textPos: number) => void >textPos : number + lookAhead(callback: () => T): T; +>lookAhead : (callback: () => T) => T +>T : T +>callback : () => T +>T : T +>T : T + tryScan(callback: () => T): T; >tryScan : (callback: () => T) => T >T : T @@ -4113,35 +4228,19 @@ declare module ts { >languageVersion : ScriptTarget >ScriptTarget : ScriptTarget - function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback): Scanner; ->createScanner : (languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback, onComment?: CommentCallback) => Scanner + function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner; +>createScanner : (languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback) => Scanner >languageVersion : ScriptTarget >ScriptTarget : ScriptTarget >skipTrivia : boolean >text : string >onError : ErrorCallback >ErrorCallback : ErrorCallback ->onComment : CommentCallback ->CommentCallback : CommentCallback >Scanner : Scanner } declare module ts { >ts : typeof ts - interface ReferencePathMatchResult { ->ReferencePathMatchResult : ReferencePathMatchResult - - fileReference?: FileReference; ->fileReference : FileReference ->FileReference : FileReference - - diagnostic?: DiagnosticMessage; ->diagnostic : DiagnosticMessage ->DiagnosticMessage : DiagnosticMessage - - isNoDefaultLib?: boolean; ->isNoDefaultLib : boolean - } function getNodeConstructor(kind: SyntaxKind): new () => Node; >getNodeConstructor : (kind: SyntaxKind) => new () => Node >kind : SyntaxKind @@ -4195,6 +4294,9 @@ declare module ts { declare module ts { >ts : typeof ts + var servicesVersion: string; +>servicesVersion : string + interface Node { >Node : Node @@ -4460,18 +4562,20 @@ declare module ts { >fileName : string >IScriptSnapshot : IScriptSnapshot - getLocalizedDiagnosticMessages(): any; + getLocalizedDiagnosticMessages?(): any; >getLocalizedDiagnosticMessages : () => any - getCancellationToken(): CancellationToken; + getCancellationToken?(): CancellationToken; >getCancellationToken : () => CancellationToken >CancellationToken : CancellationToken getCurrentDirectory(): string; >getCurrentDirectory : () => string - getDefaultLibFilename(): string; ->getDefaultLibFilename : () => string + getDefaultLibFilename(options: CompilerOptions): string; +>getDefaultLibFilename : (options: CompilerOptions) => string +>options : CompilerOptions +>CompilerOptions : CompilerOptions } interface LanguageService { >LanguageService : LanguageService @@ -4507,11 +4611,10 @@ declare module ts { >TextSpan : TextSpan >ClassifiedSpan : ClassifiedSpan - getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): CompletionInfo; ->getCompletionsAtPosition : (fileName: string, position: number, isMemberCompletion: boolean) => CompletionInfo + getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; +>getCompletionsAtPosition : (fileName: string, position: number) => CompletionInfo >fileName : string >position : number ->isMemberCompletion : boolean >CompletionInfo : CompletionInfo getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; @@ -5573,12 +5676,10 @@ declare module ts { static typeParameterName: string; >typeParameterName : string - } - function displayPartsToString(displayParts: SymbolDisplayPart[]): string; ->displayPartsToString : (displayParts: SymbolDisplayPart[]) => string ->displayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart + static typeAlias: string; +>typeAlias : string + } interface DisplayPartsSymbolWriter extends SymbolWriter { >DisplayPartsSymbolWriter : DisplayPartsSymbolWriter >SymbolWriter : SymbolWriter @@ -5587,6 +5688,11 @@ declare module ts { >displayParts : () => SymbolDisplayPart[] >SymbolDisplayPart : SymbolDisplayPart } + function displayPartsToString(displayParts: SymbolDisplayPart[]): string; +>displayPartsToString : (displayParts: SymbolDisplayPart[]) => string +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + function getDefaultCompilerOptions(): CompilerOptions; >getDefaultCompilerOptions : () => CompilerOptions >CompilerOptions : CompilerOptions From 036209a89eac36b4f726234b2f8e91e840faeb2f Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 10 Dec 2014 17:13:39 -0800 Subject: [PATCH 121/141] Moved createCompilerHost into parser.ts Conflicts: src/compiler/tsc.ts --- src/compiler/parser.ts | 71 +++ src/compiler/tsc.ts | 69 --- .../reference/APISample_node_compile.js | 289 ++++++----- .../reference/APISample_node_compile.types | 471 +++++++++++------- .../reference/APISample_standalone_compile.js | 289 ++++++----- .../APISample_standalone_compile.types | 471 +++++++++++------- .../cases/compiler/APISample_node_compile.ts | 2 +- .../compiler/APISample_standalone_compile.ts | 2 +- 8 files changed, 965 insertions(+), 699 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index d2a5971a078..b8ddaedf67f 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -272,6 +272,77 @@ module ts { } } + // TODO (drosen, mhegazy): Move to a more appropriate file. + export function createCompilerHost(options: CompilerOptions): CompilerHost { + var currentDirectory: string; + var existingDirectories: Map = {}; + + function getCanonicalFileName(fileName: string): string { + // if underlying system can distinguish between two files whose names differs only in cases then file name already in canonical form. + // otherwise use toLowerCase as a canonical form. + return sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase(); + } + + // returned by CScript sys environment + var unsupportedFileEncodingErrorCode = -2147024809; + + function getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile { + try { + var text = sys.readFile(filename, options.charset); + } + catch (e) { + if (onError) { + onError(e.number === unsupportedFileEncodingErrorCode ? + createCompilerDiagnostic(Diagnostics.Unsupported_file_encoding).messageText : + e.message); + } + text = ""; + } + return text !== undefined ? createSourceFile(filename, text, languageVersion) : undefined; + } + + function writeFile(fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void) { + + function directoryExists(directoryPath: string): boolean { + if (hasProperty(existingDirectories, directoryPath)) { + return true; + } + if (sys.directoryExists(directoryPath)) { + existingDirectories[directoryPath] = true; + return true; + } + return false; + } + + function ensureDirectoriesExist(directoryPath: string) { + if (directoryPath.length > getRootLength(directoryPath) && !directoryExists(directoryPath)) { + var parentDirectory = getDirectoryPath(directoryPath); + ensureDirectoriesExist(parentDirectory); + sys.createDirectory(directoryPath); + } + } + + try { + ensureDirectoriesExist(getDirectoryPath(normalizePath(fileName))); + sys.writeFile(fileName, data, writeByteOrderMark); + } + catch (e) { + if (onError) onError(e.message); + } + } + + return { + getSourceFile, + getDefaultLibFilename: options => combinePaths(getDirectoryPath(normalizePath(sys.getExecutingFilePath())), options.target === ScriptTarget.ES6 ? "lib.es6.d.ts" : "lib.d.ts"), + writeFile, + getCurrentDirectory: () => currentDirectory || (currentDirectory = sys.getCurrentDirectory()), + useCaseSensitiveFileNames: () => sys.useCaseSensitiveFileNames, + getCanonicalFileName, + getNewLine: () => sys.newLine + }; + } + + const enum ParsingContext { SourceElements, // Elements in source file ModuleElements, // Elements in module declaration diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index 54d80d31190..5e4918d91e9 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -133,75 +133,6 @@ module ts { reportStatisticalValue(name, (time / 1000).toFixed(2) + "s"); } - function createCompilerHost(options: CompilerOptions): CompilerHost { - var currentDirectory: string; - var existingDirectories: Map = {}; - - function getCanonicalFileName(fileName: string): string { - // if underlying system can distinguish between two files whose names differs only in cases then file name already in canonical form. - // otherwise use toLowerCase as a canonical form. - return sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase(); - } - - // returned by CScript sys environment - var unsupportedFileEncodingErrorCode = -2147024809; - - function getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile { - try { - var text = sys.readFile(filename, options.charset); - } - catch (e) { - if (onError) { - onError(e.number === unsupportedFileEncodingErrorCode ? - getDiagnosticText(Diagnostics.Unsupported_file_encoding) : - e.message); - } - text = ""; - } - return text !== undefined ? createSourceFile(filename, text, languageVersion) : undefined; - } - - function writeFile(fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void) { - - function directoryExists(directoryPath: string): boolean { - if (hasProperty(existingDirectories, directoryPath)) { - return true; - } - if (sys.directoryExists(directoryPath)) { - existingDirectories[directoryPath] = true; - return true; - } - return false; - } - - function ensureDirectoriesExist(directoryPath: string) { - if (directoryPath.length > getRootLength(directoryPath) && !directoryExists(directoryPath)) { - var parentDirectory = getDirectoryPath(directoryPath); - ensureDirectoriesExist(parentDirectory); - sys.createDirectory(directoryPath); - } - } - - try { - ensureDirectoriesExist(getDirectoryPath(normalizePath(fileName))); - sys.writeFile(fileName, data, writeByteOrderMark); - } - catch (e) { - if (onError) onError(e.message); - } - } - - return { - getSourceFile, - getDefaultLibFilename: options => combinePaths(getDirectoryPath(normalizePath(sys.getExecutingFilePath())), options.target === ScriptTarget.ES6 ? "lib.es6.d.ts" : "lib.d.ts"), - writeFile, - getCurrentDirectory: () => currentDirectory || (currentDirectory = sys.getCurrentDirectory()), - useCaseSensitiveFileNames: () => sys.useCaseSensitiveFileNames, - getCanonicalFileName, - getNewLine: () => sys.newLine - }; - } - export function executeCommandLine(args: string[]): void { var commandLine = parseCommandLine(args); var compilerOptions = commandLine.options; diff --git a/tests/baselines/reference/APISample_node_compile.js b/tests/baselines/reference/APISample_node_compile.js index 6807d97db84..223ba05429d 100644 --- a/tests/baselines/reference/APISample_node_compile.js +++ b/tests/baselines/reference/APISample_node_compile.js @@ -4,7 +4,7 @@ import ts = require("typescript"); -var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest); var program = ts.createProgram(["file1.ts"], {}, undefined); //// [typescript.d.ts] @@ -156,87 +156,92 @@ declare module "typescript" { ComputedPropertyName = 121, TypeParameter = 122, Parameter = 123, - Property = 124, - Method = 125, - Constructor = 126, - GetAccessor = 127, - SetAccessor = 128, - CallSignature = 129, - ConstructSignature = 130, - IndexSignature = 131, - TypeReference = 132, - FunctionType = 133, - ConstructorType = 134, - TypeQuery = 135, - TypeLiteral = 136, - ArrayType = 137, - TupleType = 138, - UnionType = 139, - ParenthesizedType = 140, - ArrayLiteralExpression = 141, - ObjectLiteralExpression = 142, - PropertyAccessExpression = 143, - ElementAccessExpression = 144, - CallExpression = 145, - NewExpression = 146, - TaggedTemplateExpression = 147, - TypeAssertionExpression = 148, - ParenthesizedExpression = 149, - FunctionExpression = 150, - ArrowFunction = 151, - DeleteExpression = 152, - TypeOfExpression = 153, - VoidExpression = 154, - PrefixUnaryExpression = 155, - PostfixUnaryExpression = 156, - BinaryExpression = 157, - ConditionalExpression = 158, - TemplateExpression = 159, - YieldExpression = 160, - OmittedExpression = 161, - TemplateSpan = 162, - Block = 163, - VariableStatement = 164, - EmptyStatement = 165, - ExpressionStatement = 166, - IfStatement = 167, - DoStatement = 168, - WhileStatement = 169, - ForStatement = 170, - ForInStatement = 171, - ContinueStatement = 172, - BreakStatement = 173, - ReturnStatement = 174, - WithStatement = 175, - SwitchStatement = 176, - LabeledStatement = 177, - ThrowStatement = 178, - TryStatement = 179, - TryBlock = 180, - FinallyBlock = 181, - DebuggerStatement = 182, - VariableDeclaration = 183, - FunctionDeclaration = 184, - ClassDeclaration = 185, - InterfaceDeclaration = 186, - TypeAliasDeclaration = 187, - EnumDeclaration = 188, - ModuleDeclaration = 189, - ModuleBlock = 190, - ImportDeclaration = 191, - ExportAssignment = 192, - ExternalModuleReference = 193, - CaseClause = 194, - DefaultClause = 195, - HeritageClause = 196, - CatchClause = 197, - PropertyAssignment = 198, - ShorthandPropertyAssignment = 199, - EnumMember = 200, - SourceFile = 201, - Program = 202, - SyntaxList = 203, - Count = 204, + PropertySignature = 124, + PropertyDeclaration = 125, + MethodSignature = 126, + MethodDeclaration = 127, + Constructor = 128, + GetAccessor = 129, + SetAccessor = 130, + CallSignature = 131, + ConstructSignature = 132, + IndexSignature = 133, + TypeReference = 134, + FunctionType = 135, + ConstructorType = 136, + TypeQuery = 137, + TypeLiteral = 138, + ArrayType = 139, + TupleType = 140, + UnionType = 141, + ParenthesizedType = 142, + ObjectBindingPattern = 143, + ArrayBindingPattern = 144, + BindingElement = 145, + ArrayLiteralExpression = 146, + ObjectLiteralExpression = 147, + PropertyAccessExpression = 148, + ElementAccessExpression = 149, + CallExpression = 150, + NewExpression = 151, + TaggedTemplateExpression = 152, + TypeAssertionExpression = 153, + ParenthesizedExpression = 154, + FunctionExpression = 155, + ArrowFunction = 156, + DeleteExpression = 157, + TypeOfExpression = 158, + VoidExpression = 159, + PrefixUnaryExpression = 160, + PostfixUnaryExpression = 161, + BinaryExpression = 162, + ConditionalExpression = 163, + TemplateExpression = 164, + YieldExpression = 165, + OmittedExpression = 166, + TemplateSpan = 167, + Block = 168, + VariableStatement = 169, + EmptyStatement = 170, + ExpressionStatement = 171, + IfStatement = 172, + DoStatement = 173, + WhileStatement = 174, + ForStatement = 175, + ForInStatement = 176, + ContinueStatement = 177, + BreakStatement = 178, + ReturnStatement = 179, + WithStatement = 180, + SwitchStatement = 181, + LabeledStatement = 182, + ThrowStatement = 183, + TryStatement = 184, + TryBlock = 185, + FinallyBlock = 186, + DebuggerStatement = 187, + VariableDeclaration = 188, + FunctionDeclaration = 189, + ClassDeclaration = 190, + InterfaceDeclaration = 191, + TypeAliasDeclaration = 192, + EnumDeclaration = 193, + ModuleDeclaration = 194, + ModuleBlock = 195, + ImportDeclaration = 196, + ExportAssignment = 197, + ExternalModuleReference = 198, + CaseClause = 199, + DefaultClause = 200, + HeritageClause = 201, + CatchClause = 202, + PropertyAssignment = 203, + ShorthandPropertyAssignment = 204, + EnumMember = 205, + SourceFile = 206, + Program = 207, + SyntaxList = 208, + Count = 209, FirstAssignment = 51, LastAssignment = 62, FirstReservedWord = 64, @@ -245,8 +250,8 @@ declare module "typescript" { LastKeyword = 119, FirstFutureReservedWord = 100, LastFutureReservedWord = 108, - FirstTypeNode = 132, - LastTypeNode = 140, + FirstTypeNode = 134, + LastTypeNode = 142, FirstPunctuation = 13, LastPunctuation = 62, FirstToken = 0, @@ -314,7 +319,7 @@ declare module "typescript" { right: Identifier; } type EntityName = Identifier | QualifiedName; - type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; + type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName | BindingPattern; interface Declaration extends Node { _declarationBrand: any; name?: DeclarationName; @@ -333,38 +338,53 @@ declare module "typescript" { type?: TypeNode; } interface VariableDeclaration extends Declaration { - name: Identifier; + name: Identifier | BindingPattern; type?: TypeNode; initializer?: Expression; } interface ParameterDeclaration extends Declaration { dotDotDotToken?: Node; - name: Identifier; - questionToken?: Node; - type?: TypeNode | StringLiteralExpression; - initializer?: Expression; - } - interface PropertyDeclaration extends Declaration, ClassElement { - _propertyDeclarationBrand: any; + name: Identifier | BindingPattern; + questionToken?: Node; + type?: TypeNode; + initializer?: Expression; + } + interface BindingElement extends Declaration { + propertyName?: Identifier; + dotDotDotToken?: Node; + name: Identifier | BindingPattern; + initializer?: Expression; + } + interface PropertyDeclaration extends Declaration, ClassElement { + name: DeclarationName; questionToken?: Node; type?: TypeNode; initializer?: Expression; } - type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; - type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; interface ObjectLiteralElement extends Declaration { _objectLiteralBrandBrand: any; } - interface ShorthandPropertyAssignment extends ObjectLiteralElement { - name: Identifier; - questionToken?: Node; - } interface PropertyAssignment extends ObjectLiteralElement { _propertyAssignmentBrand: any; name: DeclarationName; questionToken?: Node; initializer: Expression; } + interface ShorthandPropertyAssignment extends ObjectLiteralElement { + name: Identifier; + questionToken?: Node; + } + interface VariableLikeDeclaration extends Declaration { + propertyName?: Identifier; + dotDotDotToken?: Node; + name: DeclarationName; + questionToken?: Node; + type?: TypeNode; + initializer?: Expression; + } + interface BindingPattern extends Node { + elements: NodeArray; + } /** * Several node kinds share function-like features such as a signature, * a name, and a body. These nodes should extend FunctionLikeDeclaration. @@ -424,6 +444,8 @@ declare module "typescript" { interface ParenthesizedTypeNode extends TypeNode { type: TypeNode; } + interface StringLiteralTypeNode extends LiteralExpression, TypeNode { + } interface Expression extends Node { _expressionBrand: any; contextualType?: Type; @@ -680,8 +702,6 @@ declare module "typescript" { nodeCount: number; identifierCount: number; symbolCount: number; - isOpen: boolean; - version: string; languageVersion: ScriptTarget; identifiers: Map; } @@ -831,12 +851,13 @@ declare module "typescript" { hasSemanticErrors(sourceFile?: SourceFile): boolean; isDeclarationVisible(node: Declaration): boolean; isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; - writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; + writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableLikeDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number; isEmitBlocked(sourceFile?: SourceFile): boolean; + isUnknownIdentifier(location: Node, name: string): boolean; } const enum SymbolFlags { FunctionScopedVariable = 1, @@ -856,54 +877,52 @@ declare module "typescript" { Constructor = 16384, GetAccessor = 32768, SetAccessor = 65536, - CallSignature = 131072, - ConstructSignature = 262144, - IndexSignature = 524288, - TypeParameter = 1048576, - TypeAlias = 2097152, - ExportValue = 4194304, - ExportType = 8388608, - ExportNamespace = 16777216, - Import = 33554432, - Instantiated = 67108864, - Merged = 134217728, - Transient = 268435456, - Prototype = 536870912, - UnionProperty = 1073741824, + Signature = 131072, + TypeParameter = 262144, + TypeAlias = 524288, + ExportValue = 1048576, + ExportType = 2097152, + ExportNamespace = 4194304, + Import = 8388608, + Instantiated = 16777216, + Merged = 33554432, + Transient = 67108864, + Prototype = 134217728, + UnionProperty = 268435456, + Optional = 536870912, Enum = 384, Variable = 3, Value = 107455, - Type = 3152352, + Type = 793056, Namespace = 1536, Module = 1536, Accessor = 98304, - Signature = 917504, FunctionScopedVariableExcludes = 107454, BlockScopedVariableExcludes = 107455, ParameterExcludes = 107455, PropertyExcludes = 107455, EnumMemberExcludes = 107455, FunctionExcludes = 106927, - ClassExcludes = 3258879, - InterfaceExcludes = 3152288, - RegularEnumExcludes = 3258623, - ConstEnumExcludes = 3259263, + ClassExcludes = 899583, + InterfaceExcludes = 792992, + RegularEnumExcludes = 899327, + ConstEnumExcludes = 899967, ValueModuleExcludes = 106639, NamespaceModuleExcludes = 0, MethodExcludes = 99263, GetAccessorExcludes = 41919, SetAccessorExcludes = 74687, - TypeParameterExcludes = 2103776, - TypeAliasExcludes = 3152352, - ImportExcludes = 33554432, - ModuleMember = 35653619, + TypeParameterExcludes = 530912, + TypeAliasExcludes = 793056, + ImportExcludes = 8388608, + ModuleMember = 8914931, ExportHasLocal = 944, - HasLocals = 1041936, + HasLocals = 255504, HasExports = 1952, HasMembers = 6240, - IsContainer = 1048560, + IsContainer = 262128, PropertyOrAccessor = 98308, - Export = 29360128, + Export = 7340032, } interface Symbol { flags: SymbolFlags; @@ -971,6 +990,7 @@ declare module "typescript" { Union = 16384, Anonymous = 32768, FromSignature = 65536, + Unwidened = 131072, Intrinsic = 127, StringLike = 258, NumberLike = 132, @@ -1338,8 +1358,10 @@ declare module "typescript" { } declare module "typescript" { function getNodeConstructor(kind: SyntaxKind): new () => Node; + function createNode(kind: SyntaxKind): Node; function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; - function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; + function createCompilerHost(options: CompilerOptions): CompilerHost; + function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean): SourceFile; function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; } declare module "typescript" { @@ -1388,6 +1410,8 @@ declare module "typescript" { getDocumentationComment(): SymbolDisplayPart[]; } interface SourceFile { + isOpen: boolean; + version: string; getScriptSnapshot(): IScriptSnapshot; getNamedDeclarations(): Declaration[]; update(scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; @@ -1427,6 +1451,8 @@ declare module "typescript" { } interface Logger { log(s: string): void; + trace(s: string): void; + error(s: string): void; } interface LanguageServiceHost extends Logger { getCompilationSettings(): CompilerOptions; @@ -1850,6 +1876,7 @@ declare module "typescript" { isCancellationRequested(): boolean; throwIfCancellationRequested(): void; } + function createLanguageServiceSourceFile(filename: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, isOpen: boolean, setNodeParents: boolean): SourceFile; function createDocumentRegistry(): DocumentRegistry; function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry): LanguageService; @@ -1859,5 +1886,5 @@ declare module "typescript" { //// [APISample_node_compile.js] var ts = require("typescript"); -var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", 2 /* Latest */, "0.0"); +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", 2 /* Latest */); var program = ts.createProgram(["file1.ts"], {}, undefined); diff --git a/tests/baselines/reference/APISample_node_compile.types b/tests/baselines/reference/APISample_node_compile.types index 4331fb28c72..fa881875212 100644 --- a/tests/baselines/reference/APISample_node_compile.types +++ b/tests/baselines/reference/APISample_node_compile.types @@ -3,12 +3,12 @@ import ts = require("typescript"); >ts : typeof ts -var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest); >sourceFile : ts.SourceFile ->ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0") : ts.SourceFile ->ts.createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, version: string, isOpen?: boolean) => ts.SourceFile +>ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest) : ts.SourceFile +>ts.createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, setParentNodes?: boolean) => ts.SourceFile >ts : typeof ts ->createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, version: string, isOpen?: boolean) => ts.SourceFile +>createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, setParentNodes?: boolean) => ts.SourceFile >ts.ScriptTarget.Latest : ts.ScriptTarget >ts.ScriptTarget : typeof ts.ScriptTarget >ts : typeof ts @@ -434,247 +434,262 @@ declare module "typescript" { Parameter = 123, >Parameter : SyntaxKind - Property = 124, ->Property : SyntaxKind + PropertySignature = 124, +>PropertySignature : SyntaxKind - Method = 125, ->Method : SyntaxKind + PropertyDeclaration = 125, +>PropertyDeclaration : SyntaxKind - Constructor = 126, + MethodSignature = 126, +>MethodSignature : SyntaxKind + + MethodDeclaration = 127, +>MethodDeclaration : SyntaxKind + + Constructor = 128, >Constructor : SyntaxKind - GetAccessor = 127, + GetAccessor = 129, >GetAccessor : SyntaxKind - SetAccessor = 128, + SetAccessor = 130, >SetAccessor : SyntaxKind - CallSignature = 129, + CallSignature = 131, >CallSignature : SyntaxKind - ConstructSignature = 130, + ConstructSignature = 132, >ConstructSignature : SyntaxKind - IndexSignature = 131, + IndexSignature = 133, >IndexSignature : SyntaxKind - TypeReference = 132, + TypeReference = 134, >TypeReference : SyntaxKind - FunctionType = 133, + FunctionType = 135, >FunctionType : SyntaxKind - ConstructorType = 134, + ConstructorType = 136, >ConstructorType : SyntaxKind - TypeQuery = 135, + TypeQuery = 137, >TypeQuery : SyntaxKind - TypeLiteral = 136, + TypeLiteral = 138, >TypeLiteral : SyntaxKind - ArrayType = 137, + ArrayType = 139, >ArrayType : SyntaxKind - TupleType = 138, + TupleType = 140, >TupleType : SyntaxKind - UnionType = 139, + UnionType = 141, >UnionType : SyntaxKind - ParenthesizedType = 140, + ParenthesizedType = 142, >ParenthesizedType : SyntaxKind - ArrayLiteralExpression = 141, + ObjectBindingPattern = 143, +>ObjectBindingPattern : SyntaxKind + + ArrayBindingPattern = 144, +>ArrayBindingPattern : SyntaxKind + + BindingElement = 145, +>BindingElement : SyntaxKind + + ArrayLiteralExpression = 146, >ArrayLiteralExpression : SyntaxKind - ObjectLiteralExpression = 142, + ObjectLiteralExpression = 147, >ObjectLiteralExpression : SyntaxKind - PropertyAccessExpression = 143, + PropertyAccessExpression = 148, >PropertyAccessExpression : SyntaxKind - ElementAccessExpression = 144, + ElementAccessExpression = 149, >ElementAccessExpression : SyntaxKind - CallExpression = 145, + CallExpression = 150, >CallExpression : SyntaxKind - NewExpression = 146, + NewExpression = 151, >NewExpression : SyntaxKind - TaggedTemplateExpression = 147, + TaggedTemplateExpression = 152, >TaggedTemplateExpression : SyntaxKind - TypeAssertionExpression = 148, + TypeAssertionExpression = 153, >TypeAssertionExpression : SyntaxKind - ParenthesizedExpression = 149, + ParenthesizedExpression = 154, >ParenthesizedExpression : SyntaxKind - FunctionExpression = 150, + FunctionExpression = 155, >FunctionExpression : SyntaxKind - ArrowFunction = 151, + ArrowFunction = 156, >ArrowFunction : SyntaxKind - DeleteExpression = 152, + DeleteExpression = 157, >DeleteExpression : SyntaxKind - TypeOfExpression = 153, + TypeOfExpression = 158, >TypeOfExpression : SyntaxKind - VoidExpression = 154, + VoidExpression = 159, >VoidExpression : SyntaxKind - PrefixUnaryExpression = 155, + PrefixUnaryExpression = 160, >PrefixUnaryExpression : SyntaxKind - PostfixUnaryExpression = 156, + PostfixUnaryExpression = 161, >PostfixUnaryExpression : SyntaxKind - BinaryExpression = 157, + BinaryExpression = 162, >BinaryExpression : SyntaxKind - ConditionalExpression = 158, + ConditionalExpression = 163, >ConditionalExpression : SyntaxKind - TemplateExpression = 159, + TemplateExpression = 164, >TemplateExpression : SyntaxKind - YieldExpression = 160, + YieldExpression = 165, >YieldExpression : SyntaxKind - OmittedExpression = 161, + OmittedExpression = 166, >OmittedExpression : SyntaxKind - TemplateSpan = 162, + TemplateSpan = 167, >TemplateSpan : SyntaxKind - Block = 163, + Block = 168, >Block : SyntaxKind - VariableStatement = 164, + VariableStatement = 169, >VariableStatement : SyntaxKind - EmptyStatement = 165, + EmptyStatement = 170, >EmptyStatement : SyntaxKind - ExpressionStatement = 166, + ExpressionStatement = 171, >ExpressionStatement : SyntaxKind - IfStatement = 167, + IfStatement = 172, >IfStatement : SyntaxKind - DoStatement = 168, + DoStatement = 173, >DoStatement : SyntaxKind - WhileStatement = 169, + WhileStatement = 174, >WhileStatement : SyntaxKind - ForStatement = 170, + ForStatement = 175, >ForStatement : SyntaxKind - ForInStatement = 171, + ForInStatement = 176, >ForInStatement : SyntaxKind - ContinueStatement = 172, + ContinueStatement = 177, >ContinueStatement : SyntaxKind - BreakStatement = 173, + BreakStatement = 178, >BreakStatement : SyntaxKind - ReturnStatement = 174, + ReturnStatement = 179, >ReturnStatement : SyntaxKind - WithStatement = 175, + WithStatement = 180, >WithStatement : SyntaxKind - SwitchStatement = 176, + SwitchStatement = 181, >SwitchStatement : SyntaxKind - LabeledStatement = 177, + LabeledStatement = 182, >LabeledStatement : SyntaxKind - ThrowStatement = 178, + ThrowStatement = 183, >ThrowStatement : SyntaxKind - TryStatement = 179, + TryStatement = 184, >TryStatement : SyntaxKind - TryBlock = 180, + TryBlock = 185, >TryBlock : SyntaxKind - FinallyBlock = 181, + FinallyBlock = 186, >FinallyBlock : SyntaxKind - DebuggerStatement = 182, + DebuggerStatement = 187, >DebuggerStatement : SyntaxKind - VariableDeclaration = 183, + VariableDeclaration = 188, >VariableDeclaration : SyntaxKind - FunctionDeclaration = 184, + FunctionDeclaration = 189, >FunctionDeclaration : SyntaxKind - ClassDeclaration = 185, + ClassDeclaration = 190, >ClassDeclaration : SyntaxKind - InterfaceDeclaration = 186, + InterfaceDeclaration = 191, >InterfaceDeclaration : SyntaxKind - TypeAliasDeclaration = 187, + TypeAliasDeclaration = 192, >TypeAliasDeclaration : SyntaxKind - EnumDeclaration = 188, + EnumDeclaration = 193, >EnumDeclaration : SyntaxKind - ModuleDeclaration = 189, + ModuleDeclaration = 194, >ModuleDeclaration : SyntaxKind - ModuleBlock = 190, + ModuleBlock = 195, >ModuleBlock : SyntaxKind - ImportDeclaration = 191, + ImportDeclaration = 196, >ImportDeclaration : SyntaxKind - ExportAssignment = 192, + ExportAssignment = 197, >ExportAssignment : SyntaxKind - ExternalModuleReference = 193, + ExternalModuleReference = 198, >ExternalModuleReference : SyntaxKind - CaseClause = 194, + CaseClause = 199, >CaseClause : SyntaxKind - DefaultClause = 195, + DefaultClause = 200, >DefaultClause : SyntaxKind - HeritageClause = 196, + HeritageClause = 201, >HeritageClause : SyntaxKind - CatchClause = 197, + CatchClause = 202, >CatchClause : SyntaxKind - PropertyAssignment = 198, + PropertyAssignment = 203, >PropertyAssignment : SyntaxKind - ShorthandPropertyAssignment = 199, + ShorthandPropertyAssignment = 204, >ShorthandPropertyAssignment : SyntaxKind - EnumMember = 200, + EnumMember = 205, >EnumMember : SyntaxKind - SourceFile = 201, + SourceFile = 206, >SourceFile : SyntaxKind - Program = 202, + Program = 207, >Program : SyntaxKind - SyntaxList = 203, + SyntaxList = 208, >SyntaxList : SyntaxKind - Count = 204, + Count = 209, >Count : SyntaxKind FirstAssignment = 51, @@ -701,10 +716,10 @@ declare module "typescript" { LastFutureReservedWord = 108, >LastFutureReservedWord : SyntaxKind - FirstTypeNode = 132, + FirstTypeNode = 134, >FirstTypeNode : SyntaxKind - LastTypeNode = 140, + LastTypeNode = 142, >LastTypeNode : SyntaxKind FirstPunctuation = 13, @@ -906,11 +921,12 @@ declare module "typescript" { >Identifier : Identifier >QualifiedName : QualifiedName - type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName + type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName | BindingPattern; +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern >Identifier : Identifier >LiteralExpression : LiteralExpression >ComputedPropertyName : ComputedPropertyName +>BindingPattern : BindingPattern interface Declaration extends Node { >Declaration : Declaration @@ -920,8 +936,8 @@ declare module "typescript" { >_declarationBrand : any name?: DeclarationName; ->name : Identifier | LiteralExpression | ComputedPropertyName ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName +>name : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern } interface ComputedPropertyName extends Node { >ComputedPropertyName : ComputedPropertyName @@ -969,9 +985,10 @@ declare module "typescript" { >VariableDeclaration : VariableDeclaration >Declaration : Declaration - name: Identifier; ->name : Identifier + name: Identifier | BindingPattern; +>name : Identifier | BindingPattern >Identifier : Identifier +>BindingPattern : BindingPattern type?: TypeNode; >type : TypeNode @@ -989,30 +1006,10 @@ declare module "typescript" { >dotDotDotToken : Node >Node : Node - name: Identifier; ->name : Identifier + name: Identifier | BindingPattern; +>name : Identifier | BindingPattern >Identifier : Identifier - - questionToken?: Node; ->questionToken : Node ->Node : Node - - type?: TypeNode | StringLiteralExpression; ->type : TypeNode | StringLiteralExpression ->TypeNode : TypeNode ->StringLiteralExpression : StringLiteralExpression - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - } - interface PropertyDeclaration extends Declaration, ClassElement { ->PropertyDeclaration : PropertyDeclaration ->Declaration : Declaration ->ClassElement : ClassElement - - _propertyDeclarationBrand: any; ->_propertyDeclarationBrand : any +>BindingPattern : BindingPattern questionToken?: Node; >questionToken : Node @@ -1026,22 +1023,73 @@ declare module "typescript" { >initializer : Expression >Expression : Expression } - type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; ->VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration ->VariableDeclaration : VariableDeclaration ->ParameterDeclaration : ParameterDeclaration + interface BindingElement extends Declaration { +>BindingElement : BindingElement +>Declaration : Declaration - type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; ->VariableOrParameterOrPropertyDeclaration : ParameterDeclaration | VariableDeclaration | PropertyDeclaration ->VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration + propertyName?: Identifier; +>propertyName : Identifier +>Identifier : Identifier + + dotDotDotToken?: Node; +>dotDotDotToken : Node +>Node : Node + + name: Identifier | BindingPattern; +>name : Identifier | BindingPattern +>Identifier : Identifier +>BindingPattern : BindingPattern + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + interface PropertyDeclaration extends Declaration, ClassElement { >PropertyDeclaration : PropertyDeclaration +>Declaration : Declaration +>ClassElement : ClassElement + name: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern + + questionToken?: Node; +>questionToken : Node +>Node : Node + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } interface ObjectLiteralElement extends Declaration { >ObjectLiteralElement : ObjectLiteralElement >Declaration : Declaration _objectLiteralBrandBrand: any; >_objectLiteralBrandBrand : any + } + interface PropertyAssignment extends ObjectLiteralElement { +>PropertyAssignment : PropertyAssignment +>ObjectLiteralElement : ObjectLiteralElement + + _propertyAssignmentBrand: any; +>_propertyAssignmentBrand : any + + name: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern + + questionToken?: Node; +>questionToken : Node +>Node : Node + + initializer: Expression; +>initializer : Expression +>Expression : Expression } interface ShorthandPropertyAssignment extends ObjectLiteralElement { >ShorthandPropertyAssignment : ShorthandPropertyAssignment @@ -1055,24 +1103,42 @@ declare module "typescript" { >questionToken : Node >Node : Node } - interface PropertyAssignment extends ObjectLiteralElement { ->PropertyAssignment : PropertyAssignment ->ObjectLiteralElement : ObjectLiteralElement + interface VariableLikeDeclaration extends Declaration { +>VariableLikeDeclaration : VariableLikeDeclaration +>Declaration : Declaration - _propertyAssignmentBrand: any; ->_propertyAssignmentBrand : any + propertyName?: Identifier; +>propertyName : Identifier +>Identifier : Identifier + + dotDotDotToken?: Node; +>dotDotDotToken : Node +>Node : Node name: DeclarationName; ->name : Identifier | LiteralExpression | ComputedPropertyName ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName +>name : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern questionToken?: Node; >questionToken : Node >Node : Node - initializer: Expression; + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + initializer?: Expression; >initializer : Expression >Expression : Expression + } + interface BindingPattern extends Node { +>BindingPattern : BindingPattern +>Node : Node + + elements: NodeArray; +>elements : NodeArray +>NodeArray : NodeArray +>BindingElement : BindingElement } /** * Several node kinds share function-like features such as a signature, @@ -1233,6 +1299,11 @@ declare module "typescript" { type: TypeNode; >type : TypeNode +>TypeNode : TypeNode + } + interface StringLiteralTypeNode extends LiteralExpression, TypeNode { +>StringLiteralTypeNode : StringLiteralTypeNode +>LiteralExpression : LiteralExpression >TypeNode : TypeNode } interface Expression extends Node { @@ -1859,8 +1930,8 @@ declare module "typescript" { >Declaration : Declaration name: DeclarationName; ->name : Identifier | LiteralExpression | ComputedPropertyName ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName +>name : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern initializer?: Expression; >initializer : Expression @@ -2028,12 +2099,6 @@ declare module "typescript" { symbolCount: number; >symbolCount : number - isOpen: boolean; ->isOpen : boolean - - version: string; ->version : string - languageVersion: ScriptTarget; >languageVersion : ScriptTarget >ScriptTarget : ScriptTarget @@ -2674,11 +2739,11 @@ declare module "typescript" { >node : FunctionLikeDeclaration >FunctionLikeDeclaration : FunctionLikeDeclaration - writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; ->writeTypeOfDeclaration : (declaration: ParameterDeclaration | VariableDeclaration | AccessorDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void ->declaration : ParameterDeclaration | VariableDeclaration | AccessorDeclaration + writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableLikeDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; +>writeTypeOfDeclaration : (declaration: VariableLikeDeclaration | AccessorDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void +>declaration : VariableLikeDeclaration | AccessorDeclaration >AccessorDeclaration : AccessorDeclaration ->VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration +>VariableLikeDeclaration : VariableLikeDeclaration >enclosingDeclaration : Node >Node : Node >flags : TypeFormatFlags @@ -2725,6 +2790,12 @@ declare module "typescript" { >isEmitBlocked : (sourceFile?: SourceFile) => boolean >sourceFile : SourceFile >SourceFile : SourceFile + + isUnknownIdentifier(location: Node, name: string): boolean; +>isUnknownIdentifier : (location: Node, name: string) => boolean +>location : Node +>Node : Node +>name : string } const enum SymbolFlags { >SymbolFlags : SymbolFlags @@ -2780,48 +2851,45 @@ declare module "typescript" { SetAccessor = 65536, >SetAccessor : SymbolFlags - CallSignature = 131072, ->CallSignature : SymbolFlags + Signature = 131072, +>Signature : SymbolFlags - ConstructSignature = 262144, ->ConstructSignature : SymbolFlags - - IndexSignature = 524288, ->IndexSignature : SymbolFlags - - TypeParameter = 1048576, + TypeParameter = 262144, >TypeParameter : SymbolFlags - TypeAlias = 2097152, + TypeAlias = 524288, >TypeAlias : SymbolFlags - ExportValue = 4194304, + ExportValue = 1048576, >ExportValue : SymbolFlags - ExportType = 8388608, + ExportType = 2097152, >ExportType : SymbolFlags - ExportNamespace = 16777216, + ExportNamespace = 4194304, >ExportNamespace : SymbolFlags - Import = 33554432, + Import = 8388608, >Import : SymbolFlags - Instantiated = 67108864, + Instantiated = 16777216, >Instantiated : SymbolFlags - Merged = 134217728, + Merged = 33554432, >Merged : SymbolFlags - Transient = 268435456, + Transient = 67108864, >Transient : SymbolFlags - Prototype = 536870912, + Prototype = 134217728, >Prototype : SymbolFlags - UnionProperty = 1073741824, + UnionProperty = 268435456, >UnionProperty : SymbolFlags + Optional = 536870912, +>Optional : SymbolFlags + Enum = 384, >Enum : SymbolFlags @@ -2831,7 +2899,7 @@ declare module "typescript" { Value = 107455, >Value : SymbolFlags - Type = 3152352, + Type = 793056, >Type : SymbolFlags Namespace = 1536, @@ -2843,9 +2911,6 @@ declare module "typescript" { Accessor = 98304, >Accessor : SymbolFlags - Signature = 917504, ->Signature : SymbolFlags - FunctionScopedVariableExcludes = 107454, >FunctionScopedVariableExcludes : SymbolFlags @@ -2864,16 +2929,16 @@ declare module "typescript" { FunctionExcludes = 106927, >FunctionExcludes : SymbolFlags - ClassExcludes = 3258879, + ClassExcludes = 899583, >ClassExcludes : SymbolFlags - InterfaceExcludes = 3152288, + InterfaceExcludes = 792992, >InterfaceExcludes : SymbolFlags - RegularEnumExcludes = 3258623, + RegularEnumExcludes = 899327, >RegularEnumExcludes : SymbolFlags - ConstEnumExcludes = 3259263, + ConstEnumExcludes = 899967, >ConstEnumExcludes : SymbolFlags ValueModuleExcludes = 106639, @@ -2891,22 +2956,22 @@ declare module "typescript" { SetAccessorExcludes = 74687, >SetAccessorExcludes : SymbolFlags - TypeParameterExcludes = 2103776, + TypeParameterExcludes = 530912, >TypeParameterExcludes : SymbolFlags - TypeAliasExcludes = 3152352, + TypeAliasExcludes = 793056, >TypeAliasExcludes : SymbolFlags - ImportExcludes = 33554432, + ImportExcludes = 8388608, >ImportExcludes : SymbolFlags - ModuleMember = 35653619, + ModuleMember = 8914931, >ModuleMember : SymbolFlags ExportHasLocal = 944, >ExportHasLocal : SymbolFlags - HasLocals = 1041936, + HasLocals = 255504, >HasLocals : SymbolFlags HasExports = 1952, @@ -2915,13 +2980,13 @@ declare module "typescript" { HasMembers = 6240, >HasMembers : SymbolFlags - IsContainer = 1048560, + IsContainer = 262128, >IsContainer : SymbolFlags PropertyOrAccessor = 98308, >PropertyOrAccessor : SymbolFlags - Export = 29360128, + Export = 7340032, >Export : SymbolFlags } interface Symbol { @@ -3125,6 +3190,9 @@ declare module "typescript" { FromSignature = 65536, >FromSignature : TypeFlags + Unwidened = 131072, +>Unwidened : TypeFlags + Intrinsic = 127, >Intrinsic : TypeFlags @@ -4242,6 +4310,12 @@ declare module "typescript" { >getNodeConstructor : (kind: SyntaxKind) => new () => Node >kind : SyntaxKind >SyntaxKind : SyntaxKind +>Node : Node + + function createNode(kind: SyntaxKind): Node; +>createNode : (kind: SyntaxKind) => Node +>kind : SyntaxKind +>SyntaxKind : SyntaxKind >Node : Node function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; @@ -4259,14 +4333,19 @@ declare module "typescript" { >T : T >T : T - function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; ->createSourceFile : (filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean) => SourceFile + function createCompilerHost(options: CompilerOptions): CompilerHost; +>createCompilerHost : (options: CompilerOptions) => CompilerHost +>options : CompilerOptions +>CompilerOptions : CompilerOptions +>CompilerHost : CompilerHost + + function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean): SourceFile; +>createSourceFile : (filename: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean) => SourceFile >filename : string >sourceText : string >languageVersion : ScriptTarget >ScriptTarget : ScriptTarget ->version : string ->isOpen : boolean +>setParentNodes : boolean >SourceFile : SourceFile function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; @@ -4445,6 +4524,12 @@ declare module "typescript" { interface SourceFile { >SourceFile : SourceFile + isOpen: boolean; +>isOpen : boolean + + version: string; +>version : string + getScriptSnapshot(): IScriptSnapshot; >getScriptSnapshot : () => IScriptSnapshot >IScriptSnapshot : IScriptSnapshot @@ -4529,6 +4614,14 @@ declare module "typescript" { log(s: string): void; >log : (s: string) => void +>s : string + + trace(s: string): void; +>trace : (s: string) => void +>s : string + + error(s: string): void; +>error : (s: string) => void >s : string } interface LanguageServiceHost extends Logger { @@ -5713,6 +5806,18 @@ declare module "typescript" { throwIfCancellationRequested(): void; >throwIfCancellationRequested : () => void } + function createLanguageServiceSourceFile(filename: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, isOpen: boolean, setNodeParents: boolean): SourceFile; +>createLanguageServiceSourceFile : (filename: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, isOpen: boolean, setNodeParents: boolean) => SourceFile +>filename : string +>scriptSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>scriptTarget : ScriptTarget +>ScriptTarget : ScriptTarget +>version : string +>isOpen : boolean +>setNodeParents : boolean +>SourceFile : SourceFile + function createDocumentRegistry(): DocumentRegistry; >createDocumentRegistry : () => DocumentRegistry >DocumentRegistry : DocumentRegistry diff --git a/tests/baselines/reference/APISample_standalone_compile.js b/tests/baselines/reference/APISample_standalone_compile.js index fff2226f320..c885aa03c54 100644 --- a/tests/baselines/reference/APISample_standalone_compile.js +++ b/tests/baselines/reference/APISample_standalone_compile.js @@ -2,7 +2,7 @@ //// [APISample_standalone_compile.ts] -var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest); var program = ts.createProgram(["file1.ts"], {}, undefined); //// [typescriptServices.d.ts] @@ -154,87 +154,92 @@ declare module ts { ComputedPropertyName = 121, TypeParameter = 122, Parameter = 123, - Property = 124, - Method = 125, - Constructor = 126, - GetAccessor = 127, - SetAccessor = 128, - CallSignature = 129, - ConstructSignature = 130, - IndexSignature = 131, - TypeReference = 132, - FunctionType = 133, - ConstructorType = 134, - TypeQuery = 135, - TypeLiteral = 136, - ArrayType = 137, - TupleType = 138, - UnionType = 139, - ParenthesizedType = 140, - ArrayLiteralExpression = 141, - ObjectLiteralExpression = 142, - PropertyAccessExpression = 143, - ElementAccessExpression = 144, - CallExpression = 145, - NewExpression = 146, - TaggedTemplateExpression = 147, - TypeAssertionExpression = 148, - ParenthesizedExpression = 149, - FunctionExpression = 150, - ArrowFunction = 151, - DeleteExpression = 152, - TypeOfExpression = 153, - VoidExpression = 154, - PrefixUnaryExpression = 155, - PostfixUnaryExpression = 156, - BinaryExpression = 157, - ConditionalExpression = 158, - TemplateExpression = 159, - YieldExpression = 160, - OmittedExpression = 161, - TemplateSpan = 162, - Block = 163, - VariableStatement = 164, - EmptyStatement = 165, - ExpressionStatement = 166, - IfStatement = 167, - DoStatement = 168, - WhileStatement = 169, - ForStatement = 170, - ForInStatement = 171, - ContinueStatement = 172, - BreakStatement = 173, - ReturnStatement = 174, - WithStatement = 175, - SwitchStatement = 176, - LabeledStatement = 177, - ThrowStatement = 178, - TryStatement = 179, - TryBlock = 180, - FinallyBlock = 181, - DebuggerStatement = 182, - VariableDeclaration = 183, - FunctionDeclaration = 184, - ClassDeclaration = 185, - InterfaceDeclaration = 186, - TypeAliasDeclaration = 187, - EnumDeclaration = 188, - ModuleDeclaration = 189, - ModuleBlock = 190, - ImportDeclaration = 191, - ExportAssignment = 192, - ExternalModuleReference = 193, - CaseClause = 194, - DefaultClause = 195, - HeritageClause = 196, - CatchClause = 197, - PropertyAssignment = 198, - ShorthandPropertyAssignment = 199, - EnumMember = 200, - SourceFile = 201, - Program = 202, - SyntaxList = 203, - Count = 204, + PropertySignature = 124, + PropertyDeclaration = 125, + MethodSignature = 126, + MethodDeclaration = 127, + Constructor = 128, + GetAccessor = 129, + SetAccessor = 130, + CallSignature = 131, + ConstructSignature = 132, + IndexSignature = 133, + TypeReference = 134, + FunctionType = 135, + ConstructorType = 136, + TypeQuery = 137, + TypeLiteral = 138, + ArrayType = 139, + TupleType = 140, + UnionType = 141, + ParenthesizedType = 142, + ObjectBindingPattern = 143, + ArrayBindingPattern = 144, + BindingElement = 145, + ArrayLiteralExpression = 146, + ObjectLiteralExpression = 147, + PropertyAccessExpression = 148, + ElementAccessExpression = 149, + CallExpression = 150, + NewExpression = 151, + TaggedTemplateExpression = 152, + TypeAssertionExpression = 153, + ParenthesizedExpression = 154, + FunctionExpression = 155, + ArrowFunction = 156, + DeleteExpression = 157, + TypeOfExpression = 158, + VoidExpression = 159, + PrefixUnaryExpression = 160, + PostfixUnaryExpression = 161, + BinaryExpression = 162, + ConditionalExpression = 163, + TemplateExpression = 164, + YieldExpression = 165, + OmittedExpression = 166, + TemplateSpan = 167, + Block = 168, + VariableStatement = 169, + EmptyStatement = 170, + ExpressionStatement = 171, + IfStatement = 172, + DoStatement = 173, + WhileStatement = 174, + ForStatement = 175, + ForInStatement = 176, + ContinueStatement = 177, + BreakStatement = 178, + ReturnStatement = 179, + WithStatement = 180, + SwitchStatement = 181, + LabeledStatement = 182, + ThrowStatement = 183, + TryStatement = 184, + TryBlock = 185, + FinallyBlock = 186, + DebuggerStatement = 187, + VariableDeclaration = 188, + FunctionDeclaration = 189, + ClassDeclaration = 190, + InterfaceDeclaration = 191, + TypeAliasDeclaration = 192, + EnumDeclaration = 193, + ModuleDeclaration = 194, + ModuleBlock = 195, + ImportDeclaration = 196, + ExportAssignment = 197, + ExternalModuleReference = 198, + CaseClause = 199, + DefaultClause = 200, + HeritageClause = 201, + CatchClause = 202, + PropertyAssignment = 203, + ShorthandPropertyAssignment = 204, + EnumMember = 205, + SourceFile = 206, + Program = 207, + SyntaxList = 208, + Count = 209, FirstAssignment = 51, LastAssignment = 62, FirstReservedWord = 64, @@ -243,8 +248,8 @@ declare module ts { LastKeyword = 119, FirstFutureReservedWord = 100, LastFutureReservedWord = 108, - FirstTypeNode = 132, - LastTypeNode = 140, + FirstTypeNode = 134, + LastTypeNode = 142, FirstPunctuation = 13, LastPunctuation = 62, FirstToken = 0, @@ -312,7 +317,7 @@ declare module ts { right: Identifier; } type EntityName = Identifier | QualifiedName; - type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; + type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName | BindingPattern; interface Declaration extends Node { _declarationBrand: any; name?: DeclarationName; @@ -331,38 +336,53 @@ declare module ts { type?: TypeNode; } interface VariableDeclaration extends Declaration { - name: Identifier; + name: Identifier | BindingPattern; type?: TypeNode; initializer?: Expression; } interface ParameterDeclaration extends Declaration { dotDotDotToken?: Node; - name: Identifier; - questionToken?: Node; - type?: TypeNode | StringLiteralExpression; - initializer?: Expression; - } - interface PropertyDeclaration extends Declaration, ClassElement { - _propertyDeclarationBrand: any; + name: Identifier | BindingPattern; + questionToken?: Node; + type?: TypeNode; + initializer?: Expression; + } + interface BindingElement extends Declaration { + propertyName?: Identifier; + dotDotDotToken?: Node; + name: Identifier | BindingPattern; + initializer?: Expression; + } + interface PropertyDeclaration extends Declaration, ClassElement { + name: DeclarationName; questionToken?: Node; type?: TypeNode; initializer?: Expression; } - type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; - type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; interface ObjectLiteralElement extends Declaration { _objectLiteralBrandBrand: any; } - interface ShorthandPropertyAssignment extends ObjectLiteralElement { - name: Identifier; - questionToken?: Node; - } interface PropertyAssignment extends ObjectLiteralElement { _propertyAssignmentBrand: any; name: DeclarationName; questionToken?: Node; initializer: Expression; } + interface ShorthandPropertyAssignment extends ObjectLiteralElement { + name: Identifier; + questionToken?: Node; + } + interface VariableLikeDeclaration extends Declaration { + propertyName?: Identifier; + dotDotDotToken?: Node; + name: DeclarationName; + questionToken?: Node; + type?: TypeNode; + initializer?: Expression; + } + interface BindingPattern extends Node { + elements: NodeArray; + } /** * Several node kinds share function-like features such as a signature, * a name, and a body. These nodes should extend FunctionLikeDeclaration. @@ -422,6 +442,8 @@ declare module ts { interface ParenthesizedTypeNode extends TypeNode { type: TypeNode; } + interface StringLiteralTypeNode extends LiteralExpression, TypeNode { + } interface Expression extends Node { _expressionBrand: any; contextualType?: Type; @@ -678,8 +700,6 @@ declare module ts { nodeCount: number; identifierCount: number; symbolCount: number; - isOpen: boolean; - version: string; languageVersion: ScriptTarget; identifiers: Map; } @@ -829,12 +849,13 @@ declare module ts { hasSemanticErrors(sourceFile?: SourceFile): boolean; isDeclarationVisible(node: Declaration): boolean; isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; - writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; + writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableLikeDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number; isEmitBlocked(sourceFile?: SourceFile): boolean; + isUnknownIdentifier(location: Node, name: string): boolean; } const enum SymbolFlags { FunctionScopedVariable = 1, @@ -854,54 +875,52 @@ declare module ts { Constructor = 16384, GetAccessor = 32768, SetAccessor = 65536, - CallSignature = 131072, - ConstructSignature = 262144, - IndexSignature = 524288, - TypeParameter = 1048576, - TypeAlias = 2097152, - ExportValue = 4194304, - ExportType = 8388608, - ExportNamespace = 16777216, - Import = 33554432, - Instantiated = 67108864, - Merged = 134217728, - Transient = 268435456, - Prototype = 536870912, - UnionProperty = 1073741824, + Signature = 131072, + TypeParameter = 262144, + TypeAlias = 524288, + ExportValue = 1048576, + ExportType = 2097152, + ExportNamespace = 4194304, + Import = 8388608, + Instantiated = 16777216, + Merged = 33554432, + Transient = 67108864, + Prototype = 134217728, + UnionProperty = 268435456, + Optional = 536870912, Enum = 384, Variable = 3, Value = 107455, - Type = 3152352, + Type = 793056, Namespace = 1536, Module = 1536, Accessor = 98304, - Signature = 917504, FunctionScopedVariableExcludes = 107454, BlockScopedVariableExcludes = 107455, ParameterExcludes = 107455, PropertyExcludes = 107455, EnumMemberExcludes = 107455, FunctionExcludes = 106927, - ClassExcludes = 3258879, - InterfaceExcludes = 3152288, - RegularEnumExcludes = 3258623, - ConstEnumExcludes = 3259263, + ClassExcludes = 899583, + InterfaceExcludes = 792992, + RegularEnumExcludes = 899327, + ConstEnumExcludes = 899967, ValueModuleExcludes = 106639, NamespaceModuleExcludes = 0, MethodExcludes = 99263, GetAccessorExcludes = 41919, SetAccessorExcludes = 74687, - TypeParameterExcludes = 2103776, - TypeAliasExcludes = 3152352, - ImportExcludes = 33554432, - ModuleMember = 35653619, + TypeParameterExcludes = 530912, + TypeAliasExcludes = 793056, + ImportExcludes = 8388608, + ModuleMember = 8914931, ExportHasLocal = 944, - HasLocals = 1041936, + HasLocals = 255504, HasExports = 1952, HasMembers = 6240, - IsContainer = 1048560, + IsContainer = 262128, PropertyOrAccessor = 98308, - Export = 29360128, + Export = 7340032, } interface Symbol { flags: SymbolFlags; @@ -969,6 +988,7 @@ declare module ts { Union = 16384, Anonymous = 32768, FromSignature = 65536, + Unwidened = 131072, Intrinsic = 127, StringLike = 258, NumberLike = 132, @@ -1336,8 +1356,10 @@ declare module ts { } declare module ts { function getNodeConstructor(kind: SyntaxKind): new () => Node; + function createNode(kind: SyntaxKind): Node; function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; - function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; + function createCompilerHost(options: CompilerOptions): CompilerHost; + function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean): SourceFile; function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; } declare module ts { @@ -1386,6 +1408,8 @@ declare module ts { getDocumentationComment(): SymbolDisplayPart[]; } interface SourceFile { + isOpen: boolean; + version: string; getScriptSnapshot(): IScriptSnapshot; getNamedDeclarations(): Declaration[]; update(scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; @@ -1425,6 +1449,8 @@ declare module ts { } interface Logger { log(s: string): void; + trace(s: string): void; + error(s: string): void; } interface LanguageServiceHost extends Logger { getCompilationSettings(): CompilerOptions; @@ -1848,6 +1874,7 @@ declare module ts { isCancellationRequested(): boolean; throwIfCancellationRequested(): void; } + function createLanguageServiceSourceFile(filename: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, isOpen: boolean, setNodeParents: boolean): SourceFile; function createDocumentRegistry(): DocumentRegistry; function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry): LanguageService; @@ -1856,5 +1883,5 @@ declare module ts { //// [APISample_standalone_compile.js] -var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", 2 /* Latest */, "0.0"); +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", 2 /* Latest */); var program = ts.createProgram(["file1.ts"], {}, undefined); diff --git a/tests/baselines/reference/APISample_standalone_compile.types b/tests/baselines/reference/APISample_standalone_compile.types index c69e655aec1..804aa67e64e 100644 --- a/tests/baselines/reference/APISample_standalone_compile.types +++ b/tests/baselines/reference/APISample_standalone_compile.types @@ -1,11 +1,11 @@ === tests/cases/compiler/APISample_standalone_compile.ts === -var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest); >sourceFile : ts.SourceFile ->ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0") : ts.SourceFile ->ts.createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, version: string, isOpen?: boolean) => ts.SourceFile +>ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest) : ts.SourceFile +>ts.createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, setParentNodes?: boolean) => ts.SourceFile >ts : typeof ts ->createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, version: string, isOpen?: boolean) => ts.SourceFile +>createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, setParentNodes?: boolean) => ts.SourceFile >ts.ScriptTarget.Latest : ts.ScriptTarget >ts.ScriptTarget : typeof ts.ScriptTarget >ts : typeof ts @@ -433,247 +433,262 @@ declare module ts { Parameter = 123, >Parameter : SyntaxKind - Property = 124, ->Property : SyntaxKind + PropertySignature = 124, +>PropertySignature : SyntaxKind - Method = 125, ->Method : SyntaxKind + PropertyDeclaration = 125, +>PropertyDeclaration : SyntaxKind - Constructor = 126, + MethodSignature = 126, +>MethodSignature : SyntaxKind + + MethodDeclaration = 127, +>MethodDeclaration : SyntaxKind + + Constructor = 128, >Constructor : SyntaxKind - GetAccessor = 127, + GetAccessor = 129, >GetAccessor : SyntaxKind - SetAccessor = 128, + SetAccessor = 130, >SetAccessor : SyntaxKind - CallSignature = 129, + CallSignature = 131, >CallSignature : SyntaxKind - ConstructSignature = 130, + ConstructSignature = 132, >ConstructSignature : SyntaxKind - IndexSignature = 131, + IndexSignature = 133, >IndexSignature : SyntaxKind - TypeReference = 132, + TypeReference = 134, >TypeReference : SyntaxKind - FunctionType = 133, + FunctionType = 135, >FunctionType : SyntaxKind - ConstructorType = 134, + ConstructorType = 136, >ConstructorType : SyntaxKind - TypeQuery = 135, + TypeQuery = 137, >TypeQuery : SyntaxKind - TypeLiteral = 136, + TypeLiteral = 138, >TypeLiteral : SyntaxKind - ArrayType = 137, + ArrayType = 139, >ArrayType : SyntaxKind - TupleType = 138, + TupleType = 140, >TupleType : SyntaxKind - UnionType = 139, + UnionType = 141, >UnionType : SyntaxKind - ParenthesizedType = 140, + ParenthesizedType = 142, >ParenthesizedType : SyntaxKind - ArrayLiteralExpression = 141, + ObjectBindingPattern = 143, +>ObjectBindingPattern : SyntaxKind + + ArrayBindingPattern = 144, +>ArrayBindingPattern : SyntaxKind + + BindingElement = 145, +>BindingElement : SyntaxKind + + ArrayLiteralExpression = 146, >ArrayLiteralExpression : SyntaxKind - ObjectLiteralExpression = 142, + ObjectLiteralExpression = 147, >ObjectLiteralExpression : SyntaxKind - PropertyAccessExpression = 143, + PropertyAccessExpression = 148, >PropertyAccessExpression : SyntaxKind - ElementAccessExpression = 144, + ElementAccessExpression = 149, >ElementAccessExpression : SyntaxKind - CallExpression = 145, + CallExpression = 150, >CallExpression : SyntaxKind - NewExpression = 146, + NewExpression = 151, >NewExpression : SyntaxKind - TaggedTemplateExpression = 147, + TaggedTemplateExpression = 152, >TaggedTemplateExpression : SyntaxKind - TypeAssertionExpression = 148, + TypeAssertionExpression = 153, >TypeAssertionExpression : SyntaxKind - ParenthesizedExpression = 149, + ParenthesizedExpression = 154, >ParenthesizedExpression : SyntaxKind - FunctionExpression = 150, + FunctionExpression = 155, >FunctionExpression : SyntaxKind - ArrowFunction = 151, + ArrowFunction = 156, >ArrowFunction : SyntaxKind - DeleteExpression = 152, + DeleteExpression = 157, >DeleteExpression : SyntaxKind - TypeOfExpression = 153, + TypeOfExpression = 158, >TypeOfExpression : SyntaxKind - VoidExpression = 154, + VoidExpression = 159, >VoidExpression : SyntaxKind - PrefixUnaryExpression = 155, + PrefixUnaryExpression = 160, >PrefixUnaryExpression : SyntaxKind - PostfixUnaryExpression = 156, + PostfixUnaryExpression = 161, >PostfixUnaryExpression : SyntaxKind - BinaryExpression = 157, + BinaryExpression = 162, >BinaryExpression : SyntaxKind - ConditionalExpression = 158, + ConditionalExpression = 163, >ConditionalExpression : SyntaxKind - TemplateExpression = 159, + TemplateExpression = 164, >TemplateExpression : SyntaxKind - YieldExpression = 160, + YieldExpression = 165, >YieldExpression : SyntaxKind - OmittedExpression = 161, + OmittedExpression = 166, >OmittedExpression : SyntaxKind - TemplateSpan = 162, + TemplateSpan = 167, >TemplateSpan : SyntaxKind - Block = 163, + Block = 168, >Block : SyntaxKind - VariableStatement = 164, + VariableStatement = 169, >VariableStatement : SyntaxKind - EmptyStatement = 165, + EmptyStatement = 170, >EmptyStatement : SyntaxKind - ExpressionStatement = 166, + ExpressionStatement = 171, >ExpressionStatement : SyntaxKind - IfStatement = 167, + IfStatement = 172, >IfStatement : SyntaxKind - DoStatement = 168, + DoStatement = 173, >DoStatement : SyntaxKind - WhileStatement = 169, + WhileStatement = 174, >WhileStatement : SyntaxKind - ForStatement = 170, + ForStatement = 175, >ForStatement : SyntaxKind - ForInStatement = 171, + ForInStatement = 176, >ForInStatement : SyntaxKind - ContinueStatement = 172, + ContinueStatement = 177, >ContinueStatement : SyntaxKind - BreakStatement = 173, + BreakStatement = 178, >BreakStatement : SyntaxKind - ReturnStatement = 174, + ReturnStatement = 179, >ReturnStatement : SyntaxKind - WithStatement = 175, + WithStatement = 180, >WithStatement : SyntaxKind - SwitchStatement = 176, + SwitchStatement = 181, >SwitchStatement : SyntaxKind - LabeledStatement = 177, + LabeledStatement = 182, >LabeledStatement : SyntaxKind - ThrowStatement = 178, + ThrowStatement = 183, >ThrowStatement : SyntaxKind - TryStatement = 179, + TryStatement = 184, >TryStatement : SyntaxKind - TryBlock = 180, + TryBlock = 185, >TryBlock : SyntaxKind - FinallyBlock = 181, + FinallyBlock = 186, >FinallyBlock : SyntaxKind - DebuggerStatement = 182, + DebuggerStatement = 187, >DebuggerStatement : SyntaxKind - VariableDeclaration = 183, + VariableDeclaration = 188, >VariableDeclaration : SyntaxKind - FunctionDeclaration = 184, + FunctionDeclaration = 189, >FunctionDeclaration : SyntaxKind - ClassDeclaration = 185, + ClassDeclaration = 190, >ClassDeclaration : SyntaxKind - InterfaceDeclaration = 186, + InterfaceDeclaration = 191, >InterfaceDeclaration : SyntaxKind - TypeAliasDeclaration = 187, + TypeAliasDeclaration = 192, >TypeAliasDeclaration : SyntaxKind - EnumDeclaration = 188, + EnumDeclaration = 193, >EnumDeclaration : SyntaxKind - ModuleDeclaration = 189, + ModuleDeclaration = 194, >ModuleDeclaration : SyntaxKind - ModuleBlock = 190, + ModuleBlock = 195, >ModuleBlock : SyntaxKind - ImportDeclaration = 191, + ImportDeclaration = 196, >ImportDeclaration : SyntaxKind - ExportAssignment = 192, + ExportAssignment = 197, >ExportAssignment : SyntaxKind - ExternalModuleReference = 193, + ExternalModuleReference = 198, >ExternalModuleReference : SyntaxKind - CaseClause = 194, + CaseClause = 199, >CaseClause : SyntaxKind - DefaultClause = 195, + DefaultClause = 200, >DefaultClause : SyntaxKind - HeritageClause = 196, + HeritageClause = 201, >HeritageClause : SyntaxKind - CatchClause = 197, + CatchClause = 202, >CatchClause : SyntaxKind - PropertyAssignment = 198, + PropertyAssignment = 203, >PropertyAssignment : SyntaxKind - ShorthandPropertyAssignment = 199, + ShorthandPropertyAssignment = 204, >ShorthandPropertyAssignment : SyntaxKind - EnumMember = 200, + EnumMember = 205, >EnumMember : SyntaxKind - SourceFile = 201, + SourceFile = 206, >SourceFile : SyntaxKind - Program = 202, + Program = 207, >Program : SyntaxKind - SyntaxList = 203, + SyntaxList = 208, >SyntaxList : SyntaxKind - Count = 204, + Count = 209, >Count : SyntaxKind FirstAssignment = 51, @@ -700,10 +715,10 @@ declare module ts { LastFutureReservedWord = 108, >LastFutureReservedWord : SyntaxKind - FirstTypeNode = 132, + FirstTypeNode = 134, >FirstTypeNode : SyntaxKind - LastTypeNode = 140, + LastTypeNode = 142, >LastTypeNode : SyntaxKind FirstPunctuation = 13, @@ -905,11 +920,12 @@ declare module ts { >Identifier : Identifier >QualifiedName : QualifiedName - type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName + type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName | BindingPattern; +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern >Identifier : Identifier >LiteralExpression : LiteralExpression >ComputedPropertyName : ComputedPropertyName +>BindingPattern : BindingPattern interface Declaration extends Node { >Declaration : Declaration @@ -919,8 +935,8 @@ declare module ts { >_declarationBrand : any name?: DeclarationName; ->name : Identifier | LiteralExpression | ComputedPropertyName ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName +>name : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern } interface ComputedPropertyName extends Node { >ComputedPropertyName : ComputedPropertyName @@ -968,9 +984,10 @@ declare module ts { >VariableDeclaration : VariableDeclaration >Declaration : Declaration - name: Identifier; ->name : Identifier + name: Identifier | BindingPattern; +>name : Identifier | BindingPattern >Identifier : Identifier +>BindingPattern : BindingPattern type?: TypeNode; >type : TypeNode @@ -988,30 +1005,10 @@ declare module ts { >dotDotDotToken : Node >Node : Node - name: Identifier; ->name : Identifier + name: Identifier | BindingPattern; +>name : Identifier | BindingPattern >Identifier : Identifier - - questionToken?: Node; ->questionToken : Node ->Node : Node - - type?: TypeNode | StringLiteralExpression; ->type : TypeNode | StringLiteralExpression ->TypeNode : TypeNode ->StringLiteralExpression : StringLiteralExpression - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - } - interface PropertyDeclaration extends Declaration, ClassElement { ->PropertyDeclaration : PropertyDeclaration ->Declaration : Declaration ->ClassElement : ClassElement - - _propertyDeclarationBrand: any; ->_propertyDeclarationBrand : any +>BindingPattern : BindingPattern questionToken?: Node; >questionToken : Node @@ -1025,22 +1022,73 @@ declare module ts { >initializer : Expression >Expression : Expression } - type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; ->VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration ->VariableDeclaration : VariableDeclaration ->ParameterDeclaration : ParameterDeclaration + interface BindingElement extends Declaration { +>BindingElement : BindingElement +>Declaration : Declaration - type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; ->VariableOrParameterOrPropertyDeclaration : ParameterDeclaration | VariableDeclaration | PropertyDeclaration ->VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration + propertyName?: Identifier; +>propertyName : Identifier +>Identifier : Identifier + + dotDotDotToken?: Node; +>dotDotDotToken : Node +>Node : Node + + name: Identifier | BindingPattern; +>name : Identifier | BindingPattern +>Identifier : Identifier +>BindingPattern : BindingPattern + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + interface PropertyDeclaration extends Declaration, ClassElement { >PropertyDeclaration : PropertyDeclaration +>Declaration : Declaration +>ClassElement : ClassElement + name: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern + + questionToken?: Node; +>questionToken : Node +>Node : Node + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } interface ObjectLiteralElement extends Declaration { >ObjectLiteralElement : ObjectLiteralElement >Declaration : Declaration _objectLiteralBrandBrand: any; >_objectLiteralBrandBrand : any + } + interface PropertyAssignment extends ObjectLiteralElement { +>PropertyAssignment : PropertyAssignment +>ObjectLiteralElement : ObjectLiteralElement + + _propertyAssignmentBrand: any; +>_propertyAssignmentBrand : any + + name: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern + + questionToken?: Node; +>questionToken : Node +>Node : Node + + initializer: Expression; +>initializer : Expression +>Expression : Expression } interface ShorthandPropertyAssignment extends ObjectLiteralElement { >ShorthandPropertyAssignment : ShorthandPropertyAssignment @@ -1054,24 +1102,42 @@ declare module ts { >questionToken : Node >Node : Node } - interface PropertyAssignment extends ObjectLiteralElement { ->PropertyAssignment : PropertyAssignment ->ObjectLiteralElement : ObjectLiteralElement + interface VariableLikeDeclaration extends Declaration { +>VariableLikeDeclaration : VariableLikeDeclaration +>Declaration : Declaration - _propertyAssignmentBrand: any; ->_propertyAssignmentBrand : any + propertyName?: Identifier; +>propertyName : Identifier +>Identifier : Identifier + + dotDotDotToken?: Node; +>dotDotDotToken : Node +>Node : Node name: DeclarationName; ->name : Identifier | LiteralExpression | ComputedPropertyName ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName +>name : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern questionToken?: Node; >questionToken : Node >Node : Node - initializer: Expression; + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + initializer?: Expression; >initializer : Expression >Expression : Expression + } + interface BindingPattern extends Node { +>BindingPattern : BindingPattern +>Node : Node + + elements: NodeArray; +>elements : NodeArray +>NodeArray : NodeArray +>BindingElement : BindingElement } /** * Several node kinds share function-like features such as a signature, @@ -1232,6 +1298,11 @@ declare module ts { type: TypeNode; >type : TypeNode +>TypeNode : TypeNode + } + interface StringLiteralTypeNode extends LiteralExpression, TypeNode { +>StringLiteralTypeNode : StringLiteralTypeNode +>LiteralExpression : LiteralExpression >TypeNode : TypeNode } interface Expression extends Node { @@ -1858,8 +1929,8 @@ declare module ts { >Declaration : Declaration name: DeclarationName; ->name : Identifier | LiteralExpression | ComputedPropertyName ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName +>name : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern initializer?: Expression; >initializer : Expression @@ -2027,12 +2098,6 @@ declare module ts { symbolCount: number; >symbolCount : number - isOpen: boolean; ->isOpen : boolean - - version: string; ->version : string - languageVersion: ScriptTarget; >languageVersion : ScriptTarget >ScriptTarget : ScriptTarget @@ -2673,11 +2738,11 @@ declare module ts { >node : FunctionLikeDeclaration >FunctionLikeDeclaration : FunctionLikeDeclaration - writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; ->writeTypeOfDeclaration : (declaration: ParameterDeclaration | VariableDeclaration | AccessorDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void ->declaration : ParameterDeclaration | VariableDeclaration | AccessorDeclaration + writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableLikeDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; +>writeTypeOfDeclaration : (declaration: VariableLikeDeclaration | AccessorDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void +>declaration : VariableLikeDeclaration | AccessorDeclaration >AccessorDeclaration : AccessorDeclaration ->VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration +>VariableLikeDeclaration : VariableLikeDeclaration >enclosingDeclaration : Node >Node : Node >flags : TypeFormatFlags @@ -2724,6 +2789,12 @@ declare module ts { >isEmitBlocked : (sourceFile?: SourceFile) => boolean >sourceFile : SourceFile >SourceFile : SourceFile + + isUnknownIdentifier(location: Node, name: string): boolean; +>isUnknownIdentifier : (location: Node, name: string) => boolean +>location : Node +>Node : Node +>name : string } const enum SymbolFlags { >SymbolFlags : SymbolFlags @@ -2779,48 +2850,45 @@ declare module ts { SetAccessor = 65536, >SetAccessor : SymbolFlags - CallSignature = 131072, ->CallSignature : SymbolFlags + Signature = 131072, +>Signature : SymbolFlags - ConstructSignature = 262144, ->ConstructSignature : SymbolFlags - - IndexSignature = 524288, ->IndexSignature : SymbolFlags - - TypeParameter = 1048576, + TypeParameter = 262144, >TypeParameter : SymbolFlags - TypeAlias = 2097152, + TypeAlias = 524288, >TypeAlias : SymbolFlags - ExportValue = 4194304, + ExportValue = 1048576, >ExportValue : SymbolFlags - ExportType = 8388608, + ExportType = 2097152, >ExportType : SymbolFlags - ExportNamespace = 16777216, + ExportNamespace = 4194304, >ExportNamespace : SymbolFlags - Import = 33554432, + Import = 8388608, >Import : SymbolFlags - Instantiated = 67108864, + Instantiated = 16777216, >Instantiated : SymbolFlags - Merged = 134217728, + Merged = 33554432, >Merged : SymbolFlags - Transient = 268435456, + Transient = 67108864, >Transient : SymbolFlags - Prototype = 536870912, + Prototype = 134217728, >Prototype : SymbolFlags - UnionProperty = 1073741824, + UnionProperty = 268435456, >UnionProperty : SymbolFlags + Optional = 536870912, +>Optional : SymbolFlags + Enum = 384, >Enum : SymbolFlags @@ -2830,7 +2898,7 @@ declare module ts { Value = 107455, >Value : SymbolFlags - Type = 3152352, + Type = 793056, >Type : SymbolFlags Namespace = 1536, @@ -2842,9 +2910,6 @@ declare module ts { Accessor = 98304, >Accessor : SymbolFlags - Signature = 917504, ->Signature : SymbolFlags - FunctionScopedVariableExcludes = 107454, >FunctionScopedVariableExcludes : SymbolFlags @@ -2863,16 +2928,16 @@ declare module ts { FunctionExcludes = 106927, >FunctionExcludes : SymbolFlags - ClassExcludes = 3258879, + ClassExcludes = 899583, >ClassExcludes : SymbolFlags - InterfaceExcludes = 3152288, + InterfaceExcludes = 792992, >InterfaceExcludes : SymbolFlags - RegularEnumExcludes = 3258623, + RegularEnumExcludes = 899327, >RegularEnumExcludes : SymbolFlags - ConstEnumExcludes = 3259263, + ConstEnumExcludes = 899967, >ConstEnumExcludes : SymbolFlags ValueModuleExcludes = 106639, @@ -2890,22 +2955,22 @@ declare module ts { SetAccessorExcludes = 74687, >SetAccessorExcludes : SymbolFlags - TypeParameterExcludes = 2103776, + TypeParameterExcludes = 530912, >TypeParameterExcludes : SymbolFlags - TypeAliasExcludes = 3152352, + TypeAliasExcludes = 793056, >TypeAliasExcludes : SymbolFlags - ImportExcludes = 33554432, + ImportExcludes = 8388608, >ImportExcludes : SymbolFlags - ModuleMember = 35653619, + ModuleMember = 8914931, >ModuleMember : SymbolFlags ExportHasLocal = 944, >ExportHasLocal : SymbolFlags - HasLocals = 1041936, + HasLocals = 255504, >HasLocals : SymbolFlags HasExports = 1952, @@ -2914,13 +2979,13 @@ declare module ts { HasMembers = 6240, >HasMembers : SymbolFlags - IsContainer = 1048560, + IsContainer = 262128, >IsContainer : SymbolFlags PropertyOrAccessor = 98308, >PropertyOrAccessor : SymbolFlags - Export = 29360128, + Export = 7340032, >Export : SymbolFlags } interface Symbol { @@ -3124,6 +3189,9 @@ declare module ts { FromSignature = 65536, >FromSignature : TypeFlags + Unwidened = 131072, +>Unwidened : TypeFlags + Intrinsic = 127, >Intrinsic : TypeFlags @@ -4245,6 +4313,12 @@ declare module ts { >getNodeConstructor : (kind: SyntaxKind) => new () => Node >kind : SyntaxKind >SyntaxKind : SyntaxKind +>Node : Node + + function createNode(kind: SyntaxKind): Node; +>createNode : (kind: SyntaxKind) => Node +>kind : SyntaxKind +>SyntaxKind : SyntaxKind >Node : Node function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; @@ -4262,14 +4336,19 @@ declare module ts { >T : T >T : T - function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; ->createSourceFile : (filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean) => SourceFile + function createCompilerHost(options: CompilerOptions): CompilerHost; +>createCompilerHost : (options: CompilerOptions) => CompilerHost +>options : CompilerOptions +>CompilerOptions : CompilerOptions +>CompilerHost : CompilerHost + + function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean): SourceFile; +>createSourceFile : (filename: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean) => SourceFile >filename : string >sourceText : string >languageVersion : ScriptTarget >ScriptTarget : ScriptTarget ->version : string ->isOpen : boolean +>setParentNodes : boolean >SourceFile : SourceFile function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; @@ -4452,6 +4531,12 @@ declare module ts { interface SourceFile { >SourceFile : SourceFile + isOpen: boolean; +>isOpen : boolean + + version: string; +>version : string + getScriptSnapshot(): IScriptSnapshot; >getScriptSnapshot : () => IScriptSnapshot >IScriptSnapshot : IScriptSnapshot @@ -4536,6 +4621,14 @@ declare module ts { log(s: string): void; >log : (s: string) => void +>s : string + + trace(s: string): void; +>trace : (s: string) => void +>s : string + + error(s: string): void; +>error : (s: string) => void >s : string } interface LanguageServiceHost extends Logger { @@ -5720,6 +5813,18 @@ declare module ts { throwIfCancellationRequested(): void; >throwIfCancellationRequested : () => void } + function createLanguageServiceSourceFile(filename: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, isOpen: boolean, setNodeParents: boolean): SourceFile; +>createLanguageServiceSourceFile : (filename: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, isOpen: boolean, setNodeParents: boolean) => SourceFile +>filename : string +>scriptSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>scriptTarget : ScriptTarget +>ScriptTarget : ScriptTarget +>version : string +>isOpen : boolean +>setNodeParents : boolean +>SourceFile : SourceFile + function createDocumentRegistry(): DocumentRegistry; >createDocumentRegistry : () => DocumentRegistry >DocumentRegistry : DocumentRegistry diff --git a/tests/cases/compiler/APISample_node_compile.ts b/tests/cases/compiler/APISample_node_compile.ts index b138ce2b44c..7386641f383 100644 --- a/tests/cases/compiler/APISample_node_compile.ts +++ b/tests/cases/compiler/APISample_node_compile.ts @@ -6,6 +6,6 @@ import ts = require("typescript"); -var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest); var program = ts.createProgram(["file1.ts"], {}, undefined); \ No newline at end of file diff --git a/tests/cases/compiler/APISample_standalone_compile.ts b/tests/cases/compiler/APISample_standalone_compile.ts index 049aae5523f..06149b37ad0 100644 --- a/tests/cases/compiler/APISample_standalone_compile.ts +++ b/tests/cases/compiler/APISample_standalone_compile.ts @@ -2,6 +2,6 @@ // @noImplicitAny: true // @target: ES3 -var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest); var program = ts.createProgram(["file1.ts"], {}, undefined); \ No newline at end of file From 94cce178dd2ef2c4281b9a51063db5af8d30b2eb Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 10 Dec 2014 17:34:17 -0800 Subject: [PATCH 122/141] Responded to CR feedback. Conflicts: src/compiler/parser.ts --- src/compiler/parser.ts | 27 ++++++++++++++------------- src/compiler/utilities.ts | 6 ++++-- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index b8ddaedf67f..5ee4e053c5e 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -14,18 +14,6 @@ module ts { return new (getNodeConstructor(kind))(); } - function isEvalOrArgumentsIdentifier(node: Node): boolean { - return node.kind === SyntaxKind.Identifier && - (node).text && - ((node).text === "eval" || (node).text === "arguments"); - } - - /// Should be called only on prologue directives (isPrologueDirective(node) should be true) - function isUseStrictPrologueDirective(node: Node): boolean { - Debug.assert(isPrologueDirective(node)); - return ((node).expression).text === "use strict"; - } - // Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes // stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise, // embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns @@ -327,7 +315,9 @@ module ts { sys.writeFile(fileName, data, writeByteOrderMark); } catch (e) { - if (onError) onError(e.message); + if (onError) { + onError(e.message); + } } } @@ -433,6 +423,17 @@ module ts { forEachChild(sourceFile, walk); } + function isEvalOrArgumentsIdentifier(node: Node): boolean { + return node.kind === SyntaxKind.Identifier && + ((node).text === "eval" || (node).text === "arguments"); + } + + /// Should be called only on prologue directives (isPrologueDirective(node) should be true) + function isUseStrictPrologueDirective(node: Node): boolean { + Debug.assert(isPrologueDirective(node)); + return getTextOfNode((node).expression) === '"use strict"'; + } + export function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes = false): SourceFile { var parsingContext: ParsingContext; var identifiers: Map = {}; diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 15b0bdfc0b2..35e61a3a48e 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -90,7 +90,9 @@ module ts { } export function getSourceFileOfNode(node: Node): SourceFile { - while (node && node.kind !== SyntaxKind.SourceFile) node = node.parent; + while (node && node.kind !== SyntaxKind.SourceFile) { + node = node.parent; + } return node; } @@ -161,7 +163,7 @@ module ts { node = getErrorSpanForNode(node); var file = getSourceFileOfNode(node); - var start = getFullWidth(node) === 0 ? node.pos : skipTrivia(file.text, node.pos); + var start = getTokenPosOfNode(node, file); var length = node.end - start; return createFileDiagnostic(file, start, length, message, arg0, arg1, arg2); From 987dd0cede5b7b9dafddbb13b3562db8a36af0dc Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 10 Dec 2014 18:17:59 -0800 Subject: [PATCH 123/141] Fixed 'use strict' check. --- src/compiler/parser.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 5ee4e053c5e..c632c68c34f 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -429,9 +429,10 @@ module ts { } /// Should be called only on prologue directives (isPrologueDirective(node) should be true) - function isUseStrictPrologueDirective(node: Node): boolean { + function isUseStrictPrologueDirective(sourceFile: SourceFile, node: Node): boolean { Debug.assert(isPrologueDirective(node)); - return getTextOfNode((node).expression) === '"use strict"'; + var nodeText = getSourceTextOfNodeFromSourceFile(sourceFile,(node).expression); + return nodeText === '"use strict"' || nodeText === "'use strict'"; } export function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes = false): SourceFile { @@ -1137,7 +1138,7 @@ module ts { // test elements only if we are not already in strict mode if (checkForStrictMode && !inStrictModeContext()) { if (isPrologueDirective(element)) { - if (isUseStrictPrologueDirective(element)) { + if (isUseStrictPrologueDirective(sourceFile, element)) { setStrictModeContext(true); checkForStrictMode = false; } From 644951b1e090a2712157073f8e6d1c67ca02aaf1 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 11 Dec 2014 14:46:54 -0800 Subject: [PATCH 124/141] Fixed old sys dependency, as sys is now ts.sys. --- scripts/processDiagnosticMessages.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/processDiagnosticMessages.ts b/scripts/processDiagnosticMessages.ts index eccfb821bb2..0d32c605fdc 100644 --- a/scripts/processDiagnosticMessages.ts +++ b/scripts/processDiagnosticMessages.ts @@ -15,6 +15,7 @@ interface IIndexable { } function main(): void { + var sys = ts.sys; if (sys.args.length < 1) { sys.write("Usage:" + sys.newLine) sys.write("\tnode processDiagnosticMessages.js " + sys.newLine); From cfca38f0afc739ba2055c5ad9b0e8c5bb51731f5 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 11 Dec 2014 16:39:32 -0800 Subject: [PATCH 125/141] Remove baselines. --- .../reference/APISample_node_compile.js | 1865 ------ .../reference/APISample_node_compile.types | 5749 ---------------- .../reference/APISample_standalone_compile.js | 1862 ------ .../APISample_standalone_compile.types | 5756 ----------------- 4 files changed, 15232 deletions(-) delete mode 100644 tests/baselines/reference/APISample_node_compile.js delete mode 100644 tests/baselines/reference/APISample_node_compile.types delete mode 100644 tests/baselines/reference/APISample_standalone_compile.js delete mode 100644 tests/baselines/reference/APISample_standalone_compile.types diff --git a/tests/baselines/reference/APISample_node_compile.js b/tests/baselines/reference/APISample_node_compile.js deleted file mode 100644 index d4111bcafd4..00000000000 --- a/tests/baselines/reference/APISample_node_compile.js +++ /dev/null @@ -1,1865 +0,0 @@ -//// [tests/cases/compiler/APISample_node_compile.ts] //// - -//// [APISample_node_compile.ts] - -import ts = require("typescript"); - -var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); - -var program = ts.createProgram(["file1.ts"], {}, undefined); -//// [typescript.d.ts] -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ - -declare module "typescript" { - interface Map { - [index: string]: T; - } - interface TextRange { - pos: number; - end: number; - } - const enum SyntaxKind { - Unknown = 0, - EndOfFileToken = 1, - SingleLineCommentTrivia = 2, - MultiLineCommentTrivia = 3, - NewLineTrivia = 4, - WhitespaceTrivia = 5, - NumericLiteral = 6, - StringLiteral = 7, - RegularExpressionLiteral = 8, - NoSubstitutionTemplateLiteral = 9, - TemplateHead = 10, - TemplateMiddle = 11, - TemplateTail = 12, - OpenBraceToken = 13, - CloseBraceToken = 14, - OpenParenToken = 15, - CloseParenToken = 16, - OpenBracketToken = 17, - CloseBracketToken = 18, - DotToken = 19, - DotDotDotToken = 20, - SemicolonToken = 21, - CommaToken = 22, - LessThanToken = 23, - GreaterThanToken = 24, - LessThanEqualsToken = 25, - GreaterThanEqualsToken = 26, - EqualsEqualsToken = 27, - ExclamationEqualsToken = 28, - EqualsEqualsEqualsToken = 29, - ExclamationEqualsEqualsToken = 30, - EqualsGreaterThanToken = 31, - PlusToken = 32, - MinusToken = 33, - AsteriskToken = 34, - SlashToken = 35, - PercentToken = 36, - PlusPlusToken = 37, - MinusMinusToken = 38, - LessThanLessThanToken = 39, - GreaterThanGreaterThanToken = 40, - GreaterThanGreaterThanGreaterThanToken = 41, - AmpersandToken = 42, - BarToken = 43, - CaretToken = 44, - ExclamationToken = 45, - TildeToken = 46, - AmpersandAmpersandToken = 47, - BarBarToken = 48, - QuestionToken = 49, - ColonToken = 50, - EqualsToken = 51, - PlusEqualsToken = 52, - MinusEqualsToken = 53, - AsteriskEqualsToken = 54, - SlashEqualsToken = 55, - PercentEqualsToken = 56, - LessThanLessThanEqualsToken = 57, - GreaterThanGreaterThanEqualsToken = 58, - GreaterThanGreaterThanGreaterThanEqualsToken = 59, - AmpersandEqualsToken = 60, - BarEqualsToken = 61, - CaretEqualsToken = 62, - Identifier = 63, - BreakKeyword = 64, - CaseKeyword = 65, - CatchKeyword = 66, - ClassKeyword = 67, - ConstKeyword = 68, - ContinueKeyword = 69, - DebuggerKeyword = 70, - DefaultKeyword = 71, - DeleteKeyword = 72, - DoKeyword = 73, - ElseKeyword = 74, - EnumKeyword = 75, - ExportKeyword = 76, - ExtendsKeyword = 77, - FalseKeyword = 78, - FinallyKeyword = 79, - ForKeyword = 80, - FunctionKeyword = 81, - IfKeyword = 82, - ImportKeyword = 83, - InKeyword = 84, - InstanceOfKeyword = 85, - NewKeyword = 86, - NullKeyword = 87, - ReturnKeyword = 88, - SuperKeyword = 89, - SwitchKeyword = 90, - ThisKeyword = 91, - ThrowKeyword = 92, - TrueKeyword = 93, - TryKeyword = 94, - TypeOfKeyword = 95, - VarKeyword = 96, - VoidKeyword = 97, - WhileKeyword = 98, - WithKeyword = 99, - ImplementsKeyword = 100, - InterfaceKeyword = 101, - LetKeyword = 102, - PackageKeyword = 103, - PrivateKeyword = 104, - ProtectedKeyword = 105, - PublicKeyword = 106, - StaticKeyword = 107, - YieldKeyword = 108, - AnyKeyword = 109, - BooleanKeyword = 110, - ConstructorKeyword = 111, - DeclareKeyword = 112, - GetKeyword = 113, - ModuleKeyword = 114, - RequireKeyword = 115, - NumberKeyword = 116, - SetKeyword = 117, - StringKeyword = 118, - TypeKeyword = 119, - QualifiedName = 120, - ComputedPropertyName = 121, - TypeParameter = 122, - Parameter = 123, - Property = 124, - Method = 125, - Constructor = 126, - GetAccessor = 127, - SetAccessor = 128, - CallSignature = 129, - ConstructSignature = 130, - IndexSignature = 131, - TypeReference = 132, - FunctionType = 133, - ConstructorType = 134, - TypeQuery = 135, - TypeLiteral = 136, - ArrayType = 137, - TupleType = 138, - UnionType = 139, - ParenthesizedType = 140, - ArrayLiteralExpression = 141, - ObjectLiteralExpression = 142, - PropertyAccessExpression = 143, - ElementAccessExpression = 144, - CallExpression = 145, - NewExpression = 146, - TaggedTemplateExpression = 147, - TypeAssertionExpression = 148, - ParenthesizedExpression = 149, - FunctionExpression = 150, - ArrowFunction = 151, - DeleteExpression = 152, - TypeOfExpression = 153, - VoidExpression = 154, - PrefixUnaryExpression = 155, - PostfixUnaryExpression = 156, - BinaryExpression = 157, - ConditionalExpression = 158, - TemplateExpression = 159, - YieldExpression = 160, - OmittedExpression = 161, - TemplateSpan = 162, - Block = 163, - VariableStatement = 164, - EmptyStatement = 165, - ExpressionStatement = 166, - IfStatement = 167, - DoStatement = 168, - WhileStatement = 169, - ForStatement = 170, - ForInStatement = 171, - ContinueStatement = 172, - BreakStatement = 173, - ReturnStatement = 174, - WithStatement = 175, - SwitchStatement = 176, - LabeledStatement = 177, - ThrowStatement = 178, - TryStatement = 179, - TryBlock = 180, - FinallyBlock = 181, - DebuggerStatement = 182, - VariableDeclaration = 183, - FunctionDeclaration = 184, - ClassDeclaration = 185, - InterfaceDeclaration = 186, - TypeAliasDeclaration = 187, - EnumDeclaration = 188, - ModuleDeclaration = 189, - ModuleBlock = 190, - ImportDeclaration = 191, - ExportAssignment = 192, - ExternalModuleReference = 193, - CaseClause = 194, - DefaultClause = 195, - HeritageClause = 196, - CatchClause = 197, - PropertyAssignment = 198, - ShorthandPropertyAssignment = 199, - EnumMember = 200, - SourceFile = 201, - Program = 202, - SyntaxList = 203, - Count = 204, - FirstAssignment = 51, - LastAssignment = 62, - FirstReservedWord = 64, - LastReservedWord = 99, - FirstKeyword = 64, - LastKeyword = 119, - FirstFutureReservedWord = 100, - LastFutureReservedWord = 108, - FirstTypeNode = 132, - LastTypeNode = 140, - FirstPunctuation = 13, - LastPunctuation = 62, - FirstToken = 0, - LastToken = 119, - FirstTriviaToken = 2, - LastTriviaToken = 5, - FirstLiteralToken = 6, - LastLiteralToken = 9, - FirstTemplateToken = 9, - LastTemplateToken = 12, - FirstOperator = 21, - LastOperator = 62, - FirstBinaryOperator = 23, - LastBinaryOperator = 62, - FirstNode = 120, - } - const enum NodeFlags { - Export = 1, - Ambient = 2, - Public = 16, - Private = 32, - Protected = 64, - Static = 128, - MultiLine = 256, - Synthetic = 512, - DeclarationFile = 1024, - Let = 2048, - Const = 4096, - OctalLiteral = 8192, - Modifier = 243, - AccessibilityModifier = 112, - BlockScoped = 6144, - } - const enum ParserContextFlags { - StrictMode = 1, - DisallowIn = 2, - Yield = 4, - GeneratorParameter = 8, - ContainsError = 16, - HasPropagatedChildContainsErrorFlag = 32, - } - interface Node extends TextRange { - kind: SyntaxKind; - flags: NodeFlags; - parserContextFlags?: ParserContextFlags; - id?: number; - parent?: Node; - symbol?: Symbol; - locals?: SymbolTable; - nextContainer?: Node; - localSymbol?: Symbol; - modifiers?: ModifiersArray; - } - interface NodeArray extends Array, TextRange { - hasTrailingComma?: boolean; - } - interface ModifiersArray extends NodeArray { - flags: number; - } - interface Identifier extends PrimaryExpression { - text: string; - } - interface QualifiedName extends Node { - left: EntityName; - right: Identifier; - } - type EntityName = Identifier | QualifiedName; - type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; - interface Declaration extends Node { - _declarationBrand: any; - name?: DeclarationName; - } - interface ComputedPropertyName extends Node { - expression: Expression; - } - interface TypeParameterDeclaration extends Declaration { - name: Identifier; - constraint?: TypeNode; - expression?: Expression; - } - interface SignatureDeclaration extends Declaration { - typeParameters?: NodeArray; - parameters: NodeArray; - type?: TypeNode; - } - interface VariableDeclaration extends Declaration { - name: Identifier; - type?: TypeNode; - initializer?: Expression; - } - interface ParameterDeclaration extends Declaration { - dotDotDotToken?: Node; - name: Identifier; - questionToken?: Node; - type?: TypeNode | StringLiteralExpression; - initializer?: Expression; - } - interface PropertyDeclaration extends Declaration, ClassElement { - _propertyDeclarationBrand: any; - questionToken?: Node; - type?: TypeNode; - initializer?: Expression; - } - type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; - type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; - interface ObjectLiteralElement extends Declaration { - _objectLiteralBrandBrand: any; - } - interface ShorthandPropertyAssignment extends ObjectLiteralElement { - name: Identifier; - questionToken?: Node; - } - interface PropertyAssignment extends ObjectLiteralElement { - _propertyAssignmentBrand: any; - name: DeclarationName; - questionToken?: Node; - initializer: Expression; - } - /** - * Several node kinds share function-like features such as a signature, - * a name, and a body. These nodes should extend FunctionLikeDeclaration. - * Examples: - * FunctionDeclaration - * MethodDeclaration - * AccessorDeclaration - */ - interface FunctionLikeDeclaration extends SignatureDeclaration { - _functionLikeDeclarationBrand: any; - asteriskToken?: Node; - questionToken?: Node; - body?: Block | Expression; - } - interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { - name: Identifier; - body?: Block; - } - interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { - body?: Block; - } - interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { - body?: Block; - } - interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { - _accessorDeclarationBrand: any; - body: Block; - } - interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { - _indexSignatureDeclarationBrand: any; - } - interface TypeNode extends Node { - _typeNodeBrand: any; - } - interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { - _functionOrConstructorTypeNodeBrand: any; - } - interface TypeReferenceNode extends TypeNode { - typeName: EntityName; - typeArguments?: NodeArray; - } - interface TypeQueryNode extends TypeNode { - exprName: EntityName; - } - interface TypeLiteralNode extends TypeNode, Declaration { - members: NodeArray; - } - interface ArrayTypeNode extends TypeNode { - elementType: TypeNode; - } - interface TupleTypeNode extends TypeNode { - elementTypes: NodeArray; - } - interface UnionTypeNode extends TypeNode { - types: NodeArray; - } - interface ParenthesizedTypeNode extends TypeNode { - type: TypeNode; - } - interface Expression extends Node { - _expressionBrand: any; - contextualType?: Type; - } - interface UnaryExpression extends Expression { - _unaryExpressionBrand: any; - } - interface PrefixUnaryExpression extends UnaryExpression { - operator: SyntaxKind; - operand: UnaryExpression; - } - interface PostfixUnaryExpression extends PostfixExpression { - operand: LeftHandSideExpression; - operator: SyntaxKind; - } - interface PostfixExpression extends UnaryExpression { - _postfixExpressionBrand: any; - } - interface LeftHandSideExpression extends PostfixExpression { - _leftHandSideExpressionBrand: any; - } - interface MemberExpression extends LeftHandSideExpression { - _memberExpressionBrand: any; - } - interface PrimaryExpression extends MemberExpression { - _primaryExpressionBrand: any; - } - interface DeleteExpression extends UnaryExpression { - expression: UnaryExpression; - } - interface TypeOfExpression extends UnaryExpression { - expression: UnaryExpression; - } - interface VoidExpression extends UnaryExpression { - expression: UnaryExpression; - } - interface YieldExpression extends Expression { - asteriskToken?: Node; - expression: Expression; - } - interface BinaryExpression extends Expression { - left: Expression; - operator: SyntaxKind; - right: Expression; - } - interface ConditionalExpression extends Expression { - condition: Expression; - whenTrue: Expression; - whenFalse: Expression; - } - interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { - name?: Identifier; - body: Block | Expression; - } - interface LiteralExpression extends PrimaryExpression { - text: string; - isUnterminated?: boolean; - } - interface StringLiteralExpression extends LiteralExpression { - _stringLiteralExpressionBrand: any; - } - interface TemplateExpression extends PrimaryExpression { - head: LiteralExpression; - templateSpans: NodeArray; - } - interface TemplateSpan extends Node { - expression: Expression; - literal: LiteralExpression; - } - interface ParenthesizedExpression extends PrimaryExpression { - expression: Expression; - } - interface ArrayLiteralExpression extends PrimaryExpression { - elements: NodeArray; - } - interface ObjectLiteralExpression extends PrimaryExpression, Declaration { - properties: NodeArray; - } - interface PropertyAccessExpression extends MemberExpression { - expression: LeftHandSideExpression; - name: Identifier; - } - interface ElementAccessExpression extends MemberExpression { - expression: LeftHandSideExpression; - argumentExpression?: Expression; - } - interface CallExpression extends LeftHandSideExpression { - expression: LeftHandSideExpression; - typeArguments?: NodeArray; - arguments: NodeArray; - } - interface NewExpression extends CallExpression, PrimaryExpression { - } - interface TaggedTemplateExpression extends MemberExpression { - tag: LeftHandSideExpression; - template: LiteralExpression | TemplateExpression; - } - type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression; - interface TypeAssertion extends UnaryExpression { - type: TypeNode; - expression: UnaryExpression; - } - interface Statement extends Node, ModuleElement { - _statementBrand: any; - } - interface Block extends Statement { - statements: NodeArray; - } - interface VariableStatement extends Statement { - declarations: NodeArray; - } - interface ExpressionStatement extends Statement { - expression: Expression; - } - interface IfStatement extends Statement { - expression: Expression; - thenStatement: Statement; - elseStatement?: Statement; - } - interface IterationStatement extends Statement { - statement: Statement; - } - interface DoStatement extends IterationStatement { - expression: Expression; - } - interface WhileStatement extends IterationStatement { - expression: Expression; - } - interface ForStatement extends IterationStatement { - declarations?: NodeArray; - initializer?: Expression; - condition?: Expression; - iterator?: Expression; - } - interface ForInStatement extends IterationStatement { - declarations?: NodeArray; - variable?: Expression; - expression: Expression; - } - interface BreakOrContinueStatement extends Statement { - label?: Identifier; - } - interface ReturnStatement extends Statement { - expression?: Expression; - } - interface WithStatement extends Statement { - expression: Expression; - statement: Statement; - } - interface SwitchStatement extends Statement { - expression: Expression; - clauses: NodeArray; - } - interface CaseClause extends Node { - expression?: Expression; - statements: NodeArray; - } - interface DefaultClause extends Node { - statements: NodeArray; - } - type CaseOrDefaultClause = CaseClause | DefaultClause; - interface LabeledStatement extends Statement { - label: Identifier; - statement: Statement; - } - interface ThrowStatement extends Statement { - expression: Expression; - } - interface TryStatement extends Statement { - tryBlock: Block; - catchClause?: CatchClause; - finallyBlock?: Block; - } - interface CatchClause extends Declaration { - name: Identifier; - type?: TypeNode; - block: Block; - } - interface ModuleElement extends Node { - _moduleElementBrand: any; - } - interface ClassDeclaration extends Declaration, ModuleElement { - name: Identifier; - typeParameters?: NodeArray; - heritageClauses?: NodeArray; - members: NodeArray; - } - interface ClassElement extends Declaration { - _classElementBrand: any; - } - interface InterfaceDeclaration extends Declaration, ModuleElement { - name: Identifier; - typeParameters?: NodeArray; - heritageClauses?: NodeArray; - members: NodeArray; - } - interface HeritageClause extends Node { - token: SyntaxKind; - types?: NodeArray; - } - interface TypeAliasDeclaration extends Declaration, ModuleElement { - name: Identifier; - type: TypeNode; - } - interface EnumMember extends Declaration { - name: DeclarationName; - initializer?: Expression; - } - interface EnumDeclaration extends Declaration, ModuleElement { - name: Identifier; - members: NodeArray; - } - interface ModuleDeclaration extends Declaration, ModuleElement { - name: Identifier | LiteralExpression; - body: ModuleBlock | ModuleDeclaration; - } - interface ModuleBlock extends Node, ModuleElement { - statements: NodeArray; - } - interface ImportDeclaration extends Declaration, ModuleElement { - name: Identifier; - moduleReference: EntityName | ExternalModuleReference; - } - interface ExternalModuleReference extends Node { - expression?: Expression; - } - interface ExportAssignment extends Statement, ModuleElement { - exportName: Identifier; - } - interface FileReference extends TextRange { - filename: string; - } - interface CommentRange extends TextRange { - hasTrailingNewLine?: boolean; - } - interface SourceFile extends Declaration { - statements: NodeArray; - endOfFileToken: Node; - filename: string; - text: string; - getLineAndCharacterFromPosition(position: number): LineAndCharacter; - getPositionFromLineAndCharacter(line: number, character: number): number; - getLineStarts(): number[]; - amdDependencies: string[]; - amdModuleName: string; - referencedFiles: FileReference[]; - referenceDiagnostics: Diagnostic[]; - parseDiagnostics: Diagnostic[]; - grammarDiagnostics: Diagnostic[]; - getSyntacticDiagnostics(): Diagnostic[]; - semanticDiagnostics: Diagnostic[]; - hasNoDefaultLib: boolean; - externalModuleIndicator: Node; - nodeCount: number; - identifierCount: number; - symbolCount: number; - isOpen: boolean; - version: string; - languageVersion: ScriptTarget; - identifiers: Map; - } - interface Program { - getSourceFile(filename: string): SourceFile; - getSourceFiles(): SourceFile[]; - getCompilerOptions(): CompilerOptions; - getCompilerHost(): CompilerHost; - getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; - getGlobalDiagnostics(): Diagnostic[]; - getTypeChecker(fullTypeCheckMode: boolean): TypeChecker; - getCommonSourceDirectory(): string; - } - interface SourceMapSpan { - emittedLine: number; - emittedColumn: number; - sourceLine: number; - sourceColumn: number; - nameIndex?: number; - sourceIndex: number; - } - interface SourceMapData { - sourceMapFilePath: string; - jsSourceMappingURL: string; - sourceMapFile: string; - sourceMapSourceRoot: string; - sourceMapSources: string[]; - inputSourceFileNames: string[]; - sourceMapNames?: string[]; - sourceMapMappings: string; - sourceMapDecodedMappings: SourceMapSpan[]; - } - enum EmitReturnStatus { - Succeeded = 0, - AllOutputGenerationSkipped = 1, - JSGeneratedWithSemanticErrors = 2, - DeclarationGenerationSkipped = 3, - EmitErrorsEncountered = 4, - CompilerOptionsErrors = 5, - } - interface EmitResult { - emitResultStatus: EmitReturnStatus; - diagnostics: Diagnostic[]; - sourceMaps: SourceMapData[]; - } - interface TypeChecker { - getProgram(): Program; - getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; - getDeclarationDiagnostics(sourceFile: SourceFile): Diagnostic[]; - getGlobalDiagnostics(): Diagnostic[]; - getNodeCount(): number; - getIdentifierCount(): number; - getSymbolCount(): number; - getTypeCount(): number; - emitFiles(targetSourceFile?: SourceFile): EmitResult; - getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; - getDeclaredTypeOfSymbol(symbol: Symbol): Type; - getPropertiesOfType(type: Type): Symbol[]; - getPropertyOfType(type: Type, propertyName: string): Symbol; - getSignaturesOfType(type: Type, kind: SignatureKind): Signature[]; - getIndexTypeOfType(type: Type, kind: IndexKind): Type; - getReturnTypeOfSignature(signature: Signature): Type; - getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; - getSymbolAtLocation(node: Node): Symbol; - getShorthandAssignmentValueSymbol(location: Node): Symbol; - getTypeAtLocation(node: Node): Type; - typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; - symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; - getSymbolDisplayBuilder(): SymbolDisplayBuilder; - getFullyQualifiedName(symbol: Symbol): string; - getAugmentedPropertiesOfType(type: Type): Symbol[]; - getRootSymbols(symbol: Symbol): Symbol[]; - getContextualType(node: Expression): Type; - getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; - getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; - isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; - isUndefinedSymbol(symbol: Symbol): boolean; - isArgumentsSymbol(symbol: Symbol): boolean; - isEmitBlocked(sourceFile?: SourceFile): boolean; - getEnumMemberValue(node: EnumMember): number; - isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; - getAliasedSymbol(symbol: Symbol): Symbol; - } - interface SymbolDisplayBuilder { - buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void; - buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void; - buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - } - interface SymbolWriter { - writeKeyword(text: string): void; - writeOperator(text: string): void; - writePunctuation(text: string): void; - writeSpace(text: string): void; - writeStringLiteral(text: string): void; - writeParameter(text: string): void; - writeSymbol(text: string, symbol: Symbol): void; - writeLine(): void; - increaseIndent(): void; - decreaseIndent(): void; - clear(): void; - trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void; - } - const enum TypeFormatFlags { - None = 0, - WriteArrayAsGenericType = 1, - UseTypeOfFunction = 2, - NoTruncation = 4, - WriteArrowStyleSignature = 8, - WriteOwnNameForAnyLike = 16, - WriteTypeArgumentsOfSignature = 32, - InElementType = 64, - } - const enum SymbolFormatFlags { - None = 0, - WriteTypeParametersOrArguments = 1, - UseOnlyExternalAliasing = 2, - } - const enum SymbolAccessibility { - Accessible = 0, - NotAccessible = 1, - CannotBeNamed = 2, - } - interface SymbolVisibilityResult { - accessibility: SymbolAccessibility; - aliasesToMakeVisible?: ImportDeclaration[]; - errorSymbolName?: string; - errorNode?: Node; - } - interface SymbolAccessiblityResult extends SymbolVisibilityResult { - errorModuleName?: string; - } - interface EmitResolver { - getProgram(): Program; - getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; - getExpressionNamePrefix(node: Identifier): string; - getExportAssignmentName(node: SourceFile): string; - isReferencedImportDeclaration(node: ImportDeclaration): boolean; - isTopLevelValueImportWithEntityName(node: ImportDeclaration): boolean; - getNodeCheckFlags(node: Node): NodeCheckFlags; - getEnumMemberValue(node: EnumMember): number; - hasSemanticErrors(sourceFile?: SourceFile): boolean; - isDeclarationVisible(node: Declaration): boolean; - isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; - writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; - writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; - isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; - isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; - getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number; - isEmitBlocked(sourceFile?: SourceFile): boolean; - } - const enum SymbolFlags { - FunctionScopedVariable = 1, - BlockScopedVariable = 2, - Property = 4, - EnumMember = 8, - Function = 16, - Class = 32, - Interface = 64, - ConstEnum = 128, - RegularEnum = 256, - ValueModule = 512, - NamespaceModule = 1024, - TypeLiteral = 2048, - ObjectLiteral = 4096, - Method = 8192, - Constructor = 16384, - GetAccessor = 32768, - SetAccessor = 65536, - CallSignature = 131072, - ConstructSignature = 262144, - IndexSignature = 524288, - TypeParameter = 1048576, - TypeAlias = 2097152, - ExportValue = 4194304, - ExportType = 8388608, - ExportNamespace = 16777216, - Import = 33554432, - Instantiated = 67108864, - Merged = 134217728, - Transient = 268435456, - Prototype = 536870912, - UnionProperty = 1073741824, - Enum = 384, - Variable = 3, - Value = 107455, - Type = 3152352, - Namespace = 1536, - Module = 1536, - Accessor = 98304, - Signature = 917504, - FunctionScopedVariableExcludes = 107454, - BlockScopedVariableExcludes = 107455, - ParameterExcludes = 107455, - PropertyExcludes = 107455, - EnumMemberExcludes = 107455, - FunctionExcludes = 106927, - ClassExcludes = 3258879, - InterfaceExcludes = 3152288, - RegularEnumExcludes = 3258623, - ConstEnumExcludes = 3259263, - ValueModuleExcludes = 106639, - NamespaceModuleExcludes = 0, - MethodExcludes = 99263, - GetAccessorExcludes = 41919, - SetAccessorExcludes = 74687, - TypeParameterExcludes = 2103776, - TypeAliasExcludes = 3152352, - ImportExcludes = 33554432, - ModuleMember = 35653619, - ExportHasLocal = 944, - HasLocals = 1041936, - HasExports = 1952, - HasMembers = 6240, - IsContainer = 1048560, - PropertyOrAccessor = 98308, - Export = 29360128, - } - interface Symbol { - flags: SymbolFlags; - name: string; - id?: number; - mergeId?: number; - declarations?: Declaration[]; - parent?: Symbol; - members?: SymbolTable; - exports?: SymbolTable; - exportSymbol?: Symbol; - valueDeclaration?: Declaration; - constEnumOnlyModule?: boolean; - } - interface SymbolLinks { - target?: Symbol; - type?: Type; - declaredType?: Type; - mapper?: TypeMapper; - referenced?: boolean; - exportAssignSymbol?: Symbol; - unionType?: UnionType; - } - interface TransientSymbol extends Symbol, SymbolLinks { - } - interface SymbolTable { - [index: string]: Symbol; - } - const enum NodeCheckFlags { - TypeChecked = 1, - LexicalThis = 2, - CaptureThis = 4, - EmitExtends = 8, - SuperInstance = 16, - SuperStatic = 32, - ContextChecked = 64, - EnumValuesComputed = 128, - } - interface NodeLinks { - resolvedType?: Type; - resolvedSignature?: Signature; - resolvedSymbol?: Symbol; - flags?: NodeCheckFlags; - enumMemberValue?: number; - isIllegalTypeReferenceInConstraint?: boolean; - isVisible?: boolean; - localModuleName?: string; - assignmentChecks?: Map; - } - const enum TypeFlags { - Any = 1, - String = 2, - Number = 4, - Boolean = 8, - Void = 16, - Undefined = 32, - Null = 64, - Enum = 128, - StringLiteral = 256, - TypeParameter = 512, - Class = 1024, - Interface = 2048, - Reference = 4096, - Tuple = 8192, - Union = 16384, - Anonymous = 32768, - FromSignature = 65536, - Intrinsic = 127, - StringLike = 258, - NumberLike = 132, - ObjectType = 48128, - } - interface Type { - flags: TypeFlags; - id: number; - symbol?: Symbol; - } - interface IntrinsicType extends Type { - intrinsicName: string; - } - interface StringLiteralType extends Type { - text: string; - } - interface ObjectType extends Type { - } - interface InterfaceType extends ObjectType { - typeParameters: TypeParameter[]; - baseTypes: ObjectType[]; - declaredProperties: Symbol[]; - declaredCallSignatures: Signature[]; - declaredConstructSignatures: Signature[]; - declaredStringIndexType: Type; - declaredNumberIndexType: Type; - } - interface TypeReference extends ObjectType { - target: GenericType; - typeArguments: Type[]; - } - interface GenericType extends InterfaceType, TypeReference { - instantiations: Map; - openReferenceTargets: GenericType[]; - openReferenceChecks: Map; - } - interface TupleType extends ObjectType { - elementTypes: Type[]; - baseArrayType: TypeReference; - } - interface UnionType extends Type { - types: Type[]; - resolvedProperties: SymbolTable; - } - interface ResolvedType extends ObjectType, UnionType { - members: SymbolTable; - properties: Symbol[]; - callSignatures: Signature[]; - constructSignatures: Signature[]; - stringIndexType: Type; - numberIndexType: Type; - } - interface TypeParameter extends Type { - constraint: Type; - target?: TypeParameter; - mapper?: TypeMapper; - } - const enum SignatureKind { - Call = 0, - Construct = 1, - } - interface Signature { - declaration: SignatureDeclaration; - typeParameters: TypeParameter[]; - parameters: Symbol[]; - resolvedReturnType: Type; - minArgumentCount: number; - hasRestParameter: boolean; - hasStringLiterals: boolean; - target?: Signature; - mapper?: TypeMapper; - unionSignatures?: Signature[]; - erasedSignatureCache?: Signature; - isolatedSignatureType?: ObjectType; - } - const enum IndexKind { - String = 0, - Number = 1, - } - interface TypeMapper { - (t: Type): Type; - } - interface TypeInferences { - primary: Type[]; - secondary: Type[]; - } - interface InferenceContext { - typeParameters: TypeParameter[]; - inferUnionTypes: boolean; - inferences: TypeInferences[]; - inferredTypes: Type[]; - failedTypeParameterIndex?: number; - } - interface DiagnosticMessage { - key: string; - category: DiagnosticCategory; - code: number; - isEarly?: boolean; - } - interface DiagnosticMessageChain { - messageText: string; - category: DiagnosticCategory; - code: number; - next?: DiagnosticMessageChain; - } - interface Diagnostic { - file: SourceFile; - start: number; - length: number; - messageText: string; - category: DiagnosticCategory; - code: number; - /** - * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit - */ - isEarly?: boolean; - } - enum DiagnosticCategory { - Warning = 0, - Error = 1, - Message = 2, - } - interface CompilerOptions { - allowNonTsExtensions?: boolean; - charset?: string; - codepage?: number; - declaration?: boolean; - diagnostics?: boolean; - emitBOM?: boolean; - help?: boolean; - locale?: string; - mapRoot?: string; - module?: ModuleKind; - noEmitOnError?: boolean; - noErrorTruncation?: boolean; - noImplicitAny?: boolean; - noLib?: boolean; - noLibCheck?: boolean; - noResolve?: boolean; - out?: string; - outDir?: string; - preserveConstEnums?: boolean; - removeComments?: boolean; - sourceMap?: boolean; - sourceRoot?: string; - suppressImplicitAnyIndexErrors?: boolean; - target?: ScriptTarget; - version?: boolean; - watch?: boolean; - [option: string]: string | number | boolean; - } - const enum ModuleKind { - None = 0, - CommonJS = 1, - AMD = 2, - } - interface LineAndCharacter { - line: number; - character: number; - } - const enum ScriptTarget { - ES3 = 0, - ES5 = 1, - ES6 = 2, - Latest = 2, - } - interface ParsedCommandLine { - options: CompilerOptions; - filenames: string[]; - errors: Diagnostic[]; - } - interface CommandLineOption { - name: string; - type: string | Map; - shortName?: string; - description?: DiagnosticMessage; - paramType?: DiagnosticMessage; - error?: DiagnosticMessage; - } - const enum CharacterCodes { - nullCharacter = 0, - maxAsciiCharacter = 127, - lineFeed = 10, - carriageReturn = 13, - lineSeparator = 8232, - paragraphSeparator = 8233, - nextLine = 133, - space = 32, - nonBreakingSpace = 160, - enQuad = 8192, - emQuad = 8193, - enSpace = 8194, - emSpace = 8195, - threePerEmSpace = 8196, - fourPerEmSpace = 8197, - sixPerEmSpace = 8198, - figureSpace = 8199, - punctuationSpace = 8200, - thinSpace = 8201, - hairSpace = 8202, - zeroWidthSpace = 8203, - narrowNoBreakSpace = 8239, - ideographicSpace = 12288, - mathematicalSpace = 8287, - ogham = 5760, - _ = 95, - $ = 36, - _0 = 48, - _1 = 49, - _2 = 50, - _3 = 51, - _4 = 52, - _5 = 53, - _6 = 54, - _7 = 55, - _8 = 56, - _9 = 57, - a = 97, - b = 98, - c = 99, - d = 100, - e = 101, - f = 102, - g = 103, - h = 104, - i = 105, - j = 106, - k = 107, - l = 108, - m = 109, - n = 110, - o = 111, - p = 112, - q = 113, - r = 114, - s = 115, - t = 116, - u = 117, - v = 118, - w = 119, - x = 120, - y = 121, - z = 122, - A = 65, - B = 66, - C = 67, - D = 68, - E = 69, - F = 70, - G = 71, - H = 72, - I = 73, - J = 74, - K = 75, - L = 76, - M = 77, - N = 78, - O = 79, - P = 80, - Q = 81, - R = 82, - S = 83, - T = 84, - U = 85, - V = 86, - W = 87, - X = 88, - Y = 89, - Z = 90, - ampersand = 38, - asterisk = 42, - at = 64, - backslash = 92, - backtick = 96, - bar = 124, - caret = 94, - closeBrace = 125, - closeBracket = 93, - closeParen = 41, - colon = 58, - comma = 44, - dot = 46, - doubleQuote = 34, - equals = 61, - exclamation = 33, - greaterThan = 62, - lessThan = 60, - minus = 45, - openBrace = 123, - openBracket = 91, - openParen = 40, - percent = 37, - plus = 43, - question = 63, - semicolon = 59, - singleQuote = 39, - slash = 47, - tilde = 126, - backspace = 8, - formFeed = 12, - byteOrderMark = 65279, - tab = 9, - verticalTab = 11, - } - interface CancellationToken { - isCancellationRequested(): boolean; - } - interface CompilerHost { - getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; - getDefaultLibFilename(options: CompilerOptions): string; - getCancellationToken?(): CancellationToken; - writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; - getCurrentDirectory(): string; - getCanonicalFileName(fileName: string): string; - useCaseSensitiveFileNames(): boolean; - getNewLine(): string; - } -} -declare module "typescript" { - interface ErrorCallback { - (message: DiagnosticMessage): void; - } - interface CommentCallback { - (pos: number, end: number): void; - } - interface Scanner { - getStartPos(): number; - getToken(): SyntaxKind; - getTextPos(): number; - getTokenPos(): number; - getTokenText(): string; - getTokenValue(): string; - hasPrecedingLineBreak(): boolean; - isIdentifier(): boolean; - isReservedWord(): boolean; - isUnterminated(): boolean; - reScanGreaterToken(): SyntaxKind; - reScanSlashToken(): SyntaxKind; - reScanTemplateToken(): SyntaxKind; - scan(): SyntaxKind; - setText(text: string): void; - setTextPos(textPos: number): void; - lookAhead(callback: () => T): T; - tryScan(callback: () => T): T; - } - function tokenToString(t: SyntaxKind): string; - function computeLineStarts(text: string): number[]; - function getPositionFromLineAndCharacter(lineStarts: number[], line: number, character: number): number; - function getLineAndCharacterOfPosition(lineStarts: number[], position: number): { - line: number; - character: number; - }; - function positionToLineAndCharacter(text: string, pos: number): { - line: number; - character: number; - }; - function isWhiteSpace(ch: number): boolean; - function isLineBreak(ch: number): boolean; - function isOctalDigit(ch: number): boolean; - function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean): number; - function getLeadingCommentRanges(text: string, pos: number): CommentRange[]; - function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; - function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; - function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; - function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner; -} -declare module "typescript" { - function getNodeConstructor(kind: SyntaxKind): new () => Node; - function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; - function createCompilerHost(options: CompilerOptions): CompilerHost; - function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; - function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; -} -declare module "typescript" { - function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; -} -declare module "typescript" { - var servicesVersion: string; - interface Node { - getSourceFile(): SourceFile; - getChildCount(sourceFile?: SourceFile): number; - getChildAt(index: number, sourceFile?: SourceFile): Node; - getChildren(sourceFile?: SourceFile): Node[]; - getStart(sourceFile?: SourceFile): number; - getFullStart(): number; - getEnd(): number; - getWidth(sourceFile?: SourceFile): number; - getFullWidth(): number; - getLeadingTriviaWidth(sourceFile?: SourceFile): number; - getFullText(sourceFile?: SourceFile): string; - getText(sourceFile?: SourceFile): string; - getFirstToken(sourceFile?: SourceFile): Node; - getLastToken(sourceFile?: SourceFile): Node; - } - interface Symbol { - getFlags(): SymbolFlags; - getName(): string; - getDeclarations(): Declaration[]; - getDocumentationComment(): SymbolDisplayPart[]; - } - interface Type { - getFlags(): TypeFlags; - getSymbol(): Symbol; - getProperties(): Symbol[]; - getProperty(propertyName: string): Symbol; - getApparentProperties(): Symbol[]; - getCallSignatures(): Signature[]; - getConstructSignatures(): Signature[]; - getStringIndexType(): Type; - getNumberIndexType(): Type; - } - interface Signature { - getDeclaration(): SignatureDeclaration; - getTypeParameters(): Type[]; - getParameters(): Symbol[]; - getReturnType(): Type; - getDocumentationComment(): SymbolDisplayPart[]; - } - interface SourceFile { - getScriptSnapshot(): IScriptSnapshot; - getNamedDeclarations(): Declaration[]; - update(scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; - } - /** - * Represents an immutable snapshot of a script at a specified time.Once acquired, the - * snapshot is observably immutable. i.e. the same calls with the same parameters will return - * the same values. - */ - interface IScriptSnapshot { - /** Gets a portion of the script snapshot specified by [start, end). */ - getText(start: number, end: number): string; - /** Gets the length of this script snapshot. */ - getLength(): number; - /** - * This call returns the array containing the start position of every line. - * i.e."[0, 10, 55]". TODO: consider making this optional. The language service could - * always determine this (albeit in a more expensive manner). - */ - getLineStartPositions(): number[]; - /** - * Gets the TextChangeRange that describe how the text changed between this text and - * an older version. This information is used by the incremental parser to determine - * what sections of the script need to be re-parsed. 'undefined' can be returned if the - * change range cannot be determined. However, in that case, incremental parsing will - * not happen and the entire document will be re - parsed. - */ - getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; - } - module ScriptSnapshot { - function fromString(text: string): IScriptSnapshot; - } - interface PreProcessedFileInfo { - referencedFiles: FileReference[]; - importedFiles: FileReference[]; - isLibFile: boolean; - } - interface Logger { - log(s: string): void; - } - interface LanguageServiceHost extends Logger { - getCompilationSettings(): CompilerOptions; - getScriptFileNames(): string[]; - getScriptVersion(fileName: string): string; - getScriptIsOpen(fileName: string): boolean; - getScriptSnapshot(fileName: string): IScriptSnapshot; - getLocalizedDiagnosticMessages?(): any; - getCancellationToken?(): CancellationToken; - getCurrentDirectory(): string; - getDefaultLibFilename(options: CompilerOptions): string; - } - interface LanguageService { - cleanupSemanticCache(): void; - getSyntacticDiagnostics(fileName: string): Diagnostic[]; - getSemanticDiagnostics(fileName: string): Diagnostic[]; - getCompilerOptionsDiagnostics(): Diagnostic[]; - getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; - getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; - getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; - getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; - getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; - getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; - getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan; - getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems; - getRenameInfo(fileName: string, position: number): RenameInfo; - findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[]; - getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; - getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; - getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; - getNavigateToItems(searchValue: string): NavigateToItem[]; - getNavigationBarItems(fileName: string): NavigationBarItem[]; - getOutliningSpans(fileName: string): OutliningSpan[]; - getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; - getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; - getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number; - getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[]; - getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; - getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[]; - getEmitOutput(fileName: string): EmitOutput; - getSourceFile(filename: string): SourceFile; - dispose(): void; - } - class TextSpan { - private _start; - private _length; - /** - * Creates a TextSpan instance beginning with the position Start and having the Length - * specified with length. - */ - constructor(start: number, length: number); - toJSON(key: any): any; - start(): number; - length(): number; - end(): number; - isEmpty(): boolean; - /** - * Determines whether the position lies within the span. Returns true if the position is greater than or equal to Start and strictly less - * than End, otherwise false. - * @param position The position to check. - */ - containsPosition(position: number): boolean; - /** - * Determines whether span falls completely within this span. Returns true if the specified span falls completely within this span, otherwise false. - * @param span The span to check. - */ - containsTextSpan(span: TextSpan): boolean; - /** - * Determines whether the given span overlaps this span. Two spans are considered to overlap - * if they have positions in common and neither is empty. Empty spans do not overlap with any - * other span. Returns true if the spans overlap, false otherwise. - * @param span The span to check. - */ - overlapsWith(span: TextSpan): boolean; - /** - * Returns the overlap with the given span, or undefined if there is no overlap. - * @param span The span to check. - */ - overlap(span: TextSpan): TextSpan; - /** - * Determines whether span intersects this span. Two spans are considered to - * intersect if they have positions in common or the end of one span - * coincides with the start of the other span. Returns true if the spans intersect, false otherwise. - * @param The span to check. - */ - intersectsWithTextSpan(span: TextSpan): boolean; - intersectsWith(start: number, length: number): boolean; - /** - * Determines whether the given position intersects this span. - * A position is considered to intersect if it is between the start and - * end positions (inclusive) of this span. Returns true if the position intersects, false otherwise. - * @param position The position to check. - */ - intersectsWithPosition(position: number): boolean; - /** - * Returns the intersection with the given span, or undefined if there is no intersection. - * @param span The span to check. - */ - intersection(span: TextSpan): TextSpan; - /** - * Creates a new TextSpan from the given start and end positions - * as opposed to a position and length. - */ - static fromBounds(start: number, end: number): TextSpan; - } - class TextChangeRange { - static unchanged: TextChangeRange; - private _span; - private _newLength; - /** - * Initializes a new instance of TextChangeRange. - */ - constructor(span: TextSpan, newLength: number); - /** - * The span of text before the edit which is being changed - */ - span(): TextSpan; - /** - * Width of the span after the edit. A 0 here would represent a delete - */ - newLength(): number; - newSpan(): TextSpan; - isUnchanged(): boolean; - /** - * Called to merge all the changes that occurred across several versions of a script snapshot - * into a single change. i.e. if a user keeps making successive edits to a script we will - * have a text change from V1 to V2, V2 to V3, ..., Vn. - * - * This function will then merge those changes into a single change range valid between V1 and - * Vn. - */ - static collapseChangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; - } - interface ClassifiedSpan { - textSpan: TextSpan; - classificationType: string; - } - interface NavigationBarItem { - text: string; - kind: string; - kindModifiers: string; - spans: TextSpan[]; - childItems: NavigationBarItem[]; - indent: number; - bolded: boolean; - grayed: boolean; - } - interface TodoCommentDescriptor { - text: string; - priority: number; - } - interface TodoComment { - descriptor: TodoCommentDescriptor; - message: string; - position: number; - } - class TextChange { - span: TextSpan; - newText: string; - } - interface RenameLocation { - textSpan: TextSpan; - fileName: string; - } - interface ReferenceEntry { - textSpan: TextSpan; - fileName: string; - isWriteAccess: boolean; - } - interface NavigateToItem { - name: string; - kind: string; - kindModifiers: string; - matchKind: string; - fileName: string; - textSpan: TextSpan; - containerName: string; - containerKind: string; - } - interface EditorOptions { - IndentSize: number; - TabSize: number; - NewLineCharacter: string; - ConvertTabsToSpaces: boolean; - } - interface FormatCodeOptions extends EditorOptions { - InsertSpaceAfterCommaDelimiter: boolean; - InsertSpaceAfterSemicolonInForStatements: boolean; - InsertSpaceBeforeAndAfterBinaryOperators: boolean; - InsertSpaceAfterKeywordsInControlFlowStatements: boolean; - InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; - InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; - PlaceOpenBraceOnNewLineForFunctions: boolean; - PlaceOpenBraceOnNewLineForControlBlocks: boolean; - } - interface DefinitionInfo { - fileName: string; - textSpan: TextSpan; - kind: string; - name: string; - containerKind: string; - containerName: string; - } - enum SymbolDisplayPartKind { - aliasName = 0, - className = 1, - enumName = 2, - fieldName = 3, - interfaceName = 4, - keyword = 5, - lineBreak = 6, - numericLiteral = 7, - stringLiteral = 8, - localName = 9, - methodName = 10, - moduleName = 11, - operator = 12, - parameterName = 13, - propertyName = 14, - punctuation = 15, - space = 16, - text = 17, - typeParameterName = 18, - enumMemberName = 19, - functionName = 20, - regularExpressionLiteral = 21, - } - interface SymbolDisplayPart { - text: string; - kind: string; - } - interface QuickInfo { - kind: string; - kindModifiers: string; - textSpan: TextSpan; - displayParts: SymbolDisplayPart[]; - documentation: SymbolDisplayPart[]; - } - interface RenameInfo { - canRename: boolean; - localizedErrorMessage: string; - displayName: string; - fullDisplayName: string; - kind: string; - kindModifiers: string; - triggerSpan: TextSpan; - } - interface SignatureHelpParameter { - name: string; - documentation: SymbolDisplayPart[]; - displayParts: SymbolDisplayPart[]; - isOptional: boolean; - } - /** - * Represents a single signature to show in signature help. - * The id is used for subsequent calls into the language service to ask questions about the - * signature help item in the context of any documents that have been updated. i.e. after - * an edit has happened, while signature help is still active, the host can ask important - * questions like 'what parameter is the user currently contained within?'. - */ - interface SignatureHelpItem { - isVariadic: boolean; - prefixDisplayParts: SymbolDisplayPart[]; - suffixDisplayParts: SymbolDisplayPart[]; - separatorDisplayParts: SymbolDisplayPart[]; - parameters: SignatureHelpParameter[]; - documentation: SymbolDisplayPart[]; - } - /** - * Represents a set of signature help items, and the preferred item that should be selected. - */ - interface SignatureHelpItems { - items: SignatureHelpItem[]; - applicableSpan: TextSpan; - selectedItemIndex: number; - argumentIndex: number; - argumentCount: number; - } - interface CompletionInfo { - isMemberCompletion: boolean; - entries: CompletionEntry[]; - } - interface CompletionEntry { - name: string; - kind: string; - kindModifiers: string; - } - interface CompletionEntryDetails { - name: string; - kind: string; - kindModifiers: string; - displayParts: SymbolDisplayPart[]; - documentation: SymbolDisplayPart[]; - } - interface OutliningSpan { - /** The span of the document to actually collapse. */ - textSpan: TextSpan; - /** The span of the document to display when the user hovers over the collapsed span. */ - hintSpan: TextSpan; - /** The text to display in the editor for the collapsed region. */ - bannerText: string; - /** - * Whether or not this region should be automatically collapsed when - * the 'Collapse to Definitions' command is invoked. - */ - autoCollapse: boolean; - } - interface EmitOutput { - outputFiles: OutputFile[]; - emitOutputStatus: EmitReturnStatus; - } - const enum OutputFileType { - JavaScript = 0, - SourceMap = 1, - Declaration = 2, - } - interface OutputFile { - name: string; - writeByteOrderMark: boolean; - text: string; - } - const enum EndOfLineState { - Start = 0, - InMultiLineCommentTrivia = 1, - InSingleQuoteStringLiteral = 2, - InDoubleQuoteStringLiteral = 3, - } - enum TokenClass { - Punctuation = 0, - Keyword = 1, - Operator = 2, - Comment = 3, - Whitespace = 4, - Identifier = 5, - NumberLiteral = 6, - StringLiteral = 7, - RegExpLiteral = 8, - } - interface ClassificationResult { - finalLexState: EndOfLineState; - entries: ClassificationInfo[]; - } - interface ClassificationInfo { - length: number; - classification: TokenClass; - } - interface Classifier { - getClassificationsForLine(text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean): ClassificationResult; - } - interface DocumentRegistry { - acquireDocument(filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean): SourceFile; - updateDocument(sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; - releaseDocument(filename: string, compilationSettings: CompilerOptions): void; - } - class ScriptElementKind { - static unknown: string; - static keyword: string; - static scriptElement: string; - static moduleElement: string; - static classElement: string; - static interfaceElement: string; - static typeElement: string; - static enumElement: string; - static variableElement: string; - static localVariableElement: string; - static functionElement: string; - static localFunctionElement: string; - static memberFunctionElement: string; - static memberGetAccessorElement: string; - static memberSetAccessorElement: string; - static memberVariableElement: string; - static constructorImplementationElement: string; - static callSignatureElement: string; - static indexSignatureElement: string; - static constructSignatureElement: string; - static parameterElement: string; - static typeParameterElement: string; - static primitiveType: string; - static label: string; - static alias: string; - static constElement: string; - static letElement: string; - } - class ScriptElementKindModifier { - static none: string; - static publicMemberModifier: string; - static privateMemberModifier: string; - static protectedMemberModifier: string; - static exportedModifier: string; - static ambientModifier: string; - static staticModifier: string; - } - class ClassificationTypeNames { - static comment: string; - static identifier: string; - static keyword: string; - static numericLiteral: string; - static operator: string; - static stringLiteral: string; - static whiteSpace: string; - static text: string; - static punctuation: string; - static className: string; - static enumName: string; - static interfaceName: string; - static moduleName: string; - static typeParameterName: string; - static typeAlias: string; - } - interface DisplayPartsSymbolWriter extends SymbolWriter { - displayParts(): SymbolDisplayPart[]; - } - function displayPartsToString(displayParts: SymbolDisplayPart[]): string; - function getDefaultCompilerOptions(): CompilerOptions; - class OperationCanceledException { - } - class CancellationTokenObject { - private cancellationToken; - static None: CancellationTokenObject; - constructor(cancellationToken: CancellationToken); - isCancellationRequested(): boolean; - throwIfCancellationRequested(): void; - } - function createDocumentRegistry(): DocumentRegistry; - function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; - function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry): LanguageService; - function createClassifier(host: Logger): Classifier; -} - - -//// [APISample_node_compile.js] -var ts = require("typescript"); -var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", 2 /* Latest */, "0.0"); -var program = ts.createProgram(["file1.ts"], {}, undefined); diff --git a/tests/baselines/reference/APISample_node_compile.types b/tests/baselines/reference/APISample_node_compile.types deleted file mode 100644 index 347c5aa358e..00000000000 --- a/tests/baselines/reference/APISample_node_compile.types +++ /dev/null @@ -1,5749 +0,0 @@ -=== tests/cases/compiler/APISample_node_compile.ts === - -import ts = require("typescript"); ->ts : typeof ts - -var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); ->sourceFile : ts.SourceFile ->ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0") : ts.SourceFile ->ts.createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, version: string, isOpen?: boolean) => ts.SourceFile ->ts : typeof ts ->createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, version: string, isOpen?: boolean) => ts.SourceFile ->ts.ScriptTarget.Latest : ts.ScriptTarget ->ts.ScriptTarget : typeof ts.ScriptTarget ->ts : typeof ts ->ScriptTarget : typeof ts.ScriptTarget ->Latest : ts.ScriptTarget - -var program = ts.createProgram(["file1.ts"], {}, undefined); ->program : ts.Program ->ts.createProgram(["file1.ts"], {}, undefined) : ts.Program ->ts.createProgram : (rootNames: string[], options: ts.CompilerOptions, host: ts.CompilerHost) => ts.Program ->ts : typeof ts ->createProgram : (rootNames: string[], options: ts.CompilerOptions, host: ts.CompilerHost) => ts.Program ->["file1.ts"] : string[] ->{} : { [x: string]: undefined; } ->undefined : undefined - -=== typescript.d.ts === -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ - -declare module "typescript" { - interface Map { ->Map : Map ->T : T - - [index: string]: T; ->index : string ->T : T - } - interface TextRange { ->TextRange : TextRange - - pos: number; ->pos : number - - end: number; ->end : number - } - const enum SyntaxKind { ->SyntaxKind : SyntaxKind - - Unknown = 0, ->Unknown : SyntaxKind - - EndOfFileToken = 1, ->EndOfFileToken : SyntaxKind - - SingleLineCommentTrivia = 2, ->SingleLineCommentTrivia : SyntaxKind - - MultiLineCommentTrivia = 3, ->MultiLineCommentTrivia : SyntaxKind - - NewLineTrivia = 4, ->NewLineTrivia : SyntaxKind - - WhitespaceTrivia = 5, ->WhitespaceTrivia : SyntaxKind - - NumericLiteral = 6, ->NumericLiteral : SyntaxKind - - StringLiteral = 7, ->StringLiteral : SyntaxKind - - RegularExpressionLiteral = 8, ->RegularExpressionLiteral : SyntaxKind - - NoSubstitutionTemplateLiteral = 9, ->NoSubstitutionTemplateLiteral : SyntaxKind - - TemplateHead = 10, ->TemplateHead : SyntaxKind - - TemplateMiddle = 11, ->TemplateMiddle : SyntaxKind - - TemplateTail = 12, ->TemplateTail : SyntaxKind - - OpenBraceToken = 13, ->OpenBraceToken : SyntaxKind - - CloseBraceToken = 14, ->CloseBraceToken : SyntaxKind - - OpenParenToken = 15, ->OpenParenToken : SyntaxKind - - CloseParenToken = 16, ->CloseParenToken : SyntaxKind - - OpenBracketToken = 17, ->OpenBracketToken : SyntaxKind - - CloseBracketToken = 18, ->CloseBracketToken : SyntaxKind - - DotToken = 19, ->DotToken : SyntaxKind - - DotDotDotToken = 20, ->DotDotDotToken : SyntaxKind - - SemicolonToken = 21, ->SemicolonToken : SyntaxKind - - CommaToken = 22, ->CommaToken : SyntaxKind - - LessThanToken = 23, ->LessThanToken : SyntaxKind - - GreaterThanToken = 24, ->GreaterThanToken : SyntaxKind - - LessThanEqualsToken = 25, ->LessThanEqualsToken : SyntaxKind - - GreaterThanEqualsToken = 26, ->GreaterThanEqualsToken : SyntaxKind - - EqualsEqualsToken = 27, ->EqualsEqualsToken : SyntaxKind - - ExclamationEqualsToken = 28, ->ExclamationEqualsToken : SyntaxKind - - EqualsEqualsEqualsToken = 29, ->EqualsEqualsEqualsToken : SyntaxKind - - ExclamationEqualsEqualsToken = 30, ->ExclamationEqualsEqualsToken : SyntaxKind - - EqualsGreaterThanToken = 31, ->EqualsGreaterThanToken : SyntaxKind - - PlusToken = 32, ->PlusToken : SyntaxKind - - MinusToken = 33, ->MinusToken : SyntaxKind - - AsteriskToken = 34, ->AsteriskToken : SyntaxKind - - SlashToken = 35, ->SlashToken : SyntaxKind - - PercentToken = 36, ->PercentToken : SyntaxKind - - PlusPlusToken = 37, ->PlusPlusToken : SyntaxKind - - MinusMinusToken = 38, ->MinusMinusToken : SyntaxKind - - LessThanLessThanToken = 39, ->LessThanLessThanToken : SyntaxKind - - GreaterThanGreaterThanToken = 40, ->GreaterThanGreaterThanToken : SyntaxKind - - GreaterThanGreaterThanGreaterThanToken = 41, ->GreaterThanGreaterThanGreaterThanToken : SyntaxKind - - AmpersandToken = 42, ->AmpersandToken : SyntaxKind - - BarToken = 43, ->BarToken : SyntaxKind - - CaretToken = 44, ->CaretToken : SyntaxKind - - ExclamationToken = 45, ->ExclamationToken : SyntaxKind - - TildeToken = 46, ->TildeToken : SyntaxKind - - AmpersandAmpersandToken = 47, ->AmpersandAmpersandToken : SyntaxKind - - BarBarToken = 48, ->BarBarToken : SyntaxKind - - QuestionToken = 49, ->QuestionToken : SyntaxKind - - ColonToken = 50, ->ColonToken : SyntaxKind - - EqualsToken = 51, ->EqualsToken : SyntaxKind - - PlusEqualsToken = 52, ->PlusEqualsToken : SyntaxKind - - MinusEqualsToken = 53, ->MinusEqualsToken : SyntaxKind - - AsteriskEqualsToken = 54, ->AsteriskEqualsToken : SyntaxKind - - SlashEqualsToken = 55, ->SlashEqualsToken : SyntaxKind - - PercentEqualsToken = 56, ->PercentEqualsToken : SyntaxKind - - LessThanLessThanEqualsToken = 57, ->LessThanLessThanEqualsToken : SyntaxKind - - GreaterThanGreaterThanEqualsToken = 58, ->GreaterThanGreaterThanEqualsToken : SyntaxKind - - GreaterThanGreaterThanGreaterThanEqualsToken = 59, ->GreaterThanGreaterThanGreaterThanEqualsToken : SyntaxKind - - AmpersandEqualsToken = 60, ->AmpersandEqualsToken : SyntaxKind - - BarEqualsToken = 61, ->BarEqualsToken : SyntaxKind - - CaretEqualsToken = 62, ->CaretEqualsToken : SyntaxKind - - Identifier = 63, ->Identifier : SyntaxKind - - BreakKeyword = 64, ->BreakKeyword : SyntaxKind - - CaseKeyword = 65, ->CaseKeyword : SyntaxKind - - CatchKeyword = 66, ->CatchKeyword : SyntaxKind - - ClassKeyword = 67, ->ClassKeyword : SyntaxKind - - ConstKeyword = 68, ->ConstKeyword : SyntaxKind - - ContinueKeyword = 69, ->ContinueKeyword : SyntaxKind - - DebuggerKeyword = 70, ->DebuggerKeyword : SyntaxKind - - DefaultKeyword = 71, ->DefaultKeyword : SyntaxKind - - DeleteKeyword = 72, ->DeleteKeyword : SyntaxKind - - DoKeyword = 73, ->DoKeyword : SyntaxKind - - ElseKeyword = 74, ->ElseKeyword : SyntaxKind - - EnumKeyword = 75, ->EnumKeyword : SyntaxKind - - ExportKeyword = 76, ->ExportKeyword : SyntaxKind - - ExtendsKeyword = 77, ->ExtendsKeyword : SyntaxKind - - FalseKeyword = 78, ->FalseKeyword : SyntaxKind - - FinallyKeyword = 79, ->FinallyKeyword : SyntaxKind - - ForKeyword = 80, ->ForKeyword : SyntaxKind - - FunctionKeyword = 81, ->FunctionKeyword : SyntaxKind - - IfKeyword = 82, ->IfKeyword : SyntaxKind - - ImportKeyword = 83, ->ImportKeyword : SyntaxKind - - InKeyword = 84, ->InKeyword : SyntaxKind - - InstanceOfKeyword = 85, ->InstanceOfKeyword : SyntaxKind - - NewKeyword = 86, ->NewKeyword : SyntaxKind - - NullKeyword = 87, ->NullKeyword : SyntaxKind - - ReturnKeyword = 88, ->ReturnKeyword : SyntaxKind - - SuperKeyword = 89, ->SuperKeyword : SyntaxKind - - SwitchKeyword = 90, ->SwitchKeyword : SyntaxKind - - ThisKeyword = 91, ->ThisKeyword : SyntaxKind - - ThrowKeyword = 92, ->ThrowKeyword : SyntaxKind - - TrueKeyword = 93, ->TrueKeyword : SyntaxKind - - TryKeyword = 94, ->TryKeyword : SyntaxKind - - TypeOfKeyword = 95, ->TypeOfKeyword : SyntaxKind - - VarKeyword = 96, ->VarKeyword : SyntaxKind - - VoidKeyword = 97, ->VoidKeyword : SyntaxKind - - WhileKeyword = 98, ->WhileKeyword : SyntaxKind - - WithKeyword = 99, ->WithKeyword : SyntaxKind - - ImplementsKeyword = 100, ->ImplementsKeyword : SyntaxKind - - InterfaceKeyword = 101, ->InterfaceKeyword : SyntaxKind - - LetKeyword = 102, ->LetKeyword : SyntaxKind - - PackageKeyword = 103, ->PackageKeyword : SyntaxKind - - PrivateKeyword = 104, ->PrivateKeyword : SyntaxKind - - ProtectedKeyword = 105, ->ProtectedKeyword : SyntaxKind - - PublicKeyword = 106, ->PublicKeyword : SyntaxKind - - StaticKeyword = 107, ->StaticKeyword : SyntaxKind - - YieldKeyword = 108, ->YieldKeyword : SyntaxKind - - AnyKeyword = 109, ->AnyKeyword : SyntaxKind - - BooleanKeyword = 110, ->BooleanKeyword : SyntaxKind - - ConstructorKeyword = 111, ->ConstructorKeyword : SyntaxKind - - DeclareKeyword = 112, ->DeclareKeyword : SyntaxKind - - GetKeyword = 113, ->GetKeyword : SyntaxKind - - ModuleKeyword = 114, ->ModuleKeyword : SyntaxKind - - RequireKeyword = 115, ->RequireKeyword : SyntaxKind - - NumberKeyword = 116, ->NumberKeyword : SyntaxKind - - SetKeyword = 117, ->SetKeyword : SyntaxKind - - StringKeyword = 118, ->StringKeyword : SyntaxKind - - TypeKeyword = 119, ->TypeKeyword : SyntaxKind - - QualifiedName = 120, ->QualifiedName : SyntaxKind - - ComputedPropertyName = 121, ->ComputedPropertyName : SyntaxKind - - TypeParameter = 122, ->TypeParameter : SyntaxKind - - Parameter = 123, ->Parameter : SyntaxKind - - Property = 124, ->Property : SyntaxKind - - Method = 125, ->Method : SyntaxKind - - Constructor = 126, ->Constructor : SyntaxKind - - GetAccessor = 127, ->GetAccessor : SyntaxKind - - SetAccessor = 128, ->SetAccessor : SyntaxKind - - CallSignature = 129, ->CallSignature : SyntaxKind - - ConstructSignature = 130, ->ConstructSignature : SyntaxKind - - IndexSignature = 131, ->IndexSignature : SyntaxKind - - TypeReference = 132, ->TypeReference : SyntaxKind - - FunctionType = 133, ->FunctionType : SyntaxKind - - ConstructorType = 134, ->ConstructorType : SyntaxKind - - TypeQuery = 135, ->TypeQuery : SyntaxKind - - TypeLiteral = 136, ->TypeLiteral : SyntaxKind - - ArrayType = 137, ->ArrayType : SyntaxKind - - TupleType = 138, ->TupleType : SyntaxKind - - UnionType = 139, ->UnionType : SyntaxKind - - ParenthesizedType = 140, ->ParenthesizedType : SyntaxKind - - ArrayLiteralExpression = 141, ->ArrayLiteralExpression : SyntaxKind - - ObjectLiteralExpression = 142, ->ObjectLiteralExpression : SyntaxKind - - PropertyAccessExpression = 143, ->PropertyAccessExpression : SyntaxKind - - ElementAccessExpression = 144, ->ElementAccessExpression : SyntaxKind - - CallExpression = 145, ->CallExpression : SyntaxKind - - NewExpression = 146, ->NewExpression : SyntaxKind - - TaggedTemplateExpression = 147, ->TaggedTemplateExpression : SyntaxKind - - TypeAssertionExpression = 148, ->TypeAssertionExpression : SyntaxKind - - ParenthesizedExpression = 149, ->ParenthesizedExpression : SyntaxKind - - FunctionExpression = 150, ->FunctionExpression : SyntaxKind - - ArrowFunction = 151, ->ArrowFunction : SyntaxKind - - DeleteExpression = 152, ->DeleteExpression : SyntaxKind - - TypeOfExpression = 153, ->TypeOfExpression : SyntaxKind - - VoidExpression = 154, ->VoidExpression : SyntaxKind - - PrefixUnaryExpression = 155, ->PrefixUnaryExpression : SyntaxKind - - PostfixUnaryExpression = 156, ->PostfixUnaryExpression : SyntaxKind - - BinaryExpression = 157, ->BinaryExpression : SyntaxKind - - ConditionalExpression = 158, ->ConditionalExpression : SyntaxKind - - TemplateExpression = 159, ->TemplateExpression : SyntaxKind - - YieldExpression = 160, ->YieldExpression : SyntaxKind - - OmittedExpression = 161, ->OmittedExpression : SyntaxKind - - TemplateSpan = 162, ->TemplateSpan : SyntaxKind - - Block = 163, ->Block : SyntaxKind - - VariableStatement = 164, ->VariableStatement : SyntaxKind - - EmptyStatement = 165, ->EmptyStatement : SyntaxKind - - ExpressionStatement = 166, ->ExpressionStatement : SyntaxKind - - IfStatement = 167, ->IfStatement : SyntaxKind - - DoStatement = 168, ->DoStatement : SyntaxKind - - WhileStatement = 169, ->WhileStatement : SyntaxKind - - ForStatement = 170, ->ForStatement : SyntaxKind - - ForInStatement = 171, ->ForInStatement : SyntaxKind - - ContinueStatement = 172, ->ContinueStatement : SyntaxKind - - BreakStatement = 173, ->BreakStatement : SyntaxKind - - ReturnStatement = 174, ->ReturnStatement : SyntaxKind - - WithStatement = 175, ->WithStatement : SyntaxKind - - SwitchStatement = 176, ->SwitchStatement : SyntaxKind - - LabeledStatement = 177, ->LabeledStatement : SyntaxKind - - ThrowStatement = 178, ->ThrowStatement : SyntaxKind - - TryStatement = 179, ->TryStatement : SyntaxKind - - TryBlock = 180, ->TryBlock : SyntaxKind - - FinallyBlock = 181, ->FinallyBlock : SyntaxKind - - DebuggerStatement = 182, ->DebuggerStatement : SyntaxKind - - VariableDeclaration = 183, ->VariableDeclaration : SyntaxKind - - FunctionDeclaration = 184, ->FunctionDeclaration : SyntaxKind - - ClassDeclaration = 185, ->ClassDeclaration : SyntaxKind - - InterfaceDeclaration = 186, ->InterfaceDeclaration : SyntaxKind - - TypeAliasDeclaration = 187, ->TypeAliasDeclaration : SyntaxKind - - EnumDeclaration = 188, ->EnumDeclaration : SyntaxKind - - ModuleDeclaration = 189, ->ModuleDeclaration : SyntaxKind - - ModuleBlock = 190, ->ModuleBlock : SyntaxKind - - ImportDeclaration = 191, ->ImportDeclaration : SyntaxKind - - ExportAssignment = 192, ->ExportAssignment : SyntaxKind - - ExternalModuleReference = 193, ->ExternalModuleReference : SyntaxKind - - CaseClause = 194, ->CaseClause : SyntaxKind - - DefaultClause = 195, ->DefaultClause : SyntaxKind - - HeritageClause = 196, ->HeritageClause : SyntaxKind - - CatchClause = 197, ->CatchClause : SyntaxKind - - PropertyAssignment = 198, ->PropertyAssignment : SyntaxKind - - ShorthandPropertyAssignment = 199, ->ShorthandPropertyAssignment : SyntaxKind - - EnumMember = 200, ->EnumMember : SyntaxKind - - SourceFile = 201, ->SourceFile : SyntaxKind - - Program = 202, ->Program : SyntaxKind - - SyntaxList = 203, ->SyntaxList : SyntaxKind - - Count = 204, ->Count : SyntaxKind - - FirstAssignment = 51, ->FirstAssignment : SyntaxKind - - LastAssignment = 62, ->LastAssignment : SyntaxKind - - FirstReservedWord = 64, ->FirstReservedWord : SyntaxKind - - LastReservedWord = 99, ->LastReservedWord : SyntaxKind - - FirstKeyword = 64, ->FirstKeyword : SyntaxKind - - LastKeyword = 119, ->LastKeyword : SyntaxKind - - FirstFutureReservedWord = 100, ->FirstFutureReservedWord : SyntaxKind - - LastFutureReservedWord = 108, ->LastFutureReservedWord : SyntaxKind - - FirstTypeNode = 132, ->FirstTypeNode : SyntaxKind - - LastTypeNode = 140, ->LastTypeNode : SyntaxKind - - FirstPunctuation = 13, ->FirstPunctuation : SyntaxKind - - LastPunctuation = 62, ->LastPunctuation : SyntaxKind - - FirstToken = 0, ->FirstToken : SyntaxKind - - LastToken = 119, ->LastToken : SyntaxKind - - FirstTriviaToken = 2, ->FirstTriviaToken : SyntaxKind - - LastTriviaToken = 5, ->LastTriviaToken : SyntaxKind - - FirstLiteralToken = 6, ->FirstLiteralToken : SyntaxKind - - LastLiteralToken = 9, ->LastLiteralToken : SyntaxKind - - FirstTemplateToken = 9, ->FirstTemplateToken : SyntaxKind - - LastTemplateToken = 12, ->LastTemplateToken : SyntaxKind - - FirstOperator = 21, ->FirstOperator : SyntaxKind - - LastOperator = 62, ->LastOperator : SyntaxKind - - FirstBinaryOperator = 23, ->FirstBinaryOperator : SyntaxKind - - LastBinaryOperator = 62, ->LastBinaryOperator : SyntaxKind - - FirstNode = 120, ->FirstNode : SyntaxKind - } - const enum NodeFlags { ->NodeFlags : NodeFlags - - Export = 1, ->Export : NodeFlags - - Ambient = 2, ->Ambient : NodeFlags - - Public = 16, ->Public : NodeFlags - - Private = 32, ->Private : NodeFlags - - Protected = 64, ->Protected : NodeFlags - - Static = 128, ->Static : NodeFlags - - MultiLine = 256, ->MultiLine : NodeFlags - - Synthetic = 512, ->Synthetic : NodeFlags - - DeclarationFile = 1024, ->DeclarationFile : NodeFlags - - Let = 2048, ->Let : NodeFlags - - Const = 4096, ->Const : NodeFlags - - OctalLiteral = 8192, ->OctalLiteral : NodeFlags - - Modifier = 243, ->Modifier : NodeFlags - - AccessibilityModifier = 112, ->AccessibilityModifier : NodeFlags - - BlockScoped = 6144, ->BlockScoped : NodeFlags - } - const enum ParserContextFlags { ->ParserContextFlags : ParserContextFlags - - StrictMode = 1, ->StrictMode : ParserContextFlags - - DisallowIn = 2, ->DisallowIn : ParserContextFlags - - Yield = 4, ->Yield : ParserContextFlags - - GeneratorParameter = 8, ->GeneratorParameter : ParserContextFlags - - ContainsError = 16, ->ContainsError : ParserContextFlags - - HasPropagatedChildContainsErrorFlag = 32, ->HasPropagatedChildContainsErrorFlag : ParserContextFlags - } - interface Node extends TextRange { ->Node : Node ->TextRange : TextRange - - kind: SyntaxKind; ->kind : SyntaxKind ->SyntaxKind : SyntaxKind - - flags: NodeFlags; ->flags : NodeFlags ->NodeFlags : NodeFlags - - parserContextFlags?: ParserContextFlags; ->parserContextFlags : ParserContextFlags ->ParserContextFlags : ParserContextFlags - - id?: number; ->id : number - - parent?: Node; ->parent : Node ->Node : Node - - symbol?: Symbol; ->symbol : Symbol ->Symbol : Symbol - - locals?: SymbolTable; ->locals : SymbolTable ->SymbolTable : SymbolTable - - nextContainer?: Node; ->nextContainer : Node ->Node : Node - - localSymbol?: Symbol; ->localSymbol : Symbol ->Symbol : Symbol - - modifiers?: ModifiersArray; ->modifiers : ModifiersArray ->ModifiersArray : ModifiersArray - } - interface NodeArray extends Array, TextRange { ->NodeArray : NodeArray ->T : T ->Array : T[] ->T : T ->TextRange : TextRange - - hasTrailingComma?: boolean; ->hasTrailingComma : boolean - } - interface ModifiersArray extends NodeArray { ->ModifiersArray : ModifiersArray ->NodeArray : NodeArray ->Node : Node - - flags: number; ->flags : number - } - interface Identifier extends PrimaryExpression { ->Identifier : Identifier ->PrimaryExpression : PrimaryExpression - - text: string; ->text : string - } - interface QualifiedName extends Node { ->QualifiedName : QualifiedName ->Node : Node - - left: EntityName; ->left : Identifier | QualifiedName ->EntityName : Identifier | QualifiedName - - right: Identifier; ->right : Identifier ->Identifier : Identifier - } - type EntityName = Identifier | QualifiedName; ->EntityName : Identifier | QualifiedName ->Identifier : Identifier ->QualifiedName : QualifiedName - - type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName ->Identifier : Identifier ->LiteralExpression : LiteralExpression ->ComputedPropertyName : ComputedPropertyName - - interface Declaration extends Node { ->Declaration : Declaration ->Node : Node - - _declarationBrand: any; ->_declarationBrand : any - - name?: DeclarationName; ->name : Identifier | LiteralExpression | ComputedPropertyName ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName - } - interface ComputedPropertyName extends Node { ->ComputedPropertyName : ComputedPropertyName ->Node : Node - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface TypeParameterDeclaration extends Declaration { ->TypeParameterDeclaration : TypeParameterDeclaration ->Declaration : Declaration - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - constraint?: TypeNode; ->constraint : TypeNode ->TypeNode : TypeNode - - expression?: Expression; ->expression : Expression ->Expression : Expression - } - interface SignatureDeclaration extends Declaration { ->SignatureDeclaration : SignatureDeclaration ->Declaration : Declaration - - typeParameters?: NodeArray; ->typeParameters : NodeArray ->NodeArray : NodeArray ->TypeParameterDeclaration : TypeParameterDeclaration - - parameters: NodeArray; ->parameters : NodeArray ->NodeArray : NodeArray ->ParameterDeclaration : ParameterDeclaration - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - } - interface VariableDeclaration extends Declaration { ->VariableDeclaration : VariableDeclaration ->Declaration : Declaration - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - } - interface ParameterDeclaration extends Declaration { ->ParameterDeclaration : ParameterDeclaration ->Declaration : Declaration - - dotDotDotToken?: Node; ->dotDotDotToken : Node ->Node : Node - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - questionToken?: Node; ->questionToken : Node ->Node : Node - - type?: TypeNode | StringLiteralExpression; ->type : TypeNode | StringLiteralExpression ->TypeNode : TypeNode ->StringLiteralExpression : StringLiteralExpression - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - } - interface PropertyDeclaration extends Declaration, ClassElement { ->PropertyDeclaration : PropertyDeclaration ->Declaration : Declaration ->ClassElement : ClassElement - - _propertyDeclarationBrand: any; ->_propertyDeclarationBrand : any - - questionToken?: Node; ->questionToken : Node ->Node : Node - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - } - type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; ->VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration ->VariableDeclaration : VariableDeclaration ->ParameterDeclaration : ParameterDeclaration - - type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; ->VariableOrParameterOrPropertyDeclaration : ParameterDeclaration | VariableDeclaration | PropertyDeclaration ->VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration ->PropertyDeclaration : PropertyDeclaration - - interface ObjectLiteralElement extends Declaration { ->ObjectLiteralElement : ObjectLiteralElement ->Declaration : Declaration - - _objectLiteralBrandBrand: any; ->_objectLiteralBrandBrand : any - } - interface ShorthandPropertyAssignment extends ObjectLiteralElement { ->ShorthandPropertyAssignment : ShorthandPropertyAssignment ->ObjectLiteralElement : ObjectLiteralElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - questionToken?: Node; ->questionToken : Node ->Node : Node - } - interface PropertyAssignment extends ObjectLiteralElement { ->PropertyAssignment : PropertyAssignment ->ObjectLiteralElement : ObjectLiteralElement - - _propertyAssignmentBrand: any; ->_propertyAssignmentBrand : any - - name: DeclarationName; ->name : Identifier | LiteralExpression | ComputedPropertyName ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName - - questionToken?: Node; ->questionToken : Node ->Node : Node - - initializer: Expression; ->initializer : Expression ->Expression : Expression - } - /** - * Several node kinds share function-like features such as a signature, - * a name, and a body. These nodes should extend FunctionLikeDeclaration. - * Examples: - * FunctionDeclaration - * MethodDeclaration - * AccessorDeclaration - */ - interface FunctionLikeDeclaration extends SignatureDeclaration { ->FunctionLikeDeclaration : FunctionLikeDeclaration ->SignatureDeclaration : SignatureDeclaration - - _functionLikeDeclarationBrand: any; ->_functionLikeDeclarationBrand : any - - asteriskToken?: Node; ->asteriskToken : Node ->Node : Node - - questionToken?: Node; ->questionToken : Node ->Node : Node - - body?: Block | Expression; ->body : Expression | Block ->Block : Block ->Expression : Expression - } - interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { ->FunctionDeclaration : FunctionDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration ->Statement : Statement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - body?: Block; ->body : Block ->Block : Block - } - interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { ->MethodDeclaration : MethodDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration ->ClassElement : ClassElement ->ObjectLiteralElement : ObjectLiteralElement - - body?: Block; ->body : Block ->Block : Block - } - interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { ->ConstructorDeclaration : ConstructorDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration ->ClassElement : ClassElement - - body?: Block; ->body : Block ->Block : Block - } - interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { ->AccessorDeclaration : AccessorDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration ->ClassElement : ClassElement ->ObjectLiteralElement : ObjectLiteralElement - - _accessorDeclarationBrand: any; ->_accessorDeclarationBrand : any - - body: Block; ->body : Block ->Block : Block - } - interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { ->IndexSignatureDeclaration : IndexSignatureDeclaration ->SignatureDeclaration : SignatureDeclaration ->ClassElement : ClassElement - - _indexSignatureDeclarationBrand: any; ->_indexSignatureDeclarationBrand : any - } - interface TypeNode extends Node { ->TypeNode : TypeNode ->Node : Node - - _typeNodeBrand: any; ->_typeNodeBrand : any - } - interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { ->FunctionOrConstructorTypeNode : FunctionOrConstructorTypeNode ->TypeNode : TypeNode ->SignatureDeclaration : SignatureDeclaration - - _functionOrConstructorTypeNodeBrand: any; ->_functionOrConstructorTypeNodeBrand : any - } - interface TypeReferenceNode extends TypeNode { ->TypeReferenceNode : TypeReferenceNode ->TypeNode : TypeNode - - typeName: EntityName; ->typeName : Identifier | QualifiedName ->EntityName : Identifier | QualifiedName - - typeArguments?: NodeArray; ->typeArguments : NodeArray ->NodeArray : NodeArray ->TypeNode : TypeNode - } - interface TypeQueryNode extends TypeNode { ->TypeQueryNode : TypeQueryNode ->TypeNode : TypeNode - - exprName: EntityName; ->exprName : Identifier | QualifiedName ->EntityName : Identifier | QualifiedName - } - interface TypeLiteralNode extends TypeNode, Declaration { ->TypeLiteralNode : TypeLiteralNode ->TypeNode : TypeNode ->Declaration : Declaration - - members: NodeArray; ->members : NodeArray ->NodeArray : NodeArray ->Node : Node - } - interface ArrayTypeNode extends TypeNode { ->ArrayTypeNode : ArrayTypeNode ->TypeNode : TypeNode - - elementType: TypeNode; ->elementType : TypeNode ->TypeNode : TypeNode - } - interface TupleTypeNode extends TypeNode { ->TupleTypeNode : TupleTypeNode ->TypeNode : TypeNode - - elementTypes: NodeArray; ->elementTypes : NodeArray ->NodeArray : NodeArray ->TypeNode : TypeNode - } - interface UnionTypeNode extends TypeNode { ->UnionTypeNode : UnionTypeNode ->TypeNode : TypeNode - - types: NodeArray; ->types : NodeArray ->NodeArray : NodeArray ->TypeNode : TypeNode - } - interface ParenthesizedTypeNode extends TypeNode { ->ParenthesizedTypeNode : ParenthesizedTypeNode ->TypeNode : TypeNode - - type: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - } - interface Expression extends Node { ->Expression : Expression ->Node : Node - - _expressionBrand: any; ->_expressionBrand : any - - contextualType?: Type; ->contextualType : Type ->Type : Type - } - interface UnaryExpression extends Expression { ->UnaryExpression : UnaryExpression ->Expression : Expression - - _unaryExpressionBrand: any; ->_unaryExpressionBrand : any - } - interface PrefixUnaryExpression extends UnaryExpression { ->PrefixUnaryExpression : PrefixUnaryExpression ->UnaryExpression : UnaryExpression - - operator: SyntaxKind; ->operator : SyntaxKind ->SyntaxKind : SyntaxKind - - operand: UnaryExpression; ->operand : UnaryExpression ->UnaryExpression : UnaryExpression - } - interface PostfixUnaryExpression extends PostfixExpression { ->PostfixUnaryExpression : PostfixUnaryExpression ->PostfixExpression : PostfixExpression - - operand: LeftHandSideExpression; ->operand : LeftHandSideExpression ->LeftHandSideExpression : LeftHandSideExpression - - operator: SyntaxKind; ->operator : SyntaxKind ->SyntaxKind : SyntaxKind - } - interface PostfixExpression extends UnaryExpression { ->PostfixExpression : PostfixExpression ->UnaryExpression : UnaryExpression - - _postfixExpressionBrand: any; ->_postfixExpressionBrand : any - } - interface LeftHandSideExpression extends PostfixExpression { ->LeftHandSideExpression : LeftHandSideExpression ->PostfixExpression : PostfixExpression - - _leftHandSideExpressionBrand: any; ->_leftHandSideExpressionBrand : any - } - interface MemberExpression extends LeftHandSideExpression { ->MemberExpression : MemberExpression ->LeftHandSideExpression : LeftHandSideExpression - - _memberExpressionBrand: any; ->_memberExpressionBrand : any - } - interface PrimaryExpression extends MemberExpression { ->PrimaryExpression : PrimaryExpression ->MemberExpression : MemberExpression - - _primaryExpressionBrand: any; ->_primaryExpressionBrand : any - } - interface DeleteExpression extends UnaryExpression { ->DeleteExpression : DeleteExpression ->UnaryExpression : UnaryExpression - - expression: UnaryExpression; ->expression : UnaryExpression ->UnaryExpression : UnaryExpression - } - interface TypeOfExpression extends UnaryExpression { ->TypeOfExpression : TypeOfExpression ->UnaryExpression : UnaryExpression - - expression: UnaryExpression; ->expression : UnaryExpression ->UnaryExpression : UnaryExpression - } - interface VoidExpression extends UnaryExpression { ->VoidExpression : VoidExpression ->UnaryExpression : UnaryExpression - - expression: UnaryExpression; ->expression : UnaryExpression ->UnaryExpression : UnaryExpression - } - interface YieldExpression extends Expression { ->YieldExpression : YieldExpression ->Expression : Expression - - asteriskToken?: Node; ->asteriskToken : Node ->Node : Node - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface BinaryExpression extends Expression { ->BinaryExpression : BinaryExpression ->Expression : Expression - - left: Expression; ->left : Expression ->Expression : Expression - - operator: SyntaxKind; ->operator : SyntaxKind ->SyntaxKind : SyntaxKind - - right: Expression; ->right : Expression ->Expression : Expression - } - interface ConditionalExpression extends Expression { ->ConditionalExpression : ConditionalExpression ->Expression : Expression - - condition: Expression; ->condition : Expression ->Expression : Expression - - whenTrue: Expression; ->whenTrue : Expression ->Expression : Expression - - whenFalse: Expression; ->whenFalse : Expression ->Expression : Expression - } - interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { ->FunctionExpression : FunctionExpression ->PrimaryExpression : PrimaryExpression ->FunctionLikeDeclaration : FunctionLikeDeclaration - - name?: Identifier; ->name : Identifier ->Identifier : Identifier - - body: Block | Expression; ->body : Expression | Block ->Block : Block ->Expression : Expression - } - interface LiteralExpression extends PrimaryExpression { ->LiteralExpression : LiteralExpression ->PrimaryExpression : PrimaryExpression - - text: string; ->text : string - - isUnterminated?: boolean; ->isUnterminated : boolean - } - interface StringLiteralExpression extends LiteralExpression { ->StringLiteralExpression : StringLiteralExpression ->LiteralExpression : LiteralExpression - - _stringLiteralExpressionBrand: any; ->_stringLiteralExpressionBrand : any - } - interface TemplateExpression extends PrimaryExpression { ->TemplateExpression : TemplateExpression ->PrimaryExpression : PrimaryExpression - - head: LiteralExpression; ->head : LiteralExpression ->LiteralExpression : LiteralExpression - - templateSpans: NodeArray; ->templateSpans : NodeArray ->NodeArray : NodeArray ->TemplateSpan : TemplateSpan - } - interface TemplateSpan extends Node { ->TemplateSpan : TemplateSpan ->Node : Node - - expression: Expression; ->expression : Expression ->Expression : Expression - - literal: LiteralExpression; ->literal : LiteralExpression ->LiteralExpression : LiteralExpression - } - interface ParenthesizedExpression extends PrimaryExpression { ->ParenthesizedExpression : ParenthesizedExpression ->PrimaryExpression : PrimaryExpression - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface ArrayLiteralExpression extends PrimaryExpression { ->ArrayLiteralExpression : ArrayLiteralExpression ->PrimaryExpression : PrimaryExpression - - elements: NodeArray; ->elements : NodeArray ->NodeArray : NodeArray ->Expression : Expression - } - interface ObjectLiteralExpression extends PrimaryExpression, Declaration { ->ObjectLiteralExpression : ObjectLiteralExpression ->PrimaryExpression : PrimaryExpression ->Declaration : Declaration - - properties: NodeArray; ->properties : NodeArray ->NodeArray : NodeArray ->ObjectLiteralElement : ObjectLiteralElement - } - interface PropertyAccessExpression extends MemberExpression { ->PropertyAccessExpression : PropertyAccessExpression ->MemberExpression : MemberExpression - - expression: LeftHandSideExpression; ->expression : LeftHandSideExpression ->LeftHandSideExpression : LeftHandSideExpression - - name: Identifier; ->name : Identifier ->Identifier : Identifier - } - interface ElementAccessExpression extends MemberExpression { ->ElementAccessExpression : ElementAccessExpression ->MemberExpression : MemberExpression - - expression: LeftHandSideExpression; ->expression : LeftHandSideExpression ->LeftHandSideExpression : LeftHandSideExpression - - argumentExpression?: Expression; ->argumentExpression : Expression ->Expression : Expression - } - interface CallExpression extends LeftHandSideExpression { ->CallExpression : CallExpression ->LeftHandSideExpression : LeftHandSideExpression - - expression: LeftHandSideExpression; ->expression : LeftHandSideExpression ->LeftHandSideExpression : LeftHandSideExpression - - typeArguments?: NodeArray; ->typeArguments : NodeArray ->NodeArray : NodeArray ->TypeNode : TypeNode - - arguments: NodeArray; ->arguments : NodeArray ->NodeArray : NodeArray ->Expression : Expression - } - interface NewExpression extends CallExpression, PrimaryExpression { ->NewExpression : NewExpression ->CallExpression : CallExpression ->PrimaryExpression : PrimaryExpression - } - interface TaggedTemplateExpression extends MemberExpression { ->TaggedTemplateExpression : TaggedTemplateExpression ->MemberExpression : MemberExpression - - tag: LeftHandSideExpression; ->tag : LeftHandSideExpression ->LeftHandSideExpression : LeftHandSideExpression - - template: LiteralExpression | TemplateExpression; ->template : LiteralExpression | TemplateExpression ->LiteralExpression : LiteralExpression ->TemplateExpression : TemplateExpression - } - type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression; ->CallLikeExpression : CallExpression | NewExpression | TaggedTemplateExpression ->CallExpression : CallExpression ->NewExpression : NewExpression ->TaggedTemplateExpression : TaggedTemplateExpression - - interface TypeAssertion extends UnaryExpression { ->TypeAssertion : TypeAssertion ->UnaryExpression : UnaryExpression - - type: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - - expression: UnaryExpression; ->expression : UnaryExpression ->UnaryExpression : UnaryExpression - } - interface Statement extends Node, ModuleElement { ->Statement : Statement ->Node : Node ->ModuleElement : ModuleElement - - _statementBrand: any; ->_statementBrand : any - } - interface Block extends Statement { ->Block : Block ->Statement : Statement - - statements: NodeArray; ->statements : NodeArray ->NodeArray : NodeArray ->Statement : Statement - } - interface VariableStatement extends Statement { ->VariableStatement : VariableStatement ->Statement : Statement - - declarations: NodeArray; ->declarations : NodeArray ->NodeArray : NodeArray ->VariableDeclaration : VariableDeclaration - } - interface ExpressionStatement extends Statement { ->ExpressionStatement : ExpressionStatement ->Statement : Statement - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface IfStatement extends Statement { ->IfStatement : IfStatement ->Statement : Statement - - expression: Expression; ->expression : Expression ->Expression : Expression - - thenStatement: Statement; ->thenStatement : Statement ->Statement : Statement - - elseStatement?: Statement; ->elseStatement : Statement ->Statement : Statement - } - interface IterationStatement extends Statement { ->IterationStatement : IterationStatement ->Statement : Statement - - statement: Statement; ->statement : Statement ->Statement : Statement - } - interface DoStatement extends IterationStatement { ->DoStatement : DoStatement ->IterationStatement : IterationStatement - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface WhileStatement extends IterationStatement { ->WhileStatement : WhileStatement ->IterationStatement : IterationStatement - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface ForStatement extends IterationStatement { ->ForStatement : ForStatement ->IterationStatement : IterationStatement - - declarations?: NodeArray; ->declarations : NodeArray ->NodeArray : NodeArray ->VariableDeclaration : VariableDeclaration - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - - condition?: Expression; ->condition : Expression ->Expression : Expression - - iterator?: Expression; ->iterator : Expression ->Expression : Expression - } - interface ForInStatement extends IterationStatement { ->ForInStatement : ForInStatement ->IterationStatement : IterationStatement - - declarations?: NodeArray; ->declarations : NodeArray ->NodeArray : NodeArray ->VariableDeclaration : VariableDeclaration - - variable?: Expression; ->variable : Expression ->Expression : Expression - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface BreakOrContinueStatement extends Statement { ->BreakOrContinueStatement : BreakOrContinueStatement ->Statement : Statement - - label?: Identifier; ->label : Identifier ->Identifier : Identifier - } - interface ReturnStatement extends Statement { ->ReturnStatement : ReturnStatement ->Statement : Statement - - expression?: Expression; ->expression : Expression ->Expression : Expression - } - interface WithStatement extends Statement { ->WithStatement : WithStatement ->Statement : Statement - - expression: Expression; ->expression : Expression ->Expression : Expression - - statement: Statement; ->statement : Statement ->Statement : Statement - } - interface SwitchStatement extends Statement { ->SwitchStatement : SwitchStatement ->Statement : Statement - - expression: Expression; ->expression : Expression ->Expression : Expression - - clauses: NodeArray; ->clauses : NodeArray ->NodeArray : NodeArray ->CaseOrDefaultClause : CaseClause | DefaultClause - } - interface CaseClause extends Node { ->CaseClause : CaseClause ->Node : Node - - expression?: Expression; ->expression : Expression ->Expression : Expression - - statements: NodeArray; ->statements : NodeArray ->NodeArray : NodeArray ->Statement : Statement - } - interface DefaultClause extends Node { ->DefaultClause : DefaultClause ->Node : Node - - statements: NodeArray; ->statements : NodeArray ->NodeArray : NodeArray ->Statement : Statement - } - type CaseOrDefaultClause = CaseClause | DefaultClause; ->CaseOrDefaultClause : CaseClause | DefaultClause ->CaseClause : CaseClause ->DefaultClause : DefaultClause - - interface LabeledStatement extends Statement { ->LabeledStatement : LabeledStatement ->Statement : Statement - - label: Identifier; ->label : Identifier ->Identifier : Identifier - - statement: Statement; ->statement : Statement ->Statement : Statement - } - interface ThrowStatement extends Statement { ->ThrowStatement : ThrowStatement ->Statement : Statement - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface TryStatement extends Statement { ->TryStatement : TryStatement ->Statement : Statement - - tryBlock: Block; ->tryBlock : Block ->Block : Block - - catchClause?: CatchClause; ->catchClause : CatchClause ->CatchClause : CatchClause - - finallyBlock?: Block; ->finallyBlock : Block ->Block : Block - } - interface CatchClause extends Declaration { ->CatchClause : CatchClause ->Declaration : Declaration - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - - block: Block; ->block : Block ->Block : Block - } - interface ModuleElement extends Node { ->ModuleElement : ModuleElement ->Node : Node - - _moduleElementBrand: any; ->_moduleElementBrand : any - } - interface ClassDeclaration extends Declaration, ModuleElement { ->ClassDeclaration : ClassDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - typeParameters?: NodeArray; ->typeParameters : NodeArray ->NodeArray : NodeArray ->TypeParameterDeclaration : TypeParameterDeclaration - - heritageClauses?: NodeArray; ->heritageClauses : NodeArray ->NodeArray : NodeArray ->HeritageClause : HeritageClause - - members: NodeArray; ->members : NodeArray ->NodeArray : NodeArray ->ClassElement : ClassElement - } - interface ClassElement extends Declaration { ->ClassElement : ClassElement ->Declaration : Declaration - - _classElementBrand: any; ->_classElementBrand : any - } - interface InterfaceDeclaration extends Declaration, ModuleElement { ->InterfaceDeclaration : InterfaceDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - typeParameters?: NodeArray; ->typeParameters : NodeArray ->NodeArray : NodeArray ->TypeParameterDeclaration : TypeParameterDeclaration - - heritageClauses?: NodeArray; ->heritageClauses : NodeArray ->NodeArray : NodeArray ->HeritageClause : HeritageClause - - members: NodeArray; ->members : NodeArray ->NodeArray : NodeArray ->Declaration : Declaration - } - interface HeritageClause extends Node { ->HeritageClause : HeritageClause ->Node : Node - - token: SyntaxKind; ->token : SyntaxKind ->SyntaxKind : SyntaxKind - - types?: NodeArray; ->types : NodeArray ->NodeArray : NodeArray ->TypeReferenceNode : TypeReferenceNode - } - interface TypeAliasDeclaration extends Declaration, ModuleElement { ->TypeAliasDeclaration : TypeAliasDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - type: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - } - interface EnumMember extends Declaration { ->EnumMember : EnumMember ->Declaration : Declaration - - name: DeclarationName; ->name : Identifier | LiteralExpression | ComputedPropertyName ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - } - interface EnumDeclaration extends Declaration, ModuleElement { ->EnumDeclaration : EnumDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - members: NodeArray; ->members : NodeArray ->NodeArray : NodeArray ->EnumMember : EnumMember - } - interface ModuleDeclaration extends Declaration, ModuleElement { ->ModuleDeclaration : ModuleDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier | LiteralExpression; ->name : Identifier | LiteralExpression ->Identifier : Identifier ->LiteralExpression : LiteralExpression - - body: ModuleBlock | ModuleDeclaration; ->body : ModuleDeclaration | ModuleBlock ->ModuleBlock : ModuleBlock ->ModuleDeclaration : ModuleDeclaration - } - interface ModuleBlock extends Node, ModuleElement { ->ModuleBlock : ModuleBlock ->Node : Node ->ModuleElement : ModuleElement - - statements: NodeArray; ->statements : NodeArray ->NodeArray : NodeArray ->ModuleElement : ModuleElement - } - interface ImportDeclaration extends Declaration, ModuleElement { ->ImportDeclaration : ImportDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - moduleReference: EntityName | ExternalModuleReference; ->moduleReference : Identifier | QualifiedName | ExternalModuleReference ->EntityName : Identifier | QualifiedName ->ExternalModuleReference : ExternalModuleReference - } - interface ExternalModuleReference extends Node { ->ExternalModuleReference : ExternalModuleReference ->Node : Node - - expression?: Expression; ->expression : Expression ->Expression : Expression - } - interface ExportAssignment extends Statement, ModuleElement { ->ExportAssignment : ExportAssignment ->Statement : Statement ->ModuleElement : ModuleElement - - exportName: Identifier; ->exportName : Identifier ->Identifier : Identifier - } - interface FileReference extends TextRange { ->FileReference : FileReference ->TextRange : TextRange - - filename: string; ->filename : string - } - interface CommentRange extends TextRange { ->CommentRange : CommentRange ->TextRange : TextRange - - hasTrailingNewLine?: boolean; ->hasTrailingNewLine : boolean - } - interface SourceFile extends Declaration { ->SourceFile : SourceFile ->Declaration : Declaration - - statements: NodeArray; ->statements : NodeArray ->NodeArray : NodeArray ->ModuleElement : ModuleElement - - endOfFileToken: Node; ->endOfFileToken : Node ->Node : Node - - filename: string; ->filename : string - - text: string; ->text : string - - getLineAndCharacterFromPosition(position: number): LineAndCharacter; ->getLineAndCharacterFromPosition : (position: number) => LineAndCharacter ->position : number ->LineAndCharacter : LineAndCharacter - - getPositionFromLineAndCharacter(line: number, character: number): number; ->getPositionFromLineAndCharacter : (line: number, character: number) => number ->line : number ->character : number - - getLineStarts(): number[]; ->getLineStarts : () => number[] - - amdDependencies: string[]; ->amdDependencies : string[] - - amdModuleName: string; ->amdModuleName : string - - referencedFiles: FileReference[]; ->referencedFiles : FileReference[] ->FileReference : FileReference - - referenceDiagnostics: Diagnostic[]; ->referenceDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - parseDiagnostics: Diagnostic[]; ->parseDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - grammarDiagnostics: Diagnostic[]; ->grammarDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - getSyntacticDiagnostics(): Diagnostic[]; ->getSyntacticDiagnostics : () => Diagnostic[] ->Diagnostic : Diagnostic - - semanticDiagnostics: Diagnostic[]; ->semanticDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - hasNoDefaultLib: boolean; ->hasNoDefaultLib : boolean - - externalModuleIndicator: Node; ->externalModuleIndicator : Node ->Node : Node - - nodeCount: number; ->nodeCount : number - - identifierCount: number; ->identifierCount : number - - symbolCount: number; ->symbolCount : number - - isOpen: boolean; ->isOpen : boolean - - version: string; ->version : string - - languageVersion: ScriptTarget; ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget - - identifiers: Map; ->identifiers : Map ->Map : Map - } - interface Program { ->Program : Program - - getSourceFile(filename: string): SourceFile; ->getSourceFile : (filename: string) => SourceFile ->filename : string ->SourceFile : SourceFile - - getSourceFiles(): SourceFile[]; ->getSourceFiles : () => SourceFile[] ->SourceFile : SourceFile - - getCompilerOptions(): CompilerOptions; ->getCompilerOptions : () => CompilerOptions ->CompilerOptions : CompilerOptions - - getCompilerHost(): CompilerHost; ->getCompilerHost : () => CompilerHost ->CompilerHost : CompilerHost - - getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; ->getDiagnostics : (sourceFile?: SourceFile) => Diagnostic[] ->sourceFile : SourceFile ->SourceFile : SourceFile ->Diagnostic : Diagnostic - - getGlobalDiagnostics(): Diagnostic[]; ->getGlobalDiagnostics : () => Diagnostic[] ->Diagnostic : Diagnostic - - getTypeChecker(fullTypeCheckMode: boolean): TypeChecker; ->getTypeChecker : (fullTypeCheckMode: boolean) => TypeChecker ->fullTypeCheckMode : boolean ->TypeChecker : TypeChecker - - getCommonSourceDirectory(): string; ->getCommonSourceDirectory : () => string - } - interface SourceMapSpan { ->SourceMapSpan : SourceMapSpan - - emittedLine: number; ->emittedLine : number - - emittedColumn: number; ->emittedColumn : number - - sourceLine: number; ->sourceLine : number - - sourceColumn: number; ->sourceColumn : number - - nameIndex?: number; ->nameIndex : number - - sourceIndex: number; ->sourceIndex : number - } - interface SourceMapData { ->SourceMapData : SourceMapData - - sourceMapFilePath: string; ->sourceMapFilePath : string - - jsSourceMappingURL: string; ->jsSourceMappingURL : string - - sourceMapFile: string; ->sourceMapFile : string - - sourceMapSourceRoot: string; ->sourceMapSourceRoot : string - - sourceMapSources: string[]; ->sourceMapSources : string[] - - inputSourceFileNames: string[]; ->inputSourceFileNames : string[] - - sourceMapNames?: string[]; ->sourceMapNames : string[] - - sourceMapMappings: string; ->sourceMapMappings : string - - sourceMapDecodedMappings: SourceMapSpan[]; ->sourceMapDecodedMappings : SourceMapSpan[] ->SourceMapSpan : SourceMapSpan - } - enum EmitReturnStatus { ->EmitReturnStatus : EmitReturnStatus - - Succeeded = 0, ->Succeeded : EmitReturnStatus - - AllOutputGenerationSkipped = 1, ->AllOutputGenerationSkipped : EmitReturnStatus - - JSGeneratedWithSemanticErrors = 2, ->JSGeneratedWithSemanticErrors : EmitReturnStatus - - DeclarationGenerationSkipped = 3, ->DeclarationGenerationSkipped : EmitReturnStatus - - EmitErrorsEncountered = 4, ->EmitErrorsEncountered : EmitReturnStatus - - CompilerOptionsErrors = 5, ->CompilerOptionsErrors : EmitReturnStatus - } - interface EmitResult { ->EmitResult : EmitResult - - emitResultStatus: EmitReturnStatus; ->emitResultStatus : EmitReturnStatus ->EmitReturnStatus : EmitReturnStatus - - diagnostics: Diagnostic[]; ->diagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - sourceMaps: SourceMapData[]; ->sourceMaps : SourceMapData[] ->SourceMapData : SourceMapData - } - interface TypeChecker { ->TypeChecker : TypeChecker - - getProgram(): Program; ->getProgram : () => Program ->Program : Program - - getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; ->getDiagnostics : (sourceFile?: SourceFile) => Diagnostic[] ->sourceFile : SourceFile ->SourceFile : SourceFile ->Diagnostic : Diagnostic - - getDeclarationDiagnostics(sourceFile: SourceFile): Diagnostic[]; ->getDeclarationDiagnostics : (sourceFile: SourceFile) => Diagnostic[] ->sourceFile : SourceFile ->SourceFile : SourceFile ->Diagnostic : Diagnostic - - getGlobalDiagnostics(): Diagnostic[]; ->getGlobalDiagnostics : () => Diagnostic[] ->Diagnostic : Diagnostic - - getNodeCount(): number; ->getNodeCount : () => number - - getIdentifierCount(): number; ->getIdentifierCount : () => number - - getSymbolCount(): number; ->getSymbolCount : () => number - - getTypeCount(): number; ->getTypeCount : () => number - - emitFiles(targetSourceFile?: SourceFile): EmitResult; ->emitFiles : (targetSourceFile?: SourceFile) => EmitResult ->targetSourceFile : SourceFile ->SourceFile : SourceFile ->EmitResult : EmitResult - - getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; ->getTypeOfSymbolAtLocation : (symbol: Symbol, node: Node) => Type ->symbol : Symbol ->Symbol : Symbol ->node : Node ->Node : Node ->Type : Type - - getDeclaredTypeOfSymbol(symbol: Symbol): Type; ->getDeclaredTypeOfSymbol : (symbol: Symbol) => Type ->symbol : Symbol ->Symbol : Symbol ->Type : Type - - getPropertiesOfType(type: Type): Symbol[]; ->getPropertiesOfType : (type: Type) => Symbol[] ->type : Type ->Type : Type ->Symbol : Symbol - - getPropertyOfType(type: Type, propertyName: string): Symbol; ->getPropertyOfType : (type: Type, propertyName: string) => Symbol ->type : Type ->Type : Type ->propertyName : string ->Symbol : Symbol - - getSignaturesOfType(type: Type, kind: SignatureKind): Signature[]; ->getSignaturesOfType : (type: Type, kind: SignatureKind) => Signature[] ->type : Type ->Type : Type ->kind : SignatureKind ->SignatureKind : SignatureKind ->Signature : Signature - - getIndexTypeOfType(type: Type, kind: IndexKind): Type; ->getIndexTypeOfType : (type: Type, kind: IndexKind) => Type ->type : Type ->Type : Type ->kind : IndexKind ->IndexKind : IndexKind ->Type : Type - - getReturnTypeOfSignature(signature: Signature): Type; ->getReturnTypeOfSignature : (signature: Signature) => Type ->signature : Signature ->Signature : Signature ->Type : Type - - getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; ->getSymbolsInScope : (location: Node, meaning: SymbolFlags) => Symbol[] ->location : Node ->Node : Node ->meaning : SymbolFlags ->SymbolFlags : SymbolFlags ->Symbol : Symbol - - getSymbolAtLocation(node: Node): Symbol; ->getSymbolAtLocation : (node: Node) => Symbol ->node : Node ->Node : Node ->Symbol : Symbol - - getShorthandAssignmentValueSymbol(location: Node): Symbol; ->getShorthandAssignmentValueSymbol : (location: Node) => Symbol ->location : Node ->Node : Node ->Symbol : Symbol - - getTypeAtLocation(node: Node): Type; ->getTypeAtLocation : (node: Node) => Type ->node : Node ->Node : Node ->Type : Type - - typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; ->typeToString : (type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => string ->type : Type ->Type : Type ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; ->symbolToString : (symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) => string ->symbol : Symbol ->Symbol : Symbol ->enclosingDeclaration : Node ->Node : Node ->meaning : SymbolFlags ->SymbolFlags : SymbolFlags - - getSymbolDisplayBuilder(): SymbolDisplayBuilder; ->getSymbolDisplayBuilder : () => SymbolDisplayBuilder ->SymbolDisplayBuilder : SymbolDisplayBuilder - - getFullyQualifiedName(symbol: Symbol): string; ->getFullyQualifiedName : (symbol: Symbol) => string ->symbol : Symbol ->Symbol : Symbol - - getAugmentedPropertiesOfType(type: Type): Symbol[]; ->getAugmentedPropertiesOfType : (type: Type) => Symbol[] ->type : Type ->Type : Type ->Symbol : Symbol - - getRootSymbols(symbol: Symbol): Symbol[]; ->getRootSymbols : (symbol: Symbol) => Symbol[] ->symbol : Symbol ->Symbol : Symbol ->Symbol : Symbol - - getContextualType(node: Expression): Type; ->getContextualType : (node: Expression) => Type ->node : Expression ->Expression : Expression ->Type : Type - - getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; ->getResolvedSignature : (node: CallExpression | NewExpression | TaggedTemplateExpression, candidatesOutArray?: Signature[]) => Signature ->node : CallExpression | NewExpression | TaggedTemplateExpression ->CallLikeExpression : CallExpression | NewExpression | TaggedTemplateExpression ->candidatesOutArray : Signature[] ->Signature : Signature ->Signature : Signature - - getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; ->getSignatureFromDeclaration : (declaration: SignatureDeclaration) => Signature ->declaration : SignatureDeclaration ->SignatureDeclaration : SignatureDeclaration ->Signature : Signature - - isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; ->isImplementationOfOverload : (node: FunctionLikeDeclaration) => boolean ->node : FunctionLikeDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration - - isUndefinedSymbol(symbol: Symbol): boolean; ->isUndefinedSymbol : (symbol: Symbol) => boolean ->symbol : Symbol ->Symbol : Symbol - - isArgumentsSymbol(symbol: Symbol): boolean; ->isArgumentsSymbol : (symbol: Symbol) => boolean ->symbol : Symbol ->Symbol : Symbol - - isEmitBlocked(sourceFile?: SourceFile): boolean; ->isEmitBlocked : (sourceFile?: SourceFile) => boolean ->sourceFile : SourceFile ->SourceFile : SourceFile - - getEnumMemberValue(node: EnumMember): number; ->getEnumMemberValue : (node: EnumMember) => number ->node : EnumMember ->EnumMember : EnumMember - - isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; ->isValidPropertyAccess : (node: QualifiedName | PropertyAccessExpression, propertyName: string) => boolean ->node : QualifiedName | PropertyAccessExpression ->PropertyAccessExpression : PropertyAccessExpression ->QualifiedName : QualifiedName ->propertyName : string - - getAliasedSymbol(symbol: Symbol): Symbol; ->getAliasedSymbol : (symbol: Symbol) => Symbol ->symbol : Symbol ->Symbol : Symbol ->Symbol : Symbol - } - interface SymbolDisplayBuilder { ->SymbolDisplayBuilder : SymbolDisplayBuilder - - buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildTypeDisplay : (type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->type : Type ->Type : Type ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void; ->buildSymbolDisplay : (symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags) => void ->symbol : Symbol ->Symbol : Symbol ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->meaning : SymbolFlags ->SymbolFlags : SymbolFlags ->flags : SymbolFormatFlags ->SymbolFormatFlags : SymbolFormatFlags - - buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildSignatureDisplay : (signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->signatures : Signature ->Signature : Signature ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildParameterDisplay : (parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->parameter : Symbol ->Symbol : Symbol ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildTypeParameterDisplay : (tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->tp : TypeParameter ->TypeParameter : TypeParameter ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void; ->buildTypeParameterDisplayFromSymbol : (symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags) => void ->symbol : Symbol ->Symbol : Symbol ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaraiton : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildDisplayForParametersAndDelimiters : (parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->parameters : Symbol[] ->Symbol : Symbol ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildDisplayForTypeParametersAndDelimiters : (typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->typeParameters : TypeParameter[] ->TypeParameter : TypeParameter ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildReturnTypeDisplay : (signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->signature : Signature ->Signature : Signature ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - } - interface SymbolWriter { ->SymbolWriter : SymbolWriter - - writeKeyword(text: string): void; ->writeKeyword : (text: string) => void ->text : string - - writeOperator(text: string): void; ->writeOperator : (text: string) => void ->text : string - - writePunctuation(text: string): void; ->writePunctuation : (text: string) => void ->text : string - - writeSpace(text: string): void; ->writeSpace : (text: string) => void ->text : string - - writeStringLiteral(text: string): void; ->writeStringLiteral : (text: string) => void ->text : string - - writeParameter(text: string): void; ->writeParameter : (text: string) => void ->text : string - - writeSymbol(text: string, symbol: Symbol): void; ->writeSymbol : (text: string, symbol: Symbol) => void ->text : string ->symbol : Symbol ->Symbol : Symbol - - writeLine(): void; ->writeLine : () => void - - increaseIndent(): void; ->increaseIndent : () => void - - decreaseIndent(): void; ->decreaseIndent : () => void - - clear(): void; ->clear : () => void - - trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void; ->trackSymbol : (symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) => void ->symbol : Symbol ->Symbol : Symbol ->enclosingDeclaration : Node ->Node : Node ->meaning : SymbolFlags ->SymbolFlags : SymbolFlags - } - const enum TypeFormatFlags { ->TypeFormatFlags : TypeFormatFlags - - None = 0, ->None : TypeFormatFlags - - WriteArrayAsGenericType = 1, ->WriteArrayAsGenericType : TypeFormatFlags - - UseTypeOfFunction = 2, ->UseTypeOfFunction : TypeFormatFlags - - NoTruncation = 4, ->NoTruncation : TypeFormatFlags - - WriteArrowStyleSignature = 8, ->WriteArrowStyleSignature : TypeFormatFlags - - WriteOwnNameForAnyLike = 16, ->WriteOwnNameForAnyLike : TypeFormatFlags - - WriteTypeArgumentsOfSignature = 32, ->WriteTypeArgumentsOfSignature : TypeFormatFlags - - InElementType = 64, ->InElementType : TypeFormatFlags - } - const enum SymbolFormatFlags { ->SymbolFormatFlags : SymbolFormatFlags - - None = 0, ->None : SymbolFormatFlags - - WriteTypeParametersOrArguments = 1, ->WriteTypeParametersOrArguments : SymbolFormatFlags - - UseOnlyExternalAliasing = 2, ->UseOnlyExternalAliasing : SymbolFormatFlags - } - const enum SymbolAccessibility { ->SymbolAccessibility : SymbolAccessibility - - Accessible = 0, ->Accessible : SymbolAccessibility - - NotAccessible = 1, ->NotAccessible : SymbolAccessibility - - CannotBeNamed = 2, ->CannotBeNamed : SymbolAccessibility - } - interface SymbolVisibilityResult { ->SymbolVisibilityResult : SymbolVisibilityResult - - accessibility: SymbolAccessibility; ->accessibility : SymbolAccessibility ->SymbolAccessibility : SymbolAccessibility - - aliasesToMakeVisible?: ImportDeclaration[]; ->aliasesToMakeVisible : ImportDeclaration[] ->ImportDeclaration : ImportDeclaration - - errorSymbolName?: string; ->errorSymbolName : string - - errorNode?: Node; ->errorNode : Node ->Node : Node - } - interface SymbolAccessiblityResult extends SymbolVisibilityResult { ->SymbolAccessiblityResult : SymbolAccessiblityResult ->SymbolVisibilityResult : SymbolVisibilityResult - - errorModuleName?: string; ->errorModuleName : string - } - interface EmitResolver { ->EmitResolver : EmitResolver - - getProgram(): Program; ->getProgram : () => Program ->Program : Program - - getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; ->getLocalNameOfContainer : (container: EnumDeclaration | ModuleDeclaration) => string ->container : EnumDeclaration | ModuleDeclaration ->ModuleDeclaration : ModuleDeclaration ->EnumDeclaration : EnumDeclaration - - getExpressionNamePrefix(node: Identifier): string; ->getExpressionNamePrefix : (node: Identifier) => string ->node : Identifier ->Identifier : Identifier - - getExportAssignmentName(node: SourceFile): string; ->getExportAssignmentName : (node: SourceFile) => string ->node : SourceFile ->SourceFile : SourceFile - - isReferencedImportDeclaration(node: ImportDeclaration): boolean; ->isReferencedImportDeclaration : (node: ImportDeclaration) => boolean ->node : ImportDeclaration ->ImportDeclaration : ImportDeclaration - - isTopLevelValueImportWithEntityName(node: ImportDeclaration): boolean; ->isTopLevelValueImportWithEntityName : (node: ImportDeclaration) => boolean ->node : ImportDeclaration ->ImportDeclaration : ImportDeclaration - - getNodeCheckFlags(node: Node): NodeCheckFlags; ->getNodeCheckFlags : (node: Node) => NodeCheckFlags ->node : Node ->Node : Node ->NodeCheckFlags : NodeCheckFlags - - getEnumMemberValue(node: EnumMember): number; ->getEnumMemberValue : (node: EnumMember) => number ->node : EnumMember ->EnumMember : EnumMember - - hasSemanticErrors(sourceFile?: SourceFile): boolean; ->hasSemanticErrors : (sourceFile?: SourceFile) => boolean ->sourceFile : SourceFile ->SourceFile : SourceFile - - isDeclarationVisible(node: Declaration): boolean; ->isDeclarationVisible : (node: Declaration) => boolean ->node : Declaration ->Declaration : Declaration - - isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; ->isImplementationOfOverload : (node: FunctionLikeDeclaration) => boolean ->node : FunctionLikeDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration - - writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; ->writeTypeOfDeclaration : (declaration: ParameterDeclaration | VariableDeclaration | AccessorDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void ->declaration : ParameterDeclaration | VariableDeclaration | AccessorDeclaration ->AccessorDeclaration : AccessorDeclaration ->VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags ->writer : SymbolWriter ->SymbolWriter : SymbolWriter - - writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; ->writeReturnTypeOfSignatureDeclaration : (signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void ->signatureDeclaration : SignatureDeclaration ->SignatureDeclaration : SignatureDeclaration ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags ->writer : SymbolWriter ->SymbolWriter : SymbolWriter - - isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; ->isSymbolAccessible : (symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags) => SymbolAccessiblityResult ->symbol : Symbol ->Symbol : Symbol ->enclosingDeclaration : Node ->Node : Node ->meaning : SymbolFlags ->SymbolFlags : SymbolFlags ->SymbolAccessiblityResult : SymbolAccessiblityResult - - isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; ->isEntityNameVisible : (entityName: Identifier | QualifiedName, enclosingDeclaration: Node) => SymbolVisibilityResult ->entityName : Identifier | QualifiedName ->EntityName : Identifier | QualifiedName ->enclosingDeclaration : Node ->Node : Node ->SymbolVisibilityResult : SymbolVisibilityResult - - getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number; ->getConstantValue : (node: PropertyAccessExpression | ElementAccessExpression) => number ->node : PropertyAccessExpression | ElementAccessExpression ->PropertyAccessExpression : PropertyAccessExpression ->ElementAccessExpression : ElementAccessExpression - - isEmitBlocked(sourceFile?: SourceFile): boolean; ->isEmitBlocked : (sourceFile?: SourceFile) => boolean ->sourceFile : SourceFile ->SourceFile : SourceFile - } - const enum SymbolFlags { ->SymbolFlags : SymbolFlags - - FunctionScopedVariable = 1, ->FunctionScopedVariable : SymbolFlags - - BlockScopedVariable = 2, ->BlockScopedVariable : SymbolFlags - - Property = 4, ->Property : SymbolFlags - - EnumMember = 8, ->EnumMember : SymbolFlags - - Function = 16, ->Function : SymbolFlags - - Class = 32, ->Class : SymbolFlags - - Interface = 64, ->Interface : SymbolFlags - - ConstEnum = 128, ->ConstEnum : SymbolFlags - - RegularEnum = 256, ->RegularEnum : SymbolFlags - - ValueModule = 512, ->ValueModule : SymbolFlags - - NamespaceModule = 1024, ->NamespaceModule : SymbolFlags - - TypeLiteral = 2048, ->TypeLiteral : SymbolFlags - - ObjectLiteral = 4096, ->ObjectLiteral : SymbolFlags - - Method = 8192, ->Method : SymbolFlags - - Constructor = 16384, ->Constructor : SymbolFlags - - GetAccessor = 32768, ->GetAccessor : SymbolFlags - - SetAccessor = 65536, ->SetAccessor : SymbolFlags - - CallSignature = 131072, ->CallSignature : SymbolFlags - - ConstructSignature = 262144, ->ConstructSignature : SymbolFlags - - IndexSignature = 524288, ->IndexSignature : SymbolFlags - - TypeParameter = 1048576, ->TypeParameter : SymbolFlags - - TypeAlias = 2097152, ->TypeAlias : SymbolFlags - - ExportValue = 4194304, ->ExportValue : SymbolFlags - - ExportType = 8388608, ->ExportType : SymbolFlags - - ExportNamespace = 16777216, ->ExportNamespace : SymbolFlags - - Import = 33554432, ->Import : SymbolFlags - - Instantiated = 67108864, ->Instantiated : SymbolFlags - - Merged = 134217728, ->Merged : SymbolFlags - - Transient = 268435456, ->Transient : SymbolFlags - - Prototype = 536870912, ->Prototype : SymbolFlags - - UnionProperty = 1073741824, ->UnionProperty : SymbolFlags - - Enum = 384, ->Enum : SymbolFlags - - Variable = 3, ->Variable : SymbolFlags - - Value = 107455, ->Value : SymbolFlags - - Type = 3152352, ->Type : SymbolFlags - - Namespace = 1536, ->Namespace : SymbolFlags - - Module = 1536, ->Module : SymbolFlags - - Accessor = 98304, ->Accessor : SymbolFlags - - Signature = 917504, ->Signature : SymbolFlags - - FunctionScopedVariableExcludes = 107454, ->FunctionScopedVariableExcludes : SymbolFlags - - BlockScopedVariableExcludes = 107455, ->BlockScopedVariableExcludes : SymbolFlags - - ParameterExcludes = 107455, ->ParameterExcludes : SymbolFlags - - PropertyExcludes = 107455, ->PropertyExcludes : SymbolFlags - - EnumMemberExcludes = 107455, ->EnumMemberExcludes : SymbolFlags - - FunctionExcludes = 106927, ->FunctionExcludes : SymbolFlags - - ClassExcludes = 3258879, ->ClassExcludes : SymbolFlags - - InterfaceExcludes = 3152288, ->InterfaceExcludes : SymbolFlags - - RegularEnumExcludes = 3258623, ->RegularEnumExcludes : SymbolFlags - - ConstEnumExcludes = 3259263, ->ConstEnumExcludes : SymbolFlags - - ValueModuleExcludes = 106639, ->ValueModuleExcludes : SymbolFlags - - NamespaceModuleExcludes = 0, ->NamespaceModuleExcludes : SymbolFlags - - MethodExcludes = 99263, ->MethodExcludes : SymbolFlags - - GetAccessorExcludes = 41919, ->GetAccessorExcludes : SymbolFlags - - SetAccessorExcludes = 74687, ->SetAccessorExcludes : SymbolFlags - - TypeParameterExcludes = 2103776, ->TypeParameterExcludes : SymbolFlags - - TypeAliasExcludes = 3152352, ->TypeAliasExcludes : SymbolFlags - - ImportExcludes = 33554432, ->ImportExcludes : SymbolFlags - - ModuleMember = 35653619, ->ModuleMember : SymbolFlags - - ExportHasLocal = 944, ->ExportHasLocal : SymbolFlags - - HasLocals = 1041936, ->HasLocals : SymbolFlags - - HasExports = 1952, ->HasExports : SymbolFlags - - HasMembers = 6240, ->HasMembers : SymbolFlags - - IsContainer = 1048560, ->IsContainer : SymbolFlags - - PropertyOrAccessor = 98308, ->PropertyOrAccessor : SymbolFlags - - Export = 29360128, ->Export : SymbolFlags - } - interface Symbol { ->Symbol : Symbol - - flags: SymbolFlags; ->flags : SymbolFlags ->SymbolFlags : SymbolFlags - - name: string; ->name : string - - id?: number; ->id : number - - mergeId?: number; ->mergeId : number - - declarations?: Declaration[]; ->declarations : Declaration[] ->Declaration : Declaration - - parent?: Symbol; ->parent : Symbol ->Symbol : Symbol - - members?: SymbolTable; ->members : SymbolTable ->SymbolTable : SymbolTable - - exports?: SymbolTable; ->exports : SymbolTable ->SymbolTable : SymbolTable - - exportSymbol?: Symbol; ->exportSymbol : Symbol ->Symbol : Symbol - - valueDeclaration?: Declaration; ->valueDeclaration : Declaration ->Declaration : Declaration - - constEnumOnlyModule?: boolean; ->constEnumOnlyModule : boolean - } - interface SymbolLinks { ->SymbolLinks : SymbolLinks - - target?: Symbol; ->target : Symbol ->Symbol : Symbol - - type?: Type; ->type : Type ->Type : Type - - declaredType?: Type; ->declaredType : Type ->Type : Type - - mapper?: TypeMapper; ->mapper : TypeMapper ->TypeMapper : TypeMapper - - referenced?: boolean; ->referenced : boolean - - exportAssignSymbol?: Symbol; ->exportAssignSymbol : Symbol ->Symbol : Symbol - - unionType?: UnionType; ->unionType : UnionType ->UnionType : UnionType - } - interface TransientSymbol extends Symbol, SymbolLinks { ->TransientSymbol : TransientSymbol ->Symbol : Symbol ->SymbolLinks : SymbolLinks - } - interface SymbolTable { ->SymbolTable : SymbolTable - - [index: string]: Symbol; ->index : string ->Symbol : Symbol - } - const enum NodeCheckFlags { ->NodeCheckFlags : NodeCheckFlags - - TypeChecked = 1, ->TypeChecked : NodeCheckFlags - - LexicalThis = 2, ->LexicalThis : NodeCheckFlags - - CaptureThis = 4, ->CaptureThis : NodeCheckFlags - - EmitExtends = 8, ->EmitExtends : NodeCheckFlags - - SuperInstance = 16, ->SuperInstance : NodeCheckFlags - - SuperStatic = 32, ->SuperStatic : NodeCheckFlags - - ContextChecked = 64, ->ContextChecked : NodeCheckFlags - - EnumValuesComputed = 128, ->EnumValuesComputed : NodeCheckFlags - } - interface NodeLinks { ->NodeLinks : NodeLinks - - resolvedType?: Type; ->resolvedType : Type ->Type : Type - - resolvedSignature?: Signature; ->resolvedSignature : Signature ->Signature : Signature - - resolvedSymbol?: Symbol; ->resolvedSymbol : Symbol ->Symbol : Symbol - - flags?: NodeCheckFlags; ->flags : NodeCheckFlags ->NodeCheckFlags : NodeCheckFlags - - enumMemberValue?: number; ->enumMemberValue : number - - isIllegalTypeReferenceInConstraint?: boolean; ->isIllegalTypeReferenceInConstraint : boolean - - isVisible?: boolean; ->isVisible : boolean - - localModuleName?: string; ->localModuleName : string - - assignmentChecks?: Map; ->assignmentChecks : Map ->Map : Map - } - const enum TypeFlags { ->TypeFlags : TypeFlags - - Any = 1, ->Any : TypeFlags - - String = 2, ->String : TypeFlags - - Number = 4, ->Number : TypeFlags - - Boolean = 8, ->Boolean : TypeFlags - - Void = 16, ->Void : TypeFlags - - Undefined = 32, ->Undefined : TypeFlags - - Null = 64, ->Null : TypeFlags - - Enum = 128, ->Enum : TypeFlags - - StringLiteral = 256, ->StringLiteral : TypeFlags - - TypeParameter = 512, ->TypeParameter : TypeFlags - - Class = 1024, ->Class : TypeFlags - - Interface = 2048, ->Interface : TypeFlags - - Reference = 4096, ->Reference : TypeFlags - - Tuple = 8192, ->Tuple : TypeFlags - - Union = 16384, ->Union : TypeFlags - - Anonymous = 32768, ->Anonymous : TypeFlags - - FromSignature = 65536, ->FromSignature : TypeFlags - - Intrinsic = 127, ->Intrinsic : TypeFlags - - StringLike = 258, ->StringLike : TypeFlags - - NumberLike = 132, ->NumberLike : TypeFlags - - ObjectType = 48128, ->ObjectType : TypeFlags - } - interface Type { ->Type : Type - - flags: TypeFlags; ->flags : TypeFlags ->TypeFlags : TypeFlags - - id: number; ->id : number - - symbol?: Symbol; ->symbol : Symbol ->Symbol : Symbol - } - interface IntrinsicType extends Type { ->IntrinsicType : IntrinsicType ->Type : Type - - intrinsicName: string; ->intrinsicName : string - } - interface StringLiteralType extends Type { ->StringLiteralType : StringLiteralType ->Type : Type - - text: string; ->text : string - } - interface ObjectType extends Type { ->ObjectType : ObjectType ->Type : Type - } - interface InterfaceType extends ObjectType { ->InterfaceType : InterfaceType ->ObjectType : ObjectType - - typeParameters: TypeParameter[]; ->typeParameters : TypeParameter[] ->TypeParameter : TypeParameter - - baseTypes: ObjectType[]; ->baseTypes : ObjectType[] ->ObjectType : ObjectType - - declaredProperties: Symbol[]; ->declaredProperties : Symbol[] ->Symbol : Symbol - - declaredCallSignatures: Signature[]; ->declaredCallSignatures : Signature[] ->Signature : Signature - - declaredConstructSignatures: Signature[]; ->declaredConstructSignatures : Signature[] ->Signature : Signature - - declaredStringIndexType: Type; ->declaredStringIndexType : Type ->Type : Type - - declaredNumberIndexType: Type; ->declaredNumberIndexType : Type ->Type : Type - } - interface TypeReference extends ObjectType { ->TypeReference : TypeReference ->ObjectType : ObjectType - - target: GenericType; ->target : GenericType ->GenericType : GenericType - - typeArguments: Type[]; ->typeArguments : Type[] ->Type : Type - } - interface GenericType extends InterfaceType, TypeReference { ->GenericType : GenericType ->InterfaceType : InterfaceType ->TypeReference : TypeReference - - instantiations: Map; ->instantiations : Map ->Map : Map ->TypeReference : TypeReference - - openReferenceTargets: GenericType[]; ->openReferenceTargets : GenericType[] ->GenericType : GenericType - - openReferenceChecks: Map; ->openReferenceChecks : Map ->Map : Map - } - interface TupleType extends ObjectType { ->TupleType : TupleType ->ObjectType : ObjectType - - elementTypes: Type[]; ->elementTypes : Type[] ->Type : Type - - baseArrayType: TypeReference; ->baseArrayType : TypeReference ->TypeReference : TypeReference - } - interface UnionType extends Type { ->UnionType : UnionType ->Type : Type - - types: Type[]; ->types : Type[] ->Type : Type - - resolvedProperties: SymbolTable; ->resolvedProperties : SymbolTable ->SymbolTable : SymbolTable - } - interface ResolvedType extends ObjectType, UnionType { ->ResolvedType : ResolvedType ->ObjectType : ObjectType ->UnionType : UnionType - - members: SymbolTable; ->members : SymbolTable ->SymbolTable : SymbolTable - - properties: Symbol[]; ->properties : Symbol[] ->Symbol : Symbol - - callSignatures: Signature[]; ->callSignatures : Signature[] ->Signature : Signature - - constructSignatures: Signature[]; ->constructSignatures : Signature[] ->Signature : Signature - - stringIndexType: Type; ->stringIndexType : Type ->Type : Type - - numberIndexType: Type; ->numberIndexType : Type ->Type : Type - } - interface TypeParameter extends Type { ->TypeParameter : TypeParameter ->Type : Type - - constraint: Type; ->constraint : Type ->Type : Type - - target?: TypeParameter; ->target : TypeParameter ->TypeParameter : TypeParameter - - mapper?: TypeMapper; ->mapper : TypeMapper ->TypeMapper : TypeMapper - } - const enum SignatureKind { ->SignatureKind : SignatureKind - - Call = 0, ->Call : SignatureKind - - Construct = 1, ->Construct : SignatureKind - } - interface Signature { ->Signature : Signature - - declaration: SignatureDeclaration; ->declaration : SignatureDeclaration ->SignatureDeclaration : SignatureDeclaration - - typeParameters: TypeParameter[]; ->typeParameters : TypeParameter[] ->TypeParameter : TypeParameter - - parameters: Symbol[]; ->parameters : Symbol[] ->Symbol : Symbol - - resolvedReturnType: Type; ->resolvedReturnType : Type ->Type : Type - - minArgumentCount: number; ->minArgumentCount : number - - hasRestParameter: boolean; ->hasRestParameter : boolean - - hasStringLiterals: boolean; ->hasStringLiterals : boolean - - target?: Signature; ->target : Signature ->Signature : Signature - - mapper?: TypeMapper; ->mapper : TypeMapper ->TypeMapper : TypeMapper - - unionSignatures?: Signature[]; ->unionSignatures : Signature[] ->Signature : Signature - - erasedSignatureCache?: Signature; ->erasedSignatureCache : Signature ->Signature : Signature - - isolatedSignatureType?: ObjectType; ->isolatedSignatureType : ObjectType ->ObjectType : ObjectType - } - const enum IndexKind { ->IndexKind : IndexKind - - String = 0, ->String : IndexKind - - Number = 1, ->Number : IndexKind - } - interface TypeMapper { ->TypeMapper : TypeMapper - - (t: Type): Type; ->t : Type ->Type : Type ->Type : Type - } - interface TypeInferences { ->TypeInferences : TypeInferences - - primary: Type[]; ->primary : Type[] ->Type : Type - - secondary: Type[]; ->secondary : Type[] ->Type : Type - } - interface InferenceContext { ->InferenceContext : InferenceContext - - typeParameters: TypeParameter[]; ->typeParameters : TypeParameter[] ->TypeParameter : TypeParameter - - inferUnionTypes: boolean; ->inferUnionTypes : boolean - - inferences: TypeInferences[]; ->inferences : TypeInferences[] ->TypeInferences : TypeInferences - - inferredTypes: Type[]; ->inferredTypes : Type[] ->Type : Type - - failedTypeParameterIndex?: number; ->failedTypeParameterIndex : number - } - interface DiagnosticMessage { ->DiagnosticMessage : DiagnosticMessage - - key: string; ->key : string - - category: DiagnosticCategory; ->category : DiagnosticCategory ->DiagnosticCategory : DiagnosticCategory - - code: number; ->code : number - - isEarly?: boolean; ->isEarly : boolean - } - interface DiagnosticMessageChain { ->DiagnosticMessageChain : DiagnosticMessageChain - - messageText: string; ->messageText : string - - category: DiagnosticCategory; ->category : DiagnosticCategory ->DiagnosticCategory : DiagnosticCategory - - code: number; ->code : number - - next?: DiagnosticMessageChain; ->next : DiagnosticMessageChain ->DiagnosticMessageChain : DiagnosticMessageChain - } - interface Diagnostic { ->Diagnostic : Diagnostic - - file: SourceFile; ->file : SourceFile ->SourceFile : SourceFile - - start: number; ->start : number - - length: number; ->length : number - - messageText: string; ->messageText : string - - category: DiagnosticCategory; ->category : DiagnosticCategory ->DiagnosticCategory : DiagnosticCategory - - code: number; ->code : number - - /** - * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit - */ - isEarly?: boolean; ->isEarly : boolean - } - enum DiagnosticCategory { ->DiagnosticCategory : DiagnosticCategory - - Warning = 0, ->Warning : DiagnosticCategory - - Error = 1, ->Error : DiagnosticCategory - - Message = 2, ->Message : DiagnosticCategory - } - interface CompilerOptions { ->CompilerOptions : CompilerOptions - - allowNonTsExtensions?: boolean; ->allowNonTsExtensions : boolean - - charset?: string; ->charset : string - - codepage?: number; ->codepage : number - - declaration?: boolean; ->declaration : boolean - - diagnostics?: boolean; ->diagnostics : boolean - - emitBOM?: boolean; ->emitBOM : boolean - - help?: boolean; ->help : boolean - - locale?: string; ->locale : string - - mapRoot?: string; ->mapRoot : string - - module?: ModuleKind; ->module : ModuleKind ->ModuleKind : ModuleKind - - noEmitOnError?: boolean; ->noEmitOnError : boolean - - noErrorTruncation?: boolean; ->noErrorTruncation : boolean - - noImplicitAny?: boolean; ->noImplicitAny : boolean - - noLib?: boolean; ->noLib : boolean - - noLibCheck?: boolean; ->noLibCheck : boolean - - noResolve?: boolean; ->noResolve : boolean - - out?: string; ->out : string - - outDir?: string; ->outDir : string - - preserveConstEnums?: boolean; ->preserveConstEnums : boolean - - removeComments?: boolean; ->removeComments : boolean - - sourceMap?: boolean; ->sourceMap : boolean - - sourceRoot?: string; ->sourceRoot : string - - suppressImplicitAnyIndexErrors?: boolean; ->suppressImplicitAnyIndexErrors : boolean - - target?: ScriptTarget; ->target : ScriptTarget ->ScriptTarget : ScriptTarget - - version?: boolean; ->version : boolean - - watch?: boolean; ->watch : boolean - - [option: string]: string | number | boolean; ->option : string - } - const enum ModuleKind { ->ModuleKind : ModuleKind - - None = 0, ->None : ModuleKind - - CommonJS = 1, ->CommonJS : ModuleKind - - AMD = 2, ->AMD : ModuleKind - } - interface LineAndCharacter { ->LineAndCharacter : LineAndCharacter - - line: number; ->line : number - - character: number; ->character : number - } - const enum ScriptTarget { ->ScriptTarget : ScriptTarget - - ES3 = 0, ->ES3 : ScriptTarget - - ES5 = 1, ->ES5 : ScriptTarget - - ES6 = 2, ->ES6 : ScriptTarget - - Latest = 2, ->Latest : ScriptTarget - } - interface ParsedCommandLine { ->ParsedCommandLine : ParsedCommandLine - - options: CompilerOptions; ->options : CompilerOptions ->CompilerOptions : CompilerOptions - - filenames: string[]; ->filenames : string[] - - errors: Diagnostic[]; ->errors : Diagnostic[] ->Diagnostic : Diagnostic - } - interface CommandLineOption { ->CommandLineOption : CommandLineOption - - name: string; ->name : string - - type: string | Map; ->type : string | Map ->Map : Map - - shortName?: string; ->shortName : string - - description?: DiagnosticMessage; ->description : DiagnosticMessage ->DiagnosticMessage : DiagnosticMessage - - paramType?: DiagnosticMessage; ->paramType : DiagnosticMessage ->DiagnosticMessage : DiagnosticMessage - - error?: DiagnosticMessage; ->error : DiagnosticMessage ->DiagnosticMessage : DiagnosticMessage - } - const enum CharacterCodes { ->CharacterCodes : CharacterCodes - - nullCharacter = 0, ->nullCharacter : CharacterCodes - - maxAsciiCharacter = 127, ->maxAsciiCharacter : CharacterCodes - - lineFeed = 10, ->lineFeed : CharacterCodes - - carriageReturn = 13, ->carriageReturn : CharacterCodes - - lineSeparator = 8232, ->lineSeparator : CharacterCodes - - paragraphSeparator = 8233, ->paragraphSeparator : CharacterCodes - - nextLine = 133, ->nextLine : CharacterCodes - - space = 32, ->space : CharacterCodes - - nonBreakingSpace = 160, ->nonBreakingSpace : CharacterCodes - - enQuad = 8192, ->enQuad : CharacterCodes - - emQuad = 8193, ->emQuad : CharacterCodes - - enSpace = 8194, ->enSpace : CharacterCodes - - emSpace = 8195, ->emSpace : CharacterCodes - - threePerEmSpace = 8196, ->threePerEmSpace : CharacterCodes - - fourPerEmSpace = 8197, ->fourPerEmSpace : CharacterCodes - - sixPerEmSpace = 8198, ->sixPerEmSpace : CharacterCodes - - figureSpace = 8199, ->figureSpace : CharacterCodes - - punctuationSpace = 8200, ->punctuationSpace : CharacterCodes - - thinSpace = 8201, ->thinSpace : CharacterCodes - - hairSpace = 8202, ->hairSpace : CharacterCodes - - zeroWidthSpace = 8203, ->zeroWidthSpace : CharacterCodes - - narrowNoBreakSpace = 8239, ->narrowNoBreakSpace : CharacterCodes - - ideographicSpace = 12288, ->ideographicSpace : CharacterCodes - - mathematicalSpace = 8287, ->mathematicalSpace : CharacterCodes - - ogham = 5760, ->ogham : CharacterCodes - - _ = 95, ->_ : CharacterCodes - - $ = 36, ->$ : CharacterCodes - - _0 = 48, ->_0 : CharacterCodes - - _1 = 49, ->_1 : CharacterCodes - - _2 = 50, ->_2 : CharacterCodes - - _3 = 51, ->_3 : CharacterCodes - - _4 = 52, ->_4 : CharacterCodes - - _5 = 53, ->_5 : CharacterCodes - - _6 = 54, ->_6 : CharacterCodes - - _7 = 55, ->_7 : CharacterCodes - - _8 = 56, ->_8 : CharacterCodes - - _9 = 57, ->_9 : CharacterCodes - - a = 97, ->a : CharacterCodes - - b = 98, ->b : CharacterCodes - - c = 99, ->c : CharacterCodes - - d = 100, ->d : CharacterCodes - - e = 101, ->e : CharacterCodes - - f = 102, ->f : CharacterCodes - - g = 103, ->g : CharacterCodes - - h = 104, ->h : CharacterCodes - - i = 105, ->i : CharacterCodes - - j = 106, ->j : CharacterCodes - - k = 107, ->k : CharacterCodes - - l = 108, ->l : CharacterCodes - - m = 109, ->m : CharacterCodes - - n = 110, ->n : CharacterCodes - - o = 111, ->o : CharacterCodes - - p = 112, ->p : CharacterCodes - - q = 113, ->q : CharacterCodes - - r = 114, ->r : CharacterCodes - - s = 115, ->s : CharacterCodes - - t = 116, ->t : CharacterCodes - - u = 117, ->u : CharacterCodes - - v = 118, ->v : CharacterCodes - - w = 119, ->w : CharacterCodes - - x = 120, ->x : CharacterCodes - - y = 121, ->y : CharacterCodes - - z = 122, ->z : CharacterCodes - - A = 65, ->A : CharacterCodes - - B = 66, ->B : CharacterCodes - - C = 67, ->C : CharacterCodes - - D = 68, ->D : CharacterCodes - - E = 69, ->E : CharacterCodes - - F = 70, ->F : CharacterCodes - - G = 71, ->G : CharacterCodes - - H = 72, ->H : CharacterCodes - - I = 73, ->I : CharacterCodes - - J = 74, ->J : CharacterCodes - - K = 75, ->K : CharacterCodes - - L = 76, ->L : CharacterCodes - - M = 77, ->M : CharacterCodes - - N = 78, ->N : CharacterCodes - - O = 79, ->O : CharacterCodes - - P = 80, ->P : CharacterCodes - - Q = 81, ->Q : CharacterCodes - - R = 82, ->R : CharacterCodes - - S = 83, ->S : CharacterCodes - - T = 84, ->T : CharacterCodes - - U = 85, ->U : CharacterCodes - - V = 86, ->V : CharacterCodes - - W = 87, ->W : CharacterCodes - - X = 88, ->X : CharacterCodes - - Y = 89, ->Y : CharacterCodes - - Z = 90, ->Z : CharacterCodes - - ampersand = 38, ->ampersand : CharacterCodes - - asterisk = 42, ->asterisk : CharacterCodes - - at = 64, ->at : CharacterCodes - - backslash = 92, ->backslash : CharacterCodes - - backtick = 96, ->backtick : CharacterCodes - - bar = 124, ->bar : CharacterCodes - - caret = 94, ->caret : CharacterCodes - - closeBrace = 125, ->closeBrace : CharacterCodes - - closeBracket = 93, ->closeBracket : CharacterCodes - - closeParen = 41, ->closeParen : CharacterCodes - - colon = 58, ->colon : CharacterCodes - - comma = 44, ->comma : CharacterCodes - - dot = 46, ->dot : CharacterCodes - - doubleQuote = 34, ->doubleQuote : CharacterCodes - - equals = 61, ->equals : CharacterCodes - - exclamation = 33, ->exclamation : CharacterCodes - - greaterThan = 62, ->greaterThan : CharacterCodes - - lessThan = 60, ->lessThan : CharacterCodes - - minus = 45, ->minus : CharacterCodes - - openBrace = 123, ->openBrace : CharacterCodes - - openBracket = 91, ->openBracket : CharacterCodes - - openParen = 40, ->openParen : CharacterCodes - - percent = 37, ->percent : CharacterCodes - - plus = 43, ->plus : CharacterCodes - - question = 63, ->question : CharacterCodes - - semicolon = 59, ->semicolon : CharacterCodes - - singleQuote = 39, ->singleQuote : CharacterCodes - - slash = 47, ->slash : CharacterCodes - - tilde = 126, ->tilde : CharacterCodes - - backspace = 8, ->backspace : CharacterCodes - - formFeed = 12, ->formFeed : CharacterCodes - - byteOrderMark = 65279, ->byteOrderMark : CharacterCodes - - tab = 9, ->tab : CharacterCodes - - verticalTab = 11, ->verticalTab : CharacterCodes - } - interface CancellationToken { ->CancellationToken : CancellationToken - - isCancellationRequested(): boolean; ->isCancellationRequested : () => boolean - } - interface CompilerHost { ->CompilerHost : CompilerHost - - getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; ->getSourceFile : (filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void) => SourceFile ->filename : string ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget ->onError : (message: string) => void ->message : string ->SourceFile : SourceFile - - getDefaultLibFilename(options: CompilerOptions): string; ->getDefaultLibFilename : (options: CompilerOptions) => string ->options : CompilerOptions ->CompilerOptions : CompilerOptions - - getCancellationToken?(): CancellationToken; ->getCancellationToken : () => CancellationToken ->CancellationToken : CancellationToken - - writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; ->writeFile : (filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void) => void ->filename : string ->data : string ->writeByteOrderMark : boolean ->onError : (message: string) => void ->message : string - - getCurrentDirectory(): string; ->getCurrentDirectory : () => string - - getCanonicalFileName(fileName: string): string; ->getCanonicalFileName : (fileName: string) => string ->fileName : string - - useCaseSensitiveFileNames(): boolean; ->useCaseSensitiveFileNames : () => boolean - - getNewLine(): string; ->getNewLine : () => string - } -} -declare module "typescript" { - interface ErrorCallback { ->ErrorCallback : ErrorCallback - - (message: DiagnosticMessage): void; ->message : DiagnosticMessage ->DiagnosticMessage : DiagnosticMessage - } - interface CommentCallback { ->CommentCallback : CommentCallback - - (pos: number, end: number): void; ->pos : number ->end : number - } - interface Scanner { ->Scanner : Scanner - - getStartPos(): number; ->getStartPos : () => number - - getToken(): SyntaxKind; ->getToken : () => SyntaxKind ->SyntaxKind : SyntaxKind - - getTextPos(): number; ->getTextPos : () => number - - getTokenPos(): number; ->getTokenPos : () => number - - getTokenText(): string; ->getTokenText : () => string - - getTokenValue(): string; ->getTokenValue : () => string - - hasPrecedingLineBreak(): boolean; ->hasPrecedingLineBreak : () => boolean - - isIdentifier(): boolean; ->isIdentifier : () => boolean - - isReservedWord(): boolean; ->isReservedWord : () => boolean - - isUnterminated(): boolean; ->isUnterminated : () => boolean - - reScanGreaterToken(): SyntaxKind; ->reScanGreaterToken : () => SyntaxKind ->SyntaxKind : SyntaxKind - - reScanSlashToken(): SyntaxKind; ->reScanSlashToken : () => SyntaxKind ->SyntaxKind : SyntaxKind - - reScanTemplateToken(): SyntaxKind; ->reScanTemplateToken : () => SyntaxKind ->SyntaxKind : SyntaxKind - - scan(): SyntaxKind; ->scan : () => SyntaxKind ->SyntaxKind : SyntaxKind - - setText(text: string): void; ->setText : (text: string) => void ->text : string - - setTextPos(textPos: number): void; ->setTextPos : (textPos: number) => void ->textPos : number - - lookAhead(callback: () => T): T; ->lookAhead : (callback: () => T) => T ->T : T ->callback : () => T ->T : T ->T : T - - tryScan(callback: () => T): T; ->tryScan : (callback: () => T) => T ->T : T ->callback : () => T ->T : T ->T : T - } - function tokenToString(t: SyntaxKind): string; ->tokenToString : (t: SyntaxKind) => string ->t : SyntaxKind ->SyntaxKind : SyntaxKind - - function computeLineStarts(text: string): number[]; ->computeLineStarts : (text: string) => number[] ->text : string - - function getPositionFromLineAndCharacter(lineStarts: number[], line: number, character: number): number; ->getPositionFromLineAndCharacter : (lineStarts: number[], line: number, character: number) => number ->lineStarts : number[] ->line : number ->character : number - - function getLineAndCharacterOfPosition(lineStarts: number[], position: number): { ->getLineAndCharacterOfPosition : (lineStarts: number[], position: number) => { line: number; character: number; } ->lineStarts : number[] ->position : number - - line: number; ->line : number - - character: number; ->character : number - - }; - function positionToLineAndCharacter(text: string, pos: number): { ->positionToLineAndCharacter : (text: string, pos: number) => { line: number; character: number; } ->text : string ->pos : number - - line: number; ->line : number - - character: number; ->character : number - - }; - function isWhiteSpace(ch: number): boolean; ->isWhiteSpace : (ch: number) => boolean ->ch : number - - function isLineBreak(ch: number): boolean; ->isLineBreak : (ch: number) => boolean ->ch : number - - function isOctalDigit(ch: number): boolean; ->isOctalDigit : (ch: number) => boolean ->ch : number - - function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean): number; ->skipTrivia : (text: string, pos: number, stopAfterLineBreak?: boolean) => number ->text : string ->pos : number ->stopAfterLineBreak : boolean - - function getLeadingCommentRanges(text: string, pos: number): CommentRange[]; ->getLeadingCommentRanges : (text: string, pos: number) => CommentRange[] ->text : string ->pos : number ->CommentRange : CommentRange - - function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; ->getTrailingCommentRanges : (text: string, pos: number) => CommentRange[] ->text : string ->pos : number ->CommentRange : CommentRange - - function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; ->isIdentifierStart : (ch: number, languageVersion: ScriptTarget) => boolean ->ch : number ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget - - function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; ->isIdentifierPart : (ch: number, languageVersion: ScriptTarget) => boolean ->ch : number ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget - - function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner; ->createScanner : (languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback) => Scanner ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget ->skipTrivia : boolean ->text : string ->onError : ErrorCallback ->ErrorCallback : ErrorCallback ->Scanner : Scanner -} -declare module "typescript" { - function getNodeConstructor(kind: SyntaxKind): new () => Node; ->getNodeConstructor : (kind: SyntaxKind) => new () => Node ->kind : SyntaxKind ->SyntaxKind : SyntaxKind ->Node : Node - - function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; ->forEachChild : (node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T) => T ->T : T ->node : Node ->Node : Node ->cbNode : (node: Node) => T ->node : Node ->Node : Node ->T : T ->cbNodes : (nodes: Node[]) => T ->nodes : Node[] ->Node : Node ->T : T ->T : T - - function createCompilerHost(options: CompilerOptions): CompilerHost; ->createCompilerHost : (options: CompilerOptions) => CompilerHost ->options : CompilerOptions ->CompilerOptions : CompilerOptions ->CompilerHost : CompilerHost - - function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; ->createSourceFile : (filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean) => SourceFile ->filename : string ->sourceText : string ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget ->version : string ->isOpen : boolean ->SourceFile : SourceFile - - function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; ->createProgram : (rootNames: string[], options: CompilerOptions, host: CompilerHost) => Program ->rootNames : string[] ->options : CompilerOptions ->CompilerOptions : CompilerOptions ->host : CompilerHost ->CompilerHost : CompilerHost ->Program : Program -} -declare module "typescript" { - function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; ->createTypeChecker : (program: Program, fullTypeCheck: boolean) => TypeChecker ->program : Program ->Program : Program ->fullTypeCheck : boolean ->TypeChecker : TypeChecker -} -declare module "typescript" { - var servicesVersion: string; ->servicesVersion : string - - interface Node { ->Node : Node - - getSourceFile(): SourceFile; ->getSourceFile : () => SourceFile ->SourceFile : SourceFile - - getChildCount(sourceFile?: SourceFile): number; ->getChildCount : (sourceFile?: SourceFile) => number ->sourceFile : SourceFile ->SourceFile : SourceFile - - getChildAt(index: number, sourceFile?: SourceFile): Node; ->getChildAt : (index: number, sourceFile?: SourceFile) => Node ->index : number ->sourceFile : SourceFile ->SourceFile : SourceFile ->Node : Node - - getChildren(sourceFile?: SourceFile): Node[]; ->getChildren : (sourceFile?: SourceFile) => Node[] ->sourceFile : SourceFile ->SourceFile : SourceFile ->Node : Node - - getStart(sourceFile?: SourceFile): number; ->getStart : (sourceFile?: SourceFile) => number ->sourceFile : SourceFile ->SourceFile : SourceFile - - getFullStart(): number; ->getFullStart : () => number - - getEnd(): number; ->getEnd : () => number - - getWidth(sourceFile?: SourceFile): number; ->getWidth : (sourceFile?: SourceFile) => number ->sourceFile : SourceFile ->SourceFile : SourceFile - - getFullWidth(): number; ->getFullWidth : () => number - - getLeadingTriviaWidth(sourceFile?: SourceFile): number; ->getLeadingTriviaWidth : (sourceFile?: SourceFile) => number ->sourceFile : SourceFile ->SourceFile : SourceFile - - getFullText(sourceFile?: SourceFile): string; ->getFullText : (sourceFile?: SourceFile) => string ->sourceFile : SourceFile ->SourceFile : SourceFile - - getText(sourceFile?: SourceFile): string; ->getText : (sourceFile?: SourceFile) => string ->sourceFile : SourceFile ->SourceFile : SourceFile - - getFirstToken(sourceFile?: SourceFile): Node; ->getFirstToken : (sourceFile?: SourceFile) => Node ->sourceFile : SourceFile ->SourceFile : SourceFile ->Node : Node - - getLastToken(sourceFile?: SourceFile): Node; ->getLastToken : (sourceFile?: SourceFile) => Node ->sourceFile : SourceFile ->SourceFile : SourceFile ->Node : Node - } - interface Symbol { ->Symbol : Symbol - - getFlags(): SymbolFlags; ->getFlags : () => SymbolFlags ->SymbolFlags : SymbolFlags - - getName(): string; ->getName : () => string - - getDeclarations(): Declaration[]; ->getDeclarations : () => Declaration[] ->Declaration : Declaration - - getDocumentationComment(): SymbolDisplayPart[]; ->getDocumentationComment : () => SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - interface Type { ->Type : Type - - getFlags(): TypeFlags; ->getFlags : () => TypeFlags ->TypeFlags : TypeFlags - - getSymbol(): Symbol; ->getSymbol : () => Symbol ->Symbol : Symbol - - getProperties(): Symbol[]; ->getProperties : () => Symbol[] ->Symbol : Symbol - - getProperty(propertyName: string): Symbol; ->getProperty : (propertyName: string) => Symbol ->propertyName : string ->Symbol : Symbol - - getApparentProperties(): Symbol[]; ->getApparentProperties : () => Symbol[] ->Symbol : Symbol - - getCallSignatures(): Signature[]; ->getCallSignatures : () => Signature[] ->Signature : Signature - - getConstructSignatures(): Signature[]; ->getConstructSignatures : () => Signature[] ->Signature : Signature - - getStringIndexType(): Type; ->getStringIndexType : () => Type ->Type : Type - - getNumberIndexType(): Type; ->getNumberIndexType : () => Type ->Type : Type - } - interface Signature { ->Signature : Signature - - getDeclaration(): SignatureDeclaration; ->getDeclaration : () => SignatureDeclaration ->SignatureDeclaration : SignatureDeclaration - - getTypeParameters(): Type[]; ->getTypeParameters : () => Type[] ->Type : Type - - getParameters(): Symbol[]; ->getParameters : () => Symbol[] ->Symbol : Symbol - - getReturnType(): Type; ->getReturnType : () => Type ->Type : Type - - getDocumentationComment(): SymbolDisplayPart[]; ->getDocumentationComment : () => SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - interface SourceFile { ->SourceFile : SourceFile - - getScriptSnapshot(): IScriptSnapshot; ->getScriptSnapshot : () => IScriptSnapshot ->IScriptSnapshot : IScriptSnapshot - - getNamedDeclarations(): Declaration[]; ->getNamedDeclarations : () => Declaration[] ->Declaration : Declaration - - update(scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; ->update : (scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange) => SourceFile ->scriptSnapshot : IScriptSnapshot ->IScriptSnapshot : IScriptSnapshot ->version : string ->isOpen : boolean ->textChangeRange : TextChangeRange ->TextChangeRange : TextChangeRange ->SourceFile : SourceFile - } - /** - * Represents an immutable snapshot of a script at a specified time.Once acquired, the - * snapshot is observably immutable. i.e. the same calls with the same parameters will return - * the same values. - */ - interface IScriptSnapshot { ->IScriptSnapshot : IScriptSnapshot - - /** Gets a portion of the script snapshot specified by [start, end). */ - getText(start: number, end: number): string; ->getText : (start: number, end: number) => string ->start : number ->end : number - - /** Gets the length of this script snapshot. */ - getLength(): number; ->getLength : () => number - - /** - * This call returns the array containing the start position of every line. - * i.e."[0, 10, 55]". TODO: consider making this optional. The language service could - * always determine this (albeit in a more expensive manner). - */ - getLineStartPositions(): number[]; ->getLineStartPositions : () => number[] - - /** - * Gets the TextChangeRange that describe how the text changed between this text and - * an older version. This information is used by the incremental parser to determine - * what sections of the script need to be re-parsed. 'undefined' can be returned if the - * change range cannot be determined. However, in that case, incremental parsing will - * not happen and the entire document will be re - parsed. - */ - getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; ->getChangeRange : (oldSnapshot: IScriptSnapshot) => TextChangeRange ->oldSnapshot : IScriptSnapshot ->IScriptSnapshot : IScriptSnapshot ->TextChangeRange : TextChangeRange - } - module ScriptSnapshot { ->ScriptSnapshot : typeof ScriptSnapshot - - function fromString(text: string): IScriptSnapshot; ->fromString : (text: string) => IScriptSnapshot ->text : string ->IScriptSnapshot : IScriptSnapshot - } - interface PreProcessedFileInfo { ->PreProcessedFileInfo : PreProcessedFileInfo - - referencedFiles: FileReference[]; ->referencedFiles : FileReference[] ->FileReference : FileReference - - importedFiles: FileReference[]; ->importedFiles : FileReference[] ->FileReference : FileReference - - isLibFile: boolean; ->isLibFile : boolean - } - interface Logger { ->Logger : Logger - - log(s: string): void; ->log : (s: string) => void ->s : string - } - interface LanguageServiceHost extends Logger { ->LanguageServiceHost : LanguageServiceHost ->Logger : Logger - - getCompilationSettings(): CompilerOptions; ->getCompilationSettings : () => CompilerOptions ->CompilerOptions : CompilerOptions - - getScriptFileNames(): string[]; ->getScriptFileNames : () => string[] - - getScriptVersion(fileName: string): string; ->getScriptVersion : (fileName: string) => string ->fileName : string - - getScriptIsOpen(fileName: string): boolean; ->getScriptIsOpen : (fileName: string) => boolean ->fileName : string - - getScriptSnapshot(fileName: string): IScriptSnapshot; ->getScriptSnapshot : (fileName: string) => IScriptSnapshot ->fileName : string ->IScriptSnapshot : IScriptSnapshot - - getLocalizedDiagnosticMessages?(): any; ->getLocalizedDiagnosticMessages : () => any - - getCancellationToken?(): CancellationToken; ->getCancellationToken : () => CancellationToken ->CancellationToken : CancellationToken - - getCurrentDirectory(): string; ->getCurrentDirectory : () => string - - getDefaultLibFilename(options: CompilerOptions): string; ->getDefaultLibFilename : (options: CompilerOptions) => string ->options : CompilerOptions ->CompilerOptions : CompilerOptions - } - interface LanguageService { ->LanguageService : LanguageService - - cleanupSemanticCache(): void; ->cleanupSemanticCache : () => void - - getSyntacticDiagnostics(fileName: string): Diagnostic[]; ->getSyntacticDiagnostics : (fileName: string) => Diagnostic[] ->fileName : string ->Diagnostic : Diagnostic - - getSemanticDiagnostics(fileName: string): Diagnostic[]; ->getSemanticDiagnostics : (fileName: string) => Diagnostic[] ->fileName : string ->Diagnostic : Diagnostic - - getCompilerOptionsDiagnostics(): Diagnostic[]; ->getCompilerOptionsDiagnostics : () => Diagnostic[] ->Diagnostic : Diagnostic - - getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; ->getSyntacticClassifications : (fileName: string, span: TextSpan) => ClassifiedSpan[] ->fileName : string ->span : TextSpan ->TextSpan : TextSpan ->ClassifiedSpan : ClassifiedSpan - - getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; ->getSemanticClassifications : (fileName: string, span: TextSpan) => ClassifiedSpan[] ->fileName : string ->span : TextSpan ->TextSpan : TextSpan ->ClassifiedSpan : ClassifiedSpan - - getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; ->getCompletionsAtPosition : (fileName: string, position: number) => CompletionInfo ->fileName : string ->position : number ->CompletionInfo : CompletionInfo - - getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; ->getCompletionEntryDetails : (fileName: string, position: number, entryName: string) => CompletionEntryDetails ->fileName : string ->position : number ->entryName : string ->CompletionEntryDetails : CompletionEntryDetails - - getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; ->getQuickInfoAtPosition : (fileName: string, position: number) => QuickInfo ->fileName : string ->position : number ->QuickInfo : QuickInfo - - getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; ->getNameOrDottedNameSpan : (fileName: string, startPos: number, endPos: number) => TextSpan ->fileName : string ->startPos : number ->endPos : number ->TextSpan : TextSpan - - getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan; ->getBreakpointStatementAtPosition : (fileName: string, position: number) => TextSpan ->fileName : string ->position : number ->TextSpan : TextSpan - - getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems; ->getSignatureHelpItems : (fileName: string, position: number) => SignatureHelpItems ->fileName : string ->position : number ->SignatureHelpItems : SignatureHelpItems - - getRenameInfo(fileName: string, position: number): RenameInfo; ->getRenameInfo : (fileName: string, position: number) => RenameInfo ->fileName : string ->position : number ->RenameInfo : RenameInfo - - findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[]; ->findRenameLocations : (fileName: string, position: number, findInStrings: boolean, findInComments: boolean) => RenameLocation[] ->fileName : string ->position : number ->findInStrings : boolean ->findInComments : boolean ->RenameLocation : RenameLocation - - getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; ->getDefinitionAtPosition : (fileName: string, position: number) => DefinitionInfo[] ->fileName : string ->position : number ->DefinitionInfo : DefinitionInfo - - getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; ->getReferencesAtPosition : (fileName: string, position: number) => ReferenceEntry[] ->fileName : string ->position : number ->ReferenceEntry : ReferenceEntry - - getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; ->getOccurrencesAtPosition : (fileName: string, position: number) => ReferenceEntry[] ->fileName : string ->position : number ->ReferenceEntry : ReferenceEntry - - getNavigateToItems(searchValue: string): NavigateToItem[]; ->getNavigateToItems : (searchValue: string) => NavigateToItem[] ->searchValue : string ->NavigateToItem : NavigateToItem - - getNavigationBarItems(fileName: string): NavigationBarItem[]; ->getNavigationBarItems : (fileName: string) => NavigationBarItem[] ->fileName : string ->NavigationBarItem : NavigationBarItem - - getOutliningSpans(fileName: string): OutliningSpan[]; ->getOutliningSpans : (fileName: string) => OutliningSpan[] ->fileName : string ->OutliningSpan : OutliningSpan - - getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; ->getTodoComments : (fileName: string, descriptors: TodoCommentDescriptor[]) => TodoComment[] ->fileName : string ->descriptors : TodoCommentDescriptor[] ->TodoCommentDescriptor : TodoCommentDescriptor ->TodoComment : TodoComment - - getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; ->getBraceMatchingAtPosition : (fileName: string, position: number) => TextSpan[] ->fileName : string ->position : number ->TextSpan : TextSpan - - getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number; ->getIndentationAtPosition : (fileName: string, position: number, options: EditorOptions) => number ->fileName : string ->position : number ->options : EditorOptions ->EditorOptions : EditorOptions - - getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[]; ->getFormattingEditsForRange : (fileName: string, start: number, end: number, options: FormatCodeOptions) => TextChange[] ->fileName : string ->start : number ->end : number ->options : FormatCodeOptions ->FormatCodeOptions : FormatCodeOptions ->TextChange : TextChange - - getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; ->getFormattingEditsForDocument : (fileName: string, options: FormatCodeOptions) => TextChange[] ->fileName : string ->options : FormatCodeOptions ->FormatCodeOptions : FormatCodeOptions ->TextChange : TextChange - - getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[]; ->getFormattingEditsAfterKeystroke : (fileName: string, position: number, key: string, options: FormatCodeOptions) => TextChange[] ->fileName : string ->position : number ->key : string ->options : FormatCodeOptions ->FormatCodeOptions : FormatCodeOptions ->TextChange : TextChange - - getEmitOutput(fileName: string): EmitOutput; ->getEmitOutput : (fileName: string) => EmitOutput ->fileName : string ->EmitOutput : EmitOutput - - getSourceFile(filename: string): SourceFile; ->getSourceFile : (filename: string) => SourceFile ->filename : string ->SourceFile : SourceFile - - dispose(): void; ->dispose : () => void - } - class TextSpan { ->TextSpan : TextSpan - - private _start; ->_start : any - - private _length; ->_length : any - - /** - * Creates a TextSpan instance beginning with the position Start and having the Length - * specified with length. - */ - constructor(start: number, length: number); ->start : number ->length : number - - toJSON(key: any): any; ->toJSON : (key: any) => any ->key : any - - start(): number; ->start : () => number - - length(): number; ->length : () => number - - end(): number; ->end : () => number - - isEmpty(): boolean; ->isEmpty : () => boolean - - /** - * Determines whether the position lies within the span. Returns true if the position is greater than or equal to Start and strictly less - * than End, otherwise false. - * @param position The position to check. - */ - containsPosition(position: number): boolean; ->containsPosition : (position: number) => boolean ->position : number - - /** - * Determines whether span falls completely within this span. Returns true if the specified span falls completely within this span, otherwise false. - * @param span The span to check. - */ - containsTextSpan(span: TextSpan): boolean; ->containsTextSpan : (span: TextSpan) => boolean ->span : TextSpan ->TextSpan : TextSpan - - /** - * Determines whether the given span overlaps this span. Two spans are considered to overlap - * if they have positions in common and neither is empty. Empty spans do not overlap with any - * other span. Returns true if the spans overlap, false otherwise. - * @param span The span to check. - */ - overlapsWith(span: TextSpan): boolean; ->overlapsWith : (span: TextSpan) => boolean ->span : TextSpan ->TextSpan : TextSpan - - /** - * Returns the overlap with the given span, or undefined if there is no overlap. - * @param span The span to check. - */ - overlap(span: TextSpan): TextSpan; ->overlap : (span: TextSpan) => TextSpan ->span : TextSpan ->TextSpan : TextSpan ->TextSpan : TextSpan - - /** - * Determines whether span intersects this span. Two spans are considered to - * intersect if they have positions in common or the end of one span - * coincides with the start of the other span. Returns true if the spans intersect, false otherwise. - * @param The span to check. - */ - intersectsWithTextSpan(span: TextSpan): boolean; ->intersectsWithTextSpan : (span: TextSpan) => boolean ->span : TextSpan ->TextSpan : TextSpan - - intersectsWith(start: number, length: number): boolean; ->intersectsWith : (start: number, length: number) => boolean ->start : number ->length : number - - /** - * Determines whether the given position intersects this span. - * A position is considered to intersect if it is between the start and - * end positions (inclusive) of this span. Returns true if the position intersects, false otherwise. - * @param position The position to check. - */ - intersectsWithPosition(position: number): boolean; ->intersectsWithPosition : (position: number) => boolean ->position : number - - /** - * Returns the intersection with the given span, or undefined if there is no intersection. - * @param span The span to check. - */ - intersection(span: TextSpan): TextSpan; ->intersection : (span: TextSpan) => TextSpan ->span : TextSpan ->TextSpan : TextSpan ->TextSpan : TextSpan - - /** - * Creates a new TextSpan from the given start and end positions - * as opposed to a position and length. - */ - static fromBounds(start: number, end: number): TextSpan; ->fromBounds : (start: number, end: number) => TextSpan ->start : number ->end : number ->TextSpan : TextSpan - } - class TextChangeRange { ->TextChangeRange : TextChangeRange - - static unchanged: TextChangeRange; ->unchanged : TextChangeRange ->TextChangeRange : TextChangeRange - - private _span; ->_span : any - - private _newLength; ->_newLength : any - - /** - * Initializes a new instance of TextChangeRange. - */ - constructor(span: TextSpan, newLength: number); ->span : TextSpan ->TextSpan : TextSpan ->newLength : number - - /** - * The span of text before the edit which is being changed - */ - span(): TextSpan; ->span : () => TextSpan ->TextSpan : TextSpan - - /** - * Width of the span after the edit. A 0 here would represent a delete - */ - newLength(): number; ->newLength : () => number - - newSpan(): TextSpan; ->newSpan : () => TextSpan ->TextSpan : TextSpan - - isUnchanged(): boolean; ->isUnchanged : () => boolean - - /** - * Called to merge all the changes that occurred across several versions of a script snapshot - * into a single change. i.e. if a user keeps making successive edits to a script we will - * have a text change from V1 to V2, V2 to V3, ..., Vn. - * - * This function will then merge those changes into a single change range valid between V1 and - * Vn. - */ - static collapseChangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; ->collapseChangesAcrossMultipleVersions : (changes: TextChangeRange[]) => TextChangeRange ->changes : TextChangeRange[] ->TextChangeRange : TextChangeRange ->TextChangeRange : TextChangeRange - } - interface ClassifiedSpan { ->ClassifiedSpan : ClassifiedSpan - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - classificationType: string; ->classificationType : string - } - interface NavigationBarItem { ->NavigationBarItem : NavigationBarItem - - text: string; ->text : string - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - - spans: TextSpan[]; ->spans : TextSpan[] ->TextSpan : TextSpan - - childItems: NavigationBarItem[]; ->childItems : NavigationBarItem[] ->NavigationBarItem : NavigationBarItem - - indent: number; ->indent : number - - bolded: boolean; ->bolded : boolean - - grayed: boolean; ->grayed : boolean - } - interface TodoCommentDescriptor { ->TodoCommentDescriptor : TodoCommentDescriptor - - text: string; ->text : string - - priority: number; ->priority : number - } - interface TodoComment { ->TodoComment : TodoComment - - descriptor: TodoCommentDescriptor; ->descriptor : TodoCommentDescriptor ->TodoCommentDescriptor : TodoCommentDescriptor - - message: string; ->message : string - - position: number; ->position : number - } - class TextChange { ->TextChange : TextChange - - span: TextSpan; ->span : TextSpan ->TextSpan : TextSpan - - newText: string; ->newText : string - } - interface RenameLocation { ->RenameLocation : RenameLocation - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - fileName: string; ->fileName : string - } - interface ReferenceEntry { ->ReferenceEntry : ReferenceEntry - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - fileName: string; ->fileName : string - - isWriteAccess: boolean; ->isWriteAccess : boolean - } - interface NavigateToItem { ->NavigateToItem : NavigateToItem - - name: string; ->name : string - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - - matchKind: string; ->matchKind : string - - fileName: string; ->fileName : string - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - containerName: string; ->containerName : string - - containerKind: string; ->containerKind : string - } - interface EditorOptions { ->EditorOptions : EditorOptions - - IndentSize: number; ->IndentSize : number - - TabSize: number; ->TabSize : number - - NewLineCharacter: string; ->NewLineCharacter : string - - ConvertTabsToSpaces: boolean; ->ConvertTabsToSpaces : boolean - } - interface FormatCodeOptions extends EditorOptions { ->FormatCodeOptions : FormatCodeOptions ->EditorOptions : EditorOptions - - InsertSpaceAfterCommaDelimiter: boolean; ->InsertSpaceAfterCommaDelimiter : boolean - - InsertSpaceAfterSemicolonInForStatements: boolean; ->InsertSpaceAfterSemicolonInForStatements : boolean - - InsertSpaceBeforeAndAfterBinaryOperators: boolean; ->InsertSpaceBeforeAndAfterBinaryOperators : boolean - - InsertSpaceAfterKeywordsInControlFlowStatements: boolean; ->InsertSpaceAfterKeywordsInControlFlowStatements : boolean - - InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; ->InsertSpaceAfterFunctionKeywordForAnonymousFunctions : boolean - - InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; ->InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis : boolean - - PlaceOpenBraceOnNewLineForFunctions: boolean; ->PlaceOpenBraceOnNewLineForFunctions : boolean - - PlaceOpenBraceOnNewLineForControlBlocks: boolean; ->PlaceOpenBraceOnNewLineForControlBlocks : boolean - } - interface DefinitionInfo { ->DefinitionInfo : DefinitionInfo - - fileName: string; ->fileName : string - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - kind: string; ->kind : string - - name: string; ->name : string - - containerKind: string; ->containerKind : string - - containerName: string; ->containerName : string - } - enum SymbolDisplayPartKind { ->SymbolDisplayPartKind : SymbolDisplayPartKind - - aliasName = 0, ->aliasName : SymbolDisplayPartKind - - className = 1, ->className : SymbolDisplayPartKind - - enumName = 2, ->enumName : SymbolDisplayPartKind - - fieldName = 3, ->fieldName : SymbolDisplayPartKind - - interfaceName = 4, ->interfaceName : SymbolDisplayPartKind - - keyword = 5, ->keyword : SymbolDisplayPartKind - - lineBreak = 6, ->lineBreak : SymbolDisplayPartKind - - numericLiteral = 7, ->numericLiteral : SymbolDisplayPartKind - - stringLiteral = 8, ->stringLiteral : SymbolDisplayPartKind - - localName = 9, ->localName : SymbolDisplayPartKind - - methodName = 10, ->methodName : SymbolDisplayPartKind - - moduleName = 11, ->moduleName : SymbolDisplayPartKind - - operator = 12, ->operator : SymbolDisplayPartKind - - parameterName = 13, ->parameterName : SymbolDisplayPartKind - - propertyName = 14, ->propertyName : SymbolDisplayPartKind - - punctuation = 15, ->punctuation : SymbolDisplayPartKind - - space = 16, ->space : SymbolDisplayPartKind - - text = 17, ->text : SymbolDisplayPartKind - - typeParameterName = 18, ->typeParameterName : SymbolDisplayPartKind - - enumMemberName = 19, ->enumMemberName : SymbolDisplayPartKind - - functionName = 20, ->functionName : SymbolDisplayPartKind - - regularExpressionLiteral = 21, ->regularExpressionLiteral : SymbolDisplayPartKind - } - interface SymbolDisplayPart { ->SymbolDisplayPart : SymbolDisplayPart - - text: string; ->text : string - - kind: string; ->kind : string - } - interface QuickInfo { ->QuickInfo : QuickInfo - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - displayParts: SymbolDisplayPart[]; ->displayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - documentation: SymbolDisplayPart[]; ->documentation : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - interface RenameInfo { ->RenameInfo : RenameInfo - - canRename: boolean; ->canRename : boolean - - localizedErrorMessage: string; ->localizedErrorMessage : string - - displayName: string; ->displayName : string - - fullDisplayName: string; ->fullDisplayName : string - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - - triggerSpan: TextSpan; ->triggerSpan : TextSpan ->TextSpan : TextSpan - } - interface SignatureHelpParameter { ->SignatureHelpParameter : SignatureHelpParameter - - name: string; ->name : string - - documentation: SymbolDisplayPart[]; ->documentation : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - displayParts: SymbolDisplayPart[]; ->displayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - isOptional: boolean; ->isOptional : boolean - } - /** - * Represents a single signature to show in signature help. - * The id is used for subsequent calls into the language service to ask questions about the - * signature help item in the context of any documents that have been updated. i.e. after - * an edit has happened, while signature help is still active, the host can ask important - * questions like 'what parameter is the user currently contained within?'. - */ - interface SignatureHelpItem { ->SignatureHelpItem : SignatureHelpItem - - isVariadic: boolean; ->isVariadic : boolean - - prefixDisplayParts: SymbolDisplayPart[]; ->prefixDisplayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - suffixDisplayParts: SymbolDisplayPart[]; ->suffixDisplayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - separatorDisplayParts: SymbolDisplayPart[]; ->separatorDisplayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - parameters: SignatureHelpParameter[]; ->parameters : SignatureHelpParameter[] ->SignatureHelpParameter : SignatureHelpParameter - - documentation: SymbolDisplayPart[]; ->documentation : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - /** - * Represents a set of signature help items, and the preferred item that should be selected. - */ - interface SignatureHelpItems { ->SignatureHelpItems : SignatureHelpItems - - items: SignatureHelpItem[]; ->items : SignatureHelpItem[] ->SignatureHelpItem : SignatureHelpItem - - applicableSpan: TextSpan; ->applicableSpan : TextSpan ->TextSpan : TextSpan - - selectedItemIndex: number; ->selectedItemIndex : number - - argumentIndex: number; ->argumentIndex : number - - argumentCount: number; ->argumentCount : number - } - interface CompletionInfo { ->CompletionInfo : CompletionInfo - - isMemberCompletion: boolean; ->isMemberCompletion : boolean - - entries: CompletionEntry[]; ->entries : CompletionEntry[] ->CompletionEntry : CompletionEntry - } - interface CompletionEntry { ->CompletionEntry : CompletionEntry - - name: string; ->name : string - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - } - interface CompletionEntryDetails { ->CompletionEntryDetails : CompletionEntryDetails - - name: string; ->name : string - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - - displayParts: SymbolDisplayPart[]; ->displayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - documentation: SymbolDisplayPart[]; ->documentation : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - interface OutliningSpan { ->OutliningSpan : OutliningSpan - - /** The span of the document to actually collapse. */ - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - /** The span of the document to display when the user hovers over the collapsed span. */ - hintSpan: TextSpan; ->hintSpan : TextSpan ->TextSpan : TextSpan - - /** The text to display in the editor for the collapsed region. */ - bannerText: string; ->bannerText : string - - /** - * Whether or not this region should be automatically collapsed when - * the 'Collapse to Definitions' command is invoked. - */ - autoCollapse: boolean; ->autoCollapse : boolean - } - interface EmitOutput { ->EmitOutput : EmitOutput - - outputFiles: OutputFile[]; ->outputFiles : OutputFile[] ->OutputFile : OutputFile - - emitOutputStatus: EmitReturnStatus; ->emitOutputStatus : EmitReturnStatus ->EmitReturnStatus : EmitReturnStatus - } - const enum OutputFileType { ->OutputFileType : OutputFileType - - JavaScript = 0, ->JavaScript : OutputFileType - - SourceMap = 1, ->SourceMap : OutputFileType - - Declaration = 2, ->Declaration : OutputFileType - } - interface OutputFile { ->OutputFile : OutputFile - - name: string; ->name : string - - writeByteOrderMark: boolean; ->writeByteOrderMark : boolean - - text: string; ->text : string - } - const enum EndOfLineState { ->EndOfLineState : EndOfLineState - - Start = 0, ->Start : EndOfLineState - - InMultiLineCommentTrivia = 1, ->InMultiLineCommentTrivia : EndOfLineState - - InSingleQuoteStringLiteral = 2, ->InSingleQuoteStringLiteral : EndOfLineState - - InDoubleQuoteStringLiteral = 3, ->InDoubleQuoteStringLiteral : EndOfLineState - } - enum TokenClass { ->TokenClass : TokenClass - - Punctuation = 0, ->Punctuation : TokenClass - - Keyword = 1, ->Keyword : TokenClass - - Operator = 2, ->Operator : TokenClass - - Comment = 3, ->Comment : TokenClass - - Whitespace = 4, ->Whitespace : TokenClass - - Identifier = 5, ->Identifier : TokenClass - - NumberLiteral = 6, ->NumberLiteral : TokenClass - - StringLiteral = 7, ->StringLiteral : TokenClass - - RegExpLiteral = 8, ->RegExpLiteral : TokenClass - } - interface ClassificationResult { ->ClassificationResult : ClassificationResult - - finalLexState: EndOfLineState; ->finalLexState : EndOfLineState ->EndOfLineState : EndOfLineState - - entries: ClassificationInfo[]; ->entries : ClassificationInfo[] ->ClassificationInfo : ClassificationInfo - } - interface ClassificationInfo { ->ClassificationInfo : ClassificationInfo - - length: number; ->length : number - - classification: TokenClass; ->classification : TokenClass ->TokenClass : TokenClass - } - interface Classifier { ->Classifier : Classifier - - getClassificationsForLine(text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean): ClassificationResult; ->getClassificationsForLine : (text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean) => ClassificationResult ->text : string ->lexState : EndOfLineState ->EndOfLineState : EndOfLineState ->classifyKeywordsInGenerics : boolean ->ClassificationResult : ClassificationResult - } - interface DocumentRegistry { ->DocumentRegistry : DocumentRegistry - - acquireDocument(filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean): SourceFile; ->acquireDocument : (filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean) => SourceFile ->filename : string ->compilationSettings : CompilerOptions ->CompilerOptions : CompilerOptions ->scriptSnapshot : IScriptSnapshot ->IScriptSnapshot : IScriptSnapshot ->version : string ->isOpen : boolean ->SourceFile : SourceFile - - updateDocument(sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; ->updateDocument : (sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange) => SourceFile ->sourceFile : SourceFile ->SourceFile : SourceFile ->filename : string ->compilationSettings : CompilerOptions ->CompilerOptions : CompilerOptions ->scriptSnapshot : IScriptSnapshot ->IScriptSnapshot : IScriptSnapshot ->version : string ->isOpen : boolean ->textChangeRange : TextChangeRange ->TextChangeRange : TextChangeRange ->SourceFile : SourceFile - - releaseDocument(filename: string, compilationSettings: CompilerOptions): void; ->releaseDocument : (filename: string, compilationSettings: CompilerOptions) => void ->filename : string ->compilationSettings : CompilerOptions ->CompilerOptions : CompilerOptions - } - class ScriptElementKind { ->ScriptElementKind : ScriptElementKind - - static unknown: string; ->unknown : string - - static keyword: string; ->keyword : string - - static scriptElement: string; ->scriptElement : string - - static moduleElement: string; ->moduleElement : string - - static classElement: string; ->classElement : string - - static interfaceElement: string; ->interfaceElement : string - - static typeElement: string; ->typeElement : string - - static enumElement: string; ->enumElement : string - - static variableElement: string; ->variableElement : string - - static localVariableElement: string; ->localVariableElement : string - - static functionElement: string; ->functionElement : string - - static localFunctionElement: string; ->localFunctionElement : string - - static memberFunctionElement: string; ->memberFunctionElement : string - - static memberGetAccessorElement: string; ->memberGetAccessorElement : string - - static memberSetAccessorElement: string; ->memberSetAccessorElement : string - - static memberVariableElement: string; ->memberVariableElement : string - - static constructorImplementationElement: string; ->constructorImplementationElement : string - - static callSignatureElement: string; ->callSignatureElement : string - - static indexSignatureElement: string; ->indexSignatureElement : string - - static constructSignatureElement: string; ->constructSignatureElement : string - - static parameterElement: string; ->parameterElement : string - - static typeParameterElement: string; ->typeParameterElement : string - - static primitiveType: string; ->primitiveType : string - - static label: string; ->label : string - - static alias: string; ->alias : string - - static constElement: string; ->constElement : string - - static letElement: string; ->letElement : string - } - class ScriptElementKindModifier { ->ScriptElementKindModifier : ScriptElementKindModifier - - static none: string; ->none : string - - static publicMemberModifier: string; ->publicMemberModifier : string - - static privateMemberModifier: string; ->privateMemberModifier : string - - static protectedMemberModifier: string; ->protectedMemberModifier : string - - static exportedModifier: string; ->exportedModifier : string - - static ambientModifier: string; ->ambientModifier : string - - static staticModifier: string; ->staticModifier : string - } - class ClassificationTypeNames { ->ClassificationTypeNames : ClassificationTypeNames - - static comment: string; ->comment : string - - static identifier: string; ->identifier : string - - static keyword: string; ->keyword : string - - static numericLiteral: string; ->numericLiteral : string - - static operator: string; ->operator : string - - static stringLiteral: string; ->stringLiteral : string - - static whiteSpace: string; ->whiteSpace : string - - static text: string; ->text : string - - static punctuation: string; ->punctuation : string - - static className: string; ->className : string - - static enumName: string; ->enumName : string - - static interfaceName: string; ->interfaceName : string - - static moduleName: string; ->moduleName : string - - static typeParameterName: string; ->typeParameterName : string - - static typeAlias: string; ->typeAlias : string - } - interface DisplayPartsSymbolWriter extends SymbolWriter { ->DisplayPartsSymbolWriter : DisplayPartsSymbolWriter ->SymbolWriter : SymbolWriter - - displayParts(): SymbolDisplayPart[]; ->displayParts : () => SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - function displayPartsToString(displayParts: SymbolDisplayPart[]): string; ->displayPartsToString : (displayParts: SymbolDisplayPart[]) => string ->displayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - function getDefaultCompilerOptions(): CompilerOptions; ->getDefaultCompilerOptions : () => CompilerOptions ->CompilerOptions : CompilerOptions - - class OperationCanceledException { ->OperationCanceledException : OperationCanceledException - } - class CancellationTokenObject { ->CancellationTokenObject : CancellationTokenObject - - private cancellationToken; ->cancellationToken : any - - static None: CancellationTokenObject; ->None : CancellationTokenObject ->CancellationTokenObject : CancellationTokenObject - - constructor(cancellationToken: CancellationToken); ->cancellationToken : CancellationToken ->CancellationToken : CancellationToken - - isCancellationRequested(): boolean; ->isCancellationRequested : () => boolean - - throwIfCancellationRequested(): void; ->throwIfCancellationRequested : () => void - } - function createDocumentRegistry(): DocumentRegistry; ->createDocumentRegistry : () => DocumentRegistry ->DocumentRegistry : DocumentRegistry - - function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; ->preProcessFile : (sourceText: string, readImportFiles?: boolean) => PreProcessedFileInfo ->sourceText : string ->readImportFiles : boolean ->PreProcessedFileInfo : PreProcessedFileInfo - - function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry): LanguageService; ->createLanguageService : (host: LanguageServiceHost, documentRegistry: DocumentRegistry) => LanguageService ->host : LanguageServiceHost ->LanguageServiceHost : LanguageServiceHost ->documentRegistry : DocumentRegistry ->DocumentRegistry : DocumentRegistry ->LanguageService : LanguageService - - function createClassifier(host: Logger): Classifier; ->createClassifier : (host: Logger) => Classifier ->host : Logger ->Logger : Logger ->Classifier : Classifier -} - diff --git a/tests/baselines/reference/APISample_standalone_compile.js b/tests/baselines/reference/APISample_standalone_compile.js deleted file mode 100644 index 6ba3d4f6b1b..00000000000 --- a/tests/baselines/reference/APISample_standalone_compile.js +++ /dev/null @@ -1,1862 +0,0 @@ -//// [tests/cases/compiler/APISample_standalone_compile.ts] //// - -//// [APISample_standalone_compile.ts] - -var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); - -var program = ts.createProgram(["file1.ts"], {}, undefined); -//// [typescriptServices.d.ts] -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ - -declare module ts { - interface Map { - [index: string]: T; - } - interface TextRange { - pos: number; - end: number; - } - const enum SyntaxKind { - Unknown = 0, - EndOfFileToken = 1, - SingleLineCommentTrivia = 2, - MultiLineCommentTrivia = 3, - NewLineTrivia = 4, - WhitespaceTrivia = 5, - NumericLiteral = 6, - StringLiteral = 7, - RegularExpressionLiteral = 8, - NoSubstitutionTemplateLiteral = 9, - TemplateHead = 10, - TemplateMiddle = 11, - TemplateTail = 12, - OpenBraceToken = 13, - CloseBraceToken = 14, - OpenParenToken = 15, - CloseParenToken = 16, - OpenBracketToken = 17, - CloseBracketToken = 18, - DotToken = 19, - DotDotDotToken = 20, - SemicolonToken = 21, - CommaToken = 22, - LessThanToken = 23, - GreaterThanToken = 24, - LessThanEqualsToken = 25, - GreaterThanEqualsToken = 26, - EqualsEqualsToken = 27, - ExclamationEqualsToken = 28, - EqualsEqualsEqualsToken = 29, - ExclamationEqualsEqualsToken = 30, - EqualsGreaterThanToken = 31, - PlusToken = 32, - MinusToken = 33, - AsteriskToken = 34, - SlashToken = 35, - PercentToken = 36, - PlusPlusToken = 37, - MinusMinusToken = 38, - LessThanLessThanToken = 39, - GreaterThanGreaterThanToken = 40, - GreaterThanGreaterThanGreaterThanToken = 41, - AmpersandToken = 42, - BarToken = 43, - CaretToken = 44, - ExclamationToken = 45, - TildeToken = 46, - AmpersandAmpersandToken = 47, - BarBarToken = 48, - QuestionToken = 49, - ColonToken = 50, - EqualsToken = 51, - PlusEqualsToken = 52, - MinusEqualsToken = 53, - AsteriskEqualsToken = 54, - SlashEqualsToken = 55, - PercentEqualsToken = 56, - LessThanLessThanEqualsToken = 57, - GreaterThanGreaterThanEqualsToken = 58, - GreaterThanGreaterThanGreaterThanEqualsToken = 59, - AmpersandEqualsToken = 60, - BarEqualsToken = 61, - CaretEqualsToken = 62, - Identifier = 63, - BreakKeyword = 64, - CaseKeyword = 65, - CatchKeyword = 66, - ClassKeyword = 67, - ConstKeyword = 68, - ContinueKeyword = 69, - DebuggerKeyword = 70, - DefaultKeyword = 71, - DeleteKeyword = 72, - DoKeyword = 73, - ElseKeyword = 74, - EnumKeyword = 75, - ExportKeyword = 76, - ExtendsKeyword = 77, - FalseKeyword = 78, - FinallyKeyword = 79, - ForKeyword = 80, - FunctionKeyword = 81, - IfKeyword = 82, - ImportKeyword = 83, - InKeyword = 84, - InstanceOfKeyword = 85, - NewKeyword = 86, - NullKeyword = 87, - ReturnKeyword = 88, - SuperKeyword = 89, - SwitchKeyword = 90, - ThisKeyword = 91, - ThrowKeyword = 92, - TrueKeyword = 93, - TryKeyword = 94, - TypeOfKeyword = 95, - VarKeyword = 96, - VoidKeyword = 97, - WhileKeyword = 98, - WithKeyword = 99, - ImplementsKeyword = 100, - InterfaceKeyword = 101, - LetKeyword = 102, - PackageKeyword = 103, - PrivateKeyword = 104, - ProtectedKeyword = 105, - PublicKeyword = 106, - StaticKeyword = 107, - YieldKeyword = 108, - AnyKeyword = 109, - BooleanKeyword = 110, - ConstructorKeyword = 111, - DeclareKeyword = 112, - GetKeyword = 113, - ModuleKeyword = 114, - RequireKeyword = 115, - NumberKeyword = 116, - SetKeyword = 117, - StringKeyword = 118, - TypeKeyword = 119, - QualifiedName = 120, - ComputedPropertyName = 121, - TypeParameter = 122, - Parameter = 123, - Property = 124, - Method = 125, - Constructor = 126, - GetAccessor = 127, - SetAccessor = 128, - CallSignature = 129, - ConstructSignature = 130, - IndexSignature = 131, - TypeReference = 132, - FunctionType = 133, - ConstructorType = 134, - TypeQuery = 135, - TypeLiteral = 136, - ArrayType = 137, - TupleType = 138, - UnionType = 139, - ParenthesizedType = 140, - ArrayLiteralExpression = 141, - ObjectLiteralExpression = 142, - PropertyAccessExpression = 143, - ElementAccessExpression = 144, - CallExpression = 145, - NewExpression = 146, - TaggedTemplateExpression = 147, - TypeAssertionExpression = 148, - ParenthesizedExpression = 149, - FunctionExpression = 150, - ArrowFunction = 151, - DeleteExpression = 152, - TypeOfExpression = 153, - VoidExpression = 154, - PrefixUnaryExpression = 155, - PostfixUnaryExpression = 156, - BinaryExpression = 157, - ConditionalExpression = 158, - TemplateExpression = 159, - YieldExpression = 160, - OmittedExpression = 161, - TemplateSpan = 162, - Block = 163, - VariableStatement = 164, - EmptyStatement = 165, - ExpressionStatement = 166, - IfStatement = 167, - DoStatement = 168, - WhileStatement = 169, - ForStatement = 170, - ForInStatement = 171, - ContinueStatement = 172, - BreakStatement = 173, - ReturnStatement = 174, - WithStatement = 175, - SwitchStatement = 176, - LabeledStatement = 177, - ThrowStatement = 178, - TryStatement = 179, - TryBlock = 180, - FinallyBlock = 181, - DebuggerStatement = 182, - VariableDeclaration = 183, - FunctionDeclaration = 184, - ClassDeclaration = 185, - InterfaceDeclaration = 186, - TypeAliasDeclaration = 187, - EnumDeclaration = 188, - ModuleDeclaration = 189, - ModuleBlock = 190, - ImportDeclaration = 191, - ExportAssignment = 192, - ExternalModuleReference = 193, - CaseClause = 194, - DefaultClause = 195, - HeritageClause = 196, - CatchClause = 197, - PropertyAssignment = 198, - ShorthandPropertyAssignment = 199, - EnumMember = 200, - SourceFile = 201, - Program = 202, - SyntaxList = 203, - Count = 204, - FirstAssignment = 51, - LastAssignment = 62, - FirstReservedWord = 64, - LastReservedWord = 99, - FirstKeyword = 64, - LastKeyword = 119, - FirstFutureReservedWord = 100, - LastFutureReservedWord = 108, - FirstTypeNode = 132, - LastTypeNode = 140, - FirstPunctuation = 13, - LastPunctuation = 62, - FirstToken = 0, - LastToken = 119, - FirstTriviaToken = 2, - LastTriviaToken = 5, - FirstLiteralToken = 6, - LastLiteralToken = 9, - FirstTemplateToken = 9, - LastTemplateToken = 12, - FirstOperator = 21, - LastOperator = 62, - FirstBinaryOperator = 23, - LastBinaryOperator = 62, - FirstNode = 120, - } - const enum NodeFlags { - Export = 1, - Ambient = 2, - Public = 16, - Private = 32, - Protected = 64, - Static = 128, - MultiLine = 256, - Synthetic = 512, - DeclarationFile = 1024, - Let = 2048, - Const = 4096, - OctalLiteral = 8192, - Modifier = 243, - AccessibilityModifier = 112, - BlockScoped = 6144, - } - const enum ParserContextFlags { - StrictMode = 1, - DisallowIn = 2, - Yield = 4, - GeneratorParameter = 8, - ContainsError = 16, - HasPropagatedChildContainsErrorFlag = 32, - } - interface Node extends TextRange { - kind: SyntaxKind; - flags: NodeFlags; - parserContextFlags?: ParserContextFlags; - id?: number; - parent?: Node; - symbol?: Symbol; - locals?: SymbolTable; - nextContainer?: Node; - localSymbol?: Symbol; - modifiers?: ModifiersArray; - } - interface NodeArray extends Array, TextRange { - hasTrailingComma?: boolean; - } - interface ModifiersArray extends NodeArray { - flags: number; - } - interface Identifier extends PrimaryExpression { - text: string; - } - interface QualifiedName extends Node { - left: EntityName; - right: Identifier; - } - type EntityName = Identifier | QualifiedName; - type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; - interface Declaration extends Node { - _declarationBrand: any; - name?: DeclarationName; - } - interface ComputedPropertyName extends Node { - expression: Expression; - } - interface TypeParameterDeclaration extends Declaration { - name: Identifier; - constraint?: TypeNode; - expression?: Expression; - } - interface SignatureDeclaration extends Declaration { - typeParameters?: NodeArray; - parameters: NodeArray; - type?: TypeNode; - } - interface VariableDeclaration extends Declaration { - name: Identifier; - type?: TypeNode; - initializer?: Expression; - } - interface ParameterDeclaration extends Declaration { - dotDotDotToken?: Node; - name: Identifier; - questionToken?: Node; - type?: TypeNode | StringLiteralExpression; - initializer?: Expression; - } - interface PropertyDeclaration extends Declaration, ClassElement { - _propertyDeclarationBrand: any; - questionToken?: Node; - type?: TypeNode; - initializer?: Expression; - } - type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; - type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; - interface ObjectLiteralElement extends Declaration { - _objectLiteralBrandBrand: any; - } - interface ShorthandPropertyAssignment extends ObjectLiteralElement { - name: Identifier; - questionToken?: Node; - } - interface PropertyAssignment extends ObjectLiteralElement { - _propertyAssignmentBrand: any; - name: DeclarationName; - questionToken?: Node; - initializer: Expression; - } - /** - * Several node kinds share function-like features such as a signature, - * a name, and a body. These nodes should extend FunctionLikeDeclaration. - * Examples: - * FunctionDeclaration - * MethodDeclaration - * AccessorDeclaration - */ - interface FunctionLikeDeclaration extends SignatureDeclaration { - _functionLikeDeclarationBrand: any; - asteriskToken?: Node; - questionToken?: Node; - body?: Block | Expression; - } - interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { - name: Identifier; - body?: Block; - } - interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { - body?: Block; - } - interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { - body?: Block; - } - interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { - _accessorDeclarationBrand: any; - body: Block; - } - interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { - _indexSignatureDeclarationBrand: any; - } - interface TypeNode extends Node { - _typeNodeBrand: any; - } - interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { - _functionOrConstructorTypeNodeBrand: any; - } - interface TypeReferenceNode extends TypeNode { - typeName: EntityName; - typeArguments?: NodeArray; - } - interface TypeQueryNode extends TypeNode { - exprName: EntityName; - } - interface TypeLiteralNode extends TypeNode, Declaration { - members: NodeArray; - } - interface ArrayTypeNode extends TypeNode { - elementType: TypeNode; - } - interface TupleTypeNode extends TypeNode { - elementTypes: NodeArray; - } - interface UnionTypeNode extends TypeNode { - types: NodeArray; - } - interface ParenthesizedTypeNode extends TypeNode { - type: TypeNode; - } - interface Expression extends Node { - _expressionBrand: any; - contextualType?: Type; - } - interface UnaryExpression extends Expression { - _unaryExpressionBrand: any; - } - interface PrefixUnaryExpression extends UnaryExpression { - operator: SyntaxKind; - operand: UnaryExpression; - } - interface PostfixUnaryExpression extends PostfixExpression { - operand: LeftHandSideExpression; - operator: SyntaxKind; - } - interface PostfixExpression extends UnaryExpression { - _postfixExpressionBrand: any; - } - interface LeftHandSideExpression extends PostfixExpression { - _leftHandSideExpressionBrand: any; - } - interface MemberExpression extends LeftHandSideExpression { - _memberExpressionBrand: any; - } - interface PrimaryExpression extends MemberExpression { - _primaryExpressionBrand: any; - } - interface DeleteExpression extends UnaryExpression { - expression: UnaryExpression; - } - interface TypeOfExpression extends UnaryExpression { - expression: UnaryExpression; - } - interface VoidExpression extends UnaryExpression { - expression: UnaryExpression; - } - interface YieldExpression extends Expression { - asteriskToken?: Node; - expression: Expression; - } - interface BinaryExpression extends Expression { - left: Expression; - operator: SyntaxKind; - right: Expression; - } - interface ConditionalExpression extends Expression { - condition: Expression; - whenTrue: Expression; - whenFalse: Expression; - } - interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { - name?: Identifier; - body: Block | Expression; - } - interface LiteralExpression extends PrimaryExpression { - text: string; - isUnterminated?: boolean; - } - interface StringLiteralExpression extends LiteralExpression { - _stringLiteralExpressionBrand: any; - } - interface TemplateExpression extends PrimaryExpression { - head: LiteralExpression; - templateSpans: NodeArray; - } - interface TemplateSpan extends Node { - expression: Expression; - literal: LiteralExpression; - } - interface ParenthesizedExpression extends PrimaryExpression { - expression: Expression; - } - interface ArrayLiteralExpression extends PrimaryExpression { - elements: NodeArray; - } - interface ObjectLiteralExpression extends PrimaryExpression, Declaration { - properties: NodeArray; - } - interface PropertyAccessExpression extends MemberExpression { - expression: LeftHandSideExpression; - name: Identifier; - } - interface ElementAccessExpression extends MemberExpression { - expression: LeftHandSideExpression; - argumentExpression?: Expression; - } - interface CallExpression extends LeftHandSideExpression { - expression: LeftHandSideExpression; - typeArguments?: NodeArray; - arguments: NodeArray; - } - interface NewExpression extends CallExpression, PrimaryExpression { - } - interface TaggedTemplateExpression extends MemberExpression { - tag: LeftHandSideExpression; - template: LiteralExpression | TemplateExpression; - } - type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression; - interface TypeAssertion extends UnaryExpression { - type: TypeNode; - expression: UnaryExpression; - } - interface Statement extends Node, ModuleElement { - _statementBrand: any; - } - interface Block extends Statement { - statements: NodeArray; - } - interface VariableStatement extends Statement { - declarations: NodeArray; - } - interface ExpressionStatement extends Statement { - expression: Expression; - } - interface IfStatement extends Statement { - expression: Expression; - thenStatement: Statement; - elseStatement?: Statement; - } - interface IterationStatement extends Statement { - statement: Statement; - } - interface DoStatement extends IterationStatement { - expression: Expression; - } - interface WhileStatement extends IterationStatement { - expression: Expression; - } - interface ForStatement extends IterationStatement { - declarations?: NodeArray; - initializer?: Expression; - condition?: Expression; - iterator?: Expression; - } - interface ForInStatement extends IterationStatement { - declarations?: NodeArray; - variable?: Expression; - expression: Expression; - } - interface BreakOrContinueStatement extends Statement { - label?: Identifier; - } - interface ReturnStatement extends Statement { - expression?: Expression; - } - interface WithStatement extends Statement { - expression: Expression; - statement: Statement; - } - interface SwitchStatement extends Statement { - expression: Expression; - clauses: NodeArray; - } - interface CaseClause extends Node { - expression?: Expression; - statements: NodeArray; - } - interface DefaultClause extends Node { - statements: NodeArray; - } - type CaseOrDefaultClause = CaseClause | DefaultClause; - interface LabeledStatement extends Statement { - label: Identifier; - statement: Statement; - } - interface ThrowStatement extends Statement { - expression: Expression; - } - interface TryStatement extends Statement { - tryBlock: Block; - catchClause?: CatchClause; - finallyBlock?: Block; - } - interface CatchClause extends Declaration { - name: Identifier; - type?: TypeNode; - block: Block; - } - interface ModuleElement extends Node { - _moduleElementBrand: any; - } - interface ClassDeclaration extends Declaration, ModuleElement { - name: Identifier; - typeParameters?: NodeArray; - heritageClauses?: NodeArray; - members: NodeArray; - } - interface ClassElement extends Declaration { - _classElementBrand: any; - } - interface InterfaceDeclaration extends Declaration, ModuleElement { - name: Identifier; - typeParameters?: NodeArray; - heritageClauses?: NodeArray; - members: NodeArray; - } - interface HeritageClause extends Node { - token: SyntaxKind; - types?: NodeArray; - } - interface TypeAliasDeclaration extends Declaration, ModuleElement { - name: Identifier; - type: TypeNode; - } - interface EnumMember extends Declaration { - name: DeclarationName; - initializer?: Expression; - } - interface EnumDeclaration extends Declaration, ModuleElement { - name: Identifier; - members: NodeArray; - } - interface ModuleDeclaration extends Declaration, ModuleElement { - name: Identifier | LiteralExpression; - body: ModuleBlock | ModuleDeclaration; - } - interface ModuleBlock extends Node, ModuleElement { - statements: NodeArray; - } - interface ImportDeclaration extends Declaration, ModuleElement { - name: Identifier; - moduleReference: EntityName | ExternalModuleReference; - } - interface ExternalModuleReference extends Node { - expression?: Expression; - } - interface ExportAssignment extends Statement, ModuleElement { - exportName: Identifier; - } - interface FileReference extends TextRange { - filename: string; - } - interface CommentRange extends TextRange { - hasTrailingNewLine?: boolean; - } - interface SourceFile extends Declaration { - statements: NodeArray; - endOfFileToken: Node; - filename: string; - text: string; - getLineAndCharacterFromPosition(position: number): LineAndCharacter; - getPositionFromLineAndCharacter(line: number, character: number): number; - getLineStarts(): number[]; - amdDependencies: string[]; - amdModuleName: string; - referencedFiles: FileReference[]; - referenceDiagnostics: Diagnostic[]; - parseDiagnostics: Diagnostic[]; - grammarDiagnostics: Diagnostic[]; - getSyntacticDiagnostics(): Diagnostic[]; - semanticDiagnostics: Diagnostic[]; - hasNoDefaultLib: boolean; - externalModuleIndicator: Node; - nodeCount: number; - identifierCount: number; - symbolCount: number; - isOpen: boolean; - version: string; - languageVersion: ScriptTarget; - identifiers: Map; - } - interface Program { - getSourceFile(filename: string): SourceFile; - getSourceFiles(): SourceFile[]; - getCompilerOptions(): CompilerOptions; - getCompilerHost(): CompilerHost; - getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; - getGlobalDiagnostics(): Diagnostic[]; - getTypeChecker(fullTypeCheckMode: boolean): TypeChecker; - getCommonSourceDirectory(): string; - } - interface SourceMapSpan { - emittedLine: number; - emittedColumn: number; - sourceLine: number; - sourceColumn: number; - nameIndex?: number; - sourceIndex: number; - } - interface SourceMapData { - sourceMapFilePath: string; - jsSourceMappingURL: string; - sourceMapFile: string; - sourceMapSourceRoot: string; - sourceMapSources: string[]; - inputSourceFileNames: string[]; - sourceMapNames?: string[]; - sourceMapMappings: string; - sourceMapDecodedMappings: SourceMapSpan[]; - } - enum EmitReturnStatus { - Succeeded = 0, - AllOutputGenerationSkipped = 1, - JSGeneratedWithSemanticErrors = 2, - DeclarationGenerationSkipped = 3, - EmitErrorsEncountered = 4, - CompilerOptionsErrors = 5, - } - interface EmitResult { - emitResultStatus: EmitReturnStatus; - diagnostics: Diagnostic[]; - sourceMaps: SourceMapData[]; - } - interface TypeChecker { - getProgram(): Program; - getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; - getDeclarationDiagnostics(sourceFile: SourceFile): Diagnostic[]; - getGlobalDiagnostics(): Diagnostic[]; - getNodeCount(): number; - getIdentifierCount(): number; - getSymbolCount(): number; - getTypeCount(): number; - emitFiles(targetSourceFile?: SourceFile): EmitResult; - getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; - getDeclaredTypeOfSymbol(symbol: Symbol): Type; - getPropertiesOfType(type: Type): Symbol[]; - getPropertyOfType(type: Type, propertyName: string): Symbol; - getSignaturesOfType(type: Type, kind: SignatureKind): Signature[]; - getIndexTypeOfType(type: Type, kind: IndexKind): Type; - getReturnTypeOfSignature(signature: Signature): Type; - getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; - getSymbolAtLocation(node: Node): Symbol; - getShorthandAssignmentValueSymbol(location: Node): Symbol; - getTypeAtLocation(node: Node): Type; - typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; - symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; - getSymbolDisplayBuilder(): SymbolDisplayBuilder; - getFullyQualifiedName(symbol: Symbol): string; - getAugmentedPropertiesOfType(type: Type): Symbol[]; - getRootSymbols(symbol: Symbol): Symbol[]; - getContextualType(node: Expression): Type; - getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; - getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; - isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; - isUndefinedSymbol(symbol: Symbol): boolean; - isArgumentsSymbol(symbol: Symbol): boolean; - isEmitBlocked(sourceFile?: SourceFile): boolean; - getEnumMemberValue(node: EnumMember): number; - isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; - getAliasedSymbol(symbol: Symbol): Symbol; - } - interface SymbolDisplayBuilder { - buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void; - buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void; - buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - } - interface SymbolWriter { - writeKeyword(text: string): void; - writeOperator(text: string): void; - writePunctuation(text: string): void; - writeSpace(text: string): void; - writeStringLiteral(text: string): void; - writeParameter(text: string): void; - writeSymbol(text: string, symbol: Symbol): void; - writeLine(): void; - increaseIndent(): void; - decreaseIndent(): void; - clear(): void; - trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void; - } - const enum TypeFormatFlags { - None = 0, - WriteArrayAsGenericType = 1, - UseTypeOfFunction = 2, - NoTruncation = 4, - WriteArrowStyleSignature = 8, - WriteOwnNameForAnyLike = 16, - WriteTypeArgumentsOfSignature = 32, - InElementType = 64, - } - const enum SymbolFormatFlags { - None = 0, - WriteTypeParametersOrArguments = 1, - UseOnlyExternalAliasing = 2, - } - const enum SymbolAccessibility { - Accessible = 0, - NotAccessible = 1, - CannotBeNamed = 2, - } - interface SymbolVisibilityResult { - accessibility: SymbolAccessibility; - aliasesToMakeVisible?: ImportDeclaration[]; - errorSymbolName?: string; - errorNode?: Node; - } - interface SymbolAccessiblityResult extends SymbolVisibilityResult { - errorModuleName?: string; - } - interface EmitResolver { - getProgram(): Program; - getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; - getExpressionNamePrefix(node: Identifier): string; - getExportAssignmentName(node: SourceFile): string; - isReferencedImportDeclaration(node: ImportDeclaration): boolean; - isTopLevelValueImportWithEntityName(node: ImportDeclaration): boolean; - getNodeCheckFlags(node: Node): NodeCheckFlags; - getEnumMemberValue(node: EnumMember): number; - hasSemanticErrors(sourceFile?: SourceFile): boolean; - isDeclarationVisible(node: Declaration): boolean; - isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; - writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; - writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; - isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; - isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; - getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number; - isEmitBlocked(sourceFile?: SourceFile): boolean; - } - const enum SymbolFlags { - FunctionScopedVariable = 1, - BlockScopedVariable = 2, - Property = 4, - EnumMember = 8, - Function = 16, - Class = 32, - Interface = 64, - ConstEnum = 128, - RegularEnum = 256, - ValueModule = 512, - NamespaceModule = 1024, - TypeLiteral = 2048, - ObjectLiteral = 4096, - Method = 8192, - Constructor = 16384, - GetAccessor = 32768, - SetAccessor = 65536, - CallSignature = 131072, - ConstructSignature = 262144, - IndexSignature = 524288, - TypeParameter = 1048576, - TypeAlias = 2097152, - ExportValue = 4194304, - ExportType = 8388608, - ExportNamespace = 16777216, - Import = 33554432, - Instantiated = 67108864, - Merged = 134217728, - Transient = 268435456, - Prototype = 536870912, - UnionProperty = 1073741824, - Enum = 384, - Variable = 3, - Value = 107455, - Type = 3152352, - Namespace = 1536, - Module = 1536, - Accessor = 98304, - Signature = 917504, - FunctionScopedVariableExcludes = 107454, - BlockScopedVariableExcludes = 107455, - ParameterExcludes = 107455, - PropertyExcludes = 107455, - EnumMemberExcludes = 107455, - FunctionExcludes = 106927, - ClassExcludes = 3258879, - InterfaceExcludes = 3152288, - RegularEnumExcludes = 3258623, - ConstEnumExcludes = 3259263, - ValueModuleExcludes = 106639, - NamespaceModuleExcludes = 0, - MethodExcludes = 99263, - GetAccessorExcludes = 41919, - SetAccessorExcludes = 74687, - TypeParameterExcludes = 2103776, - TypeAliasExcludes = 3152352, - ImportExcludes = 33554432, - ModuleMember = 35653619, - ExportHasLocal = 944, - HasLocals = 1041936, - HasExports = 1952, - HasMembers = 6240, - IsContainer = 1048560, - PropertyOrAccessor = 98308, - Export = 29360128, - } - interface Symbol { - flags: SymbolFlags; - name: string; - id?: number; - mergeId?: number; - declarations?: Declaration[]; - parent?: Symbol; - members?: SymbolTable; - exports?: SymbolTable; - exportSymbol?: Symbol; - valueDeclaration?: Declaration; - constEnumOnlyModule?: boolean; - } - interface SymbolLinks { - target?: Symbol; - type?: Type; - declaredType?: Type; - mapper?: TypeMapper; - referenced?: boolean; - exportAssignSymbol?: Symbol; - unionType?: UnionType; - } - interface TransientSymbol extends Symbol, SymbolLinks { - } - interface SymbolTable { - [index: string]: Symbol; - } - const enum NodeCheckFlags { - TypeChecked = 1, - LexicalThis = 2, - CaptureThis = 4, - EmitExtends = 8, - SuperInstance = 16, - SuperStatic = 32, - ContextChecked = 64, - EnumValuesComputed = 128, - } - interface NodeLinks { - resolvedType?: Type; - resolvedSignature?: Signature; - resolvedSymbol?: Symbol; - flags?: NodeCheckFlags; - enumMemberValue?: number; - isIllegalTypeReferenceInConstraint?: boolean; - isVisible?: boolean; - localModuleName?: string; - assignmentChecks?: Map; - } - const enum TypeFlags { - Any = 1, - String = 2, - Number = 4, - Boolean = 8, - Void = 16, - Undefined = 32, - Null = 64, - Enum = 128, - StringLiteral = 256, - TypeParameter = 512, - Class = 1024, - Interface = 2048, - Reference = 4096, - Tuple = 8192, - Union = 16384, - Anonymous = 32768, - FromSignature = 65536, - Intrinsic = 127, - StringLike = 258, - NumberLike = 132, - ObjectType = 48128, - } - interface Type { - flags: TypeFlags; - id: number; - symbol?: Symbol; - } - interface IntrinsicType extends Type { - intrinsicName: string; - } - interface StringLiteralType extends Type { - text: string; - } - interface ObjectType extends Type { - } - interface InterfaceType extends ObjectType { - typeParameters: TypeParameter[]; - baseTypes: ObjectType[]; - declaredProperties: Symbol[]; - declaredCallSignatures: Signature[]; - declaredConstructSignatures: Signature[]; - declaredStringIndexType: Type; - declaredNumberIndexType: Type; - } - interface TypeReference extends ObjectType { - target: GenericType; - typeArguments: Type[]; - } - interface GenericType extends InterfaceType, TypeReference { - instantiations: Map; - openReferenceTargets: GenericType[]; - openReferenceChecks: Map; - } - interface TupleType extends ObjectType { - elementTypes: Type[]; - baseArrayType: TypeReference; - } - interface UnionType extends Type { - types: Type[]; - resolvedProperties: SymbolTable; - } - interface ResolvedType extends ObjectType, UnionType { - members: SymbolTable; - properties: Symbol[]; - callSignatures: Signature[]; - constructSignatures: Signature[]; - stringIndexType: Type; - numberIndexType: Type; - } - interface TypeParameter extends Type { - constraint: Type; - target?: TypeParameter; - mapper?: TypeMapper; - } - const enum SignatureKind { - Call = 0, - Construct = 1, - } - interface Signature { - declaration: SignatureDeclaration; - typeParameters: TypeParameter[]; - parameters: Symbol[]; - resolvedReturnType: Type; - minArgumentCount: number; - hasRestParameter: boolean; - hasStringLiterals: boolean; - target?: Signature; - mapper?: TypeMapper; - unionSignatures?: Signature[]; - erasedSignatureCache?: Signature; - isolatedSignatureType?: ObjectType; - } - const enum IndexKind { - String = 0, - Number = 1, - } - interface TypeMapper { - (t: Type): Type; - } - interface TypeInferences { - primary: Type[]; - secondary: Type[]; - } - interface InferenceContext { - typeParameters: TypeParameter[]; - inferUnionTypes: boolean; - inferences: TypeInferences[]; - inferredTypes: Type[]; - failedTypeParameterIndex?: number; - } - interface DiagnosticMessage { - key: string; - category: DiagnosticCategory; - code: number; - isEarly?: boolean; - } - interface DiagnosticMessageChain { - messageText: string; - category: DiagnosticCategory; - code: number; - next?: DiagnosticMessageChain; - } - interface Diagnostic { - file: SourceFile; - start: number; - length: number; - messageText: string; - category: DiagnosticCategory; - code: number; - /** - * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit - */ - isEarly?: boolean; - } - enum DiagnosticCategory { - Warning = 0, - Error = 1, - Message = 2, - } - interface CompilerOptions { - allowNonTsExtensions?: boolean; - charset?: string; - codepage?: number; - declaration?: boolean; - diagnostics?: boolean; - emitBOM?: boolean; - help?: boolean; - locale?: string; - mapRoot?: string; - module?: ModuleKind; - noEmitOnError?: boolean; - noErrorTruncation?: boolean; - noImplicitAny?: boolean; - noLib?: boolean; - noLibCheck?: boolean; - noResolve?: boolean; - out?: string; - outDir?: string; - preserveConstEnums?: boolean; - removeComments?: boolean; - sourceMap?: boolean; - sourceRoot?: string; - suppressImplicitAnyIndexErrors?: boolean; - target?: ScriptTarget; - version?: boolean; - watch?: boolean; - [option: string]: string | number | boolean; - } - const enum ModuleKind { - None = 0, - CommonJS = 1, - AMD = 2, - } - interface LineAndCharacter { - line: number; - character: number; - } - const enum ScriptTarget { - ES3 = 0, - ES5 = 1, - ES6 = 2, - Latest = 2, - } - interface ParsedCommandLine { - options: CompilerOptions; - filenames: string[]; - errors: Diagnostic[]; - } - interface CommandLineOption { - name: string; - type: string | Map; - shortName?: string; - description?: DiagnosticMessage; - paramType?: DiagnosticMessage; - error?: DiagnosticMessage; - } - const enum CharacterCodes { - nullCharacter = 0, - maxAsciiCharacter = 127, - lineFeed = 10, - carriageReturn = 13, - lineSeparator = 8232, - paragraphSeparator = 8233, - nextLine = 133, - space = 32, - nonBreakingSpace = 160, - enQuad = 8192, - emQuad = 8193, - enSpace = 8194, - emSpace = 8195, - threePerEmSpace = 8196, - fourPerEmSpace = 8197, - sixPerEmSpace = 8198, - figureSpace = 8199, - punctuationSpace = 8200, - thinSpace = 8201, - hairSpace = 8202, - zeroWidthSpace = 8203, - narrowNoBreakSpace = 8239, - ideographicSpace = 12288, - mathematicalSpace = 8287, - ogham = 5760, - _ = 95, - $ = 36, - _0 = 48, - _1 = 49, - _2 = 50, - _3 = 51, - _4 = 52, - _5 = 53, - _6 = 54, - _7 = 55, - _8 = 56, - _9 = 57, - a = 97, - b = 98, - c = 99, - d = 100, - e = 101, - f = 102, - g = 103, - h = 104, - i = 105, - j = 106, - k = 107, - l = 108, - m = 109, - n = 110, - o = 111, - p = 112, - q = 113, - r = 114, - s = 115, - t = 116, - u = 117, - v = 118, - w = 119, - x = 120, - y = 121, - z = 122, - A = 65, - B = 66, - C = 67, - D = 68, - E = 69, - F = 70, - G = 71, - H = 72, - I = 73, - J = 74, - K = 75, - L = 76, - M = 77, - N = 78, - O = 79, - P = 80, - Q = 81, - R = 82, - S = 83, - T = 84, - U = 85, - V = 86, - W = 87, - X = 88, - Y = 89, - Z = 90, - ampersand = 38, - asterisk = 42, - at = 64, - backslash = 92, - backtick = 96, - bar = 124, - caret = 94, - closeBrace = 125, - closeBracket = 93, - closeParen = 41, - colon = 58, - comma = 44, - dot = 46, - doubleQuote = 34, - equals = 61, - exclamation = 33, - greaterThan = 62, - lessThan = 60, - minus = 45, - openBrace = 123, - openBracket = 91, - openParen = 40, - percent = 37, - plus = 43, - question = 63, - semicolon = 59, - singleQuote = 39, - slash = 47, - tilde = 126, - backspace = 8, - formFeed = 12, - byteOrderMark = 65279, - tab = 9, - verticalTab = 11, - } - interface CancellationToken { - isCancellationRequested(): boolean; - } - interface CompilerHost { - getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; - getDefaultLibFilename(options: CompilerOptions): string; - getCancellationToken?(): CancellationToken; - writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; - getCurrentDirectory(): string; - getCanonicalFileName(fileName: string): string; - useCaseSensitiveFileNames(): boolean; - getNewLine(): string; - } -} -declare module ts { - interface ErrorCallback { - (message: DiagnosticMessage): void; - } - interface CommentCallback { - (pos: number, end: number): void; - } - interface Scanner { - getStartPos(): number; - getToken(): SyntaxKind; - getTextPos(): number; - getTokenPos(): number; - getTokenText(): string; - getTokenValue(): string; - hasPrecedingLineBreak(): boolean; - isIdentifier(): boolean; - isReservedWord(): boolean; - isUnterminated(): boolean; - reScanGreaterToken(): SyntaxKind; - reScanSlashToken(): SyntaxKind; - reScanTemplateToken(): SyntaxKind; - scan(): SyntaxKind; - setText(text: string): void; - setTextPos(textPos: number): void; - lookAhead(callback: () => T): T; - tryScan(callback: () => T): T; - } - function tokenToString(t: SyntaxKind): string; - function computeLineStarts(text: string): number[]; - function getPositionFromLineAndCharacter(lineStarts: number[], line: number, character: number): number; - function getLineAndCharacterOfPosition(lineStarts: number[], position: number): { - line: number; - character: number; - }; - function positionToLineAndCharacter(text: string, pos: number): { - line: number; - character: number; - }; - function isWhiteSpace(ch: number): boolean; - function isLineBreak(ch: number): boolean; - function isOctalDigit(ch: number): boolean; - function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean): number; - function getLeadingCommentRanges(text: string, pos: number): CommentRange[]; - function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; - function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; - function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; - function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner; -} -declare module ts { - function getNodeConstructor(kind: SyntaxKind): new () => Node; - function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; - function createCompilerHost(options: CompilerOptions): CompilerHost; - function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; - function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; -} -declare module ts { - function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; -} -declare module ts { - var servicesVersion: string; - interface Node { - getSourceFile(): SourceFile; - getChildCount(sourceFile?: SourceFile): number; - getChildAt(index: number, sourceFile?: SourceFile): Node; - getChildren(sourceFile?: SourceFile): Node[]; - getStart(sourceFile?: SourceFile): number; - getFullStart(): number; - getEnd(): number; - getWidth(sourceFile?: SourceFile): number; - getFullWidth(): number; - getLeadingTriviaWidth(sourceFile?: SourceFile): number; - getFullText(sourceFile?: SourceFile): string; - getText(sourceFile?: SourceFile): string; - getFirstToken(sourceFile?: SourceFile): Node; - getLastToken(sourceFile?: SourceFile): Node; - } - interface Symbol { - getFlags(): SymbolFlags; - getName(): string; - getDeclarations(): Declaration[]; - getDocumentationComment(): SymbolDisplayPart[]; - } - interface Type { - getFlags(): TypeFlags; - getSymbol(): Symbol; - getProperties(): Symbol[]; - getProperty(propertyName: string): Symbol; - getApparentProperties(): Symbol[]; - getCallSignatures(): Signature[]; - getConstructSignatures(): Signature[]; - getStringIndexType(): Type; - getNumberIndexType(): Type; - } - interface Signature { - getDeclaration(): SignatureDeclaration; - getTypeParameters(): Type[]; - getParameters(): Symbol[]; - getReturnType(): Type; - getDocumentationComment(): SymbolDisplayPart[]; - } - interface SourceFile { - getScriptSnapshot(): IScriptSnapshot; - getNamedDeclarations(): Declaration[]; - update(scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; - } - /** - * Represents an immutable snapshot of a script at a specified time.Once acquired, the - * snapshot is observably immutable. i.e. the same calls with the same parameters will return - * the same values. - */ - interface IScriptSnapshot { - /** Gets a portion of the script snapshot specified by [start, end). */ - getText(start: number, end: number): string; - /** Gets the length of this script snapshot. */ - getLength(): number; - /** - * This call returns the array containing the start position of every line. - * i.e."[0, 10, 55]". TODO: consider making this optional. The language service could - * always determine this (albeit in a more expensive manner). - */ - getLineStartPositions(): number[]; - /** - * Gets the TextChangeRange that describe how the text changed between this text and - * an older version. This information is used by the incremental parser to determine - * what sections of the script need to be re-parsed. 'undefined' can be returned if the - * change range cannot be determined. However, in that case, incremental parsing will - * not happen and the entire document will be re - parsed. - */ - getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; - } - module ScriptSnapshot { - function fromString(text: string): IScriptSnapshot; - } - interface PreProcessedFileInfo { - referencedFiles: FileReference[]; - importedFiles: FileReference[]; - isLibFile: boolean; - } - interface Logger { - log(s: string): void; - } - interface LanguageServiceHost extends Logger { - getCompilationSettings(): CompilerOptions; - getScriptFileNames(): string[]; - getScriptVersion(fileName: string): string; - getScriptIsOpen(fileName: string): boolean; - getScriptSnapshot(fileName: string): IScriptSnapshot; - getLocalizedDiagnosticMessages?(): any; - getCancellationToken?(): CancellationToken; - getCurrentDirectory(): string; - getDefaultLibFilename(options: CompilerOptions): string; - } - interface LanguageService { - cleanupSemanticCache(): void; - getSyntacticDiagnostics(fileName: string): Diagnostic[]; - getSemanticDiagnostics(fileName: string): Diagnostic[]; - getCompilerOptionsDiagnostics(): Diagnostic[]; - getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; - getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; - getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; - getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; - getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; - getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; - getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan; - getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems; - getRenameInfo(fileName: string, position: number): RenameInfo; - findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[]; - getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; - getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; - getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; - getNavigateToItems(searchValue: string): NavigateToItem[]; - getNavigationBarItems(fileName: string): NavigationBarItem[]; - getOutliningSpans(fileName: string): OutliningSpan[]; - getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; - getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; - getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number; - getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[]; - getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; - getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[]; - getEmitOutput(fileName: string): EmitOutput; - getSourceFile(filename: string): SourceFile; - dispose(): void; - } - class TextSpan { - private _start; - private _length; - /** - * Creates a TextSpan instance beginning with the position Start and having the Length - * specified with length. - */ - constructor(start: number, length: number); - toJSON(key: any): any; - start(): number; - length(): number; - end(): number; - isEmpty(): boolean; - /** - * Determines whether the position lies within the span. Returns true if the position is greater than or equal to Start and strictly less - * than End, otherwise false. - * @param position The position to check. - */ - containsPosition(position: number): boolean; - /** - * Determines whether span falls completely within this span. Returns true if the specified span falls completely within this span, otherwise false. - * @param span The span to check. - */ - containsTextSpan(span: TextSpan): boolean; - /** - * Determines whether the given span overlaps this span. Two spans are considered to overlap - * if they have positions in common and neither is empty. Empty spans do not overlap with any - * other span. Returns true if the spans overlap, false otherwise. - * @param span The span to check. - */ - overlapsWith(span: TextSpan): boolean; - /** - * Returns the overlap with the given span, or undefined if there is no overlap. - * @param span The span to check. - */ - overlap(span: TextSpan): TextSpan; - /** - * Determines whether span intersects this span. Two spans are considered to - * intersect if they have positions in common or the end of one span - * coincides with the start of the other span. Returns true if the spans intersect, false otherwise. - * @param The span to check. - */ - intersectsWithTextSpan(span: TextSpan): boolean; - intersectsWith(start: number, length: number): boolean; - /** - * Determines whether the given position intersects this span. - * A position is considered to intersect if it is between the start and - * end positions (inclusive) of this span. Returns true if the position intersects, false otherwise. - * @param position The position to check. - */ - intersectsWithPosition(position: number): boolean; - /** - * Returns the intersection with the given span, or undefined if there is no intersection. - * @param span The span to check. - */ - intersection(span: TextSpan): TextSpan; - /** - * Creates a new TextSpan from the given start and end positions - * as opposed to a position and length. - */ - static fromBounds(start: number, end: number): TextSpan; - } - class TextChangeRange { - static unchanged: TextChangeRange; - private _span; - private _newLength; - /** - * Initializes a new instance of TextChangeRange. - */ - constructor(span: TextSpan, newLength: number); - /** - * The span of text before the edit which is being changed - */ - span(): TextSpan; - /** - * Width of the span after the edit. A 0 here would represent a delete - */ - newLength(): number; - newSpan(): TextSpan; - isUnchanged(): boolean; - /** - * Called to merge all the changes that occurred across several versions of a script snapshot - * into a single change. i.e. if a user keeps making successive edits to a script we will - * have a text change from V1 to V2, V2 to V3, ..., Vn. - * - * This function will then merge those changes into a single change range valid between V1 and - * Vn. - */ - static collapseChangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; - } - interface ClassifiedSpan { - textSpan: TextSpan; - classificationType: string; - } - interface NavigationBarItem { - text: string; - kind: string; - kindModifiers: string; - spans: TextSpan[]; - childItems: NavigationBarItem[]; - indent: number; - bolded: boolean; - grayed: boolean; - } - interface TodoCommentDescriptor { - text: string; - priority: number; - } - interface TodoComment { - descriptor: TodoCommentDescriptor; - message: string; - position: number; - } - class TextChange { - span: TextSpan; - newText: string; - } - interface RenameLocation { - textSpan: TextSpan; - fileName: string; - } - interface ReferenceEntry { - textSpan: TextSpan; - fileName: string; - isWriteAccess: boolean; - } - interface NavigateToItem { - name: string; - kind: string; - kindModifiers: string; - matchKind: string; - fileName: string; - textSpan: TextSpan; - containerName: string; - containerKind: string; - } - interface EditorOptions { - IndentSize: number; - TabSize: number; - NewLineCharacter: string; - ConvertTabsToSpaces: boolean; - } - interface FormatCodeOptions extends EditorOptions { - InsertSpaceAfterCommaDelimiter: boolean; - InsertSpaceAfterSemicolonInForStatements: boolean; - InsertSpaceBeforeAndAfterBinaryOperators: boolean; - InsertSpaceAfterKeywordsInControlFlowStatements: boolean; - InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; - InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; - PlaceOpenBraceOnNewLineForFunctions: boolean; - PlaceOpenBraceOnNewLineForControlBlocks: boolean; - } - interface DefinitionInfo { - fileName: string; - textSpan: TextSpan; - kind: string; - name: string; - containerKind: string; - containerName: string; - } - enum SymbolDisplayPartKind { - aliasName = 0, - className = 1, - enumName = 2, - fieldName = 3, - interfaceName = 4, - keyword = 5, - lineBreak = 6, - numericLiteral = 7, - stringLiteral = 8, - localName = 9, - methodName = 10, - moduleName = 11, - operator = 12, - parameterName = 13, - propertyName = 14, - punctuation = 15, - space = 16, - text = 17, - typeParameterName = 18, - enumMemberName = 19, - functionName = 20, - regularExpressionLiteral = 21, - } - interface SymbolDisplayPart { - text: string; - kind: string; - } - interface QuickInfo { - kind: string; - kindModifiers: string; - textSpan: TextSpan; - displayParts: SymbolDisplayPart[]; - documentation: SymbolDisplayPart[]; - } - interface RenameInfo { - canRename: boolean; - localizedErrorMessage: string; - displayName: string; - fullDisplayName: string; - kind: string; - kindModifiers: string; - triggerSpan: TextSpan; - } - interface SignatureHelpParameter { - name: string; - documentation: SymbolDisplayPart[]; - displayParts: SymbolDisplayPart[]; - isOptional: boolean; - } - /** - * Represents a single signature to show in signature help. - * The id is used for subsequent calls into the language service to ask questions about the - * signature help item in the context of any documents that have been updated. i.e. after - * an edit has happened, while signature help is still active, the host can ask important - * questions like 'what parameter is the user currently contained within?'. - */ - interface SignatureHelpItem { - isVariadic: boolean; - prefixDisplayParts: SymbolDisplayPart[]; - suffixDisplayParts: SymbolDisplayPart[]; - separatorDisplayParts: SymbolDisplayPart[]; - parameters: SignatureHelpParameter[]; - documentation: SymbolDisplayPart[]; - } - /** - * Represents a set of signature help items, and the preferred item that should be selected. - */ - interface SignatureHelpItems { - items: SignatureHelpItem[]; - applicableSpan: TextSpan; - selectedItemIndex: number; - argumentIndex: number; - argumentCount: number; - } - interface CompletionInfo { - isMemberCompletion: boolean; - entries: CompletionEntry[]; - } - interface CompletionEntry { - name: string; - kind: string; - kindModifiers: string; - } - interface CompletionEntryDetails { - name: string; - kind: string; - kindModifiers: string; - displayParts: SymbolDisplayPart[]; - documentation: SymbolDisplayPart[]; - } - interface OutliningSpan { - /** The span of the document to actually collapse. */ - textSpan: TextSpan; - /** The span of the document to display when the user hovers over the collapsed span. */ - hintSpan: TextSpan; - /** The text to display in the editor for the collapsed region. */ - bannerText: string; - /** - * Whether or not this region should be automatically collapsed when - * the 'Collapse to Definitions' command is invoked. - */ - autoCollapse: boolean; - } - interface EmitOutput { - outputFiles: OutputFile[]; - emitOutputStatus: EmitReturnStatus; - } - const enum OutputFileType { - JavaScript = 0, - SourceMap = 1, - Declaration = 2, - } - interface OutputFile { - name: string; - writeByteOrderMark: boolean; - text: string; - } - const enum EndOfLineState { - Start = 0, - InMultiLineCommentTrivia = 1, - InSingleQuoteStringLiteral = 2, - InDoubleQuoteStringLiteral = 3, - } - enum TokenClass { - Punctuation = 0, - Keyword = 1, - Operator = 2, - Comment = 3, - Whitespace = 4, - Identifier = 5, - NumberLiteral = 6, - StringLiteral = 7, - RegExpLiteral = 8, - } - interface ClassificationResult { - finalLexState: EndOfLineState; - entries: ClassificationInfo[]; - } - interface ClassificationInfo { - length: number; - classification: TokenClass; - } - interface Classifier { - getClassificationsForLine(text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean): ClassificationResult; - } - interface DocumentRegistry { - acquireDocument(filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean): SourceFile; - updateDocument(sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; - releaseDocument(filename: string, compilationSettings: CompilerOptions): void; - } - class ScriptElementKind { - static unknown: string; - static keyword: string; - static scriptElement: string; - static moduleElement: string; - static classElement: string; - static interfaceElement: string; - static typeElement: string; - static enumElement: string; - static variableElement: string; - static localVariableElement: string; - static functionElement: string; - static localFunctionElement: string; - static memberFunctionElement: string; - static memberGetAccessorElement: string; - static memberSetAccessorElement: string; - static memberVariableElement: string; - static constructorImplementationElement: string; - static callSignatureElement: string; - static indexSignatureElement: string; - static constructSignatureElement: string; - static parameterElement: string; - static typeParameterElement: string; - static primitiveType: string; - static label: string; - static alias: string; - static constElement: string; - static letElement: string; - } - class ScriptElementKindModifier { - static none: string; - static publicMemberModifier: string; - static privateMemberModifier: string; - static protectedMemberModifier: string; - static exportedModifier: string; - static ambientModifier: string; - static staticModifier: string; - } - class ClassificationTypeNames { - static comment: string; - static identifier: string; - static keyword: string; - static numericLiteral: string; - static operator: string; - static stringLiteral: string; - static whiteSpace: string; - static text: string; - static punctuation: string; - static className: string; - static enumName: string; - static interfaceName: string; - static moduleName: string; - static typeParameterName: string; - static typeAlias: string; - } - interface DisplayPartsSymbolWriter extends SymbolWriter { - displayParts(): SymbolDisplayPart[]; - } - function displayPartsToString(displayParts: SymbolDisplayPart[]): string; - function getDefaultCompilerOptions(): CompilerOptions; - class OperationCanceledException { - } - class CancellationTokenObject { - private cancellationToken; - static None: CancellationTokenObject; - constructor(cancellationToken: CancellationToken); - isCancellationRequested(): boolean; - throwIfCancellationRequested(): void; - } - function createDocumentRegistry(): DocumentRegistry; - function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; - function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry): LanguageService; - function createClassifier(host: Logger): Classifier; -} - - -//// [APISample_standalone_compile.js] -var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", 2 /* Latest */, "0.0"); -var program = ts.createProgram(["file1.ts"], {}, undefined); diff --git a/tests/baselines/reference/APISample_standalone_compile.types b/tests/baselines/reference/APISample_standalone_compile.types deleted file mode 100644 index 465a89b8f97..00000000000 --- a/tests/baselines/reference/APISample_standalone_compile.types +++ /dev/null @@ -1,5756 +0,0 @@ -=== tests/cases/compiler/APISample_standalone_compile.ts === - -var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); ->sourceFile : ts.SourceFile ->ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0") : ts.SourceFile ->ts.createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, version: string, isOpen?: boolean) => ts.SourceFile ->ts : typeof ts ->createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, version: string, isOpen?: boolean) => ts.SourceFile ->ts.ScriptTarget.Latest : ts.ScriptTarget ->ts.ScriptTarget : typeof ts.ScriptTarget ->ts : typeof ts ->ScriptTarget : typeof ts.ScriptTarget ->Latest : ts.ScriptTarget - -var program = ts.createProgram(["file1.ts"], {}, undefined); ->program : ts.Program ->ts.createProgram(["file1.ts"], {}, undefined) : ts.Program ->ts.createProgram : (rootNames: string[], options: ts.CompilerOptions, host: ts.CompilerHost) => ts.Program ->ts : typeof ts ->createProgram : (rootNames: string[], options: ts.CompilerOptions, host: ts.CompilerHost) => ts.Program ->["file1.ts"] : string[] ->{} : { [x: string]: undefined; } ->undefined : undefined - -=== typescriptServices.d.ts === -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ - -declare module ts { ->ts : typeof ts - - interface Map { ->Map : Map ->T : T - - [index: string]: T; ->index : string ->T : T - } - interface TextRange { ->TextRange : TextRange - - pos: number; ->pos : number - - end: number; ->end : number - } - const enum SyntaxKind { ->SyntaxKind : SyntaxKind - - Unknown = 0, ->Unknown : SyntaxKind - - EndOfFileToken = 1, ->EndOfFileToken : SyntaxKind - - SingleLineCommentTrivia = 2, ->SingleLineCommentTrivia : SyntaxKind - - MultiLineCommentTrivia = 3, ->MultiLineCommentTrivia : SyntaxKind - - NewLineTrivia = 4, ->NewLineTrivia : SyntaxKind - - WhitespaceTrivia = 5, ->WhitespaceTrivia : SyntaxKind - - NumericLiteral = 6, ->NumericLiteral : SyntaxKind - - StringLiteral = 7, ->StringLiteral : SyntaxKind - - RegularExpressionLiteral = 8, ->RegularExpressionLiteral : SyntaxKind - - NoSubstitutionTemplateLiteral = 9, ->NoSubstitutionTemplateLiteral : SyntaxKind - - TemplateHead = 10, ->TemplateHead : SyntaxKind - - TemplateMiddle = 11, ->TemplateMiddle : SyntaxKind - - TemplateTail = 12, ->TemplateTail : SyntaxKind - - OpenBraceToken = 13, ->OpenBraceToken : SyntaxKind - - CloseBraceToken = 14, ->CloseBraceToken : SyntaxKind - - OpenParenToken = 15, ->OpenParenToken : SyntaxKind - - CloseParenToken = 16, ->CloseParenToken : SyntaxKind - - OpenBracketToken = 17, ->OpenBracketToken : SyntaxKind - - CloseBracketToken = 18, ->CloseBracketToken : SyntaxKind - - DotToken = 19, ->DotToken : SyntaxKind - - DotDotDotToken = 20, ->DotDotDotToken : SyntaxKind - - SemicolonToken = 21, ->SemicolonToken : SyntaxKind - - CommaToken = 22, ->CommaToken : SyntaxKind - - LessThanToken = 23, ->LessThanToken : SyntaxKind - - GreaterThanToken = 24, ->GreaterThanToken : SyntaxKind - - LessThanEqualsToken = 25, ->LessThanEqualsToken : SyntaxKind - - GreaterThanEqualsToken = 26, ->GreaterThanEqualsToken : SyntaxKind - - EqualsEqualsToken = 27, ->EqualsEqualsToken : SyntaxKind - - ExclamationEqualsToken = 28, ->ExclamationEqualsToken : SyntaxKind - - EqualsEqualsEqualsToken = 29, ->EqualsEqualsEqualsToken : SyntaxKind - - ExclamationEqualsEqualsToken = 30, ->ExclamationEqualsEqualsToken : SyntaxKind - - EqualsGreaterThanToken = 31, ->EqualsGreaterThanToken : SyntaxKind - - PlusToken = 32, ->PlusToken : SyntaxKind - - MinusToken = 33, ->MinusToken : SyntaxKind - - AsteriskToken = 34, ->AsteriskToken : SyntaxKind - - SlashToken = 35, ->SlashToken : SyntaxKind - - PercentToken = 36, ->PercentToken : SyntaxKind - - PlusPlusToken = 37, ->PlusPlusToken : SyntaxKind - - MinusMinusToken = 38, ->MinusMinusToken : SyntaxKind - - LessThanLessThanToken = 39, ->LessThanLessThanToken : SyntaxKind - - GreaterThanGreaterThanToken = 40, ->GreaterThanGreaterThanToken : SyntaxKind - - GreaterThanGreaterThanGreaterThanToken = 41, ->GreaterThanGreaterThanGreaterThanToken : SyntaxKind - - AmpersandToken = 42, ->AmpersandToken : SyntaxKind - - BarToken = 43, ->BarToken : SyntaxKind - - CaretToken = 44, ->CaretToken : SyntaxKind - - ExclamationToken = 45, ->ExclamationToken : SyntaxKind - - TildeToken = 46, ->TildeToken : SyntaxKind - - AmpersandAmpersandToken = 47, ->AmpersandAmpersandToken : SyntaxKind - - BarBarToken = 48, ->BarBarToken : SyntaxKind - - QuestionToken = 49, ->QuestionToken : SyntaxKind - - ColonToken = 50, ->ColonToken : SyntaxKind - - EqualsToken = 51, ->EqualsToken : SyntaxKind - - PlusEqualsToken = 52, ->PlusEqualsToken : SyntaxKind - - MinusEqualsToken = 53, ->MinusEqualsToken : SyntaxKind - - AsteriskEqualsToken = 54, ->AsteriskEqualsToken : SyntaxKind - - SlashEqualsToken = 55, ->SlashEqualsToken : SyntaxKind - - PercentEqualsToken = 56, ->PercentEqualsToken : SyntaxKind - - LessThanLessThanEqualsToken = 57, ->LessThanLessThanEqualsToken : SyntaxKind - - GreaterThanGreaterThanEqualsToken = 58, ->GreaterThanGreaterThanEqualsToken : SyntaxKind - - GreaterThanGreaterThanGreaterThanEqualsToken = 59, ->GreaterThanGreaterThanGreaterThanEqualsToken : SyntaxKind - - AmpersandEqualsToken = 60, ->AmpersandEqualsToken : SyntaxKind - - BarEqualsToken = 61, ->BarEqualsToken : SyntaxKind - - CaretEqualsToken = 62, ->CaretEqualsToken : SyntaxKind - - Identifier = 63, ->Identifier : SyntaxKind - - BreakKeyword = 64, ->BreakKeyword : SyntaxKind - - CaseKeyword = 65, ->CaseKeyword : SyntaxKind - - CatchKeyword = 66, ->CatchKeyword : SyntaxKind - - ClassKeyword = 67, ->ClassKeyword : SyntaxKind - - ConstKeyword = 68, ->ConstKeyword : SyntaxKind - - ContinueKeyword = 69, ->ContinueKeyword : SyntaxKind - - DebuggerKeyword = 70, ->DebuggerKeyword : SyntaxKind - - DefaultKeyword = 71, ->DefaultKeyword : SyntaxKind - - DeleteKeyword = 72, ->DeleteKeyword : SyntaxKind - - DoKeyword = 73, ->DoKeyword : SyntaxKind - - ElseKeyword = 74, ->ElseKeyword : SyntaxKind - - EnumKeyword = 75, ->EnumKeyword : SyntaxKind - - ExportKeyword = 76, ->ExportKeyword : SyntaxKind - - ExtendsKeyword = 77, ->ExtendsKeyword : SyntaxKind - - FalseKeyword = 78, ->FalseKeyword : SyntaxKind - - FinallyKeyword = 79, ->FinallyKeyword : SyntaxKind - - ForKeyword = 80, ->ForKeyword : SyntaxKind - - FunctionKeyword = 81, ->FunctionKeyword : SyntaxKind - - IfKeyword = 82, ->IfKeyword : SyntaxKind - - ImportKeyword = 83, ->ImportKeyword : SyntaxKind - - InKeyword = 84, ->InKeyword : SyntaxKind - - InstanceOfKeyword = 85, ->InstanceOfKeyword : SyntaxKind - - NewKeyword = 86, ->NewKeyword : SyntaxKind - - NullKeyword = 87, ->NullKeyword : SyntaxKind - - ReturnKeyword = 88, ->ReturnKeyword : SyntaxKind - - SuperKeyword = 89, ->SuperKeyword : SyntaxKind - - SwitchKeyword = 90, ->SwitchKeyword : SyntaxKind - - ThisKeyword = 91, ->ThisKeyword : SyntaxKind - - ThrowKeyword = 92, ->ThrowKeyword : SyntaxKind - - TrueKeyword = 93, ->TrueKeyword : SyntaxKind - - TryKeyword = 94, ->TryKeyword : SyntaxKind - - TypeOfKeyword = 95, ->TypeOfKeyword : SyntaxKind - - VarKeyword = 96, ->VarKeyword : SyntaxKind - - VoidKeyword = 97, ->VoidKeyword : SyntaxKind - - WhileKeyword = 98, ->WhileKeyword : SyntaxKind - - WithKeyword = 99, ->WithKeyword : SyntaxKind - - ImplementsKeyword = 100, ->ImplementsKeyword : SyntaxKind - - InterfaceKeyword = 101, ->InterfaceKeyword : SyntaxKind - - LetKeyword = 102, ->LetKeyword : SyntaxKind - - PackageKeyword = 103, ->PackageKeyword : SyntaxKind - - PrivateKeyword = 104, ->PrivateKeyword : SyntaxKind - - ProtectedKeyword = 105, ->ProtectedKeyword : SyntaxKind - - PublicKeyword = 106, ->PublicKeyword : SyntaxKind - - StaticKeyword = 107, ->StaticKeyword : SyntaxKind - - YieldKeyword = 108, ->YieldKeyword : SyntaxKind - - AnyKeyword = 109, ->AnyKeyword : SyntaxKind - - BooleanKeyword = 110, ->BooleanKeyword : SyntaxKind - - ConstructorKeyword = 111, ->ConstructorKeyword : SyntaxKind - - DeclareKeyword = 112, ->DeclareKeyword : SyntaxKind - - GetKeyword = 113, ->GetKeyword : SyntaxKind - - ModuleKeyword = 114, ->ModuleKeyword : SyntaxKind - - RequireKeyword = 115, ->RequireKeyword : SyntaxKind - - NumberKeyword = 116, ->NumberKeyword : SyntaxKind - - SetKeyword = 117, ->SetKeyword : SyntaxKind - - StringKeyword = 118, ->StringKeyword : SyntaxKind - - TypeKeyword = 119, ->TypeKeyword : SyntaxKind - - QualifiedName = 120, ->QualifiedName : SyntaxKind - - ComputedPropertyName = 121, ->ComputedPropertyName : SyntaxKind - - TypeParameter = 122, ->TypeParameter : SyntaxKind - - Parameter = 123, ->Parameter : SyntaxKind - - Property = 124, ->Property : SyntaxKind - - Method = 125, ->Method : SyntaxKind - - Constructor = 126, ->Constructor : SyntaxKind - - GetAccessor = 127, ->GetAccessor : SyntaxKind - - SetAccessor = 128, ->SetAccessor : SyntaxKind - - CallSignature = 129, ->CallSignature : SyntaxKind - - ConstructSignature = 130, ->ConstructSignature : SyntaxKind - - IndexSignature = 131, ->IndexSignature : SyntaxKind - - TypeReference = 132, ->TypeReference : SyntaxKind - - FunctionType = 133, ->FunctionType : SyntaxKind - - ConstructorType = 134, ->ConstructorType : SyntaxKind - - TypeQuery = 135, ->TypeQuery : SyntaxKind - - TypeLiteral = 136, ->TypeLiteral : SyntaxKind - - ArrayType = 137, ->ArrayType : SyntaxKind - - TupleType = 138, ->TupleType : SyntaxKind - - UnionType = 139, ->UnionType : SyntaxKind - - ParenthesizedType = 140, ->ParenthesizedType : SyntaxKind - - ArrayLiteralExpression = 141, ->ArrayLiteralExpression : SyntaxKind - - ObjectLiteralExpression = 142, ->ObjectLiteralExpression : SyntaxKind - - PropertyAccessExpression = 143, ->PropertyAccessExpression : SyntaxKind - - ElementAccessExpression = 144, ->ElementAccessExpression : SyntaxKind - - CallExpression = 145, ->CallExpression : SyntaxKind - - NewExpression = 146, ->NewExpression : SyntaxKind - - TaggedTemplateExpression = 147, ->TaggedTemplateExpression : SyntaxKind - - TypeAssertionExpression = 148, ->TypeAssertionExpression : SyntaxKind - - ParenthesizedExpression = 149, ->ParenthesizedExpression : SyntaxKind - - FunctionExpression = 150, ->FunctionExpression : SyntaxKind - - ArrowFunction = 151, ->ArrowFunction : SyntaxKind - - DeleteExpression = 152, ->DeleteExpression : SyntaxKind - - TypeOfExpression = 153, ->TypeOfExpression : SyntaxKind - - VoidExpression = 154, ->VoidExpression : SyntaxKind - - PrefixUnaryExpression = 155, ->PrefixUnaryExpression : SyntaxKind - - PostfixUnaryExpression = 156, ->PostfixUnaryExpression : SyntaxKind - - BinaryExpression = 157, ->BinaryExpression : SyntaxKind - - ConditionalExpression = 158, ->ConditionalExpression : SyntaxKind - - TemplateExpression = 159, ->TemplateExpression : SyntaxKind - - YieldExpression = 160, ->YieldExpression : SyntaxKind - - OmittedExpression = 161, ->OmittedExpression : SyntaxKind - - TemplateSpan = 162, ->TemplateSpan : SyntaxKind - - Block = 163, ->Block : SyntaxKind - - VariableStatement = 164, ->VariableStatement : SyntaxKind - - EmptyStatement = 165, ->EmptyStatement : SyntaxKind - - ExpressionStatement = 166, ->ExpressionStatement : SyntaxKind - - IfStatement = 167, ->IfStatement : SyntaxKind - - DoStatement = 168, ->DoStatement : SyntaxKind - - WhileStatement = 169, ->WhileStatement : SyntaxKind - - ForStatement = 170, ->ForStatement : SyntaxKind - - ForInStatement = 171, ->ForInStatement : SyntaxKind - - ContinueStatement = 172, ->ContinueStatement : SyntaxKind - - BreakStatement = 173, ->BreakStatement : SyntaxKind - - ReturnStatement = 174, ->ReturnStatement : SyntaxKind - - WithStatement = 175, ->WithStatement : SyntaxKind - - SwitchStatement = 176, ->SwitchStatement : SyntaxKind - - LabeledStatement = 177, ->LabeledStatement : SyntaxKind - - ThrowStatement = 178, ->ThrowStatement : SyntaxKind - - TryStatement = 179, ->TryStatement : SyntaxKind - - TryBlock = 180, ->TryBlock : SyntaxKind - - FinallyBlock = 181, ->FinallyBlock : SyntaxKind - - DebuggerStatement = 182, ->DebuggerStatement : SyntaxKind - - VariableDeclaration = 183, ->VariableDeclaration : SyntaxKind - - FunctionDeclaration = 184, ->FunctionDeclaration : SyntaxKind - - ClassDeclaration = 185, ->ClassDeclaration : SyntaxKind - - InterfaceDeclaration = 186, ->InterfaceDeclaration : SyntaxKind - - TypeAliasDeclaration = 187, ->TypeAliasDeclaration : SyntaxKind - - EnumDeclaration = 188, ->EnumDeclaration : SyntaxKind - - ModuleDeclaration = 189, ->ModuleDeclaration : SyntaxKind - - ModuleBlock = 190, ->ModuleBlock : SyntaxKind - - ImportDeclaration = 191, ->ImportDeclaration : SyntaxKind - - ExportAssignment = 192, ->ExportAssignment : SyntaxKind - - ExternalModuleReference = 193, ->ExternalModuleReference : SyntaxKind - - CaseClause = 194, ->CaseClause : SyntaxKind - - DefaultClause = 195, ->DefaultClause : SyntaxKind - - HeritageClause = 196, ->HeritageClause : SyntaxKind - - CatchClause = 197, ->CatchClause : SyntaxKind - - PropertyAssignment = 198, ->PropertyAssignment : SyntaxKind - - ShorthandPropertyAssignment = 199, ->ShorthandPropertyAssignment : SyntaxKind - - EnumMember = 200, ->EnumMember : SyntaxKind - - SourceFile = 201, ->SourceFile : SyntaxKind - - Program = 202, ->Program : SyntaxKind - - SyntaxList = 203, ->SyntaxList : SyntaxKind - - Count = 204, ->Count : SyntaxKind - - FirstAssignment = 51, ->FirstAssignment : SyntaxKind - - LastAssignment = 62, ->LastAssignment : SyntaxKind - - FirstReservedWord = 64, ->FirstReservedWord : SyntaxKind - - LastReservedWord = 99, ->LastReservedWord : SyntaxKind - - FirstKeyword = 64, ->FirstKeyword : SyntaxKind - - LastKeyword = 119, ->LastKeyword : SyntaxKind - - FirstFutureReservedWord = 100, ->FirstFutureReservedWord : SyntaxKind - - LastFutureReservedWord = 108, ->LastFutureReservedWord : SyntaxKind - - FirstTypeNode = 132, ->FirstTypeNode : SyntaxKind - - LastTypeNode = 140, ->LastTypeNode : SyntaxKind - - FirstPunctuation = 13, ->FirstPunctuation : SyntaxKind - - LastPunctuation = 62, ->LastPunctuation : SyntaxKind - - FirstToken = 0, ->FirstToken : SyntaxKind - - LastToken = 119, ->LastToken : SyntaxKind - - FirstTriviaToken = 2, ->FirstTriviaToken : SyntaxKind - - LastTriviaToken = 5, ->LastTriviaToken : SyntaxKind - - FirstLiteralToken = 6, ->FirstLiteralToken : SyntaxKind - - LastLiteralToken = 9, ->LastLiteralToken : SyntaxKind - - FirstTemplateToken = 9, ->FirstTemplateToken : SyntaxKind - - LastTemplateToken = 12, ->LastTemplateToken : SyntaxKind - - FirstOperator = 21, ->FirstOperator : SyntaxKind - - LastOperator = 62, ->LastOperator : SyntaxKind - - FirstBinaryOperator = 23, ->FirstBinaryOperator : SyntaxKind - - LastBinaryOperator = 62, ->LastBinaryOperator : SyntaxKind - - FirstNode = 120, ->FirstNode : SyntaxKind - } - const enum NodeFlags { ->NodeFlags : NodeFlags - - Export = 1, ->Export : NodeFlags - - Ambient = 2, ->Ambient : NodeFlags - - Public = 16, ->Public : NodeFlags - - Private = 32, ->Private : NodeFlags - - Protected = 64, ->Protected : NodeFlags - - Static = 128, ->Static : NodeFlags - - MultiLine = 256, ->MultiLine : NodeFlags - - Synthetic = 512, ->Synthetic : NodeFlags - - DeclarationFile = 1024, ->DeclarationFile : NodeFlags - - Let = 2048, ->Let : NodeFlags - - Const = 4096, ->Const : NodeFlags - - OctalLiteral = 8192, ->OctalLiteral : NodeFlags - - Modifier = 243, ->Modifier : NodeFlags - - AccessibilityModifier = 112, ->AccessibilityModifier : NodeFlags - - BlockScoped = 6144, ->BlockScoped : NodeFlags - } - const enum ParserContextFlags { ->ParserContextFlags : ParserContextFlags - - StrictMode = 1, ->StrictMode : ParserContextFlags - - DisallowIn = 2, ->DisallowIn : ParserContextFlags - - Yield = 4, ->Yield : ParserContextFlags - - GeneratorParameter = 8, ->GeneratorParameter : ParserContextFlags - - ContainsError = 16, ->ContainsError : ParserContextFlags - - HasPropagatedChildContainsErrorFlag = 32, ->HasPropagatedChildContainsErrorFlag : ParserContextFlags - } - interface Node extends TextRange { ->Node : Node ->TextRange : TextRange - - kind: SyntaxKind; ->kind : SyntaxKind ->SyntaxKind : SyntaxKind - - flags: NodeFlags; ->flags : NodeFlags ->NodeFlags : NodeFlags - - parserContextFlags?: ParserContextFlags; ->parserContextFlags : ParserContextFlags ->ParserContextFlags : ParserContextFlags - - id?: number; ->id : number - - parent?: Node; ->parent : Node ->Node : Node - - symbol?: Symbol; ->symbol : Symbol ->Symbol : Symbol - - locals?: SymbolTable; ->locals : SymbolTable ->SymbolTable : SymbolTable - - nextContainer?: Node; ->nextContainer : Node ->Node : Node - - localSymbol?: Symbol; ->localSymbol : Symbol ->Symbol : Symbol - - modifiers?: ModifiersArray; ->modifiers : ModifiersArray ->ModifiersArray : ModifiersArray - } - interface NodeArray extends Array, TextRange { ->NodeArray : NodeArray ->T : T ->Array : T[] ->T : T ->TextRange : TextRange - - hasTrailingComma?: boolean; ->hasTrailingComma : boolean - } - interface ModifiersArray extends NodeArray { ->ModifiersArray : ModifiersArray ->NodeArray : NodeArray ->Node : Node - - flags: number; ->flags : number - } - interface Identifier extends PrimaryExpression { ->Identifier : Identifier ->PrimaryExpression : PrimaryExpression - - text: string; ->text : string - } - interface QualifiedName extends Node { ->QualifiedName : QualifiedName ->Node : Node - - left: EntityName; ->left : Identifier | QualifiedName ->EntityName : Identifier | QualifiedName - - right: Identifier; ->right : Identifier ->Identifier : Identifier - } - type EntityName = Identifier | QualifiedName; ->EntityName : Identifier | QualifiedName ->Identifier : Identifier ->QualifiedName : QualifiedName - - type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName ->Identifier : Identifier ->LiteralExpression : LiteralExpression ->ComputedPropertyName : ComputedPropertyName - - interface Declaration extends Node { ->Declaration : Declaration ->Node : Node - - _declarationBrand: any; ->_declarationBrand : any - - name?: DeclarationName; ->name : Identifier | LiteralExpression | ComputedPropertyName ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName - } - interface ComputedPropertyName extends Node { ->ComputedPropertyName : ComputedPropertyName ->Node : Node - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface TypeParameterDeclaration extends Declaration { ->TypeParameterDeclaration : TypeParameterDeclaration ->Declaration : Declaration - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - constraint?: TypeNode; ->constraint : TypeNode ->TypeNode : TypeNode - - expression?: Expression; ->expression : Expression ->Expression : Expression - } - interface SignatureDeclaration extends Declaration { ->SignatureDeclaration : SignatureDeclaration ->Declaration : Declaration - - typeParameters?: NodeArray; ->typeParameters : NodeArray ->NodeArray : NodeArray ->TypeParameterDeclaration : TypeParameterDeclaration - - parameters: NodeArray; ->parameters : NodeArray ->NodeArray : NodeArray ->ParameterDeclaration : ParameterDeclaration - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - } - interface VariableDeclaration extends Declaration { ->VariableDeclaration : VariableDeclaration ->Declaration : Declaration - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - } - interface ParameterDeclaration extends Declaration { ->ParameterDeclaration : ParameterDeclaration ->Declaration : Declaration - - dotDotDotToken?: Node; ->dotDotDotToken : Node ->Node : Node - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - questionToken?: Node; ->questionToken : Node ->Node : Node - - type?: TypeNode | StringLiteralExpression; ->type : TypeNode | StringLiteralExpression ->TypeNode : TypeNode ->StringLiteralExpression : StringLiteralExpression - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - } - interface PropertyDeclaration extends Declaration, ClassElement { ->PropertyDeclaration : PropertyDeclaration ->Declaration : Declaration ->ClassElement : ClassElement - - _propertyDeclarationBrand: any; ->_propertyDeclarationBrand : any - - questionToken?: Node; ->questionToken : Node ->Node : Node - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - } - type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; ->VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration ->VariableDeclaration : VariableDeclaration ->ParameterDeclaration : ParameterDeclaration - - type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; ->VariableOrParameterOrPropertyDeclaration : ParameterDeclaration | VariableDeclaration | PropertyDeclaration ->VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration ->PropertyDeclaration : PropertyDeclaration - - interface ObjectLiteralElement extends Declaration { ->ObjectLiteralElement : ObjectLiteralElement ->Declaration : Declaration - - _objectLiteralBrandBrand: any; ->_objectLiteralBrandBrand : any - } - interface ShorthandPropertyAssignment extends ObjectLiteralElement { ->ShorthandPropertyAssignment : ShorthandPropertyAssignment ->ObjectLiteralElement : ObjectLiteralElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - questionToken?: Node; ->questionToken : Node ->Node : Node - } - interface PropertyAssignment extends ObjectLiteralElement { ->PropertyAssignment : PropertyAssignment ->ObjectLiteralElement : ObjectLiteralElement - - _propertyAssignmentBrand: any; ->_propertyAssignmentBrand : any - - name: DeclarationName; ->name : Identifier | LiteralExpression | ComputedPropertyName ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName - - questionToken?: Node; ->questionToken : Node ->Node : Node - - initializer: Expression; ->initializer : Expression ->Expression : Expression - } - /** - * Several node kinds share function-like features such as a signature, - * a name, and a body. These nodes should extend FunctionLikeDeclaration. - * Examples: - * FunctionDeclaration - * MethodDeclaration - * AccessorDeclaration - */ - interface FunctionLikeDeclaration extends SignatureDeclaration { ->FunctionLikeDeclaration : FunctionLikeDeclaration ->SignatureDeclaration : SignatureDeclaration - - _functionLikeDeclarationBrand: any; ->_functionLikeDeclarationBrand : any - - asteriskToken?: Node; ->asteriskToken : Node ->Node : Node - - questionToken?: Node; ->questionToken : Node ->Node : Node - - body?: Block | Expression; ->body : Expression | Block ->Block : Block ->Expression : Expression - } - interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { ->FunctionDeclaration : FunctionDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration ->Statement : Statement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - body?: Block; ->body : Block ->Block : Block - } - interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { ->MethodDeclaration : MethodDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration ->ClassElement : ClassElement ->ObjectLiteralElement : ObjectLiteralElement - - body?: Block; ->body : Block ->Block : Block - } - interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { ->ConstructorDeclaration : ConstructorDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration ->ClassElement : ClassElement - - body?: Block; ->body : Block ->Block : Block - } - interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { ->AccessorDeclaration : AccessorDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration ->ClassElement : ClassElement ->ObjectLiteralElement : ObjectLiteralElement - - _accessorDeclarationBrand: any; ->_accessorDeclarationBrand : any - - body: Block; ->body : Block ->Block : Block - } - interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { ->IndexSignatureDeclaration : IndexSignatureDeclaration ->SignatureDeclaration : SignatureDeclaration ->ClassElement : ClassElement - - _indexSignatureDeclarationBrand: any; ->_indexSignatureDeclarationBrand : any - } - interface TypeNode extends Node { ->TypeNode : TypeNode ->Node : Node - - _typeNodeBrand: any; ->_typeNodeBrand : any - } - interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { ->FunctionOrConstructorTypeNode : FunctionOrConstructorTypeNode ->TypeNode : TypeNode ->SignatureDeclaration : SignatureDeclaration - - _functionOrConstructorTypeNodeBrand: any; ->_functionOrConstructorTypeNodeBrand : any - } - interface TypeReferenceNode extends TypeNode { ->TypeReferenceNode : TypeReferenceNode ->TypeNode : TypeNode - - typeName: EntityName; ->typeName : Identifier | QualifiedName ->EntityName : Identifier | QualifiedName - - typeArguments?: NodeArray; ->typeArguments : NodeArray ->NodeArray : NodeArray ->TypeNode : TypeNode - } - interface TypeQueryNode extends TypeNode { ->TypeQueryNode : TypeQueryNode ->TypeNode : TypeNode - - exprName: EntityName; ->exprName : Identifier | QualifiedName ->EntityName : Identifier | QualifiedName - } - interface TypeLiteralNode extends TypeNode, Declaration { ->TypeLiteralNode : TypeLiteralNode ->TypeNode : TypeNode ->Declaration : Declaration - - members: NodeArray; ->members : NodeArray ->NodeArray : NodeArray ->Node : Node - } - interface ArrayTypeNode extends TypeNode { ->ArrayTypeNode : ArrayTypeNode ->TypeNode : TypeNode - - elementType: TypeNode; ->elementType : TypeNode ->TypeNode : TypeNode - } - interface TupleTypeNode extends TypeNode { ->TupleTypeNode : TupleTypeNode ->TypeNode : TypeNode - - elementTypes: NodeArray; ->elementTypes : NodeArray ->NodeArray : NodeArray ->TypeNode : TypeNode - } - interface UnionTypeNode extends TypeNode { ->UnionTypeNode : UnionTypeNode ->TypeNode : TypeNode - - types: NodeArray; ->types : NodeArray ->NodeArray : NodeArray ->TypeNode : TypeNode - } - interface ParenthesizedTypeNode extends TypeNode { ->ParenthesizedTypeNode : ParenthesizedTypeNode ->TypeNode : TypeNode - - type: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - } - interface Expression extends Node { ->Expression : Expression ->Node : Node - - _expressionBrand: any; ->_expressionBrand : any - - contextualType?: Type; ->contextualType : Type ->Type : Type - } - interface UnaryExpression extends Expression { ->UnaryExpression : UnaryExpression ->Expression : Expression - - _unaryExpressionBrand: any; ->_unaryExpressionBrand : any - } - interface PrefixUnaryExpression extends UnaryExpression { ->PrefixUnaryExpression : PrefixUnaryExpression ->UnaryExpression : UnaryExpression - - operator: SyntaxKind; ->operator : SyntaxKind ->SyntaxKind : SyntaxKind - - operand: UnaryExpression; ->operand : UnaryExpression ->UnaryExpression : UnaryExpression - } - interface PostfixUnaryExpression extends PostfixExpression { ->PostfixUnaryExpression : PostfixUnaryExpression ->PostfixExpression : PostfixExpression - - operand: LeftHandSideExpression; ->operand : LeftHandSideExpression ->LeftHandSideExpression : LeftHandSideExpression - - operator: SyntaxKind; ->operator : SyntaxKind ->SyntaxKind : SyntaxKind - } - interface PostfixExpression extends UnaryExpression { ->PostfixExpression : PostfixExpression ->UnaryExpression : UnaryExpression - - _postfixExpressionBrand: any; ->_postfixExpressionBrand : any - } - interface LeftHandSideExpression extends PostfixExpression { ->LeftHandSideExpression : LeftHandSideExpression ->PostfixExpression : PostfixExpression - - _leftHandSideExpressionBrand: any; ->_leftHandSideExpressionBrand : any - } - interface MemberExpression extends LeftHandSideExpression { ->MemberExpression : MemberExpression ->LeftHandSideExpression : LeftHandSideExpression - - _memberExpressionBrand: any; ->_memberExpressionBrand : any - } - interface PrimaryExpression extends MemberExpression { ->PrimaryExpression : PrimaryExpression ->MemberExpression : MemberExpression - - _primaryExpressionBrand: any; ->_primaryExpressionBrand : any - } - interface DeleteExpression extends UnaryExpression { ->DeleteExpression : DeleteExpression ->UnaryExpression : UnaryExpression - - expression: UnaryExpression; ->expression : UnaryExpression ->UnaryExpression : UnaryExpression - } - interface TypeOfExpression extends UnaryExpression { ->TypeOfExpression : TypeOfExpression ->UnaryExpression : UnaryExpression - - expression: UnaryExpression; ->expression : UnaryExpression ->UnaryExpression : UnaryExpression - } - interface VoidExpression extends UnaryExpression { ->VoidExpression : VoidExpression ->UnaryExpression : UnaryExpression - - expression: UnaryExpression; ->expression : UnaryExpression ->UnaryExpression : UnaryExpression - } - interface YieldExpression extends Expression { ->YieldExpression : YieldExpression ->Expression : Expression - - asteriskToken?: Node; ->asteriskToken : Node ->Node : Node - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface BinaryExpression extends Expression { ->BinaryExpression : BinaryExpression ->Expression : Expression - - left: Expression; ->left : Expression ->Expression : Expression - - operator: SyntaxKind; ->operator : SyntaxKind ->SyntaxKind : SyntaxKind - - right: Expression; ->right : Expression ->Expression : Expression - } - interface ConditionalExpression extends Expression { ->ConditionalExpression : ConditionalExpression ->Expression : Expression - - condition: Expression; ->condition : Expression ->Expression : Expression - - whenTrue: Expression; ->whenTrue : Expression ->Expression : Expression - - whenFalse: Expression; ->whenFalse : Expression ->Expression : Expression - } - interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { ->FunctionExpression : FunctionExpression ->PrimaryExpression : PrimaryExpression ->FunctionLikeDeclaration : FunctionLikeDeclaration - - name?: Identifier; ->name : Identifier ->Identifier : Identifier - - body: Block | Expression; ->body : Expression | Block ->Block : Block ->Expression : Expression - } - interface LiteralExpression extends PrimaryExpression { ->LiteralExpression : LiteralExpression ->PrimaryExpression : PrimaryExpression - - text: string; ->text : string - - isUnterminated?: boolean; ->isUnterminated : boolean - } - interface StringLiteralExpression extends LiteralExpression { ->StringLiteralExpression : StringLiteralExpression ->LiteralExpression : LiteralExpression - - _stringLiteralExpressionBrand: any; ->_stringLiteralExpressionBrand : any - } - interface TemplateExpression extends PrimaryExpression { ->TemplateExpression : TemplateExpression ->PrimaryExpression : PrimaryExpression - - head: LiteralExpression; ->head : LiteralExpression ->LiteralExpression : LiteralExpression - - templateSpans: NodeArray; ->templateSpans : NodeArray ->NodeArray : NodeArray ->TemplateSpan : TemplateSpan - } - interface TemplateSpan extends Node { ->TemplateSpan : TemplateSpan ->Node : Node - - expression: Expression; ->expression : Expression ->Expression : Expression - - literal: LiteralExpression; ->literal : LiteralExpression ->LiteralExpression : LiteralExpression - } - interface ParenthesizedExpression extends PrimaryExpression { ->ParenthesizedExpression : ParenthesizedExpression ->PrimaryExpression : PrimaryExpression - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface ArrayLiteralExpression extends PrimaryExpression { ->ArrayLiteralExpression : ArrayLiteralExpression ->PrimaryExpression : PrimaryExpression - - elements: NodeArray; ->elements : NodeArray ->NodeArray : NodeArray ->Expression : Expression - } - interface ObjectLiteralExpression extends PrimaryExpression, Declaration { ->ObjectLiteralExpression : ObjectLiteralExpression ->PrimaryExpression : PrimaryExpression ->Declaration : Declaration - - properties: NodeArray; ->properties : NodeArray ->NodeArray : NodeArray ->ObjectLiteralElement : ObjectLiteralElement - } - interface PropertyAccessExpression extends MemberExpression { ->PropertyAccessExpression : PropertyAccessExpression ->MemberExpression : MemberExpression - - expression: LeftHandSideExpression; ->expression : LeftHandSideExpression ->LeftHandSideExpression : LeftHandSideExpression - - name: Identifier; ->name : Identifier ->Identifier : Identifier - } - interface ElementAccessExpression extends MemberExpression { ->ElementAccessExpression : ElementAccessExpression ->MemberExpression : MemberExpression - - expression: LeftHandSideExpression; ->expression : LeftHandSideExpression ->LeftHandSideExpression : LeftHandSideExpression - - argumentExpression?: Expression; ->argumentExpression : Expression ->Expression : Expression - } - interface CallExpression extends LeftHandSideExpression { ->CallExpression : CallExpression ->LeftHandSideExpression : LeftHandSideExpression - - expression: LeftHandSideExpression; ->expression : LeftHandSideExpression ->LeftHandSideExpression : LeftHandSideExpression - - typeArguments?: NodeArray; ->typeArguments : NodeArray ->NodeArray : NodeArray ->TypeNode : TypeNode - - arguments: NodeArray; ->arguments : NodeArray ->NodeArray : NodeArray ->Expression : Expression - } - interface NewExpression extends CallExpression, PrimaryExpression { ->NewExpression : NewExpression ->CallExpression : CallExpression ->PrimaryExpression : PrimaryExpression - } - interface TaggedTemplateExpression extends MemberExpression { ->TaggedTemplateExpression : TaggedTemplateExpression ->MemberExpression : MemberExpression - - tag: LeftHandSideExpression; ->tag : LeftHandSideExpression ->LeftHandSideExpression : LeftHandSideExpression - - template: LiteralExpression | TemplateExpression; ->template : LiteralExpression | TemplateExpression ->LiteralExpression : LiteralExpression ->TemplateExpression : TemplateExpression - } - type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression; ->CallLikeExpression : CallExpression | NewExpression | TaggedTemplateExpression ->CallExpression : CallExpression ->NewExpression : NewExpression ->TaggedTemplateExpression : TaggedTemplateExpression - - interface TypeAssertion extends UnaryExpression { ->TypeAssertion : TypeAssertion ->UnaryExpression : UnaryExpression - - type: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - - expression: UnaryExpression; ->expression : UnaryExpression ->UnaryExpression : UnaryExpression - } - interface Statement extends Node, ModuleElement { ->Statement : Statement ->Node : Node ->ModuleElement : ModuleElement - - _statementBrand: any; ->_statementBrand : any - } - interface Block extends Statement { ->Block : Block ->Statement : Statement - - statements: NodeArray; ->statements : NodeArray ->NodeArray : NodeArray ->Statement : Statement - } - interface VariableStatement extends Statement { ->VariableStatement : VariableStatement ->Statement : Statement - - declarations: NodeArray; ->declarations : NodeArray ->NodeArray : NodeArray ->VariableDeclaration : VariableDeclaration - } - interface ExpressionStatement extends Statement { ->ExpressionStatement : ExpressionStatement ->Statement : Statement - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface IfStatement extends Statement { ->IfStatement : IfStatement ->Statement : Statement - - expression: Expression; ->expression : Expression ->Expression : Expression - - thenStatement: Statement; ->thenStatement : Statement ->Statement : Statement - - elseStatement?: Statement; ->elseStatement : Statement ->Statement : Statement - } - interface IterationStatement extends Statement { ->IterationStatement : IterationStatement ->Statement : Statement - - statement: Statement; ->statement : Statement ->Statement : Statement - } - interface DoStatement extends IterationStatement { ->DoStatement : DoStatement ->IterationStatement : IterationStatement - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface WhileStatement extends IterationStatement { ->WhileStatement : WhileStatement ->IterationStatement : IterationStatement - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface ForStatement extends IterationStatement { ->ForStatement : ForStatement ->IterationStatement : IterationStatement - - declarations?: NodeArray; ->declarations : NodeArray ->NodeArray : NodeArray ->VariableDeclaration : VariableDeclaration - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - - condition?: Expression; ->condition : Expression ->Expression : Expression - - iterator?: Expression; ->iterator : Expression ->Expression : Expression - } - interface ForInStatement extends IterationStatement { ->ForInStatement : ForInStatement ->IterationStatement : IterationStatement - - declarations?: NodeArray; ->declarations : NodeArray ->NodeArray : NodeArray ->VariableDeclaration : VariableDeclaration - - variable?: Expression; ->variable : Expression ->Expression : Expression - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface BreakOrContinueStatement extends Statement { ->BreakOrContinueStatement : BreakOrContinueStatement ->Statement : Statement - - label?: Identifier; ->label : Identifier ->Identifier : Identifier - } - interface ReturnStatement extends Statement { ->ReturnStatement : ReturnStatement ->Statement : Statement - - expression?: Expression; ->expression : Expression ->Expression : Expression - } - interface WithStatement extends Statement { ->WithStatement : WithStatement ->Statement : Statement - - expression: Expression; ->expression : Expression ->Expression : Expression - - statement: Statement; ->statement : Statement ->Statement : Statement - } - interface SwitchStatement extends Statement { ->SwitchStatement : SwitchStatement ->Statement : Statement - - expression: Expression; ->expression : Expression ->Expression : Expression - - clauses: NodeArray; ->clauses : NodeArray ->NodeArray : NodeArray ->CaseOrDefaultClause : CaseClause | DefaultClause - } - interface CaseClause extends Node { ->CaseClause : CaseClause ->Node : Node - - expression?: Expression; ->expression : Expression ->Expression : Expression - - statements: NodeArray; ->statements : NodeArray ->NodeArray : NodeArray ->Statement : Statement - } - interface DefaultClause extends Node { ->DefaultClause : DefaultClause ->Node : Node - - statements: NodeArray; ->statements : NodeArray ->NodeArray : NodeArray ->Statement : Statement - } - type CaseOrDefaultClause = CaseClause | DefaultClause; ->CaseOrDefaultClause : CaseClause | DefaultClause ->CaseClause : CaseClause ->DefaultClause : DefaultClause - - interface LabeledStatement extends Statement { ->LabeledStatement : LabeledStatement ->Statement : Statement - - label: Identifier; ->label : Identifier ->Identifier : Identifier - - statement: Statement; ->statement : Statement ->Statement : Statement - } - interface ThrowStatement extends Statement { ->ThrowStatement : ThrowStatement ->Statement : Statement - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface TryStatement extends Statement { ->TryStatement : TryStatement ->Statement : Statement - - tryBlock: Block; ->tryBlock : Block ->Block : Block - - catchClause?: CatchClause; ->catchClause : CatchClause ->CatchClause : CatchClause - - finallyBlock?: Block; ->finallyBlock : Block ->Block : Block - } - interface CatchClause extends Declaration { ->CatchClause : CatchClause ->Declaration : Declaration - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - - block: Block; ->block : Block ->Block : Block - } - interface ModuleElement extends Node { ->ModuleElement : ModuleElement ->Node : Node - - _moduleElementBrand: any; ->_moduleElementBrand : any - } - interface ClassDeclaration extends Declaration, ModuleElement { ->ClassDeclaration : ClassDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - typeParameters?: NodeArray; ->typeParameters : NodeArray ->NodeArray : NodeArray ->TypeParameterDeclaration : TypeParameterDeclaration - - heritageClauses?: NodeArray; ->heritageClauses : NodeArray ->NodeArray : NodeArray ->HeritageClause : HeritageClause - - members: NodeArray; ->members : NodeArray ->NodeArray : NodeArray ->ClassElement : ClassElement - } - interface ClassElement extends Declaration { ->ClassElement : ClassElement ->Declaration : Declaration - - _classElementBrand: any; ->_classElementBrand : any - } - interface InterfaceDeclaration extends Declaration, ModuleElement { ->InterfaceDeclaration : InterfaceDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - typeParameters?: NodeArray; ->typeParameters : NodeArray ->NodeArray : NodeArray ->TypeParameterDeclaration : TypeParameterDeclaration - - heritageClauses?: NodeArray; ->heritageClauses : NodeArray ->NodeArray : NodeArray ->HeritageClause : HeritageClause - - members: NodeArray; ->members : NodeArray ->NodeArray : NodeArray ->Declaration : Declaration - } - interface HeritageClause extends Node { ->HeritageClause : HeritageClause ->Node : Node - - token: SyntaxKind; ->token : SyntaxKind ->SyntaxKind : SyntaxKind - - types?: NodeArray; ->types : NodeArray ->NodeArray : NodeArray ->TypeReferenceNode : TypeReferenceNode - } - interface TypeAliasDeclaration extends Declaration, ModuleElement { ->TypeAliasDeclaration : TypeAliasDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - type: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - } - interface EnumMember extends Declaration { ->EnumMember : EnumMember ->Declaration : Declaration - - name: DeclarationName; ->name : Identifier | LiteralExpression | ComputedPropertyName ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - } - interface EnumDeclaration extends Declaration, ModuleElement { ->EnumDeclaration : EnumDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - members: NodeArray; ->members : NodeArray ->NodeArray : NodeArray ->EnumMember : EnumMember - } - interface ModuleDeclaration extends Declaration, ModuleElement { ->ModuleDeclaration : ModuleDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier | LiteralExpression; ->name : Identifier | LiteralExpression ->Identifier : Identifier ->LiteralExpression : LiteralExpression - - body: ModuleBlock | ModuleDeclaration; ->body : ModuleDeclaration | ModuleBlock ->ModuleBlock : ModuleBlock ->ModuleDeclaration : ModuleDeclaration - } - interface ModuleBlock extends Node, ModuleElement { ->ModuleBlock : ModuleBlock ->Node : Node ->ModuleElement : ModuleElement - - statements: NodeArray; ->statements : NodeArray ->NodeArray : NodeArray ->ModuleElement : ModuleElement - } - interface ImportDeclaration extends Declaration, ModuleElement { ->ImportDeclaration : ImportDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - moduleReference: EntityName | ExternalModuleReference; ->moduleReference : Identifier | QualifiedName | ExternalModuleReference ->EntityName : Identifier | QualifiedName ->ExternalModuleReference : ExternalModuleReference - } - interface ExternalModuleReference extends Node { ->ExternalModuleReference : ExternalModuleReference ->Node : Node - - expression?: Expression; ->expression : Expression ->Expression : Expression - } - interface ExportAssignment extends Statement, ModuleElement { ->ExportAssignment : ExportAssignment ->Statement : Statement ->ModuleElement : ModuleElement - - exportName: Identifier; ->exportName : Identifier ->Identifier : Identifier - } - interface FileReference extends TextRange { ->FileReference : FileReference ->TextRange : TextRange - - filename: string; ->filename : string - } - interface CommentRange extends TextRange { ->CommentRange : CommentRange ->TextRange : TextRange - - hasTrailingNewLine?: boolean; ->hasTrailingNewLine : boolean - } - interface SourceFile extends Declaration { ->SourceFile : SourceFile ->Declaration : Declaration - - statements: NodeArray; ->statements : NodeArray ->NodeArray : NodeArray ->ModuleElement : ModuleElement - - endOfFileToken: Node; ->endOfFileToken : Node ->Node : Node - - filename: string; ->filename : string - - text: string; ->text : string - - getLineAndCharacterFromPosition(position: number): LineAndCharacter; ->getLineAndCharacterFromPosition : (position: number) => LineAndCharacter ->position : number ->LineAndCharacter : LineAndCharacter - - getPositionFromLineAndCharacter(line: number, character: number): number; ->getPositionFromLineAndCharacter : (line: number, character: number) => number ->line : number ->character : number - - getLineStarts(): number[]; ->getLineStarts : () => number[] - - amdDependencies: string[]; ->amdDependencies : string[] - - amdModuleName: string; ->amdModuleName : string - - referencedFiles: FileReference[]; ->referencedFiles : FileReference[] ->FileReference : FileReference - - referenceDiagnostics: Diagnostic[]; ->referenceDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - parseDiagnostics: Diagnostic[]; ->parseDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - grammarDiagnostics: Diagnostic[]; ->grammarDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - getSyntacticDiagnostics(): Diagnostic[]; ->getSyntacticDiagnostics : () => Diagnostic[] ->Diagnostic : Diagnostic - - semanticDiagnostics: Diagnostic[]; ->semanticDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - hasNoDefaultLib: boolean; ->hasNoDefaultLib : boolean - - externalModuleIndicator: Node; ->externalModuleIndicator : Node ->Node : Node - - nodeCount: number; ->nodeCount : number - - identifierCount: number; ->identifierCount : number - - symbolCount: number; ->symbolCount : number - - isOpen: boolean; ->isOpen : boolean - - version: string; ->version : string - - languageVersion: ScriptTarget; ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget - - identifiers: Map; ->identifiers : Map ->Map : Map - } - interface Program { ->Program : Program - - getSourceFile(filename: string): SourceFile; ->getSourceFile : (filename: string) => SourceFile ->filename : string ->SourceFile : SourceFile - - getSourceFiles(): SourceFile[]; ->getSourceFiles : () => SourceFile[] ->SourceFile : SourceFile - - getCompilerOptions(): CompilerOptions; ->getCompilerOptions : () => CompilerOptions ->CompilerOptions : CompilerOptions - - getCompilerHost(): CompilerHost; ->getCompilerHost : () => CompilerHost ->CompilerHost : CompilerHost - - getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; ->getDiagnostics : (sourceFile?: SourceFile) => Diagnostic[] ->sourceFile : SourceFile ->SourceFile : SourceFile ->Diagnostic : Diagnostic - - getGlobalDiagnostics(): Diagnostic[]; ->getGlobalDiagnostics : () => Diagnostic[] ->Diagnostic : Diagnostic - - getTypeChecker(fullTypeCheckMode: boolean): TypeChecker; ->getTypeChecker : (fullTypeCheckMode: boolean) => TypeChecker ->fullTypeCheckMode : boolean ->TypeChecker : TypeChecker - - getCommonSourceDirectory(): string; ->getCommonSourceDirectory : () => string - } - interface SourceMapSpan { ->SourceMapSpan : SourceMapSpan - - emittedLine: number; ->emittedLine : number - - emittedColumn: number; ->emittedColumn : number - - sourceLine: number; ->sourceLine : number - - sourceColumn: number; ->sourceColumn : number - - nameIndex?: number; ->nameIndex : number - - sourceIndex: number; ->sourceIndex : number - } - interface SourceMapData { ->SourceMapData : SourceMapData - - sourceMapFilePath: string; ->sourceMapFilePath : string - - jsSourceMappingURL: string; ->jsSourceMappingURL : string - - sourceMapFile: string; ->sourceMapFile : string - - sourceMapSourceRoot: string; ->sourceMapSourceRoot : string - - sourceMapSources: string[]; ->sourceMapSources : string[] - - inputSourceFileNames: string[]; ->inputSourceFileNames : string[] - - sourceMapNames?: string[]; ->sourceMapNames : string[] - - sourceMapMappings: string; ->sourceMapMappings : string - - sourceMapDecodedMappings: SourceMapSpan[]; ->sourceMapDecodedMappings : SourceMapSpan[] ->SourceMapSpan : SourceMapSpan - } - enum EmitReturnStatus { ->EmitReturnStatus : EmitReturnStatus - - Succeeded = 0, ->Succeeded : EmitReturnStatus - - AllOutputGenerationSkipped = 1, ->AllOutputGenerationSkipped : EmitReturnStatus - - JSGeneratedWithSemanticErrors = 2, ->JSGeneratedWithSemanticErrors : EmitReturnStatus - - DeclarationGenerationSkipped = 3, ->DeclarationGenerationSkipped : EmitReturnStatus - - EmitErrorsEncountered = 4, ->EmitErrorsEncountered : EmitReturnStatus - - CompilerOptionsErrors = 5, ->CompilerOptionsErrors : EmitReturnStatus - } - interface EmitResult { ->EmitResult : EmitResult - - emitResultStatus: EmitReturnStatus; ->emitResultStatus : EmitReturnStatus ->EmitReturnStatus : EmitReturnStatus - - diagnostics: Diagnostic[]; ->diagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - sourceMaps: SourceMapData[]; ->sourceMaps : SourceMapData[] ->SourceMapData : SourceMapData - } - interface TypeChecker { ->TypeChecker : TypeChecker - - getProgram(): Program; ->getProgram : () => Program ->Program : Program - - getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; ->getDiagnostics : (sourceFile?: SourceFile) => Diagnostic[] ->sourceFile : SourceFile ->SourceFile : SourceFile ->Diagnostic : Diagnostic - - getDeclarationDiagnostics(sourceFile: SourceFile): Diagnostic[]; ->getDeclarationDiagnostics : (sourceFile: SourceFile) => Diagnostic[] ->sourceFile : SourceFile ->SourceFile : SourceFile ->Diagnostic : Diagnostic - - getGlobalDiagnostics(): Diagnostic[]; ->getGlobalDiagnostics : () => Diagnostic[] ->Diagnostic : Diagnostic - - getNodeCount(): number; ->getNodeCount : () => number - - getIdentifierCount(): number; ->getIdentifierCount : () => number - - getSymbolCount(): number; ->getSymbolCount : () => number - - getTypeCount(): number; ->getTypeCount : () => number - - emitFiles(targetSourceFile?: SourceFile): EmitResult; ->emitFiles : (targetSourceFile?: SourceFile) => EmitResult ->targetSourceFile : SourceFile ->SourceFile : SourceFile ->EmitResult : EmitResult - - getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; ->getTypeOfSymbolAtLocation : (symbol: Symbol, node: Node) => Type ->symbol : Symbol ->Symbol : Symbol ->node : Node ->Node : Node ->Type : Type - - getDeclaredTypeOfSymbol(symbol: Symbol): Type; ->getDeclaredTypeOfSymbol : (symbol: Symbol) => Type ->symbol : Symbol ->Symbol : Symbol ->Type : Type - - getPropertiesOfType(type: Type): Symbol[]; ->getPropertiesOfType : (type: Type) => Symbol[] ->type : Type ->Type : Type ->Symbol : Symbol - - getPropertyOfType(type: Type, propertyName: string): Symbol; ->getPropertyOfType : (type: Type, propertyName: string) => Symbol ->type : Type ->Type : Type ->propertyName : string ->Symbol : Symbol - - getSignaturesOfType(type: Type, kind: SignatureKind): Signature[]; ->getSignaturesOfType : (type: Type, kind: SignatureKind) => Signature[] ->type : Type ->Type : Type ->kind : SignatureKind ->SignatureKind : SignatureKind ->Signature : Signature - - getIndexTypeOfType(type: Type, kind: IndexKind): Type; ->getIndexTypeOfType : (type: Type, kind: IndexKind) => Type ->type : Type ->Type : Type ->kind : IndexKind ->IndexKind : IndexKind ->Type : Type - - getReturnTypeOfSignature(signature: Signature): Type; ->getReturnTypeOfSignature : (signature: Signature) => Type ->signature : Signature ->Signature : Signature ->Type : Type - - getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; ->getSymbolsInScope : (location: Node, meaning: SymbolFlags) => Symbol[] ->location : Node ->Node : Node ->meaning : SymbolFlags ->SymbolFlags : SymbolFlags ->Symbol : Symbol - - getSymbolAtLocation(node: Node): Symbol; ->getSymbolAtLocation : (node: Node) => Symbol ->node : Node ->Node : Node ->Symbol : Symbol - - getShorthandAssignmentValueSymbol(location: Node): Symbol; ->getShorthandAssignmentValueSymbol : (location: Node) => Symbol ->location : Node ->Node : Node ->Symbol : Symbol - - getTypeAtLocation(node: Node): Type; ->getTypeAtLocation : (node: Node) => Type ->node : Node ->Node : Node ->Type : Type - - typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; ->typeToString : (type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => string ->type : Type ->Type : Type ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; ->symbolToString : (symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) => string ->symbol : Symbol ->Symbol : Symbol ->enclosingDeclaration : Node ->Node : Node ->meaning : SymbolFlags ->SymbolFlags : SymbolFlags - - getSymbolDisplayBuilder(): SymbolDisplayBuilder; ->getSymbolDisplayBuilder : () => SymbolDisplayBuilder ->SymbolDisplayBuilder : SymbolDisplayBuilder - - getFullyQualifiedName(symbol: Symbol): string; ->getFullyQualifiedName : (symbol: Symbol) => string ->symbol : Symbol ->Symbol : Symbol - - getAugmentedPropertiesOfType(type: Type): Symbol[]; ->getAugmentedPropertiesOfType : (type: Type) => Symbol[] ->type : Type ->Type : Type ->Symbol : Symbol - - getRootSymbols(symbol: Symbol): Symbol[]; ->getRootSymbols : (symbol: Symbol) => Symbol[] ->symbol : Symbol ->Symbol : Symbol ->Symbol : Symbol - - getContextualType(node: Expression): Type; ->getContextualType : (node: Expression) => Type ->node : Expression ->Expression : Expression ->Type : Type - - getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; ->getResolvedSignature : (node: CallExpression | NewExpression | TaggedTemplateExpression, candidatesOutArray?: Signature[]) => Signature ->node : CallExpression | NewExpression | TaggedTemplateExpression ->CallLikeExpression : CallExpression | NewExpression | TaggedTemplateExpression ->candidatesOutArray : Signature[] ->Signature : Signature ->Signature : Signature - - getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; ->getSignatureFromDeclaration : (declaration: SignatureDeclaration) => Signature ->declaration : SignatureDeclaration ->SignatureDeclaration : SignatureDeclaration ->Signature : Signature - - isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; ->isImplementationOfOverload : (node: FunctionLikeDeclaration) => boolean ->node : FunctionLikeDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration - - isUndefinedSymbol(symbol: Symbol): boolean; ->isUndefinedSymbol : (symbol: Symbol) => boolean ->symbol : Symbol ->Symbol : Symbol - - isArgumentsSymbol(symbol: Symbol): boolean; ->isArgumentsSymbol : (symbol: Symbol) => boolean ->symbol : Symbol ->Symbol : Symbol - - isEmitBlocked(sourceFile?: SourceFile): boolean; ->isEmitBlocked : (sourceFile?: SourceFile) => boolean ->sourceFile : SourceFile ->SourceFile : SourceFile - - getEnumMemberValue(node: EnumMember): number; ->getEnumMemberValue : (node: EnumMember) => number ->node : EnumMember ->EnumMember : EnumMember - - isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; ->isValidPropertyAccess : (node: QualifiedName | PropertyAccessExpression, propertyName: string) => boolean ->node : QualifiedName | PropertyAccessExpression ->PropertyAccessExpression : PropertyAccessExpression ->QualifiedName : QualifiedName ->propertyName : string - - getAliasedSymbol(symbol: Symbol): Symbol; ->getAliasedSymbol : (symbol: Symbol) => Symbol ->symbol : Symbol ->Symbol : Symbol ->Symbol : Symbol - } - interface SymbolDisplayBuilder { ->SymbolDisplayBuilder : SymbolDisplayBuilder - - buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildTypeDisplay : (type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->type : Type ->Type : Type ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void; ->buildSymbolDisplay : (symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags) => void ->symbol : Symbol ->Symbol : Symbol ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->meaning : SymbolFlags ->SymbolFlags : SymbolFlags ->flags : SymbolFormatFlags ->SymbolFormatFlags : SymbolFormatFlags - - buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildSignatureDisplay : (signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->signatures : Signature ->Signature : Signature ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildParameterDisplay : (parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->parameter : Symbol ->Symbol : Symbol ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildTypeParameterDisplay : (tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->tp : TypeParameter ->TypeParameter : TypeParameter ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void; ->buildTypeParameterDisplayFromSymbol : (symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags) => void ->symbol : Symbol ->Symbol : Symbol ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaraiton : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildDisplayForParametersAndDelimiters : (parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->parameters : Symbol[] ->Symbol : Symbol ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildDisplayForTypeParametersAndDelimiters : (typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->typeParameters : TypeParameter[] ->TypeParameter : TypeParameter ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildReturnTypeDisplay : (signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->signature : Signature ->Signature : Signature ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - } - interface SymbolWriter { ->SymbolWriter : SymbolWriter - - writeKeyword(text: string): void; ->writeKeyword : (text: string) => void ->text : string - - writeOperator(text: string): void; ->writeOperator : (text: string) => void ->text : string - - writePunctuation(text: string): void; ->writePunctuation : (text: string) => void ->text : string - - writeSpace(text: string): void; ->writeSpace : (text: string) => void ->text : string - - writeStringLiteral(text: string): void; ->writeStringLiteral : (text: string) => void ->text : string - - writeParameter(text: string): void; ->writeParameter : (text: string) => void ->text : string - - writeSymbol(text: string, symbol: Symbol): void; ->writeSymbol : (text: string, symbol: Symbol) => void ->text : string ->symbol : Symbol ->Symbol : Symbol - - writeLine(): void; ->writeLine : () => void - - increaseIndent(): void; ->increaseIndent : () => void - - decreaseIndent(): void; ->decreaseIndent : () => void - - clear(): void; ->clear : () => void - - trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void; ->trackSymbol : (symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) => void ->symbol : Symbol ->Symbol : Symbol ->enclosingDeclaration : Node ->Node : Node ->meaning : SymbolFlags ->SymbolFlags : SymbolFlags - } - const enum TypeFormatFlags { ->TypeFormatFlags : TypeFormatFlags - - None = 0, ->None : TypeFormatFlags - - WriteArrayAsGenericType = 1, ->WriteArrayAsGenericType : TypeFormatFlags - - UseTypeOfFunction = 2, ->UseTypeOfFunction : TypeFormatFlags - - NoTruncation = 4, ->NoTruncation : TypeFormatFlags - - WriteArrowStyleSignature = 8, ->WriteArrowStyleSignature : TypeFormatFlags - - WriteOwnNameForAnyLike = 16, ->WriteOwnNameForAnyLike : TypeFormatFlags - - WriteTypeArgumentsOfSignature = 32, ->WriteTypeArgumentsOfSignature : TypeFormatFlags - - InElementType = 64, ->InElementType : TypeFormatFlags - } - const enum SymbolFormatFlags { ->SymbolFormatFlags : SymbolFormatFlags - - None = 0, ->None : SymbolFormatFlags - - WriteTypeParametersOrArguments = 1, ->WriteTypeParametersOrArguments : SymbolFormatFlags - - UseOnlyExternalAliasing = 2, ->UseOnlyExternalAliasing : SymbolFormatFlags - } - const enum SymbolAccessibility { ->SymbolAccessibility : SymbolAccessibility - - Accessible = 0, ->Accessible : SymbolAccessibility - - NotAccessible = 1, ->NotAccessible : SymbolAccessibility - - CannotBeNamed = 2, ->CannotBeNamed : SymbolAccessibility - } - interface SymbolVisibilityResult { ->SymbolVisibilityResult : SymbolVisibilityResult - - accessibility: SymbolAccessibility; ->accessibility : SymbolAccessibility ->SymbolAccessibility : SymbolAccessibility - - aliasesToMakeVisible?: ImportDeclaration[]; ->aliasesToMakeVisible : ImportDeclaration[] ->ImportDeclaration : ImportDeclaration - - errorSymbolName?: string; ->errorSymbolName : string - - errorNode?: Node; ->errorNode : Node ->Node : Node - } - interface SymbolAccessiblityResult extends SymbolVisibilityResult { ->SymbolAccessiblityResult : SymbolAccessiblityResult ->SymbolVisibilityResult : SymbolVisibilityResult - - errorModuleName?: string; ->errorModuleName : string - } - interface EmitResolver { ->EmitResolver : EmitResolver - - getProgram(): Program; ->getProgram : () => Program ->Program : Program - - getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; ->getLocalNameOfContainer : (container: EnumDeclaration | ModuleDeclaration) => string ->container : EnumDeclaration | ModuleDeclaration ->ModuleDeclaration : ModuleDeclaration ->EnumDeclaration : EnumDeclaration - - getExpressionNamePrefix(node: Identifier): string; ->getExpressionNamePrefix : (node: Identifier) => string ->node : Identifier ->Identifier : Identifier - - getExportAssignmentName(node: SourceFile): string; ->getExportAssignmentName : (node: SourceFile) => string ->node : SourceFile ->SourceFile : SourceFile - - isReferencedImportDeclaration(node: ImportDeclaration): boolean; ->isReferencedImportDeclaration : (node: ImportDeclaration) => boolean ->node : ImportDeclaration ->ImportDeclaration : ImportDeclaration - - isTopLevelValueImportWithEntityName(node: ImportDeclaration): boolean; ->isTopLevelValueImportWithEntityName : (node: ImportDeclaration) => boolean ->node : ImportDeclaration ->ImportDeclaration : ImportDeclaration - - getNodeCheckFlags(node: Node): NodeCheckFlags; ->getNodeCheckFlags : (node: Node) => NodeCheckFlags ->node : Node ->Node : Node ->NodeCheckFlags : NodeCheckFlags - - getEnumMemberValue(node: EnumMember): number; ->getEnumMemberValue : (node: EnumMember) => number ->node : EnumMember ->EnumMember : EnumMember - - hasSemanticErrors(sourceFile?: SourceFile): boolean; ->hasSemanticErrors : (sourceFile?: SourceFile) => boolean ->sourceFile : SourceFile ->SourceFile : SourceFile - - isDeclarationVisible(node: Declaration): boolean; ->isDeclarationVisible : (node: Declaration) => boolean ->node : Declaration ->Declaration : Declaration - - isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; ->isImplementationOfOverload : (node: FunctionLikeDeclaration) => boolean ->node : FunctionLikeDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration - - writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; ->writeTypeOfDeclaration : (declaration: ParameterDeclaration | VariableDeclaration | AccessorDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void ->declaration : ParameterDeclaration | VariableDeclaration | AccessorDeclaration ->AccessorDeclaration : AccessorDeclaration ->VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags ->writer : SymbolWriter ->SymbolWriter : SymbolWriter - - writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; ->writeReturnTypeOfSignatureDeclaration : (signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void ->signatureDeclaration : SignatureDeclaration ->SignatureDeclaration : SignatureDeclaration ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags ->writer : SymbolWriter ->SymbolWriter : SymbolWriter - - isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; ->isSymbolAccessible : (symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags) => SymbolAccessiblityResult ->symbol : Symbol ->Symbol : Symbol ->enclosingDeclaration : Node ->Node : Node ->meaning : SymbolFlags ->SymbolFlags : SymbolFlags ->SymbolAccessiblityResult : SymbolAccessiblityResult - - isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; ->isEntityNameVisible : (entityName: Identifier | QualifiedName, enclosingDeclaration: Node) => SymbolVisibilityResult ->entityName : Identifier | QualifiedName ->EntityName : Identifier | QualifiedName ->enclosingDeclaration : Node ->Node : Node ->SymbolVisibilityResult : SymbolVisibilityResult - - getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number; ->getConstantValue : (node: PropertyAccessExpression | ElementAccessExpression) => number ->node : PropertyAccessExpression | ElementAccessExpression ->PropertyAccessExpression : PropertyAccessExpression ->ElementAccessExpression : ElementAccessExpression - - isEmitBlocked(sourceFile?: SourceFile): boolean; ->isEmitBlocked : (sourceFile?: SourceFile) => boolean ->sourceFile : SourceFile ->SourceFile : SourceFile - } - const enum SymbolFlags { ->SymbolFlags : SymbolFlags - - FunctionScopedVariable = 1, ->FunctionScopedVariable : SymbolFlags - - BlockScopedVariable = 2, ->BlockScopedVariable : SymbolFlags - - Property = 4, ->Property : SymbolFlags - - EnumMember = 8, ->EnumMember : SymbolFlags - - Function = 16, ->Function : SymbolFlags - - Class = 32, ->Class : SymbolFlags - - Interface = 64, ->Interface : SymbolFlags - - ConstEnum = 128, ->ConstEnum : SymbolFlags - - RegularEnum = 256, ->RegularEnum : SymbolFlags - - ValueModule = 512, ->ValueModule : SymbolFlags - - NamespaceModule = 1024, ->NamespaceModule : SymbolFlags - - TypeLiteral = 2048, ->TypeLiteral : SymbolFlags - - ObjectLiteral = 4096, ->ObjectLiteral : SymbolFlags - - Method = 8192, ->Method : SymbolFlags - - Constructor = 16384, ->Constructor : SymbolFlags - - GetAccessor = 32768, ->GetAccessor : SymbolFlags - - SetAccessor = 65536, ->SetAccessor : SymbolFlags - - CallSignature = 131072, ->CallSignature : SymbolFlags - - ConstructSignature = 262144, ->ConstructSignature : SymbolFlags - - IndexSignature = 524288, ->IndexSignature : SymbolFlags - - TypeParameter = 1048576, ->TypeParameter : SymbolFlags - - TypeAlias = 2097152, ->TypeAlias : SymbolFlags - - ExportValue = 4194304, ->ExportValue : SymbolFlags - - ExportType = 8388608, ->ExportType : SymbolFlags - - ExportNamespace = 16777216, ->ExportNamespace : SymbolFlags - - Import = 33554432, ->Import : SymbolFlags - - Instantiated = 67108864, ->Instantiated : SymbolFlags - - Merged = 134217728, ->Merged : SymbolFlags - - Transient = 268435456, ->Transient : SymbolFlags - - Prototype = 536870912, ->Prototype : SymbolFlags - - UnionProperty = 1073741824, ->UnionProperty : SymbolFlags - - Enum = 384, ->Enum : SymbolFlags - - Variable = 3, ->Variable : SymbolFlags - - Value = 107455, ->Value : SymbolFlags - - Type = 3152352, ->Type : SymbolFlags - - Namespace = 1536, ->Namespace : SymbolFlags - - Module = 1536, ->Module : SymbolFlags - - Accessor = 98304, ->Accessor : SymbolFlags - - Signature = 917504, ->Signature : SymbolFlags - - FunctionScopedVariableExcludes = 107454, ->FunctionScopedVariableExcludes : SymbolFlags - - BlockScopedVariableExcludes = 107455, ->BlockScopedVariableExcludes : SymbolFlags - - ParameterExcludes = 107455, ->ParameterExcludes : SymbolFlags - - PropertyExcludes = 107455, ->PropertyExcludes : SymbolFlags - - EnumMemberExcludes = 107455, ->EnumMemberExcludes : SymbolFlags - - FunctionExcludes = 106927, ->FunctionExcludes : SymbolFlags - - ClassExcludes = 3258879, ->ClassExcludes : SymbolFlags - - InterfaceExcludes = 3152288, ->InterfaceExcludes : SymbolFlags - - RegularEnumExcludes = 3258623, ->RegularEnumExcludes : SymbolFlags - - ConstEnumExcludes = 3259263, ->ConstEnumExcludes : SymbolFlags - - ValueModuleExcludes = 106639, ->ValueModuleExcludes : SymbolFlags - - NamespaceModuleExcludes = 0, ->NamespaceModuleExcludes : SymbolFlags - - MethodExcludes = 99263, ->MethodExcludes : SymbolFlags - - GetAccessorExcludes = 41919, ->GetAccessorExcludes : SymbolFlags - - SetAccessorExcludes = 74687, ->SetAccessorExcludes : SymbolFlags - - TypeParameterExcludes = 2103776, ->TypeParameterExcludes : SymbolFlags - - TypeAliasExcludes = 3152352, ->TypeAliasExcludes : SymbolFlags - - ImportExcludes = 33554432, ->ImportExcludes : SymbolFlags - - ModuleMember = 35653619, ->ModuleMember : SymbolFlags - - ExportHasLocal = 944, ->ExportHasLocal : SymbolFlags - - HasLocals = 1041936, ->HasLocals : SymbolFlags - - HasExports = 1952, ->HasExports : SymbolFlags - - HasMembers = 6240, ->HasMembers : SymbolFlags - - IsContainer = 1048560, ->IsContainer : SymbolFlags - - PropertyOrAccessor = 98308, ->PropertyOrAccessor : SymbolFlags - - Export = 29360128, ->Export : SymbolFlags - } - interface Symbol { ->Symbol : Symbol - - flags: SymbolFlags; ->flags : SymbolFlags ->SymbolFlags : SymbolFlags - - name: string; ->name : string - - id?: number; ->id : number - - mergeId?: number; ->mergeId : number - - declarations?: Declaration[]; ->declarations : Declaration[] ->Declaration : Declaration - - parent?: Symbol; ->parent : Symbol ->Symbol : Symbol - - members?: SymbolTable; ->members : SymbolTable ->SymbolTable : SymbolTable - - exports?: SymbolTable; ->exports : SymbolTable ->SymbolTable : SymbolTable - - exportSymbol?: Symbol; ->exportSymbol : Symbol ->Symbol : Symbol - - valueDeclaration?: Declaration; ->valueDeclaration : Declaration ->Declaration : Declaration - - constEnumOnlyModule?: boolean; ->constEnumOnlyModule : boolean - } - interface SymbolLinks { ->SymbolLinks : SymbolLinks - - target?: Symbol; ->target : Symbol ->Symbol : Symbol - - type?: Type; ->type : Type ->Type : Type - - declaredType?: Type; ->declaredType : Type ->Type : Type - - mapper?: TypeMapper; ->mapper : TypeMapper ->TypeMapper : TypeMapper - - referenced?: boolean; ->referenced : boolean - - exportAssignSymbol?: Symbol; ->exportAssignSymbol : Symbol ->Symbol : Symbol - - unionType?: UnionType; ->unionType : UnionType ->UnionType : UnionType - } - interface TransientSymbol extends Symbol, SymbolLinks { ->TransientSymbol : TransientSymbol ->Symbol : Symbol ->SymbolLinks : SymbolLinks - } - interface SymbolTable { ->SymbolTable : SymbolTable - - [index: string]: Symbol; ->index : string ->Symbol : Symbol - } - const enum NodeCheckFlags { ->NodeCheckFlags : NodeCheckFlags - - TypeChecked = 1, ->TypeChecked : NodeCheckFlags - - LexicalThis = 2, ->LexicalThis : NodeCheckFlags - - CaptureThis = 4, ->CaptureThis : NodeCheckFlags - - EmitExtends = 8, ->EmitExtends : NodeCheckFlags - - SuperInstance = 16, ->SuperInstance : NodeCheckFlags - - SuperStatic = 32, ->SuperStatic : NodeCheckFlags - - ContextChecked = 64, ->ContextChecked : NodeCheckFlags - - EnumValuesComputed = 128, ->EnumValuesComputed : NodeCheckFlags - } - interface NodeLinks { ->NodeLinks : NodeLinks - - resolvedType?: Type; ->resolvedType : Type ->Type : Type - - resolvedSignature?: Signature; ->resolvedSignature : Signature ->Signature : Signature - - resolvedSymbol?: Symbol; ->resolvedSymbol : Symbol ->Symbol : Symbol - - flags?: NodeCheckFlags; ->flags : NodeCheckFlags ->NodeCheckFlags : NodeCheckFlags - - enumMemberValue?: number; ->enumMemberValue : number - - isIllegalTypeReferenceInConstraint?: boolean; ->isIllegalTypeReferenceInConstraint : boolean - - isVisible?: boolean; ->isVisible : boolean - - localModuleName?: string; ->localModuleName : string - - assignmentChecks?: Map; ->assignmentChecks : Map ->Map : Map - } - const enum TypeFlags { ->TypeFlags : TypeFlags - - Any = 1, ->Any : TypeFlags - - String = 2, ->String : TypeFlags - - Number = 4, ->Number : TypeFlags - - Boolean = 8, ->Boolean : TypeFlags - - Void = 16, ->Void : TypeFlags - - Undefined = 32, ->Undefined : TypeFlags - - Null = 64, ->Null : TypeFlags - - Enum = 128, ->Enum : TypeFlags - - StringLiteral = 256, ->StringLiteral : TypeFlags - - TypeParameter = 512, ->TypeParameter : TypeFlags - - Class = 1024, ->Class : TypeFlags - - Interface = 2048, ->Interface : TypeFlags - - Reference = 4096, ->Reference : TypeFlags - - Tuple = 8192, ->Tuple : TypeFlags - - Union = 16384, ->Union : TypeFlags - - Anonymous = 32768, ->Anonymous : TypeFlags - - FromSignature = 65536, ->FromSignature : TypeFlags - - Intrinsic = 127, ->Intrinsic : TypeFlags - - StringLike = 258, ->StringLike : TypeFlags - - NumberLike = 132, ->NumberLike : TypeFlags - - ObjectType = 48128, ->ObjectType : TypeFlags - } - interface Type { ->Type : Type - - flags: TypeFlags; ->flags : TypeFlags ->TypeFlags : TypeFlags - - id: number; ->id : number - - symbol?: Symbol; ->symbol : Symbol ->Symbol : Symbol - } - interface IntrinsicType extends Type { ->IntrinsicType : IntrinsicType ->Type : Type - - intrinsicName: string; ->intrinsicName : string - } - interface StringLiteralType extends Type { ->StringLiteralType : StringLiteralType ->Type : Type - - text: string; ->text : string - } - interface ObjectType extends Type { ->ObjectType : ObjectType ->Type : Type - } - interface InterfaceType extends ObjectType { ->InterfaceType : InterfaceType ->ObjectType : ObjectType - - typeParameters: TypeParameter[]; ->typeParameters : TypeParameter[] ->TypeParameter : TypeParameter - - baseTypes: ObjectType[]; ->baseTypes : ObjectType[] ->ObjectType : ObjectType - - declaredProperties: Symbol[]; ->declaredProperties : Symbol[] ->Symbol : Symbol - - declaredCallSignatures: Signature[]; ->declaredCallSignatures : Signature[] ->Signature : Signature - - declaredConstructSignatures: Signature[]; ->declaredConstructSignatures : Signature[] ->Signature : Signature - - declaredStringIndexType: Type; ->declaredStringIndexType : Type ->Type : Type - - declaredNumberIndexType: Type; ->declaredNumberIndexType : Type ->Type : Type - } - interface TypeReference extends ObjectType { ->TypeReference : TypeReference ->ObjectType : ObjectType - - target: GenericType; ->target : GenericType ->GenericType : GenericType - - typeArguments: Type[]; ->typeArguments : Type[] ->Type : Type - } - interface GenericType extends InterfaceType, TypeReference { ->GenericType : GenericType ->InterfaceType : InterfaceType ->TypeReference : TypeReference - - instantiations: Map; ->instantiations : Map ->Map : Map ->TypeReference : TypeReference - - openReferenceTargets: GenericType[]; ->openReferenceTargets : GenericType[] ->GenericType : GenericType - - openReferenceChecks: Map; ->openReferenceChecks : Map ->Map : Map - } - interface TupleType extends ObjectType { ->TupleType : TupleType ->ObjectType : ObjectType - - elementTypes: Type[]; ->elementTypes : Type[] ->Type : Type - - baseArrayType: TypeReference; ->baseArrayType : TypeReference ->TypeReference : TypeReference - } - interface UnionType extends Type { ->UnionType : UnionType ->Type : Type - - types: Type[]; ->types : Type[] ->Type : Type - - resolvedProperties: SymbolTable; ->resolvedProperties : SymbolTable ->SymbolTable : SymbolTable - } - interface ResolvedType extends ObjectType, UnionType { ->ResolvedType : ResolvedType ->ObjectType : ObjectType ->UnionType : UnionType - - members: SymbolTable; ->members : SymbolTable ->SymbolTable : SymbolTable - - properties: Symbol[]; ->properties : Symbol[] ->Symbol : Symbol - - callSignatures: Signature[]; ->callSignatures : Signature[] ->Signature : Signature - - constructSignatures: Signature[]; ->constructSignatures : Signature[] ->Signature : Signature - - stringIndexType: Type; ->stringIndexType : Type ->Type : Type - - numberIndexType: Type; ->numberIndexType : Type ->Type : Type - } - interface TypeParameter extends Type { ->TypeParameter : TypeParameter ->Type : Type - - constraint: Type; ->constraint : Type ->Type : Type - - target?: TypeParameter; ->target : TypeParameter ->TypeParameter : TypeParameter - - mapper?: TypeMapper; ->mapper : TypeMapper ->TypeMapper : TypeMapper - } - const enum SignatureKind { ->SignatureKind : SignatureKind - - Call = 0, ->Call : SignatureKind - - Construct = 1, ->Construct : SignatureKind - } - interface Signature { ->Signature : Signature - - declaration: SignatureDeclaration; ->declaration : SignatureDeclaration ->SignatureDeclaration : SignatureDeclaration - - typeParameters: TypeParameter[]; ->typeParameters : TypeParameter[] ->TypeParameter : TypeParameter - - parameters: Symbol[]; ->parameters : Symbol[] ->Symbol : Symbol - - resolvedReturnType: Type; ->resolvedReturnType : Type ->Type : Type - - minArgumentCount: number; ->minArgumentCount : number - - hasRestParameter: boolean; ->hasRestParameter : boolean - - hasStringLiterals: boolean; ->hasStringLiterals : boolean - - target?: Signature; ->target : Signature ->Signature : Signature - - mapper?: TypeMapper; ->mapper : TypeMapper ->TypeMapper : TypeMapper - - unionSignatures?: Signature[]; ->unionSignatures : Signature[] ->Signature : Signature - - erasedSignatureCache?: Signature; ->erasedSignatureCache : Signature ->Signature : Signature - - isolatedSignatureType?: ObjectType; ->isolatedSignatureType : ObjectType ->ObjectType : ObjectType - } - const enum IndexKind { ->IndexKind : IndexKind - - String = 0, ->String : IndexKind - - Number = 1, ->Number : IndexKind - } - interface TypeMapper { ->TypeMapper : TypeMapper - - (t: Type): Type; ->t : Type ->Type : Type ->Type : Type - } - interface TypeInferences { ->TypeInferences : TypeInferences - - primary: Type[]; ->primary : Type[] ->Type : Type - - secondary: Type[]; ->secondary : Type[] ->Type : Type - } - interface InferenceContext { ->InferenceContext : InferenceContext - - typeParameters: TypeParameter[]; ->typeParameters : TypeParameter[] ->TypeParameter : TypeParameter - - inferUnionTypes: boolean; ->inferUnionTypes : boolean - - inferences: TypeInferences[]; ->inferences : TypeInferences[] ->TypeInferences : TypeInferences - - inferredTypes: Type[]; ->inferredTypes : Type[] ->Type : Type - - failedTypeParameterIndex?: number; ->failedTypeParameterIndex : number - } - interface DiagnosticMessage { ->DiagnosticMessage : DiagnosticMessage - - key: string; ->key : string - - category: DiagnosticCategory; ->category : DiagnosticCategory ->DiagnosticCategory : DiagnosticCategory - - code: number; ->code : number - - isEarly?: boolean; ->isEarly : boolean - } - interface DiagnosticMessageChain { ->DiagnosticMessageChain : DiagnosticMessageChain - - messageText: string; ->messageText : string - - category: DiagnosticCategory; ->category : DiagnosticCategory ->DiagnosticCategory : DiagnosticCategory - - code: number; ->code : number - - next?: DiagnosticMessageChain; ->next : DiagnosticMessageChain ->DiagnosticMessageChain : DiagnosticMessageChain - } - interface Diagnostic { ->Diagnostic : Diagnostic - - file: SourceFile; ->file : SourceFile ->SourceFile : SourceFile - - start: number; ->start : number - - length: number; ->length : number - - messageText: string; ->messageText : string - - category: DiagnosticCategory; ->category : DiagnosticCategory ->DiagnosticCategory : DiagnosticCategory - - code: number; ->code : number - - /** - * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit - */ - isEarly?: boolean; ->isEarly : boolean - } - enum DiagnosticCategory { ->DiagnosticCategory : DiagnosticCategory - - Warning = 0, ->Warning : DiagnosticCategory - - Error = 1, ->Error : DiagnosticCategory - - Message = 2, ->Message : DiagnosticCategory - } - interface CompilerOptions { ->CompilerOptions : CompilerOptions - - allowNonTsExtensions?: boolean; ->allowNonTsExtensions : boolean - - charset?: string; ->charset : string - - codepage?: number; ->codepage : number - - declaration?: boolean; ->declaration : boolean - - diagnostics?: boolean; ->diagnostics : boolean - - emitBOM?: boolean; ->emitBOM : boolean - - help?: boolean; ->help : boolean - - locale?: string; ->locale : string - - mapRoot?: string; ->mapRoot : string - - module?: ModuleKind; ->module : ModuleKind ->ModuleKind : ModuleKind - - noEmitOnError?: boolean; ->noEmitOnError : boolean - - noErrorTruncation?: boolean; ->noErrorTruncation : boolean - - noImplicitAny?: boolean; ->noImplicitAny : boolean - - noLib?: boolean; ->noLib : boolean - - noLibCheck?: boolean; ->noLibCheck : boolean - - noResolve?: boolean; ->noResolve : boolean - - out?: string; ->out : string - - outDir?: string; ->outDir : string - - preserveConstEnums?: boolean; ->preserveConstEnums : boolean - - removeComments?: boolean; ->removeComments : boolean - - sourceMap?: boolean; ->sourceMap : boolean - - sourceRoot?: string; ->sourceRoot : string - - suppressImplicitAnyIndexErrors?: boolean; ->suppressImplicitAnyIndexErrors : boolean - - target?: ScriptTarget; ->target : ScriptTarget ->ScriptTarget : ScriptTarget - - version?: boolean; ->version : boolean - - watch?: boolean; ->watch : boolean - - [option: string]: string | number | boolean; ->option : string - } - const enum ModuleKind { ->ModuleKind : ModuleKind - - None = 0, ->None : ModuleKind - - CommonJS = 1, ->CommonJS : ModuleKind - - AMD = 2, ->AMD : ModuleKind - } - interface LineAndCharacter { ->LineAndCharacter : LineAndCharacter - - line: number; ->line : number - - character: number; ->character : number - } - const enum ScriptTarget { ->ScriptTarget : ScriptTarget - - ES3 = 0, ->ES3 : ScriptTarget - - ES5 = 1, ->ES5 : ScriptTarget - - ES6 = 2, ->ES6 : ScriptTarget - - Latest = 2, ->Latest : ScriptTarget - } - interface ParsedCommandLine { ->ParsedCommandLine : ParsedCommandLine - - options: CompilerOptions; ->options : CompilerOptions ->CompilerOptions : CompilerOptions - - filenames: string[]; ->filenames : string[] - - errors: Diagnostic[]; ->errors : Diagnostic[] ->Diagnostic : Diagnostic - } - interface CommandLineOption { ->CommandLineOption : CommandLineOption - - name: string; ->name : string - - type: string | Map; ->type : string | Map ->Map : Map - - shortName?: string; ->shortName : string - - description?: DiagnosticMessage; ->description : DiagnosticMessage ->DiagnosticMessage : DiagnosticMessage - - paramType?: DiagnosticMessage; ->paramType : DiagnosticMessage ->DiagnosticMessage : DiagnosticMessage - - error?: DiagnosticMessage; ->error : DiagnosticMessage ->DiagnosticMessage : DiagnosticMessage - } - const enum CharacterCodes { ->CharacterCodes : CharacterCodes - - nullCharacter = 0, ->nullCharacter : CharacterCodes - - maxAsciiCharacter = 127, ->maxAsciiCharacter : CharacterCodes - - lineFeed = 10, ->lineFeed : CharacterCodes - - carriageReturn = 13, ->carriageReturn : CharacterCodes - - lineSeparator = 8232, ->lineSeparator : CharacterCodes - - paragraphSeparator = 8233, ->paragraphSeparator : CharacterCodes - - nextLine = 133, ->nextLine : CharacterCodes - - space = 32, ->space : CharacterCodes - - nonBreakingSpace = 160, ->nonBreakingSpace : CharacterCodes - - enQuad = 8192, ->enQuad : CharacterCodes - - emQuad = 8193, ->emQuad : CharacterCodes - - enSpace = 8194, ->enSpace : CharacterCodes - - emSpace = 8195, ->emSpace : CharacterCodes - - threePerEmSpace = 8196, ->threePerEmSpace : CharacterCodes - - fourPerEmSpace = 8197, ->fourPerEmSpace : CharacterCodes - - sixPerEmSpace = 8198, ->sixPerEmSpace : CharacterCodes - - figureSpace = 8199, ->figureSpace : CharacterCodes - - punctuationSpace = 8200, ->punctuationSpace : CharacterCodes - - thinSpace = 8201, ->thinSpace : CharacterCodes - - hairSpace = 8202, ->hairSpace : CharacterCodes - - zeroWidthSpace = 8203, ->zeroWidthSpace : CharacterCodes - - narrowNoBreakSpace = 8239, ->narrowNoBreakSpace : CharacterCodes - - ideographicSpace = 12288, ->ideographicSpace : CharacterCodes - - mathematicalSpace = 8287, ->mathematicalSpace : CharacterCodes - - ogham = 5760, ->ogham : CharacterCodes - - _ = 95, ->_ : CharacterCodes - - $ = 36, ->$ : CharacterCodes - - _0 = 48, ->_0 : CharacterCodes - - _1 = 49, ->_1 : CharacterCodes - - _2 = 50, ->_2 : CharacterCodes - - _3 = 51, ->_3 : CharacterCodes - - _4 = 52, ->_4 : CharacterCodes - - _5 = 53, ->_5 : CharacterCodes - - _6 = 54, ->_6 : CharacterCodes - - _7 = 55, ->_7 : CharacterCodes - - _8 = 56, ->_8 : CharacterCodes - - _9 = 57, ->_9 : CharacterCodes - - a = 97, ->a : CharacterCodes - - b = 98, ->b : CharacterCodes - - c = 99, ->c : CharacterCodes - - d = 100, ->d : CharacterCodes - - e = 101, ->e : CharacterCodes - - f = 102, ->f : CharacterCodes - - g = 103, ->g : CharacterCodes - - h = 104, ->h : CharacterCodes - - i = 105, ->i : CharacterCodes - - j = 106, ->j : CharacterCodes - - k = 107, ->k : CharacterCodes - - l = 108, ->l : CharacterCodes - - m = 109, ->m : CharacterCodes - - n = 110, ->n : CharacterCodes - - o = 111, ->o : CharacterCodes - - p = 112, ->p : CharacterCodes - - q = 113, ->q : CharacterCodes - - r = 114, ->r : CharacterCodes - - s = 115, ->s : CharacterCodes - - t = 116, ->t : CharacterCodes - - u = 117, ->u : CharacterCodes - - v = 118, ->v : CharacterCodes - - w = 119, ->w : CharacterCodes - - x = 120, ->x : CharacterCodes - - y = 121, ->y : CharacterCodes - - z = 122, ->z : CharacterCodes - - A = 65, ->A : CharacterCodes - - B = 66, ->B : CharacterCodes - - C = 67, ->C : CharacterCodes - - D = 68, ->D : CharacterCodes - - E = 69, ->E : CharacterCodes - - F = 70, ->F : CharacterCodes - - G = 71, ->G : CharacterCodes - - H = 72, ->H : CharacterCodes - - I = 73, ->I : CharacterCodes - - J = 74, ->J : CharacterCodes - - K = 75, ->K : CharacterCodes - - L = 76, ->L : CharacterCodes - - M = 77, ->M : CharacterCodes - - N = 78, ->N : CharacterCodes - - O = 79, ->O : CharacterCodes - - P = 80, ->P : CharacterCodes - - Q = 81, ->Q : CharacterCodes - - R = 82, ->R : CharacterCodes - - S = 83, ->S : CharacterCodes - - T = 84, ->T : CharacterCodes - - U = 85, ->U : CharacterCodes - - V = 86, ->V : CharacterCodes - - W = 87, ->W : CharacterCodes - - X = 88, ->X : CharacterCodes - - Y = 89, ->Y : CharacterCodes - - Z = 90, ->Z : CharacterCodes - - ampersand = 38, ->ampersand : CharacterCodes - - asterisk = 42, ->asterisk : CharacterCodes - - at = 64, ->at : CharacterCodes - - backslash = 92, ->backslash : CharacterCodes - - backtick = 96, ->backtick : CharacterCodes - - bar = 124, ->bar : CharacterCodes - - caret = 94, ->caret : CharacterCodes - - closeBrace = 125, ->closeBrace : CharacterCodes - - closeBracket = 93, ->closeBracket : CharacterCodes - - closeParen = 41, ->closeParen : CharacterCodes - - colon = 58, ->colon : CharacterCodes - - comma = 44, ->comma : CharacterCodes - - dot = 46, ->dot : CharacterCodes - - doubleQuote = 34, ->doubleQuote : CharacterCodes - - equals = 61, ->equals : CharacterCodes - - exclamation = 33, ->exclamation : CharacterCodes - - greaterThan = 62, ->greaterThan : CharacterCodes - - lessThan = 60, ->lessThan : CharacterCodes - - minus = 45, ->minus : CharacterCodes - - openBrace = 123, ->openBrace : CharacterCodes - - openBracket = 91, ->openBracket : CharacterCodes - - openParen = 40, ->openParen : CharacterCodes - - percent = 37, ->percent : CharacterCodes - - plus = 43, ->plus : CharacterCodes - - question = 63, ->question : CharacterCodes - - semicolon = 59, ->semicolon : CharacterCodes - - singleQuote = 39, ->singleQuote : CharacterCodes - - slash = 47, ->slash : CharacterCodes - - tilde = 126, ->tilde : CharacterCodes - - backspace = 8, ->backspace : CharacterCodes - - formFeed = 12, ->formFeed : CharacterCodes - - byteOrderMark = 65279, ->byteOrderMark : CharacterCodes - - tab = 9, ->tab : CharacterCodes - - verticalTab = 11, ->verticalTab : CharacterCodes - } - interface CancellationToken { ->CancellationToken : CancellationToken - - isCancellationRequested(): boolean; ->isCancellationRequested : () => boolean - } - interface CompilerHost { ->CompilerHost : CompilerHost - - getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; ->getSourceFile : (filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void) => SourceFile ->filename : string ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget ->onError : (message: string) => void ->message : string ->SourceFile : SourceFile - - getDefaultLibFilename(options: CompilerOptions): string; ->getDefaultLibFilename : (options: CompilerOptions) => string ->options : CompilerOptions ->CompilerOptions : CompilerOptions - - getCancellationToken?(): CancellationToken; ->getCancellationToken : () => CancellationToken ->CancellationToken : CancellationToken - - writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; ->writeFile : (filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void) => void ->filename : string ->data : string ->writeByteOrderMark : boolean ->onError : (message: string) => void ->message : string - - getCurrentDirectory(): string; ->getCurrentDirectory : () => string - - getCanonicalFileName(fileName: string): string; ->getCanonicalFileName : (fileName: string) => string ->fileName : string - - useCaseSensitiveFileNames(): boolean; ->useCaseSensitiveFileNames : () => boolean - - getNewLine(): string; ->getNewLine : () => string - } -} -declare module ts { ->ts : typeof ts - - interface ErrorCallback { ->ErrorCallback : ErrorCallback - - (message: DiagnosticMessage): void; ->message : DiagnosticMessage ->DiagnosticMessage : DiagnosticMessage - } - interface CommentCallback { ->CommentCallback : CommentCallback - - (pos: number, end: number): void; ->pos : number ->end : number - } - interface Scanner { ->Scanner : Scanner - - getStartPos(): number; ->getStartPos : () => number - - getToken(): SyntaxKind; ->getToken : () => SyntaxKind ->SyntaxKind : SyntaxKind - - getTextPos(): number; ->getTextPos : () => number - - getTokenPos(): number; ->getTokenPos : () => number - - getTokenText(): string; ->getTokenText : () => string - - getTokenValue(): string; ->getTokenValue : () => string - - hasPrecedingLineBreak(): boolean; ->hasPrecedingLineBreak : () => boolean - - isIdentifier(): boolean; ->isIdentifier : () => boolean - - isReservedWord(): boolean; ->isReservedWord : () => boolean - - isUnterminated(): boolean; ->isUnterminated : () => boolean - - reScanGreaterToken(): SyntaxKind; ->reScanGreaterToken : () => SyntaxKind ->SyntaxKind : SyntaxKind - - reScanSlashToken(): SyntaxKind; ->reScanSlashToken : () => SyntaxKind ->SyntaxKind : SyntaxKind - - reScanTemplateToken(): SyntaxKind; ->reScanTemplateToken : () => SyntaxKind ->SyntaxKind : SyntaxKind - - scan(): SyntaxKind; ->scan : () => SyntaxKind ->SyntaxKind : SyntaxKind - - setText(text: string): void; ->setText : (text: string) => void ->text : string - - setTextPos(textPos: number): void; ->setTextPos : (textPos: number) => void ->textPos : number - - lookAhead(callback: () => T): T; ->lookAhead : (callback: () => T) => T ->T : T ->callback : () => T ->T : T ->T : T - - tryScan(callback: () => T): T; ->tryScan : (callback: () => T) => T ->T : T ->callback : () => T ->T : T ->T : T - } - function tokenToString(t: SyntaxKind): string; ->tokenToString : (t: SyntaxKind) => string ->t : SyntaxKind ->SyntaxKind : SyntaxKind - - function computeLineStarts(text: string): number[]; ->computeLineStarts : (text: string) => number[] ->text : string - - function getPositionFromLineAndCharacter(lineStarts: number[], line: number, character: number): number; ->getPositionFromLineAndCharacter : (lineStarts: number[], line: number, character: number) => number ->lineStarts : number[] ->line : number ->character : number - - function getLineAndCharacterOfPosition(lineStarts: number[], position: number): { ->getLineAndCharacterOfPosition : (lineStarts: number[], position: number) => { line: number; character: number; } ->lineStarts : number[] ->position : number - - line: number; ->line : number - - character: number; ->character : number - - }; - function positionToLineAndCharacter(text: string, pos: number): { ->positionToLineAndCharacter : (text: string, pos: number) => { line: number; character: number; } ->text : string ->pos : number - - line: number; ->line : number - - character: number; ->character : number - - }; - function isWhiteSpace(ch: number): boolean; ->isWhiteSpace : (ch: number) => boolean ->ch : number - - function isLineBreak(ch: number): boolean; ->isLineBreak : (ch: number) => boolean ->ch : number - - function isOctalDigit(ch: number): boolean; ->isOctalDigit : (ch: number) => boolean ->ch : number - - function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean): number; ->skipTrivia : (text: string, pos: number, stopAfterLineBreak?: boolean) => number ->text : string ->pos : number ->stopAfterLineBreak : boolean - - function getLeadingCommentRanges(text: string, pos: number): CommentRange[]; ->getLeadingCommentRanges : (text: string, pos: number) => CommentRange[] ->text : string ->pos : number ->CommentRange : CommentRange - - function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; ->getTrailingCommentRanges : (text: string, pos: number) => CommentRange[] ->text : string ->pos : number ->CommentRange : CommentRange - - function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; ->isIdentifierStart : (ch: number, languageVersion: ScriptTarget) => boolean ->ch : number ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget - - function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; ->isIdentifierPart : (ch: number, languageVersion: ScriptTarget) => boolean ->ch : number ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget - - function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner; ->createScanner : (languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback) => Scanner ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget ->skipTrivia : boolean ->text : string ->onError : ErrorCallback ->ErrorCallback : ErrorCallback ->Scanner : Scanner -} -declare module ts { ->ts : typeof ts - - function getNodeConstructor(kind: SyntaxKind): new () => Node; ->getNodeConstructor : (kind: SyntaxKind) => new () => Node ->kind : SyntaxKind ->SyntaxKind : SyntaxKind ->Node : Node - - function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; ->forEachChild : (node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T) => T ->T : T ->node : Node ->Node : Node ->cbNode : (node: Node) => T ->node : Node ->Node : Node ->T : T ->cbNodes : (nodes: Node[]) => T ->nodes : Node[] ->Node : Node ->T : T ->T : T - - function createCompilerHost(options: CompilerOptions): CompilerHost; ->createCompilerHost : (options: CompilerOptions) => CompilerHost ->options : CompilerOptions ->CompilerOptions : CompilerOptions ->CompilerHost : CompilerHost - - function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; ->createSourceFile : (filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean) => SourceFile ->filename : string ->sourceText : string ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget ->version : string ->isOpen : boolean ->SourceFile : SourceFile - - function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; ->createProgram : (rootNames: string[], options: CompilerOptions, host: CompilerHost) => Program ->rootNames : string[] ->options : CompilerOptions ->CompilerOptions : CompilerOptions ->host : CompilerHost ->CompilerHost : CompilerHost ->Program : Program -} -declare module ts { ->ts : typeof ts - - function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; ->createTypeChecker : (program: Program, fullTypeCheck: boolean) => TypeChecker ->program : Program ->Program : Program ->fullTypeCheck : boolean ->TypeChecker : TypeChecker -} -declare module ts { ->ts : typeof ts - - var servicesVersion: string; ->servicesVersion : string - - interface Node { ->Node : Node - - getSourceFile(): SourceFile; ->getSourceFile : () => SourceFile ->SourceFile : SourceFile - - getChildCount(sourceFile?: SourceFile): number; ->getChildCount : (sourceFile?: SourceFile) => number ->sourceFile : SourceFile ->SourceFile : SourceFile - - getChildAt(index: number, sourceFile?: SourceFile): Node; ->getChildAt : (index: number, sourceFile?: SourceFile) => Node ->index : number ->sourceFile : SourceFile ->SourceFile : SourceFile ->Node : Node - - getChildren(sourceFile?: SourceFile): Node[]; ->getChildren : (sourceFile?: SourceFile) => Node[] ->sourceFile : SourceFile ->SourceFile : SourceFile ->Node : Node - - getStart(sourceFile?: SourceFile): number; ->getStart : (sourceFile?: SourceFile) => number ->sourceFile : SourceFile ->SourceFile : SourceFile - - getFullStart(): number; ->getFullStart : () => number - - getEnd(): number; ->getEnd : () => number - - getWidth(sourceFile?: SourceFile): number; ->getWidth : (sourceFile?: SourceFile) => number ->sourceFile : SourceFile ->SourceFile : SourceFile - - getFullWidth(): number; ->getFullWidth : () => number - - getLeadingTriviaWidth(sourceFile?: SourceFile): number; ->getLeadingTriviaWidth : (sourceFile?: SourceFile) => number ->sourceFile : SourceFile ->SourceFile : SourceFile - - getFullText(sourceFile?: SourceFile): string; ->getFullText : (sourceFile?: SourceFile) => string ->sourceFile : SourceFile ->SourceFile : SourceFile - - getText(sourceFile?: SourceFile): string; ->getText : (sourceFile?: SourceFile) => string ->sourceFile : SourceFile ->SourceFile : SourceFile - - getFirstToken(sourceFile?: SourceFile): Node; ->getFirstToken : (sourceFile?: SourceFile) => Node ->sourceFile : SourceFile ->SourceFile : SourceFile ->Node : Node - - getLastToken(sourceFile?: SourceFile): Node; ->getLastToken : (sourceFile?: SourceFile) => Node ->sourceFile : SourceFile ->SourceFile : SourceFile ->Node : Node - } - interface Symbol { ->Symbol : Symbol - - getFlags(): SymbolFlags; ->getFlags : () => SymbolFlags ->SymbolFlags : SymbolFlags - - getName(): string; ->getName : () => string - - getDeclarations(): Declaration[]; ->getDeclarations : () => Declaration[] ->Declaration : Declaration - - getDocumentationComment(): SymbolDisplayPart[]; ->getDocumentationComment : () => SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - interface Type { ->Type : Type - - getFlags(): TypeFlags; ->getFlags : () => TypeFlags ->TypeFlags : TypeFlags - - getSymbol(): Symbol; ->getSymbol : () => Symbol ->Symbol : Symbol - - getProperties(): Symbol[]; ->getProperties : () => Symbol[] ->Symbol : Symbol - - getProperty(propertyName: string): Symbol; ->getProperty : (propertyName: string) => Symbol ->propertyName : string ->Symbol : Symbol - - getApparentProperties(): Symbol[]; ->getApparentProperties : () => Symbol[] ->Symbol : Symbol - - getCallSignatures(): Signature[]; ->getCallSignatures : () => Signature[] ->Signature : Signature - - getConstructSignatures(): Signature[]; ->getConstructSignatures : () => Signature[] ->Signature : Signature - - getStringIndexType(): Type; ->getStringIndexType : () => Type ->Type : Type - - getNumberIndexType(): Type; ->getNumberIndexType : () => Type ->Type : Type - } - interface Signature { ->Signature : Signature - - getDeclaration(): SignatureDeclaration; ->getDeclaration : () => SignatureDeclaration ->SignatureDeclaration : SignatureDeclaration - - getTypeParameters(): Type[]; ->getTypeParameters : () => Type[] ->Type : Type - - getParameters(): Symbol[]; ->getParameters : () => Symbol[] ->Symbol : Symbol - - getReturnType(): Type; ->getReturnType : () => Type ->Type : Type - - getDocumentationComment(): SymbolDisplayPart[]; ->getDocumentationComment : () => SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - interface SourceFile { ->SourceFile : SourceFile - - getScriptSnapshot(): IScriptSnapshot; ->getScriptSnapshot : () => IScriptSnapshot ->IScriptSnapshot : IScriptSnapshot - - getNamedDeclarations(): Declaration[]; ->getNamedDeclarations : () => Declaration[] ->Declaration : Declaration - - update(scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; ->update : (scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange) => SourceFile ->scriptSnapshot : IScriptSnapshot ->IScriptSnapshot : IScriptSnapshot ->version : string ->isOpen : boolean ->textChangeRange : TextChangeRange ->TextChangeRange : TextChangeRange ->SourceFile : SourceFile - } - /** - * Represents an immutable snapshot of a script at a specified time.Once acquired, the - * snapshot is observably immutable. i.e. the same calls with the same parameters will return - * the same values. - */ - interface IScriptSnapshot { ->IScriptSnapshot : IScriptSnapshot - - /** Gets a portion of the script snapshot specified by [start, end). */ - getText(start: number, end: number): string; ->getText : (start: number, end: number) => string ->start : number ->end : number - - /** Gets the length of this script snapshot. */ - getLength(): number; ->getLength : () => number - - /** - * This call returns the array containing the start position of every line. - * i.e."[0, 10, 55]". TODO: consider making this optional. The language service could - * always determine this (albeit in a more expensive manner). - */ - getLineStartPositions(): number[]; ->getLineStartPositions : () => number[] - - /** - * Gets the TextChangeRange that describe how the text changed between this text and - * an older version. This information is used by the incremental parser to determine - * what sections of the script need to be re-parsed. 'undefined' can be returned if the - * change range cannot be determined. However, in that case, incremental parsing will - * not happen and the entire document will be re - parsed. - */ - getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; ->getChangeRange : (oldSnapshot: IScriptSnapshot) => TextChangeRange ->oldSnapshot : IScriptSnapshot ->IScriptSnapshot : IScriptSnapshot ->TextChangeRange : TextChangeRange - } - module ScriptSnapshot { ->ScriptSnapshot : typeof ScriptSnapshot - - function fromString(text: string): IScriptSnapshot; ->fromString : (text: string) => IScriptSnapshot ->text : string ->IScriptSnapshot : IScriptSnapshot - } - interface PreProcessedFileInfo { ->PreProcessedFileInfo : PreProcessedFileInfo - - referencedFiles: FileReference[]; ->referencedFiles : FileReference[] ->FileReference : FileReference - - importedFiles: FileReference[]; ->importedFiles : FileReference[] ->FileReference : FileReference - - isLibFile: boolean; ->isLibFile : boolean - } - interface Logger { ->Logger : Logger - - log(s: string): void; ->log : (s: string) => void ->s : string - } - interface LanguageServiceHost extends Logger { ->LanguageServiceHost : LanguageServiceHost ->Logger : Logger - - getCompilationSettings(): CompilerOptions; ->getCompilationSettings : () => CompilerOptions ->CompilerOptions : CompilerOptions - - getScriptFileNames(): string[]; ->getScriptFileNames : () => string[] - - getScriptVersion(fileName: string): string; ->getScriptVersion : (fileName: string) => string ->fileName : string - - getScriptIsOpen(fileName: string): boolean; ->getScriptIsOpen : (fileName: string) => boolean ->fileName : string - - getScriptSnapshot(fileName: string): IScriptSnapshot; ->getScriptSnapshot : (fileName: string) => IScriptSnapshot ->fileName : string ->IScriptSnapshot : IScriptSnapshot - - getLocalizedDiagnosticMessages?(): any; ->getLocalizedDiagnosticMessages : () => any - - getCancellationToken?(): CancellationToken; ->getCancellationToken : () => CancellationToken ->CancellationToken : CancellationToken - - getCurrentDirectory(): string; ->getCurrentDirectory : () => string - - getDefaultLibFilename(options: CompilerOptions): string; ->getDefaultLibFilename : (options: CompilerOptions) => string ->options : CompilerOptions ->CompilerOptions : CompilerOptions - } - interface LanguageService { ->LanguageService : LanguageService - - cleanupSemanticCache(): void; ->cleanupSemanticCache : () => void - - getSyntacticDiagnostics(fileName: string): Diagnostic[]; ->getSyntacticDiagnostics : (fileName: string) => Diagnostic[] ->fileName : string ->Diagnostic : Diagnostic - - getSemanticDiagnostics(fileName: string): Diagnostic[]; ->getSemanticDiagnostics : (fileName: string) => Diagnostic[] ->fileName : string ->Diagnostic : Diagnostic - - getCompilerOptionsDiagnostics(): Diagnostic[]; ->getCompilerOptionsDiagnostics : () => Diagnostic[] ->Diagnostic : Diagnostic - - getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; ->getSyntacticClassifications : (fileName: string, span: TextSpan) => ClassifiedSpan[] ->fileName : string ->span : TextSpan ->TextSpan : TextSpan ->ClassifiedSpan : ClassifiedSpan - - getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; ->getSemanticClassifications : (fileName: string, span: TextSpan) => ClassifiedSpan[] ->fileName : string ->span : TextSpan ->TextSpan : TextSpan ->ClassifiedSpan : ClassifiedSpan - - getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; ->getCompletionsAtPosition : (fileName: string, position: number) => CompletionInfo ->fileName : string ->position : number ->CompletionInfo : CompletionInfo - - getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; ->getCompletionEntryDetails : (fileName: string, position: number, entryName: string) => CompletionEntryDetails ->fileName : string ->position : number ->entryName : string ->CompletionEntryDetails : CompletionEntryDetails - - getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; ->getQuickInfoAtPosition : (fileName: string, position: number) => QuickInfo ->fileName : string ->position : number ->QuickInfo : QuickInfo - - getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; ->getNameOrDottedNameSpan : (fileName: string, startPos: number, endPos: number) => TextSpan ->fileName : string ->startPos : number ->endPos : number ->TextSpan : TextSpan - - getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan; ->getBreakpointStatementAtPosition : (fileName: string, position: number) => TextSpan ->fileName : string ->position : number ->TextSpan : TextSpan - - getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems; ->getSignatureHelpItems : (fileName: string, position: number) => SignatureHelpItems ->fileName : string ->position : number ->SignatureHelpItems : SignatureHelpItems - - getRenameInfo(fileName: string, position: number): RenameInfo; ->getRenameInfo : (fileName: string, position: number) => RenameInfo ->fileName : string ->position : number ->RenameInfo : RenameInfo - - findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[]; ->findRenameLocations : (fileName: string, position: number, findInStrings: boolean, findInComments: boolean) => RenameLocation[] ->fileName : string ->position : number ->findInStrings : boolean ->findInComments : boolean ->RenameLocation : RenameLocation - - getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; ->getDefinitionAtPosition : (fileName: string, position: number) => DefinitionInfo[] ->fileName : string ->position : number ->DefinitionInfo : DefinitionInfo - - getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; ->getReferencesAtPosition : (fileName: string, position: number) => ReferenceEntry[] ->fileName : string ->position : number ->ReferenceEntry : ReferenceEntry - - getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; ->getOccurrencesAtPosition : (fileName: string, position: number) => ReferenceEntry[] ->fileName : string ->position : number ->ReferenceEntry : ReferenceEntry - - getNavigateToItems(searchValue: string): NavigateToItem[]; ->getNavigateToItems : (searchValue: string) => NavigateToItem[] ->searchValue : string ->NavigateToItem : NavigateToItem - - getNavigationBarItems(fileName: string): NavigationBarItem[]; ->getNavigationBarItems : (fileName: string) => NavigationBarItem[] ->fileName : string ->NavigationBarItem : NavigationBarItem - - getOutliningSpans(fileName: string): OutliningSpan[]; ->getOutliningSpans : (fileName: string) => OutliningSpan[] ->fileName : string ->OutliningSpan : OutliningSpan - - getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; ->getTodoComments : (fileName: string, descriptors: TodoCommentDescriptor[]) => TodoComment[] ->fileName : string ->descriptors : TodoCommentDescriptor[] ->TodoCommentDescriptor : TodoCommentDescriptor ->TodoComment : TodoComment - - getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; ->getBraceMatchingAtPosition : (fileName: string, position: number) => TextSpan[] ->fileName : string ->position : number ->TextSpan : TextSpan - - getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number; ->getIndentationAtPosition : (fileName: string, position: number, options: EditorOptions) => number ->fileName : string ->position : number ->options : EditorOptions ->EditorOptions : EditorOptions - - getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[]; ->getFormattingEditsForRange : (fileName: string, start: number, end: number, options: FormatCodeOptions) => TextChange[] ->fileName : string ->start : number ->end : number ->options : FormatCodeOptions ->FormatCodeOptions : FormatCodeOptions ->TextChange : TextChange - - getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; ->getFormattingEditsForDocument : (fileName: string, options: FormatCodeOptions) => TextChange[] ->fileName : string ->options : FormatCodeOptions ->FormatCodeOptions : FormatCodeOptions ->TextChange : TextChange - - getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[]; ->getFormattingEditsAfterKeystroke : (fileName: string, position: number, key: string, options: FormatCodeOptions) => TextChange[] ->fileName : string ->position : number ->key : string ->options : FormatCodeOptions ->FormatCodeOptions : FormatCodeOptions ->TextChange : TextChange - - getEmitOutput(fileName: string): EmitOutput; ->getEmitOutput : (fileName: string) => EmitOutput ->fileName : string ->EmitOutput : EmitOutput - - getSourceFile(filename: string): SourceFile; ->getSourceFile : (filename: string) => SourceFile ->filename : string ->SourceFile : SourceFile - - dispose(): void; ->dispose : () => void - } - class TextSpan { ->TextSpan : TextSpan - - private _start; ->_start : any - - private _length; ->_length : any - - /** - * Creates a TextSpan instance beginning with the position Start and having the Length - * specified with length. - */ - constructor(start: number, length: number); ->start : number ->length : number - - toJSON(key: any): any; ->toJSON : (key: any) => any ->key : any - - start(): number; ->start : () => number - - length(): number; ->length : () => number - - end(): number; ->end : () => number - - isEmpty(): boolean; ->isEmpty : () => boolean - - /** - * Determines whether the position lies within the span. Returns true if the position is greater than or equal to Start and strictly less - * than End, otherwise false. - * @param position The position to check. - */ - containsPosition(position: number): boolean; ->containsPosition : (position: number) => boolean ->position : number - - /** - * Determines whether span falls completely within this span. Returns true if the specified span falls completely within this span, otherwise false. - * @param span The span to check. - */ - containsTextSpan(span: TextSpan): boolean; ->containsTextSpan : (span: TextSpan) => boolean ->span : TextSpan ->TextSpan : TextSpan - - /** - * Determines whether the given span overlaps this span. Two spans are considered to overlap - * if they have positions in common and neither is empty. Empty spans do not overlap with any - * other span. Returns true if the spans overlap, false otherwise. - * @param span The span to check. - */ - overlapsWith(span: TextSpan): boolean; ->overlapsWith : (span: TextSpan) => boolean ->span : TextSpan ->TextSpan : TextSpan - - /** - * Returns the overlap with the given span, or undefined if there is no overlap. - * @param span The span to check. - */ - overlap(span: TextSpan): TextSpan; ->overlap : (span: TextSpan) => TextSpan ->span : TextSpan ->TextSpan : TextSpan ->TextSpan : TextSpan - - /** - * Determines whether span intersects this span. Two spans are considered to - * intersect if they have positions in common or the end of one span - * coincides with the start of the other span. Returns true if the spans intersect, false otherwise. - * @param The span to check. - */ - intersectsWithTextSpan(span: TextSpan): boolean; ->intersectsWithTextSpan : (span: TextSpan) => boolean ->span : TextSpan ->TextSpan : TextSpan - - intersectsWith(start: number, length: number): boolean; ->intersectsWith : (start: number, length: number) => boolean ->start : number ->length : number - - /** - * Determines whether the given position intersects this span. - * A position is considered to intersect if it is between the start and - * end positions (inclusive) of this span. Returns true if the position intersects, false otherwise. - * @param position The position to check. - */ - intersectsWithPosition(position: number): boolean; ->intersectsWithPosition : (position: number) => boolean ->position : number - - /** - * Returns the intersection with the given span, or undefined if there is no intersection. - * @param span The span to check. - */ - intersection(span: TextSpan): TextSpan; ->intersection : (span: TextSpan) => TextSpan ->span : TextSpan ->TextSpan : TextSpan ->TextSpan : TextSpan - - /** - * Creates a new TextSpan from the given start and end positions - * as opposed to a position and length. - */ - static fromBounds(start: number, end: number): TextSpan; ->fromBounds : (start: number, end: number) => TextSpan ->start : number ->end : number ->TextSpan : TextSpan - } - class TextChangeRange { ->TextChangeRange : TextChangeRange - - static unchanged: TextChangeRange; ->unchanged : TextChangeRange ->TextChangeRange : TextChangeRange - - private _span; ->_span : any - - private _newLength; ->_newLength : any - - /** - * Initializes a new instance of TextChangeRange. - */ - constructor(span: TextSpan, newLength: number); ->span : TextSpan ->TextSpan : TextSpan ->newLength : number - - /** - * The span of text before the edit which is being changed - */ - span(): TextSpan; ->span : () => TextSpan ->TextSpan : TextSpan - - /** - * Width of the span after the edit. A 0 here would represent a delete - */ - newLength(): number; ->newLength : () => number - - newSpan(): TextSpan; ->newSpan : () => TextSpan ->TextSpan : TextSpan - - isUnchanged(): boolean; ->isUnchanged : () => boolean - - /** - * Called to merge all the changes that occurred across several versions of a script snapshot - * into a single change. i.e. if a user keeps making successive edits to a script we will - * have a text change from V1 to V2, V2 to V3, ..., Vn. - * - * This function will then merge those changes into a single change range valid between V1 and - * Vn. - */ - static collapseChangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; ->collapseChangesAcrossMultipleVersions : (changes: TextChangeRange[]) => TextChangeRange ->changes : TextChangeRange[] ->TextChangeRange : TextChangeRange ->TextChangeRange : TextChangeRange - } - interface ClassifiedSpan { ->ClassifiedSpan : ClassifiedSpan - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - classificationType: string; ->classificationType : string - } - interface NavigationBarItem { ->NavigationBarItem : NavigationBarItem - - text: string; ->text : string - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - - spans: TextSpan[]; ->spans : TextSpan[] ->TextSpan : TextSpan - - childItems: NavigationBarItem[]; ->childItems : NavigationBarItem[] ->NavigationBarItem : NavigationBarItem - - indent: number; ->indent : number - - bolded: boolean; ->bolded : boolean - - grayed: boolean; ->grayed : boolean - } - interface TodoCommentDescriptor { ->TodoCommentDescriptor : TodoCommentDescriptor - - text: string; ->text : string - - priority: number; ->priority : number - } - interface TodoComment { ->TodoComment : TodoComment - - descriptor: TodoCommentDescriptor; ->descriptor : TodoCommentDescriptor ->TodoCommentDescriptor : TodoCommentDescriptor - - message: string; ->message : string - - position: number; ->position : number - } - class TextChange { ->TextChange : TextChange - - span: TextSpan; ->span : TextSpan ->TextSpan : TextSpan - - newText: string; ->newText : string - } - interface RenameLocation { ->RenameLocation : RenameLocation - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - fileName: string; ->fileName : string - } - interface ReferenceEntry { ->ReferenceEntry : ReferenceEntry - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - fileName: string; ->fileName : string - - isWriteAccess: boolean; ->isWriteAccess : boolean - } - interface NavigateToItem { ->NavigateToItem : NavigateToItem - - name: string; ->name : string - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - - matchKind: string; ->matchKind : string - - fileName: string; ->fileName : string - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - containerName: string; ->containerName : string - - containerKind: string; ->containerKind : string - } - interface EditorOptions { ->EditorOptions : EditorOptions - - IndentSize: number; ->IndentSize : number - - TabSize: number; ->TabSize : number - - NewLineCharacter: string; ->NewLineCharacter : string - - ConvertTabsToSpaces: boolean; ->ConvertTabsToSpaces : boolean - } - interface FormatCodeOptions extends EditorOptions { ->FormatCodeOptions : FormatCodeOptions ->EditorOptions : EditorOptions - - InsertSpaceAfterCommaDelimiter: boolean; ->InsertSpaceAfterCommaDelimiter : boolean - - InsertSpaceAfterSemicolonInForStatements: boolean; ->InsertSpaceAfterSemicolonInForStatements : boolean - - InsertSpaceBeforeAndAfterBinaryOperators: boolean; ->InsertSpaceBeforeAndAfterBinaryOperators : boolean - - InsertSpaceAfterKeywordsInControlFlowStatements: boolean; ->InsertSpaceAfterKeywordsInControlFlowStatements : boolean - - InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; ->InsertSpaceAfterFunctionKeywordForAnonymousFunctions : boolean - - InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; ->InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis : boolean - - PlaceOpenBraceOnNewLineForFunctions: boolean; ->PlaceOpenBraceOnNewLineForFunctions : boolean - - PlaceOpenBraceOnNewLineForControlBlocks: boolean; ->PlaceOpenBraceOnNewLineForControlBlocks : boolean - } - interface DefinitionInfo { ->DefinitionInfo : DefinitionInfo - - fileName: string; ->fileName : string - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - kind: string; ->kind : string - - name: string; ->name : string - - containerKind: string; ->containerKind : string - - containerName: string; ->containerName : string - } - enum SymbolDisplayPartKind { ->SymbolDisplayPartKind : SymbolDisplayPartKind - - aliasName = 0, ->aliasName : SymbolDisplayPartKind - - className = 1, ->className : SymbolDisplayPartKind - - enumName = 2, ->enumName : SymbolDisplayPartKind - - fieldName = 3, ->fieldName : SymbolDisplayPartKind - - interfaceName = 4, ->interfaceName : SymbolDisplayPartKind - - keyword = 5, ->keyword : SymbolDisplayPartKind - - lineBreak = 6, ->lineBreak : SymbolDisplayPartKind - - numericLiteral = 7, ->numericLiteral : SymbolDisplayPartKind - - stringLiteral = 8, ->stringLiteral : SymbolDisplayPartKind - - localName = 9, ->localName : SymbolDisplayPartKind - - methodName = 10, ->methodName : SymbolDisplayPartKind - - moduleName = 11, ->moduleName : SymbolDisplayPartKind - - operator = 12, ->operator : SymbolDisplayPartKind - - parameterName = 13, ->parameterName : SymbolDisplayPartKind - - propertyName = 14, ->propertyName : SymbolDisplayPartKind - - punctuation = 15, ->punctuation : SymbolDisplayPartKind - - space = 16, ->space : SymbolDisplayPartKind - - text = 17, ->text : SymbolDisplayPartKind - - typeParameterName = 18, ->typeParameterName : SymbolDisplayPartKind - - enumMemberName = 19, ->enumMemberName : SymbolDisplayPartKind - - functionName = 20, ->functionName : SymbolDisplayPartKind - - regularExpressionLiteral = 21, ->regularExpressionLiteral : SymbolDisplayPartKind - } - interface SymbolDisplayPart { ->SymbolDisplayPart : SymbolDisplayPart - - text: string; ->text : string - - kind: string; ->kind : string - } - interface QuickInfo { ->QuickInfo : QuickInfo - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - displayParts: SymbolDisplayPart[]; ->displayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - documentation: SymbolDisplayPart[]; ->documentation : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - interface RenameInfo { ->RenameInfo : RenameInfo - - canRename: boolean; ->canRename : boolean - - localizedErrorMessage: string; ->localizedErrorMessage : string - - displayName: string; ->displayName : string - - fullDisplayName: string; ->fullDisplayName : string - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - - triggerSpan: TextSpan; ->triggerSpan : TextSpan ->TextSpan : TextSpan - } - interface SignatureHelpParameter { ->SignatureHelpParameter : SignatureHelpParameter - - name: string; ->name : string - - documentation: SymbolDisplayPart[]; ->documentation : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - displayParts: SymbolDisplayPart[]; ->displayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - isOptional: boolean; ->isOptional : boolean - } - /** - * Represents a single signature to show in signature help. - * The id is used for subsequent calls into the language service to ask questions about the - * signature help item in the context of any documents that have been updated. i.e. after - * an edit has happened, while signature help is still active, the host can ask important - * questions like 'what parameter is the user currently contained within?'. - */ - interface SignatureHelpItem { ->SignatureHelpItem : SignatureHelpItem - - isVariadic: boolean; ->isVariadic : boolean - - prefixDisplayParts: SymbolDisplayPart[]; ->prefixDisplayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - suffixDisplayParts: SymbolDisplayPart[]; ->suffixDisplayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - separatorDisplayParts: SymbolDisplayPart[]; ->separatorDisplayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - parameters: SignatureHelpParameter[]; ->parameters : SignatureHelpParameter[] ->SignatureHelpParameter : SignatureHelpParameter - - documentation: SymbolDisplayPart[]; ->documentation : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - /** - * Represents a set of signature help items, and the preferred item that should be selected. - */ - interface SignatureHelpItems { ->SignatureHelpItems : SignatureHelpItems - - items: SignatureHelpItem[]; ->items : SignatureHelpItem[] ->SignatureHelpItem : SignatureHelpItem - - applicableSpan: TextSpan; ->applicableSpan : TextSpan ->TextSpan : TextSpan - - selectedItemIndex: number; ->selectedItemIndex : number - - argumentIndex: number; ->argumentIndex : number - - argumentCount: number; ->argumentCount : number - } - interface CompletionInfo { ->CompletionInfo : CompletionInfo - - isMemberCompletion: boolean; ->isMemberCompletion : boolean - - entries: CompletionEntry[]; ->entries : CompletionEntry[] ->CompletionEntry : CompletionEntry - } - interface CompletionEntry { ->CompletionEntry : CompletionEntry - - name: string; ->name : string - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - } - interface CompletionEntryDetails { ->CompletionEntryDetails : CompletionEntryDetails - - name: string; ->name : string - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - - displayParts: SymbolDisplayPart[]; ->displayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - documentation: SymbolDisplayPart[]; ->documentation : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - interface OutliningSpan { ->OutliningSpan : OutliningSpan - - /** The span of the document to actually collapse. */ - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - /** The span of the document to display when the user hovers over the collapsed span. */ - hintSpan: TextSpan; ->hintSpan : TextSpan ->TextSpan : TextSpan - - /** The text to display in the editor for the collapsed region. */ - bannerText: string; ->bannerText : string - - /** - * Whether or not this region should be automatically collapsed when - * the 'Collapse to Definitions' command is invoked. - */ - autoCollapse: boolean; ->autoCollapse : boolean - } - interface EmitOutput { ->EmitOutput : EmitOutput - - outputFiles: OutputFile[]; ->outputFiles : OutputFile[] ->OutputFile : OutputFile - - emitOutputStatus: EmitReturnStatus; ->emitOutputStatus : EmitReturnStatus ->EmitReturnStatus : EmitReturnStatus - } - const enum OutputFileType { ->OutputFileType : OutputFileType - - JavaScript = 0, ->JavaScript : OutputFileType - - SourceMap = 1, ->SourceMap : OutputFileType - - Declaration = 2, ->Declaration : OutputFileType - } - interface OutputFile { ->OutputFile : OutputFile - - name: string; ->name : string - - writeByteOrderMark: boolean; ->writeByteOrderMark : boolean - - text: string; ->text : string - } - const enum EndOfLineState { ->EndOfLineState : EndOfLineState - - Start = 0, ->Start : EndOfLineState - - InMultiLineCommentTrivia = 1, ->InMultiLineCommentTrivia : EndOfLineState - - InSingleQuoteStringLiteral = 2, ->InSingleQuoteStringLiteral : EndOfLineState - - InDoubleQuoteStringLiteral = 3, ->InDoubleQuoteStringLiteral : EndOfLineState - } - enum TokenClass { ->TokenClass : TokenClass - - Punctuation = 0, ->Punctuation : TokenClass - - Keyword = 1, ->Keyword : TokenClass - - Operator = 2, ->Operator : TokenClass - - Comment = 3, ->Comment : TokenClass - - Whitespace = 4, ->Whitespace : TokenClass - - Identifier = 5, ->Identifier : TokenClass - - NumberLiteral = 6, ->NumberLiteral : TokenClass - - StringLiteral = 7, ->StringLiteral : TokenClass - - RegExpLiteral = 8, ->RegExpLiteral : TokenClass - } - interface ClassificationResult { ->ClassificationResult : ClassificationResult - - finalLexState: EndOfLineState; ->finalLexState : EndOfLineState ->EndOfLineState : EndOfLineState - - entries: ClassificationInfo[]; ->entries : ClassificationInfo[] ->ClassificationInfo : ClassificationInfo - } - interface ClassificationInfo { ->ClassificationInfo : ClassificationInfo - - length: number; ->length : number - - classification: TokenClass; ->classification : TokenClass ->TokenClass : TokenClass - } - interface Classifier { ->Classifier : Classifier - - getClassificationsForLine(text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean): ClassificationResult; ->getClassificationsForLine : (text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean) => ClassificationResult ->text : string ->lexState : EndOfLineState ->EndOfLineState : EndOfLineState ->classifyKeywordsInGenerics : boolean ->ClassificationResult : ClassificationResult - } - interface DocumentRegistry { ->DocumentRegistry : DocumentRegistry - - acquireDocument(filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean): SourceFile; ->acquireDocument : (filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean) => SourceFile ->filename : string ->compilationSettings : CompilerOptions ->CompilerOptions : CompilerOptions ->scriptSnapshot : IScriptSnapshot ->IScriptSnapshot : IScriptSnapshot ->version : string ->isOpen : boolean ->SourceFile : SourceFile - - updateDocument(sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; ->updateDocument : (sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange) => SourceFile ->sourceFile : SourceFile ->SourceFile : SourceFile ->filename : string ->compilationSettings : CompilerOptions ->CompilerOptions : CompilerOptions ->scriptSnapshot : IScriptSnapshot ->IScriptSnapshot : IScriptSnapshot ->version : string ->isOpen : boolean ->textChangeRange : TextChangeRange ->TextChangeRange : TextChangeRange ->SourceFile : SourceFile - - releaseDocument(filename: string, compilationSettings: CompilerOptions): void; ->releaseDocument : (filename: string, compilationSettings: CompilerOptions) => void ->filename : string ->compilationSettings : CompilerOptions ->CompilerOptions : CompilerOptions - } - class ScriptElementKind { ->ScriptElementKind : ScriptElementKind - - static unknown: string; ->unknown : string - - static keyword: string; ->keyword : string - - static scriptElement: string; ->scriptElement : string - - static moduleElement: string; ->moduleElement : string - - static classElement: string; ->classElement : string - - static interfaceElement: string; ->interfaceElement : string - - static typeElement: string; ->typeElement : string - - static enumElement: string; ->enumElement : string - - static variableElement: string; ->variableElement : string - - static localVariableElement: string; ->localVariableElement : string - - static functionElement: string; ->functionElement : string - - static localFunctionElement: string; ->localFunctionElement : string - - static memberFunctionElement: string; ->memberFunctionElement : string - - static memberGetAccessorElement: string; ->memberGetAccessorElement : string - - static memberSetAccessorElement: string; ->memberSetAccessorElement : string - - static memberVariableElement: string; ->memberVariableElement : string - - static constructorImplementationElement: string; ->constructorImplementationElement : string - - static callSignatureElement: string; ->callSignatureElement : string - - static indexSignatureElement: string; ->indexSignatureElement : string - - static constructSignatureElement: string; ->constructSignatureElement : string - - static parameterElement: string; ->parameterElement : string - - static typeParameterElement: string; ->typeParameterElement : string - - static primitiveType: string; ->primitiveType : string - - static label: string; ->label : string - - static alias: string; ->alias : string - - static constElement: string; ->constElement : string - - static letElement: string; ->letElement : string - } - class ScriptElementKindModifier { ->ScriptElementKindModifier : ScriptElementKindModifier - - static none: string; ->none : string - - static publicMemberModifier: string; ->publicMemberModifier : string - - static privateMemberModifier: string; ->privateMemberModifier : string - - static protectedMemberModifier: string; ->protectedMemberModifier : string - - static exportedModifier: string; ->exportedModifier : string - - static ambientModifier: string; ->ambientModifier : string - - static staticModifier: string; ->staticModifier : string - } - class ClassificationTypeNames { ->ClassificationTypeNames : ClassificationTypeNames - - static comment: string; ->comment : string - - static identifier: string; ->identifier : string - - static keyword: string; ->keyword : string - - static numericLiteral: string; ->numericLiteral : string - - static operator: string; ->operator : string - - static stringLiteral: string; ->stringLiteral : string - - static whiteSpace: string; ->whiteSpace : string - - static text: string; ->text : string - - static punctuation: string; ->punctuation : string - - static className: string; ->className : string - - static enumName: string; ->enumName : string - - static interfaceName: string; ->interfaceName : string - - static moduleName: string; ->moduleName : string - - static typeParameterName: string; ->typeParameterName : string - - static typeAlias: string; ->typeAlias : string - } - interface DisplayPartsSymbolWriter extends SymbolWriter { ->DisplayPartsSymbolWriter : DisplayPartsSymbolWriter ->SymbolWriter : SymbolWriter - - displayParts(): SymbolDisplayPart[]; ->displayParts : () => SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - function displayPartsToString(displayParts: SymbolDisplayPart[]): string; ->displayPartsToString : (displayParts: SymbolDisplayPart[]) => string ->displayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - function getDefaultCompilerOptions(): CompilerOptions; ->getDefaultCompilerOptions : () => CompilerOptions ->CompilerOptions : CompilerOptions - - class OperationCanceledException { ->OperationCanceledException : OperationCanceledException - } - class CancellationTokenObject { ->CancellationTokenObject : CancellationTokenObject - - private cancellationToken; ->cancellationToken : any - - static None: CancellationTokenObject; ->None : CancellationTokenObject ->CancellationTokenObject : CancellationTokenObject - - constructor(cancellationToken: CancellationToken); ->cancellationToken : CancellationToken ->CancellationToken : CancellationToken - - isCancellationRequested(): boolean; ->isCancellationRequested : () => boolean - - throwIfCancellationRequested(): void; ->throwIfCancellationRequested : () => void - } - function createDocumentRegistry(): DocumentRegistry; ->createDocumentRegistry : () => DocumentRegistry ->DocumentRegistry : DocumentRegistry - - function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; ->preProcessFile : (sourceText: string, readImportFiles?: boolean) => PreProcessedFileInfo ->sourceText : string ->readImportFiles : boolean ->PreProcessedFileInfo : PreProcessedFileInfo - - function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry): LanguageService; ->createLanguageService : (host: LanguageServiceHost, documentRegistry: DocumentRegistry) => LanguageService ->host : LanguageServiceHost ->LanguageServiceHost : LanguageServiceHost ->documentRegistry : DocumentRegistry ->DocumentRegistry : DocumentRegistry ->LanguageService : LanguageService - - function createClassifier(host: Logger): Classifier; ->createClassifier : (host: Logger) => Classifier ->host : Logger ->Logger : Logger ->Classifier : Classifier -} - From 47ed584d1299a48cccc41b77d1f618c5657455da Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 11 Dec 2014 16:39:54 -0800 Subject: [PATCH 126/141] Re-add baselines. --- .../reference/APISample_node_compile.js | 1865 ++++++ .../reference/APISample_node_compile.types | 5749 ++++++++++++++++ .../reference/APISample_standalone_compile.js | 1862 ++++++ .../APISample_standalone_compile.types | 5756 +++++++++++++++++ 4 files changed, 15232 insertions(+) create mode 100644 tests/baselines/reference/APISample_node_compile.js create mode 100644 tests/baselines/reference/APISample_node_compile.types create mode 100644 tests/baselines/reference/APISample_standalone_compile.js create mode 100644 tests/baselines/reference/APISample_standalone_compile.types diff --git a/tests/baselines/reference/APISample_node_compile.js b/tests/baselines/reference/APISample_node_compile.js new file mode 100644 index 00000000000..d4111bcafd4 --- /dev/null +++ b/tests/baselines/reference/APISample_node_compile.js @@ -0,0 +1,1865 @@ +//// [tests/cases/compiler/APISample_node_compile.ts] //// + +//// [APISample_node_compile.ts] + +import ts = require("typescript"); + +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); + +var program = ts.createProgram(["file1.ts"], {}, undefined); +//// [typescript.d.ts] +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + +declare module "typescript" { + interface Map { + [index: string]: T; + } + interface TextRange { + pos: number; + end: number; + } + const enum SyntaxKind { + Unknown = 0, + EndOfFileToken = 1, + SingleLineCommentTrivia = 2, + MultiLineCommentTrivia = 3, + NewLineTrivia = 4, + WhitespaceTrivia = 5, + NumericLiteral = 6, + StringLiteral = 7, + RegularExpressionLiteral = 8, + NoSubstitutionTemplateLiteral = 9, + TemplateHead = 10, + TemplateMiddle = 11, + TemplateTail = 12, + OpenBraceToken = 13, + CloseBraceToken = 14, + OpenParenToken = 15, + CloseParenToken = 16, + OpenBracketToken = 17, + CloseBracketToken = 18, + DotToken = 19, + DotDotDotToken = 20, + SemicolonToken = 21, + CommaToken = 22, + LessThanToken = 23, + GreaterThanToken = 24, + LessThanEqualsToken = 25, + GreaterThanEqualsToken = 26, + EqualsEqualsToken = 27, + ExclamationEqualsToken = 28, + EqualsEqualsEqualsToken = 29, + ExclamationEqualsEqualsToken = 30, + EqualsGreaterThanToken = 31, + PlusToken = 32, + MinusToken = 33, + AsteriskToken = 34, + SlashToken = 35, + PercentToken = 36, + PlusPlusToken = 37, + MinusMinusToken = 38, + LessThanLessThanToken = 39, + GreaterThanGreaterThanToken = 40, + GreaterThanGreaterThanGreaterThanToken = 41, + AmpersandToken = 42, + BarToken = 43, + CaretToken = 44, + ExclamationToken = 45, + TildeToken = 46, + AmpersandAmpersandToken = 47, + BarBarToken = 48, + QuestionToken = 49, + ColonToken = 50, + EqualsToken = 51, + PlusEqualsToken = 52, + MinusEqualsToken = 53, + AsteriskEqualsToken = 54, + SlashEqualsToken = 55, + PercentEqualsToken = 56, + LessThanLessThanEqualsToken = 57, + GreaterThanGreaterThanEqualsToken = 58, + GreaterThanGreaterThanGreaterThanEqualsToken = 59, + AmpersandEqualsToken = 60, + BarEqualsToken = 61, + CaretEqualsToken = 62, + Identifier = 63, + BreakKeyword = 64, + CaseKeyword = 65, + CatchKeyword = 66, + ClassKeyword = 67, + ConstKeyword = 68, + ContinueKeyword = 69, + DebuggerKeyword = 70, + DefaultKeyword = 71, + DeleteKeyword = 72, + DoKeyword = 73, + ElseKeyword = 74, + EnumKeyword = 75, + ExportKeyword = 76, + ExtendsKeyword = 77, + FalseKeyword = 78, + FinallyKeyword = 79, + ForKeyword = 80, + FunctionKeyword = 81, + IfKeyword = 82, + ImportKeyword = 83, + InKeyword = 84, + InstanceOfKeyword = 85, + NewKeyword = 86, + NullKeyword = 87, + ReturnKeyword = 88, + SuperKeyword = 89, + SwitchKeyword = 90, + ThisKeyword = 91, + ThrowKeyword = 92, + TrueKeyword = 93, + TryKeyword = 94, + TypeOfKeyword = 95, + VarKeyword = 96, + VoidKeyword = 97, + WhileKeyword = 98, + WithKeyword = 99, + ImplementsKeyword = 100, + InterfaceKeyword = 101, + LetKeyword = 102, + PackageKeyword = 103, + PrivateKeyword = 104, + ProtectedKeyword = 105, + PublicKeyword = 106, + StaticKeyword = 107, + YieldKeyword = 108, + AnyKeyword = 109, + BooleanKeyword = 110, + ConstructorKeyword = 111, + DeclareKeyword = 112, + GetKeyword = 113, + ModuleKeyword = 114, + RequireKeyword = 115, + NumberKeyword = 116, + SetKeyword = 117, + StringKeyword = 118, + TypeKeyword = 119, + QualifiedName = 120, + ComputedPropertyName = 121, + TypeParameter = 122, + Parameter = 123, + Property = 124, + Method = 125, + Constructor = 126, + GetAccessor = 127, + SetAccessor = 128, + CallSignature = 129, + ConstructSignature = 130, + IndexSignature = 131, + TypeReference = 132, + FunctionType = 133, + ConstructorType = 134, + TypeQuery = 135, + TypeLiteral = 136, + ArrayType = 137, + TupleType = 138, + UnionType = 139, + ParenthesizedType = 140, + ArrayLiteralExpression = 141, + ObjectLiteralExpression = 142, + PropertyAccessExpression = 143, + ElementAccessExpression = 144, + CallExpression = 145, + NewExpression = 146, + TaggedTemplateExpression = 147, + TypeAssertionExpression = 148, + ParenthesizedExpression = 149, + FunctionExpression = 150, + ArrowFunction = 151, + DeleteExpression = 152, + TypeOfExpression = 153, + VoidExpression = 154, + PrefixUnaryExpression = 155, + PostfixUnaryExpression = 156, + BinaryExpression = 157, + ConditionalExpression = 158, + TemplateExpression = 159, + YieldExpression = 160, + OmittedExpression = 161, + TemplateSpan = 162, + Block = 163, + VariableStatement = 164, + EmptyStatement = 165, + ExpressionStatement = 166, + IfStatement = 167, + DoStatement = 168, + WhileStatement = 169, + ForStatement = 170, + ForInStatement = 171, + ContinueStatement = 172, + BreakStatement = 173, + ReturnStatement = 174, + WithStatement = 175, + SwitchStatement = 176, + LabeledStatement = 177, + ThrowStatement = 178, + TryStatement = 179, + TryBlock = 180, + FinallyBlock = 181, + DebuggerStatement = 182, + VariableDeclaration = 183, + FunctionDeclaration = 184, + ClassDeclaration = 185, + InterfaceDeclaration = 186, + TypeAliasDeclaration = 187, + EnumDeclaration = 188, + ModuleDeclaration = 189, + ModuleBlock = 190, + ImportDeclaration = 191, + ExportAssignment = 192, + ExternalModuleReference = 193, + CaseClause = 194, + DefaultClause = 195, + HeritageClause = 196, + CatchClause = 197, + PropertyAssignment = 198, + ShorthandPropertyAssignment = 199, + EnumMember = 200, + SourceFile = 201, + Program = 202, + SyntaxList = 203, + Count = 204, + FirstAssignment = 51, + LastAssignment = 62, + FirstReservedWord = 64, + LastReservedWord = 99, + FirstKeyword = 64, + LastKeyword = 119, + FirstFutureReservedWord = 100, + LastFutureReservedWord = 108, + FirstTypeNode = 132, + LastTypeNode = 140, + FirstPunctuation = 13, + LastPunctuation = 62, + FirstToken = 0, + LastToken = 119, + FirstTriviaToken = 2, + LastTriviaToken = 5, + FirstLiteralToken = 6, + LastLiteralToken = 9, + FirstTemplateToken = 9, + LastTemplateToken = 12, + FirstOperator = 21, + LastOperator = 62, + FirstBinaryOperator = 23, + LastBinaryOperator = 62, + FirstNode = 120, + } + const enum NodeFlags { + Export = 1, + Ambient = 2, + Public = 16, + Private = 32, + Protected = 64, + Static = 128, + MultiLine = 256, + Synthetic = 512, + DeclarationFile = 1024, + Let = 2048, + Const = 4096, + OctalLiteral = 8192, + Modifier = 243, + AccessibilityModifier = 112, + BlockScoped = 6144, + } + const enum ParserContextFlags { + StrictMode = 1, + DisallowIn = 2, + Yield = 4, + GeneratorParameter = 8, + ContainsError = 16, + HasPropagatedChildContainsErrorFlag = 32, + } + interface Node extends TextRange { + kind: SyntaxKind; + flags: NodeFlags; + parserContextFlags?: ParserContextFlags; + id?: number; + parent?: Node; + symbol?: Symbol; + locals?: SymbolTable; + nextContainer?: Node; + localSymbol?: Symbol; + modifiers?: ModifiersArray; + } + interface NodeArray extends Array, TextRange { + hasTrailingComma?: boolean; + } + interface ModifiersArray extends NodeArray { + flags: number; + } + interface Identifier extends PrimaryExpression { + text: string; + } + interface QualifiedName extends Node { + left: EntityName; + right: Identifier; + } + type EntityName = Identifier | QualifiedName; + type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; + interface Declaration extends Node { + _declarationBrand: any; + name?: DeclarationName; + } + interface ComputedPropertyName extends Node { + expression: Expression; + } + interface TypeParameterDeclaration extends Declaration { + name: Identifier; + constraint?: TypeNode; + expression?: Expression; + } + interface SignatureDeclaration extends Declaration { + typeParameters?: NodeArray; + parameters: NodeArray; + type?: TypeNode; + } + interface VariableDeclaration extends Declaration { + name: Identifier; + type?: TypeNode; + initializer?: Expression; + } + interface ParameterDeclaration extends Declaration { + dotDotDotToken?: Node; + name: Identifier; + questionToken?: Node; + type?: TypeNode | StringLiteralExpression; + initializer?: Expression; + } + interface PropertyDeclaration extends Declaration, ClassElement { + _propertyDeclarationBrand: any; + questionToken?: Node; + type?: TypeNode; + initializer?: Expression; + } + type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; + type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; + interface ObjectLiteralElement extends Declaration { + _objectLiteralBrandBrand: any; + } + interface ShorthandPropertyAssignment extends ObjectLiteralElement { + name: Identifier; + questionToken?: Node; + } + interface PropertyAssignment extends ObjectLiteralElement { + _propertyAssignmentBrand: any; + name: DeclarationName; + questionToken?: Node; + initializer: Expression; + } + /** + * Several node kinds share function-like features such as a signature, + * a name, and a body. These nodes should extend FunctionLikeDeclaration. + * Examples: + * FunctionDeclaration + * MethodDeclaration + * AccessorDeclaration + */ + interface FunctionLikeDeclaration extends SignatureDeclaration { + _functionLikeDeclarationBrand: any; + asteriskToken?: Node; + questionToken?: Node; + body?: Block | Expression; + } + interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { + name: Identifier; + body?: Block; + } + interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { + body?: Block; + } + interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { + body?: Block; + } + interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { + _accessorDeclarationBrand: any; + body: Block; + } + interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { + _indexSignatureDeclarationBrand: any; + } + interface TypeNode extends Node { + _typeNodeBrand: any; + } + interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { + _functionOrConstructorTypeNodeBrand: any; + } + interface TypeReferenceNode extends TypeNode { + typeName: EntityName; + typeArguments?: NodeArray; + } + interface TypeQueryNode extends TypeNode { + exprName: EntityName; + } + interface TypeLiteralNode extends TypeNode, Declaration { + members: NodeArray; + } + interface ArrayTypeNode extends TypeNode { + elementType: TypeNode; + } + interface TupleTypeNode extends TypeNode { + elementTypes: NodeArray; + } + interface UnionTypeNode extends TypeNode { + types: NodeArray; + } + interface ParenthesizedTypeNode extends TypeNode { + type: TypeNode; + } + interface Expression extends Node { + _expressionBrand: any; + contextualType?: Type; + } + interface UnaryExpression extends Expression { + _unaryExpressionBrand: any; + } + interface PrefixUnaryExpression extends UnaryExpression { + operator: SyntaxKind; + operand: UnaryExpression; + } + interface PostfixUnaryExpression extends PostfixExpression { + operand: LeftHandSideExpression; + operator: SyntaxKind; + } + interface PostfixExpression extends UnaryExpression { + _postfixExpressionBrand: any; + } + interface LeftHandSideExpression extends PostfixExpression { + _leftHandSideExpressionBrand: any; + } + interface MemberExpression extends LeftHandSideExpression { + _memberExpressionBrand: any; + } + interface PrimaryExpression extends MemberExpression { + _primaryExpressionBrand: any; + } + interface DeleteExpression extends UnaryExpression { + expression: UnaryExpression; + } + interface TypeOfExpression extends UnaryExpression { + expression: UnaryExpression; + } + interface VoidExpression extends UnaryExpression { + expression: UnaryExpression; + } + interface YieldExpression extends Expression { + asteriskToken?: Node; + expression: Expression; + } + interface BinaryExpression extends Expression { + left: Expression; + operator: SyntaxKind; + right: Expression; + } + interface ConditionalExpression extends Expression { + condition: Expression; + whenTrue: Expression; + whenFalse: Expression; + } + interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { + name?: Identifier; + body: Block | Expression; + } + interface LiteralExpression extends PrimaryExpression { + text: string; + isUnterminated?: boolean; + } + interface StringLiteralExpression extends LiteralExpression { + _stringLiteralExpressionBrand: any; + } + interface TemplateExpression extends PrimaryExpression { + head: LiteralExpression; + templateSpans: NodeArray; + } + interface TemplateSpan extends Node { + expression: Expression; + literal: LiteralExpression; + } + interface ParenthesizedExpression extends PrimaryExpression { + expression: Expression; + } + interface ArrayLiteralExpression extends PrimaryExpression { + elements: NodeArray; + } + interface ObjectLiteralExpression extends PrimaryExpression, Declaration { + properties: NodeArray; + } + interface PropertyAccessExpression extends MemberExpression { + expression: LeftHandSideExpression; + name: Identifier; + } + interface ElementAccessExpression extends MemberExpression { + expression: LeftHandSideExpression; + argumentExpression?: Expression; + } + interface CallExpression extends LeftHandSideExpression { + expression: LeftHandSideExpression; + typeArguments?: NodeArray; + arguments: NodeArray; + } + interface NewExpression extends CallExpression, PrimaryExpression { + } + interface TaggedTemplateExpression extends MemberExpression { + tag: LeftHandSideExpression; + template: LiteralExpression | TemplateExpression; + } + type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression; + interface TypeAssertion extends UnaryExpression { + type: TypeNode; + expression: UnaryExpression; + } + interface Statement extends Node, ModuleElement { + _statementBrand: any; + } + interface Block extends Statement { + statements: NodeArray; + } + interface VariableStatement extends Statement { + declarations: NodeArray; + } + interface ExpressionStatement extends Statement { + expression: Expression; + } + interface IfStatement extends Statement { + expression: Expression; + thenStatement: Statement; + elseStatement?: Statement; + } + interface IterationStatement extends Statement { + statement: Statement; + } + interface DoStatement extends IterationStatement { + expression: Expression; + } + interface WhileStatement extends IterationStatement { + expression: Expression; + } + interface ForStatement extends IterationStatement { + declarations?: NodeArray; + initializer?: Expression; + condition?: Expression; + iterator?: Expression; + } + interface ForInStatement extends IterationStatement { + declarations?: NodeArray; + variable?: Expression; + expression: Expression; + } + interface BreakOrContinueStatement extends Statement { + label?: Identifier; + } + interface ReturnStatement extends Statement { + expression?: Expression; + } + interface WithStatement extends Statement { + expression: Expression; + statement: Statement; + } + interface SwitchStatement extends Statement { + expression: Expression; + clauses: NodeArray; + } + interface CaseClause extends Node { + expression?: Expression; + statements: NodeArray; + } + interface DefaultClause extends Node { + statements: NodeArray; + } + type CaseOrDefaultClause = CaseClause | DefaultClause; + interface LabeledStatement extends Statement { + label: Identifier; + statement: Statement; + } + interface ThrowStatement extends Statement { + expression: Expression; + } + interface TryStatement extends Statement { + tryBlock: Block; + catchClause?: CatchClause; + finallyBlock?: Block; + } + interface CatchClause extends Declaration { + name: Identifier; + type?: TypeNode; + block: Block; + } + interface ModuleElement extends Node { + _moduleElementBrand: any; + } + interface ClassDeclaration extends Declaration, ModuleElement { + name: Identifier; + typeParameters?: NodeArray; + heritageClauses?: NodeArray; + members: NodeArray; + } + interface ClassElement extends Declaration { + _classElementBrand: any; + } + interface InterfaceDeclaration extends Declaration, ModuleElement { + name: Identifier; + typeParameters?: NodeArray; + heritageClauses?: NodeArray; + members: NodeArray; + } + interface HeritageClause extends Node { + token: SyntaxKind; + types?: NodeArray; + } + interface TypeAliasDeclaration extends Declaration, ModuleElement { + name: Identifier; + type: TypeNode; + } + interface EnumMember extends Declaration { + name: DeclarationName; + initializer?: Expression; + } + interface EnumDeclaration extends Declaration, ModuleElement { + name: Identifier; + members: NodeArray; + } + interface ModuleDeclaration extends Declaration, ModuleElement { + name: Identifier | LiteralExpression; + body: ModuleBlock | ModuleDeclaration; + } + interface ModuleBlock extends Node, ModuleElement { + statements: NodeArray; + } + interface ImportDeclaration extends Declaration, ModuleElement { + name: Identifier; + moduleReference: EntityName | ExternalModuleReference; + } + interface ExternalModuleReference extends Node { + expression?: Expression; + } + interface ExportAssignment extends Statement, ModuleElement { + exportName: Identifier; + } + interface FileReference extends TextRange { + filename: string; + } + interface CommentRange extends TextRange { + hasTrailingNewLine?: boolean; + } + interface SourceFile extends Declaration { + statements: NodeArray; + endOfFileToken: Node; + filename: string; + text: string; + getLineAndCharacterFromPosition(position: number): LineAndCharacter; + getPositionFromLineAndCharacter(line: number, character: number): number; + getLineStarts(): number[]; + amdDependencies: string[]; + amdModuleName: string; + referencedFiles: FileReference[]; + referenceDiagnostics: Diagnostic[]; + parseDiagnostics: Diagnostic[]; + grammarDiagnostics: Diagnostic[]; + getSyntacticDiagnostics(): Diagnostic[]; + semanticDiagnostics: Diagnostic[]; + hasNoDefaultLib: boolean; + externalModuleIndicator: Node; + nodeCount: number; + identifierCount: number; + symbolCount: number; + isOpen: boolean; + version: string; + languageVersion: ScriptTarget; + identifiers: Map; + } + interface Program { + getSourceFile(filename: string): SourceFile; + getSourceFiles(): SourceFile[]; + getCompilerOptions(): CompilerOptions; + getCompilerHost(): CompilerHost; + getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; + getGlobalDiagnostics(): Diagnostic[]; + getTypeChecker(fullTypeCheckMode: boolean): TypeChecker; + getCommonSourceDirectory(): string; + } + interface SourceMapSpan { + emittedLine: number; + emittedColumn: number; + sourceLine: number; + sourceColumn: number; + nameIndex?: number; + sourceIndex: number; + } + interface SourceMapData { + sourceMapFilePath: string; + jsSourceMappingURL: string; + sourceMapFile: string; + sourceMapSourceRoot: string; + sourceMapSources: string[]; + inputSourceFileNames: string[]; + sourceMapNames?: string[]; + sourceMapMappings: string; + sourceMapDecodedMappings: SourceMapSpan[]; + } + enum EmitReturnStatus { + Succeeded = 0, + AllOutputGenerationSkipped = 1, + JSGeneratedWithSemanticErrors = 2, + DeclarationGenerationSkipped = 3, + EmitErrorsEncountered = 4, + CompilerOptionsErrors = 5, + } + interface EmitResult { + emitResultStatus: EmitReturnStatus; + diagnostics: Diagnostic[]; + sourceMaps: SourceMapData[]; + } + interface TypeChecker { + getProgram(): Program; + getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; + getDeclarationDiagnostics(sourceFile: SourceFile): Diagnostic[]; + getGlobalDiagnostics(): Diagnostic[]; + getNodeCount(): number; + getIdentifierCount(): number; + getSymbolCount(): number; + getTypeCount(): number; + emitFiles(targetSourceFile?: SourceFile): EmitResult; + getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; + getDeclaredTypeOfSymbol(symbol: Symbol): Type; + getPropertiesOfType(type: Type): Symbol[]; + getPropertyOfType(type: Type, propertyName: string): Symbol; + getSignaturesOfType(type: Type, kind: SignatureKind): Signature[]; + getIndexTypeOfType(type: Type, kind: IndexKind): Type; + getReturnTypeOfSignature(signature: Signature): Type; + getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; + getSymbolAtLocation(node: Node): Symbol; + getShorthandAssignmentValueSymbol(location: Node): Symbol; + getTypeAtLocation(node: Node): Type; + typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; + symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; + getSymbolDisplayBuilder(): SymbolDisplayBuilder; + getFullyQualifiedName(symbol: Symbol): string; + getAugmentedPropertiesOfType(type: Type): Symbol[]; + getRootSymbols(symbol: Symbol): Symbol[]; + getContextualType(node: Expression): Type; + getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; + getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; + isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; + isUndefinedSymbol(symbol: Symbol): boolean; + isArgumentsSymbol(symbol: Symbol): boolean; + isEmitBlocked(sourceFile?: SourceFile): boolean; + getEnumMemberValue(node: EnumMember): number; + isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; + getAliasedSymbol(symbol: Symbol): Symbol; + } + interface SymbolDisplayBuilder { + buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void; + buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void; + buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + } + interface SymbolWriter { + writeKeyword(text: string): void; + writeOperator(text: string): void; + writePunctuation(text: string): void; + writeSpace(text: string): void; + writeStringLiteral(text: string): void; + writeParameter(text: string): void; + writeSymbol(text: string, symbol: Symbol): void; + writeLine(): void; + increaseIndent(): void; + decreaseIndent(): void; + clear(): void; + trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void; + } + const enum TypeFormatFlags { + None = 0, + WriteArrayAsGenericType = 1, + UseTypeOfFunction = 2, + NoTruncation = 4, + WriteArrowStyleSignature = 8, + WriteOwnNameForAnyLike = 16, + WriteTypeArgumentsOfSignature = 32, + InElementType = 64, + } + const enum SymbolFormatFlags { + None = 0, + WriteTypeParametersOrArguments = 1, + UseOnlyExternalAliasing = 2, + } + const enum SymbolAccessibility { + Accessible = 0, + NotAccessible = 1, + CannotBeNamed = 2, + } + interface SymbolVisibilityResult { + accessibility: SymbolAccessibility; + aliasesToMakeVisible?: ImportDeclaration[]; + errorSymbolName?: string; + errorNode?: Node; + } + interface SymbolAccessiblityResult extends SymbolVisibilityResult { + errorModuleName?: string; + } + interface EmitResolver { + getProgram(): Program; + getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; + getExpressionNamePrefix(node: Identifier): string; + getExportAssignmentName(node: SourceFile): string; + isReferencedImportDeclaration(node: ImportDeclaration): boolean; + isTopLevelValueImportWithEntityName(node: ImportDeclaration): boolean; + getNodeCheckFlags(node: Node): NodeCheckFlags; + getEnumMemberValue(node: EnumMember): number; + hasSemanticErrors(sourceFile?: SourceFile): boolean; + isDeclarationVisible(node: Declaration): boolean; + isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; + writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; + writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; + isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; + isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; + getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number; + isEmitBlocked(sourceFile?: SourceFile): boolean; + } + const enum SymbolFlags { + FunctionScopedVariable = 1, + BlockScopedVariable = 2, + Property = 4, + EnumMember = 8, + Function = 16, + Class = 32, + Interface = 64, + ConstEnum = 128, + RegularEnum = 256, + ValueModule = 512, + NamespaceModule = 1024, + TypeLiteral = 2048, + ObjectLiteral = 4096, + Method = 8192, + Constructor = 16384, + GetAccessor = 32768, + SetAccessor = 65536, + CallSignature = 131072, + ConstructSignature = 262144, + IndexSignature = 524288, + TypeParameter = 1048576, + TypeAlias = 2097152, + ExportValue = 4194304, + ExportType = 8388608, + ExportNamespace = 16777216, + Import = 33554432, + Instantiated = 67108864, + Merged = 134217728, + Transient = 268435456, + Prototype = 536870912, + UnionProperty = 1073741824, + Enum = 384, + Variable = 3, + Value = 107455, + Type = 3152352, + Namespace = 1536, + Module = 1536, + Accessor = 98304, + Signature = 917504, + FunctionScopedVariableExcludes = 107454, + BlockScopedVariableExcludes = 107455, + ParameterExcludes = 107455, + PropertyExcludes = 107455, + EnumMemberExcludes = 107455, + FunctionExcludes = 106927, + ClassExcludes = 3258879, + InterfaceExcludes = 3152288, + RegularEnumExcludes = 3258623, + ConstEnumExcludes = 3259263, + ValueModuleExcludes = 106639, + NamespaceModuleExcludes = 0, + MethodExcludes = 99263, + GetAccessorExcludes = 41919, + SetAccessorExcludes = 74687, + TypeParameterExcludes = 2103776, + TypeAliasExcludes = 3152352, + ImportExcludes = 33554432, + ModuleMember = 35653619, + ExportHasLocal = 944, + HasLocals = 1041936, + HasExports = 1952, + HasMembers = 6240, + IsContainer = 1048560, + PropertyOrAccessor = 98308, + Export = 29360128, + } + interface Symbol { + flags: SymbolFlags; + name: string; + id?: number; + mergeId?: number; + declarations?: Declaration[]; + parent?: Symbol; + members?: SymbolTable; + exports?: SymbolTable; + exportSymbol?: Symbol; + valueDeclaration?: Declaration; + constEnumOnlyModule?: boolean; + } + interface SymbolLinks { + target?: Symbol; + type?: Type; + declaredType?: Type; + mapper?: TypeMapper; + referenced?: boolean; + exportAssignSymbol?: Symbol; + unionType?: UnionType; + } + interface TransientSymbol extends Symbol, SymbolLinks { + } + interface SymbolTable { + [index: string]: Symbol; + } + const enum NodeCheckFlags { + TypeChecked = 1, + LexicalThis = 2, + CaptureThis = 4, + EmitExtends = 8, + SuperInstance = 16, + SuperStatic = 32, + ContextChecked = 64, + EnumValuesComputed = 128, + } + interface NodeLinks { + resolvedType?: Type; + resolvedSignature?: Signature; + resolvedSymbol?: Symbol; + flags?: NodeCheckFlags; + enumMemberValue?: number; + isIllegalTypeReferenceInConstraint?: boolean; + isVisible?: boolean; + localModuleName?: string; + assignmentChecks?: Map; + } + const enum TypeFlags { + Any = 1, + String = 2, + Number = 4, + Boolean = 8, + Void = 16, + Undefined = 32, + Null = 64, + Enum = 128, + StringLiteral = 256, + TypeParameter = 512, + Class = 1024, + Interface = 2048, + Reference = 4096, + Tuple = 8192, + Union = 16384, + Anonymous = 32768, + FromSignature = 65536, + Intrinsic = 127, + StringLike = 258, + NumberLike = 132, + ObjectType = 48128, + } + interface Type { + flags: TypeFlags; + id: number; + symbol?: Symbol; + } + interface IntrinsicType extends Type { + intrinsicName: string; + } + interface StringLiteralType extends Type { + text: string; + } + interface ObjectType extends Type { + } + interface InterfaceType extends ObjectType { + typeParameters: TypeParameter[]; + baseTypes: ObjectType[]; + declaredProperties: Symbol[]; + declaredCallSignatures: Signature[]; + declaredConstructSignatures: Signature[]; + declaredStringIndexType: Type; + declaredNumberIndexType: Type; + } + interface TypeReference extends ObjectType { + target: GenericType; + typeArguments: Type[]; + } + interface GenericType extends InterfaceType, TypeReference { + instantiations: Map; + openReferenceTargets: GenericType[]; + openReferenceChecks: Map; + } + interface TupleType extends ObjectType { + elementTypes: Type[]; + baseArrayType: TypeReference; + } + interface UnionType extends Type { + types: Type[]; + resolvedProperties: SymbolTable; + } + interface ResolvedType extends ObjectType, UnionType { + members: SymbolTable; + properties: Symbol[]; + callSignatures: Signature[]; + constructSignatures: Signature[]; + stringIndexType: Type; + numberIndexType: Type; + } + interface TypeParameter extends Type { + constraint: Type; + target?: TypeParameter; + mapper?: TypeMapper; + } + const enum SignatureKind { + Call = 0, + Construct = 1, + } + interface Signature { + declaration: SignatureDeclaration; + typeParameters: TypeParameter[]; + parameters: Symbol[]; + resolvedReturnType: Type; + minArgumentCount: number; + hasRestParameter: boolean; + hasStringLiterals: boolean; + target?: Signature; + mapper?: TypeMapper; + unionSignatures?: Signature[]; + erasedSignatureCache?: Signature; + isolatedSignatureType?: ObjectType; + } + const enum IndexKind { + String = 0, + Number = 1, + } + interface TypeMapper { + (t: Type): Type; + } + interface TypeInferences { + primary: Type[]; + secondary: Type[]; + } + interface InferenceContext { + typeParameters: TypeParameter[]; + inferUnionTypes: boolean; + inferences: TypeInferences[]; + inferredTypes: Type[]; + failedTypeParameterIndex?: number; + } + interface DiagnosticMessage { + key: string; + category: DiagnosticCategory; + code: number; + isEarly?: boolean; + } + interface DiagnosticMessageChain { + messageText: string; + category: DiagnosticCategory; + code: number; + next?: DiagnosticMessageChain; + } + interface Diagnostic { + file: SourceFile; + start: number; + length: number; + messageText: string; + category: DiagnosticCategory; + code: number; + /** + * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit + */ + isEarly?: boolean; + } + enum DiagnosticCategory { + Warning = 0, + Error = 1, + Message = 2, + } + interface CompilerOptions { + allowNonTsExtensions?: boolean; + charset?: string; + codepage?: number; + declaration?: boolean; + diagnostics?: boolean; + emitBOM?: boolean; + help?: boolean; + locale?: string; + mapRoot?: string; + module?: ModuleKind; + noEmitOnError?: boolean; + noErrorTruncation?: boolean; + noImplicitAny?: boolean; + noLib?: boolean; + noLibCheck?: boolean; + noResolve?: boolean; + out?: string; + outDir?: string; + preserveConstEnums?: boolean; + removeComments?: boolean; + sourceMap?: boolean; + sourceRoot?: string; + suppressImplicitAnyIndexErrors?: boolean; + target?: ScriptTarget; + version?: boolean; + watch?: boolean; + [option: string]: string | number | boolean; + } + const enum ModuleKind { + None = 0, + CommonJS = 1, + AMD = 2, + } + interface LineAndCharacter { + line: number; + character: number; + } + const enum ScriptTarget { + ES3 = 0, + ES5 = 1, + ES6 = 2, + Latest = 2, + } + interface ParsedCommandLine { + options: CompilerOptions; + filenames: string[]; + errors: Diagnostic[]; + } + interface CommandLineOption { + name: string; + type: string | Map; + shortName?: string; + description?: DiagnosticMessage; + paramType?: DiagnosticMessage; + error?: DiagnosticMessage; + } + const enum CharacterCodes { + nullCharacter = 0, + maxAsciiCharacter = 127, + lineFeed = 10, + carriageReturn = 13, + lineSeparator = 8232, + paragraphSeparator = 8233, + nextLine = 133, + space = 32, + nonBreakingSpace = 160, + enQuad = 8192, + emQuad = 8193, + enSpace = 8194, + emSpace = 8195, + threePerEmSpace = 8196, + fourPerEmSpace = 8197, + sixPerEmSpace = 8198, + figureSpace = 8199, + punctuationSpace = 8200, + thinSpace = 8201, + hairSpace = 8202, + zeroWidthSpace = 8203, + narrowNoBreakSpace = 8239, + ideographicSpace = 12288, + mathematicalSpace = 8287, + ogham = 5760, + _ = 95, + $ = 36, + _0 = 48, + _1 = 49, + _2 = 50, + _3 = 51, + _4 = 52, + _5 = 53, + _6 = 54, + _7 = 55, + _8 = 56, + _9 = 57, + a = 97, + b = 98, + c = 99, + d = 100, + e = 101, + f = 102, + g = 103, + h = 104, + i = 105, + j = 106, + k = 107, + l = 108, + m = 109, + n = 110, + o = 111, + p = 112, + q = 113, + r = 114, + s = 115, + t = 116, + u = 117, + v = 118, + w = 119, + x = 120, + y = 121, + z = 122, + A = 65, + B = 66, + C = 67, + D = 68, + E = 69, + F = 70, + G = 71, + H = 72, + I = 73, + J = 74, + K = 75, + L = 76, + M = 77, + N = 78, + O = 79, + P = 80, + Q = 81, + R = 82, + S = 83, + T = 84, + U = 85, + V = 86, + W = 87, + X = 88, + Y = 89, + Z = 90, + ampersand = 38, + asterisk = 42, + at = 64, + backslash = 92, + backtick = 96, + bar = 124, + caret = 94, + closeBrace = 125, + closeBracket = 93, + closeParen = 41, + colon = 58, + comma = 44, + dot = 46, + doubleQuote = 34, + equals = 61, + exclamation = 33, + greaterThan = 62, + lessThan = 60, + minus = 45, + openBrace = 123, + openBracket = 91, + openParen = 40, + percent = 37, + plus = 43, + question = 63, + semicolon = 59, + singleQuote = 39, + slash = 47, + tilde = 126, + backspace = 8, + formFeed = 12, + byteOrderMark = 65279, + tab = 9, + verticalTab = 11, + } + interface CancellationToken { + isCancellationRequested(): boolean; + } + interface CompilerHost { + getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; + getDefaultLibFilename(options: CompilerOptions): string; + getCancellationToken?(): CancellationToken; + writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; + getCurrentDirectory(): string; + getCanonicalFileName(fileName: string): string; + useCaseSensitiveFileNames(): boolean; + getNewLine(): string; + } +} +declare module "typescript" { + interface ErrorCallback { + (message: DiagnosticMessage): void; + } + interface CommentCallback { + (pos: number, end: number): void; + } + interface Scanner { + getStartPos(): number; + getToken(): SyntaxKind; + getTextPos(): number; + getTokenPos(): number; + getTokenText(): string; + getTokenValue(): string; + hasPrecedingLineBreak(): boolean; + isIdentifier(): boolean; + isReservedWord(): boolean; + isUnterminated(): boolean; + reScanGreaterToken(): SyntaxKind; + reScanSlashToken(): SyntaxKind; + reScanTemplateToken(): SyntaxKind; + scan(): SyntaxKind; + setText(text: string): void; + setTextPos(textPos: number): void; + lookAhead(callback: () => T): T; + tryScan(callback: () => T): T; + } + function tokenToString(t: SyntaxKind): string; + function computeLineStarts(text: string): number[]; + function getPositionFromLineAndCharacter(lineStarts: number[], line: number, character: number): number; + function getLineAndCharacterOfPosition(lineStarts: number[], position: number): { + line: number; + character: number; + }; + function positionToLineAndCharacter(text: string, pos: number): { + line: number; + character: number; + }; + function isWhiteSpace(ch: number): boolean; + function isLineBreak(ch: number): boolean; + function isOctalDigit(ch: number): boolean; + function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean): number; + function getLeadingCommentRanges(text: string, pos: number): CommentRange[]; + function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; + function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; + function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; + function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner; +} +declare module "typescript" { + function getNodeConstructor(kind: SyntaxKind): new () => Node; + function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; + function createCompilerHost(options: CompilerOptions): CompilerHost; + function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; + function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; +} +declare module "typescript" { + function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; +} +declare module "typescript" { + var servicesVersion: string; + interface Node { + getSourceFile(): SourceFile; + getChildCount(sourceFile?: SourceFile): number; + getChildAt(index: number, sourceFile?: SourceFile): Node; + getChildren(sourceFile?: SourceFile): Node[]; + getStart(sourceFile?: SourceFile): number; + getFullStart(): number; + getEnd(): number; + getWidth(sourceFile?: SourceFile): number; + getFullWidth(): number; + getLeadingTriviaWidth(sourceFile?: SourceFile): number; + getFullText(sourceFile?: SourceFile): string; + getText(sourceFile?: SourceFile): string; + getFirstToken(sourceFile?: SourceFile): Node; + getLastToken(sourceFile?: SourceFile): Node; + } + interface Symbol { + getFlags(): SymbolFlags; + getName(): string; + getDeclarations(): Declaration[]; + getDocumentationComment(): SymbolDisplayPart[]; + } + interface Type { + getFlags(): TypeFlags; + getSymbol(): Symbol; + getProperties(): Symbol[]; + getProperty(propertyName: string): Symbol; + getApparentProperties(): Symbol[]; + getCallSignatures(): Signature[]; + getConstructSignatures(): Signature[]; + getStringIndexType(): Type; + getNumberIndexType(): Type; + } + interface Signature { + getDeclaration(): SignatureDeclaration; + getTypeParameters(): Type[]; + getParameters(): Symbol[]; + getReturnType(): Type; + getDocumentationComment(): SymbolDisplayPart[]; + } + interface SourceFile { + getScriptSnapshot(): IScriptSnapshot; + getNamedDeclarations(): Declaration[]; + update(scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; + } + /** + * Represents an immutable snapshot of a script at a specified time.Once acquired, the + * snapshot is observably immutable. i.e. the same calls with the same parameters will return + * the same values. + */ + interface IScriptSnapshot { + /** Gets a portion of the script snapshot specified by [start, end). */ + getText(start: number, end: number): string; + /** Gets the length of this script snapshot. */ + getLength(): number; + /** + * This call returns the array containing the start position of every line. + * i.e."[0, 10, 55]". TODO: consider making this optional. The language service could + * always determine this (albeit in a more expensive manner). + */ + getLineStartPositions(): number[]; + /** + * Gets the TextChangeRange that describe how the text changed between this text and + * an older version. This information is used by the incremental parser to determine + * what sections of the script need to be re-parsed. 'undefined' can be returned if the + * change range cannot be determined. However, in that case, incremental parsing will + * not happen and the entire document will be re - parsed. + */ + getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; + } + module ScriptSnapshot { + function fromString(text: string): IScriptSnapshot; + } + interface PreProcessedFileInfo { + referencedFiles: FileReference[]; + importedFiles: FileReference[]; + isLibFile: boolean; + } + interface Logger { + log(s: string): void; + } + interface LanguageServiceHost extends Logger { + getCompilationSettings(): CompilerOptions; + getScriptFileNames(): string[]; + getScriptVersion(fileName: string): string; + getScriptIsOpen(fileName: string): boolean; + getScriptSnapshot(fileName: string): IScriptSnapshot; + getLocalizedDiagnosticMessages?(): any; + getCancellationToken?(): CancellationToken; + getCurrentDirectory(): string; + getDefaultLibFilename(options: CompilerOptions): string; + } + interface LanguageService { + cleanupSemanticCache(): void; + getSyntacticDiagnostics(fileName: string): Diagnostic[]; + getSemanticDiagnostics(fileName: string): Diagnostic[]; + getCompilerOptionsDiagnostics(): Diagnostic[]; + getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; + getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; + getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; + getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; + getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; + getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; + getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan; + getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems; + getRenameInfo(fileName: string, position: number): RenameInfo; + findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[]; + getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; + getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; + getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; + getNavigateToItems(searchValue: string): NavigateToItem[]; + getNavigationBarItems(fileName: string): NavigationBarItem[]; + getOutliningSpans(fileName: string): OutliningSpan[]; + getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; + getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; + getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number; + getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[]; + getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; + getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[]; + getEmitOutput(fileName: string): EmitOutput; + getSourceFile(filename: string): SourceFile; + dispose(): void; + } + class TextSpan { + private _start; + private _length; + /** + * Creates a TextSpan instance beginning with the position Start and having the Length + * specified with length. + */ + constructor(start: number, length: number); + toJSON(key: any): any; + start(): number; + length(): number; + end(): number; + isEmpty(): boolean; + /** + * Determines whether the position lies within the span. Returns true if the position is greater than or equal to Start and strictly less + * than End, otherwise false. + * @param position The position to check. + */ + containsPosition(position: number): boolean; + /** + * Determines whether span falls completely within this span. Returns true if the specified span falls completely within this span, otherwise false. + * @param span The span to check. + */ + containsTextSpan(span: TextSpan): boolean; + /** + * Determines whether the given span overlaps this span. Two spans are considered to overlap + * if they have positions in common and neither is empty. Empty spans do not overlap with any + * other span. Returns true if the spans overlap, false otherwise. + * @param span The span to check. + */ + overlapsWith(span: TextSpan): boolean; + /** + * Returns the overlap with the given span, or undefined if there is no overlap. + * @param span The span to check. + */ + overlap(span: TextSpan): TextSpan; + /** + * Determines whether span intersects this span. Two spans are considered to + * intersect if they have positions in common or the end of one span + * coincides with the start of the other span. Returns true if the spans intersect, false otherwise. + * @param The span to check. + */ + intersectsWithTextSpan(span: TextSpan): boolean; + intersectsWith(start: number, length: number): boolean; + /** + * Determines whether the given position intersects this span. + * A position is considered to intersect if it is between the start and + * end positions (inclusive) of this span. Returns true if the position intersects, false otherwise. + * @param position The position to check. + */ + intersectsWithPosition(position: number): boolean; + /** + * Returns the intersection with the given span, or undefined if there is no intersection. + * @param span The span to check. + */ + intersection(span: TextSpan): TextSpan; + /** + * Creates a new TextSpan from the given start and end positions + * as opposed to a position and length. + */ + static fromBounds(start: number, end: number): TextSpan; + } + class TextChangeRange { + static unchanged: TextChangeRange; + private _span; + private _newLength; + /** + * Initializes a new instance of TextChangeRange. + */ + constructor(span: TextSpan, newLength: number); + /** + * The span of text before the edit which is being changed + */ + span(): TextSpan; + /** + * Width of the span after the edit. A 0 here would represent a delete + */ + newLength(): number; + newSpan(): TextSpan; + isUnchanged(): boolean; + /** + * Called to merge all the changes that occurred across several versions of a script snapshot + * into a single change. i.e. if a user keeps making successive edits to a script we will + * have a text change from V1 to V2, V2 to V3, ..., Vn. + * + * This function will then merge those changes into a single change range valid between V1 and + * Vn. + */ + static collapseChangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; + } + interface ClassifiedSpan { + textSpan: TextSpan; + classificationType: string; + } + interface NavigationBarItem { + text: string; + kind: string; + kindModifiers: string; + spans: TextSpan[]; + childItems: NavigationBarItem[]; + indent: number; + bolded: boolean; + grayed: boolean; + } + interface TodoCommentDescriptor { + text: string; + priority: number; + } + interface TodoComment { + descriptor: TodoCommentDescriptor; + message: string; + position: number; + } + class TextChange { + span: TextSpan; + newText: string; + } + interface RenameLocation { + textSpan: TextSpan; + fileName: string; + } + interface ReferenceEntry { + textSpan: TextSpan; + fileName: string; + isWriteAccess: boolean; + } + interface NavigateToItem { + name: string; + kind: string; + kindModifiers: string; + matchKind: string; + fileName: string; + textSpan: TextSpan; + containerName: string; + containerKind: string; + } + interface EditorOptions { + IndentSize: number; + TabSize: number; + NewLineCharacter: string; + ConvertTabsToSpaces: boolean; + } + interface FormatCodeOptions extends EditorOptions { + InsertSpaceAfterCommaDelimiter: boolean; + InsertSpaceAfterSemicolonInForStatements: boolean; + InsertSpaceBeforeAndAfterBinaryOperators: boolean; + InsertSpaceAfterKeywordsInControlFlowStatements: boolean; + InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; + InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; + PlaceOpenBraceOnNewLineForFunctions: boolean; + PlaceOpenBraceOnNewLineForControlBlocks: boolean; + } + interface DefinitionInfo { + fileName: string; + textSpan: TextSpan; + kind: string; + name: string; + containerKind: string; + containerName: string; + } + enum SymbolDisplayPartKind { + aliasName = 0, + className = 1, + enumName = 2, + fieldName = 3, + interfaceName = 4, + keyword = 5, + lineBreak = 6, + numericLiteral = 7, + stringLiteral = 8, + localName = 9, + methodName = 10, + moduleName = 11, + operator = 12, + parameterName = 13, + propertyName = 14, + punctuation = 15, + space = 16, + text = 17, + typeParameterName = 18, + enumMemberName = 19, + functionName = 20, + regularExpressionLiteral = 21, + } + interface SymbolDisplayPart { + text: string; + kind: string; + } + interface QuickInfo { + kind: string; + kindModifiers: string; + textSpan: TextSpan; + displayParts: SymbolDisplayPart[]; + documentation: SymbolDisplayPart[]; + } + interface RenameInfo { + canRename: boolean; + localizedErrorMessage: string; + displayName: string; + fullDisplayName: string; + kind: string; + kindModifiers: string; + triggerSpan: TextSpan; + } + interface SignatureHelpParameter { + name: string; + documentation: SymbolDisplayPart[]; + displayParts: SymbolDisplayPart[]; + isOptional: boolean; + } + /** + * Represents a single signature to show in signature help. + * The id is used for subsequent calls into the language service to ask questions about the + * signature help item in the context of any documents that have been updated. i.e. after + * an edit has happened, while signature help is still active, the host can ask important + * questions like 'what parameter is the user currently contained within?'. + */ + interface SignatureHelpItem { + isVariadic: boolean; + prefixDisplayParts: SymbolDisplayPart[]; + suffixDisplayParts: SymbolDisplayPart[]; + separatorDisplayParts: SymbolDisplayPart[]; + parameters: SignatureHelpParameter[]; + documentation: SymbolDisplayPart[]; + } + /** + * Represents a set of signature help items, and the preferred item that should be selected. + */ + interface SignatureHelpItems { + items: SignatureHelpItem[]; + applicableSpan: TextSpan; + selectedItemIndex: number; + argumentIndex: number; + argumentCount: number; + } + interface CompletionInfo { + isMemberCompletion: boolean; + entries: CompletionEntry[]; + } + interface CompletionEntry { + name: string; + kind: string; + kindModifiers: string; + } + interface CompletionEntryDetails { + name: string; + kind: string; + kindModifiers: string; + displayParts: SymbolDisplayPart[]; + documentation: SymbolDisplayPart[]; + } + interface OutliningSpan { + /** The span of the document to actually collapse. */ + textSpan: TextSpan; + /** The span of the document to display when the user hovers over the collapsed span. */ + hintSpan: TextSpan; + /** The text to display in the editor for the collapsed region. */ + bannerText: string; + /** + * Whether or not this region should be automatically collapsed when + * the 'Collapse to Definitions' command is invoked. + */ + autoCollapse: boolean; + } + interface EmitOutput { + outputFiles: OutputFile[]; + emitOutputStatus: EmitReturnStatus; + } + const enum OutputFileType { + JavaScript = 0, + SourceMap = 1, + Declaration = 2, + } + interface OutputFile { + name: string; + writeByteOrderMark: boolean; + text: string; + } + const enum EndOfLineState { + Start = 0, + InMultiLineCommentTrivia = 1, + InSingleQuoteStringLiteral = 2, + InDoubleQuoteStringLiteral = 3, + } + enum TokenClass { + Punctuation = 0, + Keyword = 1, + Operator = 2, + Comment = 3, + Whitespace = 4, + Identifier = 5, + NumberLiteral = 6, + StringLiteral = 7, + RegExpLiteral = 8, + } + interface ClassificationResult { + finalLexState: EndOfLineState; + entries: ClassificationInfo[]; + } + interface ClassificationInfo { + length: number; + classification: TokenClass; + } + interface Classifier { + getClassificationsForLine(text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean): ClassificationResult; + } + interface DocumentRegistry { + acquireDocument(filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean): SourceFile; + updateDocument(sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; + releaseDocument(filename: string, compilationSettings: CompilerOptions): void; + } + class ScriptElementKind { + static unknown: string; + static keyword: string; + static scriptElement: string; + static moduleElement: string; + static classElement: string; + static interfaceElement: string; + static typeElement: string; + static enumElement: string; + static variableElement: string; + static localVariableElement: string; + static functionElement: string; + static localFunctionElement: string; + static memberFunctionElement: string; + static memberGetAccessorElement: string; + static memberSetAccessorElement: string; + static memberVariableElement: string; + static constructorImplementationElement: string; + static callSignatureElement: string; + static indexSignatureElement: string; + static constructSignatureElement: string; + static parameterElement: string; + static typeParameterElement: string; + static primitiveType: string; + static label: string; + static alias: string; + static constElement: string; + static letElement: string; + } + class ScriptElementKindModifier { + static none: string; + static publicMemberModifier: string; + static privateMemberModifier: string; + static protectedMemberModifier: string; + static exportedModifier: string; + static ambientModifier: string; + static staticModifier: string; + } + class ClassificationTypeNames { + static comment: string; + static identifier: string; + static keyword: string; + static numericLiteral: string; + static operator: string; + static stringLiteral: string; + static whiteSpace: string; + static text: string; + static punctuation: string; + static className: string; + static enumName: string; + static interfaceName: string; + static moduleName: string; + static typeParameterName: string; + static typeAlias: string; + } + interface DisplayPartsSymbolWriter extends SymbolWriter { + displayParts(): SymbolDisplayPart[]; + } + function displayPartsToString(displayParts: SymbolDisplayPart[]): string; + function getDefaultCompilerOptions(): CompilerOptions; + class OperationCanceledException { + } + class CancellationTokenObject { + private cancellationToken; + static None: CancellationTokenObject; + constructor(cancellationToken: CancellationToken); + isCancellationRequested(): boolean; + throwIfCancellationRequested(): void; + } + function createDocumentRegistry(): DocumentRegistry; + function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; + function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry): LanguageService; + function createClassifier(host: Logger): Classifier; +} + + +//// [APISample_node_compile.js] +var ts = require("typescript"); +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", 2 /* Latest */, "0.0"); +var program = ts.createProgram(["file1.ts"], {}, undefined); diff --git a/tests/baselines/reference/APISample_node_compile.types b/tests/baselines/reference/APISample_node_compile.types new file mode 100644 index 00000000000..347c5aa358e --- /dev/null +++ b/tests/baselines/reference/APISample_node_compile.types @@ -0,0 +1,5749 @@ +=== tests/cases/compiler/APISample_node_compile.ts === + +import ts = require("typescript"); +>ts : typeof ts + +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); +>sourceFile : ts.SourceFile +>ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0") : ts.SourceFile +>ts.createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, version: string, isOpen?: boolean) => ts.SourceFile +>ts : typeof ts +>createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, version: string, isOpen?: boolean) => ts.SourceFile +>ts.ScriptTarget.Latest : ts.ScriptTarget +>ts.ScriptTarget : typeof ts.ScriptTarget +>ts : typeof ts +>ScriptTarget : typeof ts.ScriptTarget +>Latest : ts.ScriptTarget + +var program = ts.createProgram(["file1.ts"], {}, undefined); +>program : ts.Program +>ts.createProgram(["file1.ts"], {}, undefined) : ts.Program +>ts.createProgram : (rootNames: string[], options: ts.CompilerOptions, host: ts.CompilerHost) => ts.Program +>ts : typeof ts +>createProgram : (rootNames: string[], options: ts.CompilerOptions, host: ts.CompilerHost) => ts.Program +>["file1.ts"] : string[] +>{} : { [x: string]: undefined; } +>undefined : undefined + +=== typescript.d.ts === +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + +declare module "typescript" { + interface Map { +>Map : Map +>T : T + + [index: string]: T; +>index : string +>T : T + } + interface TextRange { +>TextRange : TextRange + + pos: number; +>pos : number + + end: number; +>end : number + } + const enum SyntaxKind { +>SyntaxKind : SyntaxKind + + Unknown = 0, +>Unknown : SyntaxKind + + EndOfFileToken = 1, +>EndOfFileToken : SyntaxKind + + SingleLineCommentTrivia = 2, +>SingleLineCommentTrivia : SyntaxKind + + MultiLineCommentTrivia = 3, +>MultiLineCommentTrivia : SyntaxKind + + NewLineTrivia = 4, +>NewLineTrivia : SyntaxKind + + WhitespaceTrivia = 5, +>WhitespaceTrivia : SyntaxKind + + NumericLiteral = 6, +>NumericLiteral : SyntaxKind + + StringLiteral = 7, +>StringLiteral : SyntaxKind + + RegularExpressionLiteral = 8, +>RegularExpressionLiteral : SyntaxKind + + NoSubstitutionTemplateLiteral = 9, +>NoSubstitutionTemplateLiteral : SyntaxKind + + TemplateHead = 10, +>TemplateHead : SyntaxKind + + TemplateMiddle = 11, +>TemplateMiddle : SyntaxKind + + TemplateTail = 12, +>TemplateTail : SyntaxKind + + OpenBraceToken = 13, +>OpenBraceToken : SyntaxKind + + CloseBraceToken = 14, +>CloseBraceToken : SyntaxKind + + OpenParenToken = 15, +>OpenParenToken : SyntaxKind + + CloseParenToken = 16, +>CloseParenToken : SyntaxKind + + OpenBracketToken = 17, +>OpenBracketToken : SyntaxKind + + CloseBracketToken = 18, +>CloseBracketToken : SyntaxKind + + DotToken = 19, +>DotToken : SyntaxKind + + DotDotDotToken = 20, +>DotDotDotToken : SyntaxKind + + SemicolonToken = 21, +>SemicolonToken : SyntaxKind + + CommaToken = 22, +>CommaToken : SyntaxKind + + LessThanToken = 23, +>LessThanToken : SyntaxKind + + GreaterThanToken = 24, +>GreaterThanToken : SyntaxKind + + LessThanEqualsToken = 25, +>LessThanEqualsToken : SyntaxKind + + GreaterThanEqualsToken = 26, +>GreaterThanEqualsToken : SyntaxKind + + EqualsEqualsToken = 27, +>EqualsEqualsToken : SyntaxKind + + ExclamationEqualsToken = 28, +>ExclamationEqualsToken : SyntaxKind + + EqualsEqualsEqualsToken = 29, +>EqualsEqualsEqualsToken : SyntaxKind + + ExclamationEqualsEqualsToken = 30, +>ExclamationEqualsEqualsToken : SyntaxKind + + EqualsGreaterThanToken = 31, +>EqualsGreaterThanToken : SyntaxKind + + PlusToken = 32, +>PlusToken : SyntaxKind + + MinusToken = 33, +>MinusToken : SyntaxKind + + AsteriskToken = 34, +>AsteriskToken : SyntaxKind + + SlashToken = 35, +>SlashToken : SyntaxKind + + PercentToken = 36, +>PercentToken : SyntaxKind + + PlusPlusToken = 37, +>PlusPlusToken : SyntaxKind + + MinusMinusToken = 38, +>MinusMinusToken : SyntaxKind + + LessThanLessThanToken = 39, +>LessThanLessThanToken : SyntaxKind + + GreaterThanGreaterThanToken = 40, +>GreaterThanGreaterThanToken : SyntaxKind + + GreaterThanGreaterThanGreaterThanToken = 41, +>GreaterThanGreaterThanGreaterThanToken : SyntaxKind + + AmpersandToken = 42, +>AmpersandToken : SyntaxKind + + BarToken = 43, +>BarToken : SyntaxKind + + CaretToken = 44, +>CaretToken : SyntaxKind + + ExclamationToken = 45, +>ExclamationToken : SyntaxKind + + TildeToken = 46, +>TildeToken : SyntaxKind + + AmpersandAmpersandToken = 47, +>AmpersandAmpersandToken : SyntaxKind + + BarBarToken = 48, +>BarBarToken : SyntaxKind + + QuestionToken = 49, +>QuestionToken : SyntaxKind + + ColonToken = 50, +>ColonToken : SyntaxKind + + EqualsToken = 51, +>EqualsToken : SyntaxKind + + PlusEqualsToken = 52, +>PlusEqualsToken : SyntaxKind + + MinusEqualsToken = 53, +>MinusEqualsToken : SyntaxKind + + AsteriskEqualsToken = 54, +>AsteriskEqualsToken : SyntaxKind + + SlashEqualsToken = 55, +>SlashEqualsToken : SyntaxKind + + PercentEqualsToken = 56, +>PercentEqualsToken : SyntaxKind + + LessThanLessThanEqualsToken = 57, +>LessThanLessThanEqualsToken : SyntaxKind + + GreaterThanGreaterThanEqualsToken = 58, +>GreaterThanGreaterThanEqualsToken : SyntaxKind + + GreaterThanGreaterThanGreaterThanEqualsToken = 59, +>GreaterThanGreaterThanGreaterThanEqualsToken : SyntaxKind + + AmpersandEqualsToken = 60, +>AmpersandEqualsToken : SyntaxKind + + BarEqualsToken = 61, +>BarEqualsToken : SyntaxKind + + CaretEqualsToken = 62, +>CaretEqualsToken : SyntaxKind + + Identifier = 63, +>Identifier : SyntaxKind + + BreakKeyword = 64, +>BreakKeyword : SyntaxKind + + CaseKeyword = 65, +>CaseKeyword : SyntaxKind + + CatchKeyword = 66, +>CatchKeyword : SyntaxKind + + ClassKeyword = 67, +>ClassKeyword : SyntaxKind + + ConstKeyword = 68, +>ConstKeyword : SyntaxKind + + ContinueKeyword = 69, +>ContinueKeyword : SyntaxKind + + DebuggerKeyword = 70, +>DebuggerKeyword : SyntaxKind + + DefaultKeyword = 71, +>DefaultKeyword : SyntaxKind + + DeleteKeyword = 72, +>DeleteKeyword : SyntaxKind + + DoKeyword = 73, +>DoKeyword : SyntaxKind + + ElseKeyword = 74, +>ElseKeyword : SyntaxKind + + EnumKeyword = 75, +>EnumKeyword : SyntaxKind + + ExportKeyword = 76, +>ExportKeyword : SyntaxKind + + ExtendsKeyword = 77, +>ExtendsKeyword : SyntaxKind + + FalseKeyword = 78, +>FalseKeyword : SyntaxKind + + FinallyKeyword = 79, +>FinallyKeyword : SyntaxKind + + ForKeyword = 80, +>ForKeyword : SyntaxKind + + FunctionKeyword = 81, +>FunctionKeyword : SyntaxKind + + IfKeyword = 82, +>IfKeyword : SyntaxKind + + ImportKeyword = 83, +>ImportKeyword : SyntaxKind + + InKeyword = 84, +>InKeyword : SyntaxKind + + InstanceOfKeyword = 85, +>InstanceOfKeyword : SyntaxKind + + NewKeyword = 86, +>NewKeyword : SyntaxKind + + NullKeyword = 87, +>NullKeyword : SyntaxKind + + ReturnKeyword = 88, +>ReturnKeyword : SyntaxKind + + SuperKeyword = 89, +>SuperKeyword : SyntaxKind + + SwitchKeyword = 90, +>SwitchKeyword : SyntaxKind + + ThisKeyword = 91, +>ThisKeyword : SyntaxKind + + ThrowKeyword = 92, +>ThrowKeyword : SyntaxKind + + TrueKeyword = 93, +>TrueKeyword : SyntaxKind + + TryKeyword = 94, +>TryKeyword : SyntaxKind + + TypeOfKeyword = 95, +>TypeOfKeyword : SyntaxKind + + VarKeyword = 96, +>VarKeyword : SyntaxKind + + VoidKeyword = 97, +>VoidKeyword : SyntaxKind + + WhileKeyword = 98, +>WhileKeyword : SyntaxKind + + WithKeyword = 99, +>WithKeyword : SyntaxKind + + ImplementsKeyword = 100, +>ImplementsKeyword : SyntaxKind + + InterfaceKeyword = 101, +>InterfaceKeyword : SyntaxKind + + LetKeyword = 102, +>LetKeyword : SyntaxKind + + PackageKeyword = 103, +>PackageKeyword : SyntaxKind + + PrivateKeyword = 104, +>PrivateKeyword : SyntaxKind + + ProtectedKeyword = 105, +>ProtectedKeyword : SyntaxKind + + PublicKeyword = 106, +>PublicKeyword : SyntaxKind + + StaticKeyword = 107, +>StaticKeyword : SyntaxKind + + YieldKeyword = 108, +>YieldKeyword : SyntaxKind + + AnyKeyword = 109, +>AnyKeyword : SyntaxKind + + BooleanKeyword = 110, +>BooleanKeyword : SyntaxKind + + ConstructorKeyword = 111, +>ConstructorKeyword : SyntaxKind + + DeclareKeyword = 112, +>DeclareKeyword : SyntaxKind + + GetKeyword = 113, +>GetKeyword : SyntaxKind + + ModuleKeyword = 114, +>ModuleKeyword : SyntaxKind + + RequireKeyword = 115, +>RequireKeyword : SyntaxKind + + NumberKeyword = 116, +>NumberKeyword : SyntaxKind + + SetKeyword = 117, +>SetKeyword : SyntaxKind + + StringKeyword = 118, +>StringKeyword : SyntaxKind + + TypeKeyword = 119, +>TypeKeyword : SyntaxKind + + QualifiedName = 120, +>QualifiedName : SyntaxKind + + ComputedPropertyName = 121, +>ComputedPropertyName : SyntaxKind + + TypeParameter = 122, +>TypeParameter : SyntaxKind + + Parameter = 123, +>Parameter : SyntaxKind + + Property = 124, +>Property : SyntaxKind + + Method = 125, +>Method : SyntaxKind + + Constructor = 126, +>Constructor : SyntaxKind + + GetAccessor = 127, +>GetAccessor : SyntaxKind + + SetAccessor = 128, +>SetAccessor : SyntaxKind + + CallSignature = 129, +>CallSignature : SyntaxKind + + ConstructSignature = 130, +>ConstructSignature : SyntaxKind + + IndexSignature = 131, +>IndexSignature : SyntaxKind + + TypeReference = 132, +>TypeReference : SyntaxKind + + FunctionType = 133, +>FunctionType : SyntaxKind + + ConstructorType = 134, +>ConstructorType : SyntaxKind + + TypeQuery = 135, +>TypeQuery : SyntaxKind + + TypeLiteral = 136, +>TypeLiteral : SyntaxKind + + ArrayType = 137, +>ArrayType : SyntaxKind + + TupleType = 138, +>TupleType : SyntaxKind + + UnionType = 139, +>UnionType : SyntaxKind + + ParenthesizedType = 140, +>ParenthesizedType : SyntaxKind + + ArrayLiteralExpression = 141, +>ArrayLiteralExpression : SyntaxKind + + ObjectLiteralExpression = 142, +>ObjectLiteralExpression : SyntaxKind + + PropertyAccessExpression = 143, +>PropertyAccessExpression : SyntaxKind + + ElementAccessExpression = 144, +>ElementAccessExpression : SyntaxKind + + CallExpression = 145, +>CallExpression : SyntaxKind + + NewExpression = 146, +>NewExpression : SyntaxKind + + TaggedTemplateExpression = 147, +>TaggedTemplateExpression : SyntaxKind + + TypeAssertionExpression = 148, +>TypeAssertionExpression : SyntaxKind + + ParenthesizedExpression = 149, +>ParenthesizedExpression : SyntaxKind + + FunctionExpression = 150, +>FunctionExpression : SyntaxKind + + ArrowFunction = 151, +>ArrowFunction : SyntaxKind + + DeleteExpression = 152, +>DeleteExpression : SyntaxKind + + TypeOfExpression = 153, +>TypeOfExpression : SyntaxKind + + VoidExpression = 154, +>VoidExpression : SyntaxKind + + PrefixUnaryExpression = 155, +>PrefixUnaryExpression : SyntaxKind + + PostfixUnaryExpression = 156, +>PostfixUnaryExpression : SyntaxKind + + BinaryExpression = 157, +>BinaryExpression : SyntaxKind + + ConditionalExpression = 158, +>ConditionalExpression : SyntaxKind + + TemplateExpression = 159, +>TemplateExpression : SyntaxKind + + YieldExpression = 160, +>YieldExpression : SyntaxKind + + OmittedExpression = 161, +>OmittedExpression : SyntaxKind + + TemplateSpan = 162, +>TemplateSpan : SyntaxKind + + Block = 163, +>Block : SyntaxKind + + VariableStatement = 164, +>VariableStatement : SyntaxKind + + EmptyStatement = 165, +>EmptyStatement : SyntaxKind + + ExpressionStatement = 166, +>ExpressionStatement : SyntaxKind + + IfStatement = 167, +>IfStatement : SyntaxKind + + DoStatement = 168, +>DoStatement : SyntaxKind + + WhileStatement = 169, +>WhileStatement : SyntaxKind + + ForStatement = 170, +>ForStatement : SyntaxKind + + ForInStatement = 171, +>ForInStatement : SyntaxKind + + ContinueStatement = 172, +>ContinueStatement : SyntaxKind + + BreakStatement = 173, +>BreakStatement : SyntaxKind + + ReturnStatement = 174, +>ReturnStatement : SyntaxKind + + WithStatement = 175, +>WithStatement : SyntaxKind + + SwitchStatement = 176, +>SwitchStatement : SyntaxKind + + LabeledStatement = 177, +>LabeledStatement : SyntaxKind + + ThrowStatement = 178, +>ThrowStatement : SyntaxKind + + TryStatement = 179, +>TryStatement : SyntaxKind + + TryBlock = 180, +>TryBlock : SyntaxKind + + FinallyBlock = 181, +>FinallyBlock : SyntaxKind + + DebuggerStatement = 182, +>DebuggerStatement : SyntaxKind + + VariableDeclaration = 183, +>VariableDeclaration : SyntaxKind + + FunctionDeclaration = 184, +>FunctionDeclaration : SyntaxKind + + ClassDeclaration = 185, +>ClassDeclaration : SyntaxKind + + InterfaceDeclaration = 186, +>InterfaceDeclaration : SyntaxKind + + TypeAliasDeclaration = 187, +>TypeAliasDeclaration : SyntaxKind + + EnumDeclaration = 188, +>EnumDeclaration : SyntaxKind + + ModuleDeclaration = 189, +>ModuleDeclaration : SyntaxKind + + ModuleBlock = 190, +>ModuleBlock : SyntaxKind + + ImportDeclaration = 191, +>ImportDeclaration : SyntaxKind + + ExportAssignment = 192, +>ExportAssignment : SyntaxKind + + ExternalModuleReference = 193, +>ExternalModuleReference : SyntaxKind + + CaseClause = 194, +>CaseClause : SyntaxKind + + DefaultClause = 195, +>DefaultClause : SyntaxKind + + HeritageClause = 196, +>HeritageClause : SyntaxKind + + CatchClause = 197, +>CatchClause : SyntaxKind + + PropertyAssignment = 198, +>PropertyAssignment : SyntaxKind + + ShorthandPropertyAssignment = 199, +>ShorthandPropertyAssignment : SyntaxKind + + EnumMember = 200, +>EnumMember : SyntaxKind + + SourceFile = 201, +>SourceFile : SyntaxKind + + Program = 202, +>Program : SyntaxKind + + SyntaxList = 203, +>SyntaxList : SyntaxKind + + Count = 204, +>Count : SyntaxKind + + FirstAssignment = 51, +>FirstAssignment : SyntaxKind + + LastAssignment = 62, +>LastAssignment : SyntaxKind + + FirstReservedWord = 64, +>FirstReservedWord : SyntaxKind + + LastReservedWord = 99, +>LastReservedWord : SyntaxKind + + FirstKeyword = 64, +>FirstKeyword : SyntaxKind + + LastKeyword = 119, +>LastKeyword : SyntaxKind + + FirstFutureReservedWord = 100, +>FirstFutureReservedWord : SyntaxKind + + LastFutureReservedWord = 108, +>LastFutureReservedWord : SyntaxKind + + FirstTypeNode = 132, +>FirstTypeNode : SyntaxKind + + LastTypeNode = 140, +>LastTypeNode : SyntaxKind + + FirstPunctuation = 13, +>FirstPunctuation : SyntaxKind + + LastPunctuation = 62, +>LastPunctuation : SyntaxKind + + FirstToken = 0, +>FirstToken : SyntaxKind + + LastToken = 119, +>LastToken : SyntaxKind + + FirstTriviaToken = 2, +>FirstTriviaToken : SyntaxKind + + LastTriviaToken = 5, +>LastTriviaToken : SyntaxKind + + FirstLiteralToken = 6, +>FirstLiteralToken : SyntaxKind + + LastLiteralToken = 9, +>LastLiteralToken : SyntaxKind + + FirstTemplateToken = 9, +>FirstTemplateToken : SyntaxKind + + LastTemplateToken = 12, +>LastTemplateToken : SyntaxKind + + FirstOperator = 21, +>FirstOperator : SyntaxKind + + LastOperator = 62, +>LastOperator : SyntaxKind + + FirstBinaryOperator = 23, +>FirstBinaryOperator : SyntaxKind + + LastBinaryOperator = 62, +>LastBinaryOperator : SyntaxKind + + FirstNode = 120, +>FirstNode : SyntaxKind + } + const enum NodeFlags { +>NodeFlags : NodeFlags + + Export = 1, +>Export : NodeFlags + + Ambient = 2, +>Ambient : NodeFlags + + Public = 16, +>Public : NodeFlags + + Private = 32, +>Private : NodeFlags + + Protected = 64, +>Protected : NodeFlags + + Static = 128, +>Static : NodeFlags + + MultiLine = 256, +>MultiLine : NodeFlags + + Synthetic = 512, +>Synthetic : NodeFlags + + DeclarationFile = 1024, +>DeclarationFile : NodeFlags + + Let = 2048, +>Let : NodeFlags + + Const = 4096, +>Const : NodeFlags + + OctalLiteral = 8192, +>OctalLiteral : NodeFlags + + Modifier = 243, +>Modifier : NodeFlags + + AccessibilityModifier = 112, +>AccessibilityModifier : NodeFlags + + BlockScoped = 6144, +>BlockScoped : NodeFlags + } + const enum ParserContextFlags { +>ParserContextFlags : ParserContextFlags + + StrictMode = 1, +>StrictMode : ParserContextFlags + + DisallowIn = 2, +>DisallowIn : ParserContextFlags + + Yield = 4, +>Yield : ParserContextFlags + + GeneratorParameter = 8, +>GeneratorParameter : ParserContextFlags + + ContainsError = 16, +>ContainsError : ParserContextFlags + + HasPropagatedChildContainsErrorFlag = 32, +>HasPropagatedChildContainsErrorFlag : ParserContextFlags + } + interface Node extends TextRange { +>Node : Node +>TextRange : TextRange + + kind: SyntaxKind; +>kind : SyntaxKind +>SyntaxKind : SyntaxKind + + flags: NodeFlags; +>flags : NodeFlags +>NodeFlags : NodeFlags + + parserContextFlags?: ParserContextFlags; +>parserContextFlags : ParserContextFlags +>ParserContextFlags : ParserContextFlags + + id?: number; +>id : number + + parent?: Node; +>parent : Node +>Node : Node + + symbol?: Symbol; +>symbol : Symbol +>Symbol : Symbol + + locals?: SymbolTable; +>locals : SymbolTable +>SymbolTable : SymbolTable + + nextContainer?: Node; +>nextContainer : Node +>Node : Node + + localSymbol?: Symbol; +>localSymbol : Symbol +>Symbol : Symbol + + modifiers?: ModifiersArray; +>modifiers : ModifiersArray +>ModifiersArray : ModifiersArray + } + interface NodeArray extends Array, TextRange { +>NodeArray : NodeArray +>T : T +>Array : T[] +>T : T +>TextRange : TextRange + + hasTrailingComma?: boolean; +>hasTrailingComma : boolean + } + interface ModifiersArray extends NodeArray { +>ModifiersArray : ModifiersArray +>NodeArray : NodeArray +>Node : Node + + flags: number; +>flags : number + } + interface Identifier extends PrimaryExpression { +>Identifier : Identifier +>PrimaryExpression : PrimaryExpression + + text: string; +>text : string + } + interface QualifiedName extends Node { +>QualifiedName : QualifiedName +>Node : Node + + left: EntityName; +>left : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName + + right: Identifier; +>right : Identifier +>Identifier : Identifier + } + type EntityName = Identifier | QualifiedName; +>EntityName : Identifier | QualifiedName +>Identifier : Identifier +>QualifiedName : QualifiedName + + type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName +>Identifier : Identifier +>LiteralExpression : LiteralExpression +>ComputedPropertyName : ComputedPropertyName + + interface Declaration extends Node { +>Declaration : Declaration +>Node : Node + + _declarationBrand: any; +>_declarationBrand : any + + name?: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName + } + interface ComputedPropertyName extends Node { +>ComputedPropertyName : ComputedPropertyName +>Node : Node + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface TypeParameterDeclaration extends Declaration { +>TypeParameterDeclaration : TypeParameterDeclaration +>Declaration : Declaration + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + constraint?: TypeNode; +>constraint : TypeNode +>TypeNode : TypeNode + + expression?: Expression; +>expression : Expression +>Expression : Expression + } + interface SignatureDeclaration extends Declaration { +>SignatureDeclaration : SignatureDeclaration +>Declaration : Declaration + + typeParameters?: NodeArray; +>typeParameters : NodeArray +>NodeArray : NodeArray +>TypeParameterDeclaration : TypeParameterDeclaration + + parameters: NodeArray; +>parameters : NodeArray +>NodeArray : NodeArray +>ParameterDeclaration : ParameterDeclaration + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + } + interface VariableDeclaration extends Declaration { +>VariableDeclaration : VariableDeclaration +>Declaration : Declaration + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + interface ParameterDeclaration extends Declaration { +>ParameterDeclaration : ParameterDeclaration +>Declaration : Declaration + + dotDotDotToken?: Node; +>dotDotDotToken : Node +>Node : Node + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + questionToken?: Node; +>questionToken : Node +>Node : Node + + type?: TypeNode | StringLiteralExpression; +>type : TypeNode | StringLiteralExpression +>TypeNode : TypeNode +>StringLiteralExpression : StringLiteralExpression + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + interface PropertyDeclaration extends Declaration, ClassElement { +>PropertyDeclaration : PropertyDeclaration +>Declaration : Declaration +>ClassElement : ClassElement + + _propertyDeclarationBrand: any; +>_propertyDeclarationBrand : any + + questionToken?: Node; +>questionToken : Node +>Node : Node + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; +>VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration +>VariableDeclaration : VariableDeclaration +>ParameterDeclaration : ParameterDeclaration + + type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; +>VariableOrParameterOrPropertyDeclaration : ParameterDeclaration | VariableDeclaration | PropertyDeclaration +>VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration +>PropertyDeclaration : PropertyDeclaration + + interface ObjectLiteralElement extends Declaration { +>ObjectLiteralElement : ObjectLiteralElement +>Declaration : Declaration + + _objectLiteralBrandBrand: any; +>_objectLiteralBrandBrand : any + } + interface ShorthandPropertyAssignment extends ObjectLiteralElement { +>ShorthandPropertyAssignment : ShorthandPropertyAssignment +>ObjectLiteralElement : ObjectLiteralElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + questionToken?: Node; +>questionToken : Node +>Node : Node + } + interface PropertyAssignment extends ObjectLiteralElement { +>PropertyAssignment : PropertyAssignment +>ObjectLiteralElement : ObjectLiteralElement + + _propertyAssignmentBrand: any; +>_propertyAssignmentBrand : any + + name: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName + + questionToken?: Node; +>questionToken : Node +>Node : Node + + initializer: Expression; +>initializer : Expression +>Expression : Expression + } + /** + * Several node kinds share function-like features such as a signature, + * a name, and a body. These nodes should extend FunctionLikeDeclaration. + * Examples: + * FunctionDeclaration + * MethodDeclaration + * AccessorDeclaration + */ + interface FunctionLikeDeclaration extends SignatureDeclaration { +>FunctionLikeDeclaration : FunctionLikeDeclaration +>SignatureDeclaration : SignatureDeclaration + + _functionLikeDeclarationBrand: any; +>_functionLikeDeclarationBrand : any + + asteriskToken?: Node; +>asteriskToken : Node +>Node : Node + + questionToken?: Node; +>questionToken : Node +>Node : Node + + body?: Block | Expression; +>body : Expression | Block +>Block : Block +>Expression : Expression + } + interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { +>FunctionDeclaration : FunctionDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>Statement : Statement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + body?: Block; +>body : Block +>Block : Block + } + interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { +>MethodDeclaration : MethodDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>ClassElement : ClassElement +>ObjectLiteralElement : ObjectLiteralElement + + body?: Block; +>body : Block +>Block : Block + } + interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { +>ConstructorDeclaration : ConstructorDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>ClassElement : ClassElement + + body?: Block; +>body : Block +>Block : Block + } + interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { +>AccessorDeclaration : AccessorDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>ClassElement : ClassElement +>ObjectLiteralElement : ObjectLiteralElement + + _accessorDeclarationBrand: any; +>_accessorDeclarationBrand : any + + body: Block; +>body : Block +>Block : Block + } + interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { +>IndexSignatureDeclaration : IndexSignatureDeclaration +>SignatureDeclaration : SignatureDeclaration +>ClassElement : ClassElement + + _indexSignatureDeclarationBrand: any; +>_indexSignatureDeclarationBrand : any + } + interface TypeNode extends Node { +>TypeNode : TypeNode +>Node : Node + + _typeNodeBrand: any; +>_typeNodeBrand : any + } + interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { +>FunctionOrConstructorTypeNode : FunctionOrConstructorTypeNode +>TypeNode : TypeNode +>SignatureDeclaration : SignatureDeclaration + + _functionOrConstructorTypeNodeBrand: any; +>_functionOrConstructorTypeNodeBrand : any + } + interface TypeReferenceNode extends TypeNode { +>TypeReferenceNode : TypeReferenceNode +>TypeNode : TypeNode + + typeName: EntityName; +>typeName : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName + + typeArguments?: NodeArray; +>typeArguments : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + } + interface TypeQueryNode extends TypeNode { +>TypeQueryNode : TypeQueryNode +>TypeNode : TypeNode + + exprName: EntityName; +>exprName : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName + } + interface TypeLiteralNode extends TypeNode, Declaration { +>TypeLiteralNode : TypeLiteralNode +>TypeNode : TypeNode +>Declaration : Declaration + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>Node : Node + } + interface ArrayTypeNode extends TypeNode { +>ArrayTypeNode : ArrayTypeNode +>TypeNode : TypeNode + + elementType: TypeNode; +>elementType : TypeNode +>TypeNode : TypeNode + } + interface TupleTypeNode extends TypeNode { +>TupleTypeNode : TupleTypeNode +>TypeNode : TypeNode + + elementTypes: NodeArray; +>elementTypes : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + } + interface UnionTypeNode extends TypeNode { +>UnionTypeNode : UnionTypeNode +>TypeNode : TypeNode + + types: NodeArray; +>types : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + } + interface ParenthesizedTypeNode extends TypeNode { +>ParenthesizedTypeNode : ParenthesizedTypeNode +>TypeNode : TypeNode + + type: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + } + interface Expression extends Node { +>Expression : Expression +>Node : Node + + _expressionBrand: any; +>_expressionBrand : any + + contextualType?: Type; +>contextualType : Type +>Type : Type + } + interface UnaryExpression extends Expression { +>UnaryExpression : UnaryExpression +>Expression : Expression + + _unaryExpressionBrand: any; +>_unaryExpressionBrand : any + } + interface PrefixUnaryExpression extends UnaryExpression { +>PrefixUnaryExpression : PrefixUnaryExpression +>UnaryExpression : UnaryExpression + + operator: SyntaxKind; +>operator : SyntaxKind +>SyntaxKind : SyntaxKind + + operand: UnaryExpression; +>operand : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface PostfixUnaryExpression extends PostfixExpression { +>PostfixUnaryExpression : PostfixUnaryExpression +>PostfixExpression : PostfixExpression + + operand: LeftHandSideExpression; +>operand : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + operator: SyntaxKind; +>operator : SyntaxKind +>SyntaxKind : SyntaxKind + } + interface PostfixExpression extends UnaryExpression { +>PostfixExpression : PostfixExpression +>UnaryExpression : UnaryExpression + + _postfixExpressionBrand: any; +>_postfixExpressionBrand : any + } + interface LeftHandSideExpression extends PostfixExpression { +>LeftHandSideExpression : LeftHandSideExpression +>PostfixExpression : PostfixExpression + + _leftHandSideExpressionBrand: any; +>_leftHandSideExpressionBrand : any + } + interface MemberExpression extends LeftHandSideExpression { +>MemberExpression : MemberExpression +>LeftHandSideExpression : LeftHandSideExpression + + _memberExpressionBrand: any; +>_memberExpressionBrand : any + } + interface PrimaryExpression extends MemberExpression { +>PrimaryExpression : PrimaryExpression +>MemberExpression : MemberExpression + + _primaryExpressionBrand: any; +>_primaryExpressionBrand : any + } + interface DeleteExpression extends UnaryExpression { +>DeleteExpression : DeleteExpression +>UnaryExpression : UnaryExpression + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface TypeOfExpression extends UnaryExpression { +>TypeOfExpression : TypeOfExpression +>UnaryExpression : UnaryExpression + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface VoidExpression extends UnaryExpression { +>VoidExpression : VoidExpression +>UnaryExpression : UnaryExpression + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface YieldExpression extends Expression { +>YieldExpression : YieldExpression +>Expression : Expression + + asteriskToken?: Node; +>asteriskToken : Node +>Node : Node + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface BinaryExpression extends Expression { +>BinaryExpression : BinaryExpression +>Expression : Expression + + left: Expression; +>left : Expression +>Expression : Expression + + operator: SyntaxKind; +>operator : SyntaxKind +>SyntaxKind : SyntaxKind + + right: Expression; +>right : Expression +>Expression : Expression + } + interface ConditionalExpression extends Expression { +>ConditionalExpression : ConditionalExpression +>Expression : Expression + + condition: Expression; +>condition : Expression +>Expression : Expression + + whenTrue: Expression; +>whenTrue : Expression +>Expression : Expression + + whenFalse: Expression; +>whenFalse : Expression +>Expression : Expression + } + interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { +>FunctionExpression : FunctionExpression +>PrimaryExpression : PrimaryExpression +>FunctionLikeDeclaration : FunctionLikeDeclaration + + name?: Identifier; +>name : Identifier +>Identifier : Identifier + + body: Block | Expression; +>body : Expression | Block +>Block : Block +>Expression : Expression + } + interface LiteralExpression extends PrimaryExpression { +>LiteralExpression : LiteralExpression +>PrimaryExpression : PrimaryExpression + + text: string; +>text : string + + isUnterminated?: boolean; +>isUnterminated : boolean + } + interface StringLiteralExpression extends LiteralExpression { +>StringLiteralExpression : StringLiteralExpression +>LiteralExpression : LiteralExpression + + _stringLiteralExpressionBrand: any; +>_stringLiteralExpressionBrand : any + } + interface TemplateExpression extends PrimaryExpression { +>TemplateExpression : TemplateExpression +>PrimaryExpression : PrimaryExpression + + head: LiteralExpression; +>head : LiteralExpression +>LiteralExpression : LiteralExpression + + templateSpans: NodeArray; +>templateSpans : NodeArray +>NodeArray : NodeArray +>TemplateSpan : TemplateSpan + } + interface TemplateSpan extends Node { +>TemplateSpan : TemplateSpan +>Node : Node + + expression: Expression; +>expression : Expression +>Expression : Expression + + literal: LiteralExpression; +>literal : LiteralExpression +>LiteralExpression : LiteralExpression + } + interface ParenthesizedExpression extends PrimaryExpression { +>ParenthesizedExpression : ParenthesizedExpression +>PrimaryExpression : PrimaryExpression + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface ArrayLiteralExpression extends PrimaryExpression { +>ArrayLiteralExpression : ArrayLiteralExpression +>PrimaryExpression : PrimaryExpression + + elements: NodeArray; +>elements : NodeArray +>NodeArray : NodeArray +>Expression : Expression + } + interface ObjectLiteralExpression extends PrimaryExpression, Declaration { +>ObjectLiteralExpression : ObjectLiteralExpression +>PrimaryExpression : PrimaryExpression +>Declaration : Declaration + + properties: NodeArray; +>properties : NodeArray +>NodeArray : NodeArray +>ObjectLiteralElement : ObjectLiteralElement + } + interface PropertyAccessExpression extends MemberExpression { +>PropertyAccessExpression : PropertyAccessExpression +>MemberExpression : MemberExpression + + expression: LeftHandSideExpression; +>expression : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + name: Identifier; +>name : Identifier +>Identifier : Identifier + } + interface ElementAccessExpression extends MemberExpression { +>ElementAccessExpression : ElementAccessExpression +>MemberExpression : MemberExpression + + expression: LeftHandSideExpression; +>expression : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + argumentExpression?: Expression; +>argumentExpression : Expression +>Expression : Expression + } + interface CallExpression extends LeftHandSideExpression { +>CallExpression : CallExpression +>LeftHandSideExpression : LeftHandSideExpression + + expression: LeftHandSideExpression; +>expression : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + typeArguments?: NodeArray; +>typeArguments : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + + arguments: NodeArray; +>arguments : NodeArray +>NodeArray : NodeArray +>Expression : Expression + } + interface NewExpression extends CallExpression, PrimaryExpression { +>NewExpression : NewExpression +>CallExpression : CallExpression +>PrimaryExpression : PrimaryExpression + } + interface TaggedTemplateExpression extends MemberExpression { +>TaggedTemplateExpression : TaggedTemplateExpression +>MemberExpression : MemberExpression + + tag: LeftHandSideExpression; +>tag : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + template: LiteralExpression | TemplateExpression; +>template : LiteralExpression | TemplateExpression +>LiteralExpression : LiteralExpression +>TemplateExpression : TemplateExpression + } + type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression; +>CallLikeExpression : CallExpression | NewExpression | TaggedTemplateExpression +>CallExpression : CallExpression +>NewExpression : NewExpression +>TaggedTemplateExpression : TaggedTemplateExpression + + interface TypeAssertion extends UnaryExpression { +>TypeAssertion : TypeAssertion +>UnaryExpression : UnaryExpression + + type: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface Statement extends Node, ModuleElement { +>Statement : Statement +>Node : Node +>ModuleElement : ModuleElement + + _statementBrand: any; +>_statementBrand : any + } + interface Block extends Statement { +>Block : Block +>Statement : Statement + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>Statement : Statement + } + interface VariableStatement extends Statement { +>VariableStatement : VariableStatement +>Statement : Statement + + declarations: NodeArray; +>declarations : NodeArray +>NodeArray : NodeArray +>VariableDeclaration : VariableDeclaration + } + interface ExpressionStatement extends Statement { +>ExpressionStatement : ExpressionStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface IfStatement extends Statement { +>IfStatement : IfStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + + thenStatement: Statement; +>thenStatement : Statement +>Statement : Statement + + elseStatement?: Statement; +>elseStatement : Statement +>Statement : Statement + } + interface IterationStatement extends Statement { +>IterationStatement : IterationStatement +>Statement : Statement + + statement: Statement; +>statement : Statement +>Statement : Statement + } + interface DoStatement extends IterationStatement { +>DoStatement : DoStatement +>IterationStatement : IterationStatement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface WhileStatement extends IterationStatement { +>WhileStatement : WhileStatement +>IterationStatement : IterationStatement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface ForStatement extends IterationStatement { +>ForStatement : ForStatement +>IterationStatement : IterationStatement + + declarations?: NodeArray; +>declarations : NodeArray +>NodeArray : NodeArray +>VariableDeclaration : VariableDeclaration + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + + condition?: Expression; +>condition : Expression +>Expression : Expression + + iterator?: Expression; +>iterator : Expression +>Expression : Expression + } + interface ForInStatement extends IterationStatement { +>ForInStatement : ForInStatement +>IterationStatement : IterationStatement + + declarations?: NodeArray; +>declarations : NodeArray +>NodeArray : NodeArray +>VariableDeclaration : VariableDeclaration + + variable?: Expression; +>variable : Expression +>Expression : Expression + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface BreakOrContinueStatement extends Statement { +>BreakOrContinueStatement : BreakOrContinueStatement +>Statement : Statement + + label?: Identifier; +>label : Identifier +>Identifier : Identifier + } + interface ReturnStatement extends Statement { +>ReturnStatement : ReturnStatement +>Statement : Statement + + expression?: Expression; +>expression : Expression +>Expression : Expression + } + interface WithStatement extends Statement { +>WithStatement : WithStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + + statement: Statement; +>statement : Statement +>Statement : Statement + } + interface SwitchStatement extends Statement { +>SwitchStatement : SwitchStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + + clauses: NodeArray; +>clauses : NodeArray +>NodeArray : NodeArray +>CaseOrDefaultClause : CaseClause | DefaultClause + } + interface CaseClause extends Node { +>CaseClause : CaseClause +>Node : Node + + expression?: Expression; +>expression : Expression +>Expression : Expression + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>Statement : Statement + } + interface DefaultClause extends Node { +>DefaultClause : DefaultClause +>Node : Node + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>Statement : Statement + } + type CaseOrDefaultClause = CaseClause | DefaultClause; +>CaseOrDefaultClause : CaseClause | DefaultClause +>CaseClause : CaseClause +>DefaultClause : DefaultClause + + interface LabeledStatement extends Statement { +>LabeledStatement : LabeledStatement +>Statement : Statement + + label: Identifier; +>label : Identifier +>Identifier : Identifier + + statement: Statement; +>statement : Statement +>Statement : Statement + } + interface ThrowStatement extends Statement { +>ThrowStatement : ThrowStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface TryStatement extends Statement { +>TryStatement : TryStatement +>Statement : Statement + + tryBlock: Block; +>tryBlock : Block +>Block : Block + + catchClause?: CatchClause; +>catchClause : CatchClause +>CatchClause : CatchClause + + finallyBlock?: Block; +>finallyBlock : Block +>Block : Block + } + interface CatchClause extends Declaration { +>CatchClause : CatchClause +>Declaration : Declaration + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + block: Block; +>block : Block +>Block : Block + } + interface ModuleElement extends Node { +>ModuleElement : ModuleElement +>Node : Node + + _moduleElementBrand: any; +>_moduleElementBrand : any + } + interface ClassDeclaration extends Declaration, ModuleElement { +>ClassDeclaration : ClassDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + typeParameters?: NodeArray; +>typeParameters : NodeArray +>NodeArray : NodeArray +>TypeParameterDeclaration : TypeParameterDeclaration + + heritageClauses?: NodeArray; +>heritageClauses : NodeArray +>NodeArray : NodeArray +>HeritageClause : HeritageClause + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>ClassElement : ClassElement + } + interface ClassElement extends Declaration { +>ClassElement : ClassElement +>Declaration : Declaration + + _classElementBrand: any; +>_classElementBrand : any + } + interface InterfaceDeclaration extends Declaration, ModuleElement { +>InterfaceDeclaration : InterfaceDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + typeParameters?: NodeArray; +>typeParameters : NodeArray +>NodeArray : NodeArray +>TypeParameterDeclaration : TypeParameterDeclaration + + heritageClauses?: NodeArray; +>heritageClauses : NodeArray +>NodeArray : NodeArray +>HeritageClause : HeritageClause + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>Declaration : Declaration + } + interface HeritageClause extends Node { +>HeritageClause : HeritageClause +>Node : Node + + token: SyntaxKind; +>token : SyntaxKind +>SyntaxKind : SyntaxKind + + types?: NodeArray; +>types : NodeArray +>NodeArray : NodeArray +>TypeReferenceNode : TypeReferenceNode + } + interface TypeAliasDeclaration extends Declaration, ModuleElement { +>TypeAliasDeclaration : TypeAliasDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + type: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + } + interface EnumMember extends Declaration { +>EnumMember : EnumMember +>Declaration : Declaration + + name: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + interface EnumDeclaration extends Declaration, ModuleElement { +>EnumDeclaration : EnumDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>EnumMember : EnumMember + } + interface ModuleDeclaration extends Declaration, ModuleElement { +>ModuleDeclaration : ModuleDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier | LiteralExpression; +>name : Identifier | LiteralExpression +>Identifier : Identifier +>LiteralExpression : LiteralExpression + + body: ModuleBlock | ModuleDeclaration; +>body : ModuleDeclaration | ModuleBlock +>ModuleBlock : ModuleBlock +>ModuleDeclaration : ModuleDeclaration + } + interface ModuleBlock extends Node, ModuleElement { +>ModuleBlock : ModuleBlock +>Node : Node +>ModuleElement : ModuleElement + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>ModuleElement : ModuleElement + } + interface ImportDeclaration extends Declaration, ModuleElement { +>ImportDeclaration : ImportDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + moduleReference: EntityName | ExternalModuleReference; +>moduleReference : Identifier | QualifiedName | ExternalModuleReference +>EntityName : Identifier | QualifiedName +>ExternalModuleReference : ExternalModuleReference + } + interface ExternalModuleReference extends Node { +>ExternalModuleReference : ExternalModuleReference +>Node : Node + + expression?: Expression; +>expression : Expression +>Expression : Expression + } + interface ExportAssignment extends Statement, ModuleElement { +>ExportAssignment : ExportAssignment +>Statement : Statement +>ModuleElement : ModuleElement + + exportName: Identifier; +>exportName : Identifier +>Identifier : Identifier + } + interface FileReference extends TextRange { +>FileReference : FileReference +>TextRange : TextRange + + filename: string; +>filename : string + } + interface CommentRange extends TextRange { +>CommentRange : CommentRange +>TextRange : TextRange + + hasTrailingNewLine?: boolean; +>hasTrailingNewLine : boolean + } + interface SourceFile extends Declaration { +>SourceFile : SourceFile +>Declaration : Declaration + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>ModuleElement : ModuleElement + + endOfFileToken: Node; +>endOfFileToken : Node +>Node : Node + + filename: string; +>filename : string + + text: string; +>text : string + + getLineAndCharacterFromPosition(position: number): LineAndCharacter; +>getLineAndCharacterFromPosition : (position: number) => LineAndCharacter +>position : number +>LineAndCharacter : LineAndCharacter + + getPositionFromLineAndCharacter(line: number, character: number): number; +>getPositionFromLineAndCharacter : (line: number, character: number) => number +>line : number +>character : number + + getLineStarts(): number[]; +>getLineStarts : () => number[] + + amdDependencies: string[]; +>amdDependencies : string[] + + amdModuleName: string; +>amdModuleName : string + + referencedFiles: FileReference[]; +>referencedFiles : FileReference[] +>FileReference : FileReference + + referenceDiagnostics: Diagnostic[]; +>referenceDiagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + parseDiagnostics: Diagnostic[]; +>parseDiagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + grammarDiagnostics: Diagnostic[]; +>grammarDiagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + getSyntacticDiagnostics(): Diagnostic[]; +>getSyntacticDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + semanticDiagnostics: Diagnostic[]; +>semanticDiagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + hasNoDefaultLib: boolean; +>hasNoDefaultLib : boolean + + externalModuleIndicator: Node; +>externalModuleIndicator : Node +>Node : Node + + nodeCount: number; +>nodeCount : number + + identifierCount: number; +>identifierCount : number + + symbolCount: number; +>symbolCount : number + + isOpen: boolean; +>isOpen : boolean + + version: string; +>version : string + + languageVersion: ScriptTarget; +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget + + identifiers: Map; +>identifiers : Map +>Map : Map + } + interface Program { +>Program : Program + + getSourceFile(filename: string): SourceFile; +>getSourceFile : (filename: string) => SourceFile +>filename : string +>SourceFile : SourceFile + + getSourceFiles(): SourceFile[]; +>getSourceFiles : () => SourceFile[] +>SourceFile : SourceFile + + getCompilerOptions(): CompilerOptions; +>getCompilerOptions : () => CompilerOptions +>CompilerOptions : CompilerOptions + + getCompilerHost(): CompilerHost; +>getCompilerHost : () => CompilerHost +>CompilerHost : CompilerHost + + getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; +>getDiagnostics : (sourceFile?: SourceFile) => Diagnostic[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Diagnostic : Diagnostic + + getGlobalDiagnostics(): Diagnostic[]; +>getGlobalDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + getTypeChecker(fullTypeCheckMode: boolean): TypeChecker; +>getTypeChecker : (fullTypeCheckMode: boolean) => TypeChecker +>fullTypeCheckMode : boolean +>TypeChecker : TypeChecker + + getCommonSourceDirectory(): string; +>getCommonSourceDirectory : () => string + } + interface SourceMapSpan { +>SourceMapSpan : SourceMapSpan + + emittedLine: number; +>emittedLine : number + + emittedColumn: number; +>emittedColumn : number + + sourceLine: number; +>sourceLine : number + + sourceColumn: number; +>sourceColumn : number + + nameIndex?: number; +>nameIndex : number + + sourceIndex: number; +>sourceIndex : number + } + interface SourceMapData { +>SourceMapData : SourceMapData + + sourceMapFilePath: string; +>sourceMapFilePath : string + + jsSourceMappingURL: string; +>jsSourceMappingURL : string + + sourceMapFile: string; +>sourceMapFile : string + + sourceMapSourceRoot: string; +>sourceMapSourceRoot : string + + sourceMapSources: string[]; +>sourceMapSources : string[] + + inputSourceFileNames: string[]; +>inputSourceFileNames : string[] + + sourceMapNames?: string[]; +>sourceMapNames : string[] + + sourceMapMappings: string; +>sourceMapMappings : string + + sourceMapDecodedMappings: SourceMapSpan[]; +>sourceMapDecodedMappings : SourceMapSpan[] +>SourceMapSpan : SourceMapSpan + } + enum EmitReturnStatus { +>EmitReturnStatus : EmitReturnStatus + + Succeeded = 0, +>Succeeded : EmitReturnStatus + + AllOutputGenerationSkipped = 1, +>AllOutputGenerationSkipped : EmitReturnStatus + + JSGeneratedWithSemanticErrors = 2, +>JSGeneratedWithSemanticErrors : EmitReturnStatus + + DeclarationGenerationSkipped = 3, +>DeclarationGenerationSkipped : EmitReturnStatus + + EmitErrorsEncountered = 4, +>EmitErrorsEncountered : EmitReturnStatus + + CompilerOptionsErrors = 5, +>CompilerOptionsErrors : EmitReturnStatus + } + interface EmitResult { +>EmitResult : EmitResult + + emitResultStatus: EmitReturnStatus; +>emitResultStatus : EmitReturnStatus +>EmitReturnStatus : EmitReturnStatus + + diagnostics: Diagnostic[]; +>diagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + sourceMaps: SourceMapData[]; +>sourceMaps : SourceMapData[] +>SourceMapData : SourceMapData + } + interface TypeChecker { +>TypeChecker : TypeChecker + + getProgram(): Program; +>getProgram : () => Program +>Program : Program + + getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; +>getDiagnostics : (sourceFile?: SourceFile) => Diagnostic[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Diagnostic : Diagnostic + + getDeclarationDiagnostics(sourceFile: SourceFile): Diagnostic[]; +>getDeclarationDiagnostics : (sourceFile: SourceFile) => Diagnostic[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Diagnostic : Diagnostic + + getGlobalDiagnostics(): Diagnostic[]; +>getGlobalDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + getNodeCount(): number; +>getNodeCount : () => number + + getIdentifierCount(): number; +>getIdentifierCount : () => number + + getSymbolCount(): number; +>getSymbolCount : () => number + + getTypeCount(): number; +>getTypeCount : () => number + + emitFiles(targetSourceFile?: SourceFile): EmitResult; +>emitFiles : (targetSourceFile?: SourceFile) => EmitResult +>targetSourceFile : SourceFile +>SourceFile : SourceFile +>EmitResult : EmitResult + + getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; +>getTypeOfSymbolAtLocation : (symbol: Symbol, node: Node) => Type +>symbol : Symbol +>Symbol : Symbol +>node : Node +>Node : Node +>Type : Type + + getDeclaredTypeOfSymbol(symbol: Symbol): Type; +>getDeclaredTypeOfSymbol : (symbol: Symbol) => Type +>symbol : Symbol +>Symbol : Symbol +>Type : Type + + getPropertiesOfType(type: Type): Symbol[]; +>getPropertiesOfType : (type: Type) => Symbol[] +>type : Type +>Type : Type +>Symbol : Symbol + + getPropertyOfType(type: Type, propertyName: string): Symbol; +>getPropertyOfType : (type: Type, propertyName: string) => Symbol +>type : Type +>Type : Type +>propertyName : string +>Symbol : Symbol + + getSignaturesOfType(type: Type, kind: SignatureKind): Signature[]; +>getSignaturesOfType : (type: Type, kind: SignatureKind) => Signature[] +>type : Type +>Type : Type +>kind : SignatureKind +>SignatureKind : SignatureKind +>Signature : Signature + + getIndexTypeOfType(type: Type, kind: IndexKind): Type; +>getIndexTypeOfType : (type: Type, kind: IndexKind) => Type +>type : Type +>Type : Type +>kind : IndexKind +>IndexKind : IndexKind +>Type : Type + + getReturnTypeOfSignature(signature: Signature): Type; +>getReturnTypeOfSignature : (signature: Signature) => Type +>signature : Signature +>Signature : Signature +>Type : Type + + getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; +>getSymbolsInScope : (location: Node, meaning: SymbolFlags) => Symbol[] +>location : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags +>Symbol : Symbol + + getSymbolAtLocation(node: Node): Symbol; +>getSymbolAtLocation : (node: Node) => Symbol +>node : Node +>Node : Node +>Symbol : Symbol + + getShorthandAssignmentValueSymbol(location: Node): Symbol; +>getShorthandAssignmentValueSymbol : (location: Node) => Symbol +>location : Node +>Node : Node +>Symbol : Symbol + + getTypeAtLocation(node: Node): Type; +>getTypeAtLocation : (node: Node) => Type +>node : Node +>Node : Node +>Type : Type + + typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; +>typeToString : (type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => string +>type : Type +>Type : Type +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; +>symbolToString : (symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) => string +>symbol : Symbol +>Symbol : Symbol +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags + + getSymbolDisplayBuilder(): SymbolDisplayBuilder; +>getSymbolDisplayBuilder : () => SymbolDisplayBuilder +>SymbolDisplayBuilder : SymbolDisplayBuilder + + getFullyQualifiedName(symbol: Symbol): string; +>getFullyQualifiedName : (symbol: Symbol) => string +>symbol : Symbol +>Symbol : Symbol + + getAugmentedPropertiesOfType(type: Type): Symbol[]; +>getAugmentedPropertiesOfType : (type: Type) => Symbol[] +>type : Type +>Type : Type +>Symbol : Symbol + + getRootSymbols(symbol: Symbol): Symbol[]; +>getRootSymbols : (symbol: Symbol) => Symbol[] +>symbol : Symbol +>Symbol : Symbol +>Symbol : Symbol + + getContextualType(node: Expression): Type; +>getContextualType : (node: Expression) => Type +>node : Expression +>Expression : Expression +>Type : Type + + getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; +>getResolvedSignature : (node: CallExpression | NewExpression | TaggedTemplateExpression, candidatesOutArray?: Signature[]) => Signature +>node : CallExpression | NewExpression | TaggedTemplateExpression +>CallLikeExpression : CallExpression | NewExpression | TaggedTemplateExpression +>candidatesOutArray : Signature[] +>Signature : Signature +>Signature : Signature + + getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; +>getSignatureFromDeclaration : (declaration: SignatureDeclaration) => Signature +>declaration : SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration +>Signature : Signature + + isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; +>isImplementationOfOverload : (node: FunctionLikeDeclaration) => boolean +>node : FunctionLikeDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration + + isUndefinedSymbol(symbol: Symbol): boolean; +>isUndefinedSymbol : (symbol: Symbol) => boolean +>symbol : Symbol +>Symbol : Symbol + + isArgumentsSymbol(symbol: Symbol): boolean; +>isArgumentsSymbol : (symbol: Symbol) => boolean +>symbol : Symbol +>Symbol : Symbol + + isEmitBlocked(sourceFile?: SourceFile): boolean; +>isEmitBlocked : (sourceFile?: SourceFile) => boolean +>sourceFile : SourceFile +>SourceFile : SourceFile + + getEnumMemberValue(node: EnumMember): number; +>getEnumMemberValue : (node: EnumMember) => number +>node : EnumMember +>EnumMember : EnumMember + + isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; +>isValidPropertyAccess : (node: QualifiedName | PropertyAccessExpression, propertyName: string) => boolean +>node : QualifiedName | PropertyAccessExpression +>PropertyAccessExpression : PropertyAccessExpression +>QualifiedName : QualifiedName +>propertyName : string + + getAliasedSymbol(symbol: Symbol): Symbol; +>getAliasedSymbol : (symbol: Symbol) => Symbol +>symbol : Symbol +>Symbol : Symbol +>Symbol : Symbol + } + interface SymbolDisplayBuilder { +>SymbolDisplayBuilder : SymbolDisplayBuilder + + buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildTypeDisplay : (type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>type : Type +>Type : Type +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void; +>buildSymbolDisplay : (symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags) => void +>symbol : Symbol +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags +>flags : SymbolFormatFlags +>SymbolFormatFlags : SymbolFormatFlags + + buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildSignatureDisplay : (signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>signatures : Signature +>Signature : Signature +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildParameterDisplay : (parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>parameter : Symbol +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildTypeParameterDisplay : (tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>tp : TypeParameter +>TypeParameter : TypeParameter +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void; +>buildTypeParameterDisplayFromSymbol : (symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags) => void +>symbol : Symbol +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaraiton : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildDisplayForParametersAndDelimiters : (parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>parameters : Symbol[] +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildDisplayForTypeParametersAndDelimiters : (typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>typeParameters : TypeParameter[] +>TypeParameter : TypeParameter +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildReturnTypeDisplay : (signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>signature : Signature +>Signature : Signature +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + } + interface SymbolWriter { +>SymbolWriter : SymbolWriter + + writeKeyword(text: string): void; +>writeKeyword : (text: string) => void +>text : string + + writeOperator(text: string): void; +>writeOperator : (text: string) => void +>text : string + + writePunctuation(text: string): void; +>writePunctuation : (text: string) => void +>text : string + + writeSpace(text: string): void; +>writeSpace : (text: string) => void +>text : string + + writeStringLiteral(text: string): void; +>writeStringLiteral : (text: string) => void +>text : string + + writeParameter(text: string): void; +>writeParameter : (text: string) => void +>text : string + + writeSymbol(text: string, symbol: Symbol): void; +>writeSymbol : (text: string, symbol: Symbol) => void +>text : string +>symbol : Symbol +>Symbol : Symbol + + writeLine(): void; +>writeLine : () => void + + increaseIndent(): void; +>increaseIndent : () => void + + decreaseIndent(): void; +>decreaseIndent : () => void + + clear(): void; +>clear : () => void + + trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void; +>trackSymbol : (symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) => void +>symbol : Symbol +>Symbol : Symbol +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags + } + const enum TypeFormatFlags { +>TypeFormatFlags : TypeFormatFlags + + None = 0, +>None : TypeFormatFlags + + WriteArrayAsGenericType = 1, +>WriteArrayAsGenericType : TypeFormatFlags + + UseTypeOfFunction = 2, +>UseTypeOfFunction : TypeFormatFlags + + NoTruncation = 4, +>NoTruncation : TypeFormatFlags + + WriteArrowStyleSignature = 8, +>WriteArrowStyleSignature : TypeFormatFlags + + WriteOwnNameForAnyLike = 16, +>WriteOwnNameForAnyLike : TypeFormatFlags + + WriteTypeArgumentsOfSignature = 32, +>WriteTypeArgumentsOfSignature : TypeFormatFlags + + InElementType = 64, +>InElementType : TypeFormatFlags + } + const enum SymbolFormatFlags { +>SymbolFormatFlags : SymbolFormatFlags + + None = 0, +>None : SymbolFormatFlags + + WriteTypeParametersOrArguments = 1, +>WriteTypeParametersOrArguments : SymbolFormatFlags + + UseOnlyExternalAliasing = 2, +>UseOnlyExternalAliasing : SymbolFormatFlags + } + const enum SymbolAccessibility { +>SymbolAccessibility : SymbolAccessibility + + Accessible = 0, +>Accessible : SymbolAccessibility + + NotAccessible = 1, +>NotAccessible : SymbolAccessibility + + CannotBeNamed = 2, +>CannotBeNamed : SymbolAccessibility + } + interface SymbolVisibilityResult { +>SymbolVisibilityResult : SymbolVisibilityResult + + accessibility: SymbolAccessibility; +>accessibility : SymbolAccessibility +>SymbolAccessibility : SymbolAccessibility + + aliasesToMakeVisible?: ImportDeclaration[]; +>aliasesToMakeVisible : ImportDeclaration[] +>ImportDeclaration : ImportDeclaration + + errorSymbolName?: string; +>errorSymbolName : string + + errorNode?: Node; +>errorNode : Node +>Node : Node + } + interface SymbolAccessiblityResult extends SymbolVisibilityResult { +>SymbolAccessiblityResult : SymbolAccessiblityResult +>SymbolVisibilityResult : SymbolVisibilityResult + + errorModuleName?: string; +>errorModuleName : string + } + interface EmitResolver { +>EmitResolver : EmitResolver + + getProgram(): Program; +>getProgram : () => Program +>Program : Program + + getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; +>getLocalNameOfContainer : (container: EnumDeclaration | ModuleDeclaration) => string +>container : EnumDeclaration | ModuleDeclaration +>ModuleDeclaration : ModuleDeclaration +>EnumDeclaration : EnumDeclaration + + getExpressionNamePrefix(node: Identifier): string; +>getExpressionNamePrefix : (node: Identifier) => string +>node : Identifier +>Identifier : Identifier + + getExportAssignmentName(node: SourceFile): string; +>getExportAssignmentName : (node: SourceFile) => string +>node : SourceFile +>SourceFile : SourceFile + + isReferencedImportDeclaration(node: ImportDeclaration): boolean; +>isReferencedImportDeclaration : (node: ImportDeclaration) => boolean +>node : ImportDeclaration +>ImportDeclaration : ImportDeclaration + + isTopLevelValueImportWithEntityName(node: ImportDeclaration): boolean; +>isTopLevelValueImportWithEntityName : (node: ImportDeclaration) => boolean +>node : ImportDeclaration +>ImportDeclaration : ImportDeclaration + + getNodeCheckFlags(node: Node): NodeCheckFlags; +>getNodeCheckFlags : (node: Node) => NodeCheckFlags +>node : Node +>Node : Node +>NodeCheckFlags : NodeCheckFlags + + getEnumMemberValue(node: EnumMember): number; +>getEnumMemberValue : (node: EnumMember) => number +>node : EnumMember +>EnumMember : EnumMember + + hasSemanticErrors(sourceFile?: SourceFile): boolean; +>hasSemanticErrors : (sourceFile?: SourceFile) => boolean +>sourceFile : SourceFile +>SourceFile : SourceFile + + isDeclarationVisible(node: Declaration): boolean; +>isDeclarationVisible : (node: Declaration) => boolean +>node : Declaration +>Declaration : Declaration + + isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; +>isImplementationOfOverload : (node: FunctionLikeDeclaration) => boolean +>node : FunctionLikeDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration + + writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; +>writeTypeOfDeclaration : (declaration: ParameterDeclaration | VariableDeclaration | AccessorDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void +>declaration : ParameterDeclaration | VariableDeclaration | AccessorDeclaration +>AccessorDeclaration : AccessorDeclaration +>VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags +>writer : SymbolWriter +>SymbolWriter : SymbolWriter + + writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; +>writeReturnTypeOfSignatureDeclaration : (signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void +>signatureDeclaration : SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags +>writer : SymbolWriter +>SymbolWriter : SymbolWriter + + isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; +>isSymbolAccessible : (symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags) => SymbolAccessiblityResult +>symbol : Symbol +>Symbol : Symbol +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags +>SymbolAccessiblityResult : SymbolAccessiblityResult + + isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; +>isEntityNameVisible : (entityName: Identifier | QualifiedName, enclosingDeclaration: Node) => SymbolVisibilityResult +>entityName : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName +>enclosingDeclaration : Node +>Node : Node +>SymbolVisibilityResult : SymbolVisibilityResult + + getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number; +>getConstantValue : (node: PropertyAccessExpression | ElementAccessExpression) => number +>node : PropertyAccessExpression | ElementAccessExpression +>PropertyAccessExpression : PropertyAccessExpression +>ElementAccessExpression : ElementAccessExpression + + isEmitBlocked(sourceFile?: SourceFile): boolean; +>isEmitBlocked : (sourceFile?: SourceFile) => boolean +>sourceFile : SourceFile +>SourceFile : SourceFile + } + const enum SymbolFlags { +>SymbolFlags : SymbolFlags + + FunctionScopedVariable = 1, +>FunctionScopedVariable : SymbolFlags + + BlockScopedVariable = 2, +>BlockScopedVariable : SymbolFlags + + Property = 4, +>Property : SymbolFlags + + EnumMember = 8, +>EnumMember : SymbolFlags + + Function = 16, +>Function : SymbolFlags + + Class = 32, +>Class : SymbolFlags + + Interface = 64, +>Interface : SymbolFlags + + ConstEnum = 128, +>ConstEnum : SymbolFlags + + RegularEnum = 256, +>RegularEnum : SymbolFlags + + ValueModule = 512, +>ValueModule : SymbolFlags + + NamespaceModule = 1024, +>NamespaceModule : SymbolFlags + + TypeLiteral = 2048, +>TypeLiteral : SymbolFlags + + ObjectLiteral = 4096, +>ObjectLiteral : SymbolFlags + + Method = 8192, +>Method : SymbolFlags + + Constructor = 16384, +>Constructor : SymbolFlags + + GetAccessor = 32768, +>GetAccessor : SymbolFlags + + SetAccessor = 65536, +>SetAccessor : SymbolFlags + + CallSignature = 131072, +>CallSignature : SymbolFlags + + ConstructSignature = 262144, +>ConstructSignature : SymbolFlags + + IndexSignature = 524288, +>IndexSignature : SymbolFlags + + TypeParameter = 1048576, +>TypeParameter : SymbolFlags + + TypeAlias = 2097152, +>TypeAlias : SymbolFlags + + ExportValue = 4194304, +>ExportValue : SymbolFlags + + ExportType = 8388608, +>ExportType : SymbolFlags + + ExportNamespace = 16777216, +>ExportNamespace : SymbolFlags + + Import = 33554432, +>Import : SymbolFlags + + Instantiated = 67108864, +>Instantiated : SymbolFlags + + Merged = 134217728, +>Merged : SymbolFlags + + Transient = 268435456, +>Transient : SymbolFlags + + Prototype = 536870912, +>Prototype : SymbolFlags + + UnionProperty = 1073741824, +>UnionProperty : SymbolFlags + + Enum = 384, +>Enum : SymbolFlags + + Variable = 3, +>Variable : SymbolFlags + + Value = 107455, +>Value : SymbolFlags + + Type = 3152352, +>Type : SymbolFlags + + Namespace = 1536, +>Namespace : SymbolFlags + + Module = 1536, +>Module : SymbolFlags + + Accessor = 98304, +>Accessor : SymbolFlags + + Signature = 917504, +>Signature : SymbolFlags + + FunctionScopedVariableExcludes = 107454, +>FunctionScopedVariableExcludes : SymbolFlags + + BlockScopedVariableExcludes = 107455, +>BlockScopedVariableExcludes : SymbolFlags + + ParameterExcludes = 107455, +>ParameterExcludes : SymbolFlags + + PropertyExcludes = 107455, +>PropertyExcludes : SymbolFlags + + EnumMemberExcludes = 107455, +>EnumMemberExcludes : SymbolFlags + + FunctionExcludes = 106927, +>FunctionExcludes : SymbolFlags + + ClassExcludes = 3258879, +>ClassExcludes : SymbolFlags + + InterfaceExcludes = 3152288, +>InterfaceExcludes : SymbolFlags + + RegularEnumExcludes = 3258623, +>RegularEnumExcludes : SymbolFlags + + ConstEnumExcludes = 3259263, +>ConstEnumExcludes : SymbolFlags + + ValueModuleExcludes = 106639, +>ValueModuleExcludes : SymbolFlags + + NamespaceModuleExcludes = 0, +>NamespaceModuleExcludes : SymbolFlags + + MethodExcludes = 99263, +>MethodExcludes : SymbolFlags + + GetAccessorExcludes = 41919, +>GetAccessorExcludes : SymbolFlags + + SetAccessorExcludes = 74687, +>SetAccessorExcludes : SymbolFlags + + TypeParameterExcludes = 2103776, +>TypeParameterExcludes : SymbolFlags + + TypeAliasExcludes = 3152352, +>TypeAliasExcludes : SymbolFlags + + ImportExcludes = 33554432, +>ImportExcludes : SymbolFlags + + ModuleMember = 35653619, +>ModuleMember : SymbolFlags + + ExportHasLocal = 944, +>ExportHasLocal : SymbolFlags + + HasLocals = 1041936, +>HasLocals : SymbolFlags + + HasExports = 1952, +>HasExports : SymbolFlags + + HasMembers = 6240, +>HasMembers : SymbolFlags + + IsContainer = 1048560, +>IsContainer : SymbolFlags + + PropertyOrAccessor = 98308, +>PropertyOrAccessor : SymbolFlags + + Export = 29360128, +>Export : SymbolFlags + } + interface Symbol { +>Symbol : Symbol + + flags: SymbolFlags; +>flags : SymbolFlags +>SymbolFlags : SymbolFlags + + name: string; +>name : string + + id?: number; +>id : number + + mergeId?: number; +>mergeId : number + + declarations?: Declaration[]; +>declarations : Declaration[] +>Declaration : Declaration + + parent?: Symbol; +>parent : Symbol +>Symbol : Symbol + + members?: SymbolTable; +>members : SymbolTable +>SymbolTable : SymbolTable + + exports?: SymbolTable; +>exports : SymbolTable +>SymbolTable : SymbolTable + + exportSymbol?: Symbol; +>exportSymbol : Symbol +>Symbol : Symbol + + valueDeclaration?: Declaration; +>valueDeclaration : Declaration +>Declaration : Declaration + + constEnumOnlyModule?: boolean; +>constEnumOnlyModule : boolean + } + interface SymbolLinks { +>SymbolLinks : SymbolLinks + + target?: Symbol; +>target : Symbol +>Symbol : Symbol + + type?: Type; +>type : Type +>Type : Type + + declaredType?: Type; +>declaredType : Type +>Type : Type + + mapper?: TypeMapper; +>mapper : TypeMapper +>TypeMapper : TypeMapper + + referenced?: boolean; +>referenced : boolean + + exportAssignSymbol?: Symbol; +>exportAssignSymbol : Symbol +>Symbol : Symbol + + unionType?: UnionType; +>unionType : UnionType +>UnionType : UnionType + } + interface TransientSymbol extends Symbol, SymbolLinks { +>TransientSymbol : TransientSymbol +>Symbol : Symbol +>SymbolLinks : SymbolLinks + } + interface SymbolTable { +>SymbolTable : SymbolTable + + [index: string]: Symbol; +>index : string +>Symbol : Symbol + } + const enum NodeCheckFlags { +>NodeCheckFlags : NodeCheckFlags + + TypeChecked = 1, +>TypeChecked : NodeCheckFlags + + LexicalThis = 2, +>LexicalThis : NodeCheckFlags + + CaptureThis = 4, +>CaptureThis : NodeCheckFlags + + EmitExtends = 8, +>EmitExtends : NodeCheckFlags + + SuperInstance = 16, +>SuperInstance : NodeCheckFlags + + SuperStatic = 32, +>SuperStatic : NodeCheckFlags + + ContextChecked = 64, +>ContextChecked : NodeCheckFlags + + EnumValuesComputed = 128, +>EnumValuesComputed : NodeCheckFlags + } + interface NodeLinks { +>NodeLinks : NodeLinks + + resolvedType?: Type; +>resolvedType : Type +>Type : Type + + resolvedSignature?: Signature; +>resolvedSignature : Signature +>Signature : Signature + + resolvedSymbol?: Symbol; +>resolvedSymbol : Symbol +>Symbol : Symbol + + flags?: NodeCheckFlags; +>flags : NodeCheckFlags +>NodeCheckFlags : NodeCheckFlags + + enumMemberValue?: number; +>enumMemberValue : number + + isIllegalTypeReferenceInConstraint?: boolean; +>isIllegalTypeReferenceInConstraint : boolean + + isVisible?: boolean; +>isVisible : boolean + + localModuleName?: string; +>localModuleName : string + + assignmentChecks?: Map; +>assignmentChecks : Map +>Map : Map + } + const enum TypeFlags { +>TypeFlags : TypeFlags + + Any = 1, +>Any : TypeFlags + + String = 2, +>String : TypeFlags + + Number = 4, +>Number : TypeFlags + + Boolean = 8, +>Boolean : TypeFlags + + Void = 16, +>Void : TypeFlags + + Undefined = 32, +>Undefined : TypeFlags + + Null = 64, +>Null : TypeFlags + + Enum = 128, +>Enum : TypeFlags + + StringLiteral = 256, +>StringLiteral : TypeFlags + + TypeParameter = 512, +>TypeParameter : TypeFlags + + Class = 1024, +>Class : TypeFlags + + Interface = 2048, +>Interface : TypeFlags + + Reference = 4096, +>Reference : TypeFlags + + Tuple = 8192, +>Tuple : TypeFlags + + Union = 16384, +>Union : TypeFlags + + Anonymous = 32768, +>Anonymous : TypeFlags + + FromSignature = 65536, +>FromSignature : TypeFlags + + Intrinsic = 127, +>Intrinsic : TypeFlags + + StringLike = 258, +>StringLike : TypeFlags + + NumberLike = 132, +>NumberLike : TypeFlags + + ObjectType = 48128, +>ObjectType : TypeFlags + } + interface Type { +>Type : Type + + flags: TypeFlags; +>flags : TypeFlags +>TypeFlags : TypeFlags + + id: number; +>id : number + + symbol?: Symbol; +>symbol : Symbol +>Symbol : Symbol + } + interface IntrinsicType extends Type { +>IntrinsicType : IntrinsicType +>Type : Type + + intrinsicName: string; +>intrinsicName : string + } + interface StringLiteralType extends Type { +>StringLiteralType : StringLiteralType +>Type : Type + + text: string; +>text : string + } + interface ObjectType extends Type { +>ObjectType : ObjectType +>Type : Type + } + interface InterfaceType extends ObjectType { +>InterfaceType : InterfaceType +>ObjectType : ObjectType + + typeParameters: TypeParameter[]; +>typeParameters : TypeParameter[] +>TypeParameter : TypeParameter + + baseTypes: ObjectType[]; +>baseTypes : ObjectType[] +>ObjectType : ObjectType + + declaredProperties: Symbol[]; +>declaredProperties : Symbol[] +>Symbol : Symbol + + declaredCallSignatures: Signature[]; +>declaredCallSignatures : Signature[] +>Signature : Signature + + declaredConstructSignatures: Signature[]; +>declaredConstructSignatures : Signature[] +>Signature : Signature + + declaredStringIndexType: Type; +>declaredStringIndexType : Type +>Type : Type + + declaredNumberIndexType: Type; +>declaredNumberIndexType : Type +>Type : Type + } + interface TypeReference extends ObjectType { +>TypeReference : TypeReference +>ObjectType : ObjectType + + target: GenericType; +>target : GenericType +>GenericType : GenericType + + typeArguments: Type[]; +>typeArguments : Type[] +>Type : Type + } + interface GenericType extends InterfaceType, TypeReference { +>GenericType : GenericType +>InterfaceType : InterfaceType +>TypeReference : TypeReference + + instantiations: Map; +>instantiations : Map +>Map : Map +>TypeReference : TypeReference + + openReferenceTargets: GenericType[]; +>openReferenceTargets : GenericType[] +>GenericType : GenericType + + openReferenceChecks: Map; +>openReferenceChecks : Map +>Map : Map + } + interface TupleType extends ObjectType { +>TupleType : TupleType +>ObjectType : ObjectType + + elementTypes: Type[]; +>elementTypes : Type[] +>Type : Type + + baseArrayType: TypeReference; +>baseArrayType : TypeReference +>TypeReference : TypeReference + } + interface UnionType extends Type { +>UnionType : UnionType +>Type : Type + + types: Type[]; +>types : Type[] +>Type : Type + + resolvedProperties: SymbolTable; +>resolvedProperties : SymbolTable +>SymbolTable : SymbolTable + } + interface ResolvedType extends ObjectType, UnionType { +>ResolvedType : ResolvedType +>ObjectType : ObjectType +>UnionType : UnionType + + members: SymbolTable; +>members : SymbolTable +>SymbolTable : SymbolTable + + properties: Symbol[]; +>properties : Symbol[] +>Symbol : Symbol + + callSignatures: Signature[]; +>callSignatures : Signature[] +>Signature : Signature + + constructSignatures: Signature[]; +>constructSignatures : Signature[] +>Signature : Signature + + stringIndexType: Type; +>stringIndexType : Type +>Type : Type + + numberIndexType: Type; +>numberIndexType : Type +>Type : Type + } + interface TypeParameter extends Type { +>TypeParameter : TypeParameter +>Type : Type + + constraint: Type; +>constraint : Type +>Type : Type + + target?: TypeParameter; +>target : TypeParameter +>TypeParameter : TypeParameter + + mapper?: TypeMapper; +>mapper : TypeMapper +>TypeMapper : TypeMapper + } + const enum SignatureKind { +>SignatureKind : SignatureKind + + Call = 0, +>Call : SignatureKind + + Construct = 1, +>Construct : SignatureKind + } + interface Signature { +>Signature : Signature + + declaration: SignatureDeclaration; +>declaration : SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration + + typeParameters: TypeParameter[]; +>typeParameters : TypeParameter[] +>TypeParameter : TypeParameter + + parameters: Symbol[]; +>parameters : Symbol[] +>Symbol : Symbol + + resolvedReturnType: Type; +>resolvedReturnType : Type +>Type : Type + + minArgumentCount: number; +>minArgumentCount : number + + hasRestParameter: boolean; +>hasRestParameter : boolean + + hasStringLiterals: boolean; +>hasStringLiterals : boolean + + target?: Signature; +>target : Signature +>Signature : Signature + + mapper?: TypeMapper; +>mapper : TypeMapper +>TypeMapper : TypeMapper + + unionSignatures?: Signature[]; +>unionSignatures : Signature[] +>Signature : Signature + + erasedSignatureCache?: Signature; +>erasedSignatureCache : Signature +>Signature : Signature + + isolatedSignatureType?: ObjectType; +>isolatedSignatureType : ObjectType +>ObjectType : ObjectType + } + const enum IndexKind { +>IndexKind : IndexKind + + String = 0, +>String : IndexKind + + Number = 1, +>Number : IndexKind + } + interface TypeMapper { +>TypeMapper : TypeMapper + + (t: Type): Type; +>t : Type +>Type : Type +>Type : Type + } + interface TypeInferences { +>TypeInferences : TypeInferences + + primary: Type[]; +>primary : Type[] +>Type : Type + + secondary: Type[]; +>secondary : Type[] +>Type : Type + } + interface InferenceContext { +>InferenceContext : InferenceContext + + typeParameters: TypeParameter[]; +>typeParameters : TypeParameter[] +>TypeParameter : TypeParameter + + inferUnionTypes: boolean; +>inferUnionTypes : boolean + + inferences: TypeInferences[]; +>inferences : TypeInferences[] +>TypeInferences : TypeInferences + + inferredTypes: Type[]; +>inferredTypes : Type[] +>Type : Type + + failedTypeParameterIndex?: number; +>failedTypeParameterIndex : number + } + interface DiagnosticMessage { +>DiagnosticMessage : DiagnosticMessage + + key: string; +>key : string + + category: DiagnosticCategory; +>category : DiagnosticCategory +>DiagnosticCategory : DiagnosticCategory + + code: number; +>code : number + + isEarly?: boolean; +>isEarly : boolean + } + interface DiagnosticMessageChain { +>DiagnosticMessageChain : DiagnosticMessageChain + + messageText: string; +>messageText : string + + category: DiagnosticCategory; +>category : DiagnosticCategory +>DiagnosticCategory : DiagnosticCategory + + code: number; +>code : number + + next?: DiagnosticMessageChain; +>next : DiagnosticMessageChain +>DiagnosticMessageChain : DiagnosticMessageChain + } + interface Diagnostic { +>Diagnostic : Diagnostic + + file: SourceFile; +>file : SourceFile +>SourceFile : SourceFile + + start: number; +>start : number + + length: number; +>length : number + + messageText: string; +>messageText : string + + category: DiagnosticCategory; +>category : DiagnosticCategory +>DiagnosticCategory : DiagnosticCategory + + code: number; +>code : number + + /** + * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit + */ + isEarly?: boolean; +>isEarly : boolean + } + enum DiagnosticCategory { +>DiagnosticCategory : DiagnosticCategory + + Warning = 0, +>Warning : DiagnosticCategory + + Error = 1, +>Error : DiagnosticCategory + + Message = 2, +>Message : DiagnosticCategory + } + interface CompilerOptions { +>CompilerOptions : CompilerOptions + + allowNonTsExtensions?: boolean; +>allowNonTsExtensions : boolean + + charset?: string; +>charset : string + + codepage?: number; +>codepage : number + + declaration?: boolean; +>declaration : boolean + + diagnostics?: boolean; +>diagnostics : boolean + + emitBOM?: boolean; +>emitBOM : boolean + + help?: boolean; +>help : boolean + + locale?: string; +>locale : string + + mapRoot?: string; +>mapRoot : string + + module?: ModuleKind; +>module : ModuleKind +>ModuleKind : ModuleKind + + noEmitOnError?: boolean; +>noEmitOnError : boolean + + noErrorTruncation?: boolean; +>noErrorTruncation : boolean + + noImplicitAny?: boolean; +>noImplicitAny : boolean + + noLib?: boolean; +>noLib : boolean + + noLibCheck?: boolean; +>noLibCheck : boolean + + noResolve?: boolean; +>noResolve : boolean + + out?: string; +>out : string + + outDir?: string; +>outDir : string + + preserveConstEnums?: boolean; +>preserveConstEnums : boolean + + removeComments?: boolean; +>removeComments : boolean + + sourceMap?: boolean; +>sourceMap : boolean + + sourceRoot?: string; +>sourceRoot : string + + suppressImplicitAnyIndexErrors?: boolean; +>suppressImplicitAnyIndexErrors : boolean + + target?: ScriptTarget; +>target : ScriptTarget +>ScriptTarget : ScriptTarget + + version?: boolean; +>version : boolean + + watch?: boolean; +>watch : boolean + + [option: string]: string | number | boolean; +>option : string + } + const enum ModuleKind { +>ModuleKind : ModuleKind + + None = 0, +>None : ModuleKind + + CommonJS = 1, +>CommonJS : ModuleKind + + AMD = 2, +>AMD : ModuleKind + } + interface LineAndCharacter { +>LineAndCharacter : LineAndCharacter + + line: number; +>line : number + + character: number; +>character : number + } + const enum ScriptTarget { +>ScriptTarget : ScriptTarget + + ES3 = 0, +>ES3 : ScriptTarget + + ES5 = 1, +>ES5 : ScriptTarget + + ES6 = 2, +>ES6 : ScriptTarget + + Latest = 2, +>Latest : ScriptTarget + } + interface ParsedCommandLine { +>ParsedCommandLine : ParsedCommandLine + + options: CompilerOptions; +>options : CompilerOptions +>CompilerOptions : CompilerOptions + + filenames: string[]; +>filenames : string[] + + errors: Diagnostic[]; +>errors : Diagnostic[] +>Diagnostic : Diagnostic + } + interface CommandLineOption { +>CommandLineOption : CommandLineOption + + name: string; +>name : string + + type: string | Map; +>type : string | Map +>Map : Map + + shortName?: string; +>shortName : string + + description?: DiagnosticMessage; +>description : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + + paramType?: DiagnosticMessage; +>paramType : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + + error?: DiagnosticMessage; +>error : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + } + const enum CharacterCodes { +>CharacterCodes : CharacterCodes + + nullCharacter = 0, +>nullCharacter : CharacterCodes + + maxAsciiCharacter = 127, +>maxAsciiCharacter : CharacterCodes + + lineFeed = 10, +>lineFeed : CharacterCodes + + carriageReturn = 13, +>carriageReturn : CharacterCodes + + lineSeparator = 8232, +>lineSeparator : CharacterCodes + + paragraphSeparator = 8233, +>paragraphSeparator : CharacterCodes + + nextLine = 133, +>nextLine : CharacterCodes + + space = 32, +>space : CharacterCodes + + nonBreakingSpace = 160, +>nonBreakingSpace : CharacterCodes + + enQuad = 8192, +>enQuad : CharacterCodes + + emQuad = 8193, +>emQuad : CharacterCodes + + enSpace = 8194, +>enSpace : CharacterCodes + + emSpace = 8195, +>emSpace : CharacterCodes + + threePerEmSpace = 8196, +>threePerEmSpace : CharacterCodes + + fourPerEmSpace = 8197, +>fourPerEmSpace : CharacterCodes + + sixPerEmSpace = 8198, +>sixPerEmSpace : CharacterCodes + + figureSpace = 8199, +>figureSpace : CharacterCodes + + punctuationSpace = 8200, +>punctuationSpace : CharacterCodes + + thinSpace = 8201, +>thinSpace : CharacterCodes + + hairSpace = 8202, +>hairSpace : CharacterCodes + + zeroWidthSpace = 8203, +>zeroWidthSpace : CharacterCodes + + narrowNoBreakSpace = 8239, +>narrowNoBreakSpace : CharacterCodes + + ideographicSpace = 12288, +>ideographicSpace : CharacterCodes + + mathematicalSpace = 8287, +>mathematicalSpace : CharacterCodes + + ogham = 5760, +>ogham : CharacterCodes + + _ = 95, +>_ : CharacterCodes + + $ = 36, +>$ : CharacterCodes + + _0 = 48, +>_0 : CharacterCodes + + _1 = 49, +>_1 : CharacterCodes + + _2 = 50, +>_2 : CharacterCodes + + _3 = 51, +>_3 : CharacterCodes + + _4 = 52, +>_4 : CharacterCodes + + _5 = 53, +>_5 : CharacterCodes + + _6 = 54, +>_6 : CharacterCodes + + _7 = 55, +>_7 : CharacterCodes + + _8 = 56, +>_8 : CharacterCodes + + _9 = 57, +>_9 : CharacterCodes + + a = 97, +>a : CharacterCodes + + b = 98, +>b : CharacterCodes + + c = 99, +>c : CharacterCodes + + d = 100, +>d : CharacterCodes + + e = 101, +>e : CharacterCodes + + f = 102, +>f : CharacterCodes + + g = 103, +>g : CharacterCodes + + h = 104, +>h : CharacterCodes + + i = 105, +>i : CharacterCodes + + j = 106, +>j : CharacterCodes + + k = 107, +>k : CharacterCodes + + l = 108, +>l : CharacterCodes + + m = 109, +>m : CharacterCodes + + n = 110, +>n : CharacterCodes + + o = 111, +>o : CharacterCodes + + p = 112, +>p : CharacterCodes + + q = 113, +>q : CharacterCodes + + r = 114, +>r : CharacterCodes + + s = 115, +>s : CharacterCodes + + t = 116, +>t : CharacterCodes + + u = 117, +>u : CharacterCodes + + v = 118, +>v : CharacterCodes + + w = 119, +>w : CharacterCodes + + x = 120, +>x : CharacterCodes + + y = 121, +>y : CharacterCodes + + z = 122, +>z : CharacterCodes + + A = 65, +>A : CharacterCodes + + B = 66, +>B : CharacterCodes + + C = 67, +>C : CharacterCodes + + D = 68, +>D : CharacterCodes + + E = 69, +>E : CharacterCodes + + F = 70, +>F : CharacterCodes + + G = 71, +>G : CharacterCodes + + H = 72, +>H : CharacterCodes + + I = 73, +>I : CharacterCodes + + J = 74, +>J : CharacterCodes + + K = 75, +>K : CharacterCodes + + L = 76, +>L : CharacterCodes + + M = 77, +>M : CharacterCodes + + N = 78, +>N : CharacterCodes + + O = 79, +>O : CharacterCodes + + P = 80, +>P : CharacterCodes + + Q = 81, +>Q : CharacterCodes + + R = 82, +>R : CharacterCodes + + S = 83, +>S : CharacterCodes + + T = 84, +>T : CharacterCodes + + U = 85, +>U : CharacterCodes + + V = 86, +>V : CharacterCodes + + W = 87, +>W : CharacterCodes + + X = 88, +>X : CharacterCodes + + Y = 89, +>Y : CharacterCodes + + Z = 90, +>Z : CharacterCodes + + ampersand = 38, +>ampersand : CharacterCodes + + asterisk = 42, +>asterisk : CharacterCodes + + at = 64, +>at : CharacterCodes + + backslash = 92, +>backslash : CharacterCodes + + backtick = 96, +>backtick : CharacterCodes + + bar = 124, +>bar : CharacterCodes + + caret = 94, +>caret : CharacterCodes + + closeBrace = 125, +>closeBrace : CharacterCodes + + closeBracket = 93, +>closeBracket : CharacterCodes + + closeParen = 41, +>closeParen : CharacterCodes + + colon = 58, +>colon : CharacterCodes + + comma = 44, +>comma : CharacterCodes + + dot = 46, +>dot : CharacterCodes + + doubleQuote = 34, +>doubleQuote : CharacterCodes + + equals = 61, +>equals : CharacterCodes + + exclamation = 33, +>exclamation : CharacterCodes + + greaterThan = 62, +>greaterThan : CharacterCodes + + lessThan = 60, +>lessThan : CharacterCodes + + minus = 45, +>minus : CharacterCodes + + openBrace = 123, +>openBrace : CharacterCodes + + openBracket = 91, +>openBracket : CharacterCodes + + openParen = 40, +>openParen : CharacterCodes + + percent = 37, +>percent : CharacterCodes + + plus = 43, +>plus : CharacterCodes + + question = 63, +>question : CharacterCodes + + semicolon = 59, +>semicolon : CharacterCodes + + singleQuote = 39, +>singleQuote : CharacterCodes + + slash = 47, +>slash : CharacterCodes + + tilde = 126, +>tilde : CharacterCodes + + backspace = 8, +>backspace : CharacterCodes + + formFeed = 12, +>formFeed : CharacterCodes + + byteOrderMark = 65279, +>byteOrderMark : CharacterCodes + + tab = 9, +>tab : CharacterCodes + + verticalTab = 11, +>verticalTab : CharacterCodes + } + interface CancellationToken { +>CancellationToken : CancellationToken + + isCancellationRequested(): boolean; +>isCancellationRequested : () => boolean + } + interface CompilerHost { +>CompilerHost : CompilerHost + + getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; +>getSourceFile : (filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void) => SourceFile +>filename : string +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget +>onError : (message: string) => void +>message : string +>SourceFile : SourceFile + + getDefaultLibFilename(options: CompilerOptions): string; +>getDefaultLibFilename : (options: CompilerOptions) => string +>options : CompilerOptions +>CompilerOptions : CompilerOptions + + getCancellationToken?(): CancellationToken; +>getCancellationToken : () => CancellationToken +>CancellationToken : CancellationToken + + writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; +>writeFile : (filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void) => void +>filename : string +>data : string +>writeByteOrderMark : boolean +>onError : (message: string) => void +>message : string + + getCurrentDirectory(): string; +>getCurrentDirectory : () => string + + getCanonicalFileName(fileName: string): string; +>getCanonicalFileName : (fileName: string) => string +>fileName : string + + useCaseSensitiveFileNames(): boolean; +>useCaseSensitiveFileNames : () => boolean + + getNewLine(): string; +>getNewLine : () => string + } +} +declare module "typescript" { + interface ErrorCallback { +>ErrorCallback : ErrorCallback + + (message: DiagnosticMessage): void; +>message : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + } + interface CommentCallback { +>CommentCallback : CommentCallback + + (pos: number, end: number): void; +>pos : number +>end : number + } + interface Scanner { +>Scanner : Scanner + + getStartPos(): number; +>getStartPos : () => number + + getToken(): SyntaxKind; +>getToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + getTextPos(): number; +>getTextPos : () => number + + getTokenPos(): number; +>getTokenPos : () => number + + getTokenText(): string; +>getTokenText : () => string + + getTokenValue(): string; +>getTokenValue : () => string + + hasPrecedingLineBreak(): boolean; +>hasPrecedingLineBreak : () => boolean + + isIdentifier(): boolean; +>isIdentifier : () => boolean + + isReservedWord(): boolean; +>isReservedWord : () => boolean + + isUnterminated(): boolean; +>isUnterminated : () => boolean + + reScanGreaterToken(): SyntaxKind; +>reScanGreaterToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + reScanSlashToken(): SyntaxKind; +>reScanSlashToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + reScanTemplateToken(): SyntaxKind; +>reScanTemplateToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + scan(): SyntaxKind; +>scan : () => SyntaxKind +>SyntaxKind : SyntaxKind + + setText(text: string): void; +>setText : (text: string) => void +>text : string + + setTextPos(textPos: number): void; +>setTextPos : (textPos: number) => void +>textPos : number + + lookAhead(callback: () => T): T; +>lookAhead : (callback: () => T) => T +>T : T +>callback : () => T +>T : T +>T : T + + tryScan(callback: () => T): T; +>tryScan : (callback: () => T) => T +>T : T +>callback : () => T +>T : T +>T : T + } + function tokenToString(t: SyntaxKind): string; +>tokenToString : (t: SyntaxKind) => string +>t : SyntaxKind +>SyntaxKind : SyntaxKind + + function computeLineStarts(text: string): number[]; +>computeLineStarts : (text: string) => number[] +>text : string + + function getPositionFromLineAndCharacter(lineStarts: number[], line: number, character: number): number; +>getPositionFromLineAndCharacter : (lineStarts: number[], line: number, character: number) => number +>lineStarts : number[] +>line : number +>character : number + + function getLineAndCharacterOfPosition(lineStarts: number[], position: number): { +>getLineAndCharacterOfPosition : (lineStarts: number[], position: number) => { line: number; character: number; } +>lineStarts : number[] +>position : number + + line: number; +>line : number + + character: number; +>character : number + + }; + function positionToLineAndCharacter(text: string, pos: number): { +>positionToLineAndCharacter : (text: string, pos: number) => { line: number; character: number; } +>text : string +>pos : number + + line: number; +>line : number + + character: number; +>character : number + + }; + function isWhiteSpace(ch: number): boolean; +>isWhiteSpace : (ch: number) => boolean +>ch : number + + function isLineBreak(ch: number): boolean; +>isLineBreak : (ch: number) => boolean +>ch : number + + function isOctalDigit(ch: number): boolean; +>isOctalDigit : (ch: number) => boolean +>ch : number + + function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean): number; +>skipTrivia : (text: string, pos: number, stopAfterLineBreak?: boolean) => number +>text : string +>pos : number +>stopAfterLineBreak : boolean + + function getLeadingCommentRanges(text: string, pos: number): CommentRange[]; +>getLeadingCommentRanges : (text: string, pos: number) => CommentRange[] +>text : string +>pos : number +>CommentRange : CommentRange + + function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; +>getTrailingCommentRanges : (text: string, pos: number) => CommentRange[] +>text : string +>pos : number +>CommentRange : CommentRange + + function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; +>isIdentifierStart : (ch: number, languageVersion: ScriptTarget) => boolean +>ch : number +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget + + function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; +>isIdentifierPart : (ch: number, languageVersion: ScriptTarget) => boolean +>ch : number +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget + + function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner; +>createScanner : (languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback) => Scanner +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget +>skipTrivia : boolean +>text : string +>onError : ErrorCallback +>ErrorCallback : ErrorCallback +>Scanner : Scanner +} +declare module "typescript" { + function getNodeConstructor(kind: SyntaxKind): new () => Node; +>getNodeConstructor : (kind: SyntaxKind) => new () => Node +>kind : SyntaxKind +>SyntaxKind : SyntaxKind +>Node : Node + + function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; +>forEachChild : (node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T) => T +>T : T +>node : Node +>Node : Node +>cbNode : (node: Node) => T +>node : Node +>Node : Node +>T : T +>cbNodes : (nodes: Node[]) => T +>nodes : Node[] +>Node : Node +>T : T +>T : T + + function createCompilerHost(options: CompilerOptions): CompilerHost; +>createCompilerHost : (options: CompilerOptions) => CompilerHost +>options : CompilerOptions +>CompilerOptions : CompilerOptions +>CompilerHost : CompilerHost + + function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; +>createSourceFile : (filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean) => SourceFile +>filename : string +>sourceText : string +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget +>version : string +>isOpen : boolean +>SourceFile : SourceFile + + function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; +>createProgram : (rootNames: string[], options: CompilerOptions, host: CompilerHost) => Program +>rootNames : string[] +>options : CompilerOptions +>CompilerOptions : CompilerOptions +>host : CompilerHost +>CompilerHost : CompilerHost +>Program : Program +} +declare module "typescript" { + function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; +>createTypeChecker : (program: Program, fullTypeCheck: boolean) => TypeChecker +>program : Program +>Program : Program +>fullTypeCheck : boolean +>TypeChecker : TypeChecker +} +declare module "typescript" { + var servicesVersion: string; +>servicesVersion : string + + interface Node { +>Node : Node + + getSourceFile(): SourceFile; +>getSourceFile : () => SourceFile +>SourceFile : SourceFile + + getChildCount(sourceFile?: SourceFile): number; +>getChildCount : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getChildAt(index: number, sourceFile?: SourceFile): Node; +>getChildAt : (index: number, sourceFile?: SourceFile) => Node +>index : number +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + + getChildren(sourceFile?: SourceFile): Node[]; +>getChildren : (sourceFile?: SourceFile) => Node[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + + getStart(sourceFile?: SourceFile): number; +>getStart : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFullStart(): number; +>getFullStart : () => number + + getEnd(): number; +>getEnd : () => number + + getWidth(sourceFile?: SourceFile): number; +>getWidth : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFullWidth(): number; +>getFullWidth : () => number + + getLeadingTriviaWidth(sourceFile?: SourceFile): number; +>getLeadingTriviaWidth : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFullText(sourceFile?: SourceFile): string; +>getFullText : (sourceFile?: SourceFile) => string +>sourceFile : SourceFile +>SourceFile : SourceFile + + getText(sourceFile?: SourceFile): string; +>getText : (sourceFile?: SourceFile) => string +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFirstToken(sourceFile?: SourceFile): Node; +>getFirstToken : (sourceFile?: SourceFile) => Node +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + + getLastToken(sourceFile?: SourceFile): Node; +>getLastToken : (sourceFile?: SourceFile) => Node +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + } + interface Symbol { +>Symbol : Symbol + + getFlags(): SymbolFlags; +>getFlags : () => SymbolFlags +>SymbolFlags : SymbolFlags + + getName(): string; +>getName : () => string + + getDeclarations(): Declaration[]; +>getDeclarations : () => Declaration[] +>Declaration : Declaration + + getDocumentationComment(): SymbolDisplayPart[]; +>getDocumentationComment : () => SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface Type { +>Type : Type + + getFlags(): TypeFlags; +>getFlags : () => TypeFlags +>TypeFlags : TypeFlags + + getSymbol(): Symbol; +>getSymbol : () => Symbol +>Symbol : Symbol + + getProperties(): Symbol[]; +>getProperties : () => Symbol[] +>Symbol : Symbol + + getProperty(propertyName: string): Symbol; +>getProperty : (propertyName: string) => Symbol +>propertyName : string +>Symbol : Symbol + + getApparentProperties(): Symbol[]; +>getApparentProperties : () => Symbol[] +>Symbol : Symbol + + getCallSignatures(): Signature[]; +>getCallSignatures : () => Signature[] +>Signature : Signature + + getConstructSignatures(): Signature[]; +>getConstructSignatures : () => Signature[] +>Signature : Signature + + getStringIndexType(): Type; +>getStringIndexType : () => Type +>Type : Type + + getNumberIndexType(): Type; +>getNumberIndexType : () => Type +>Type : Type + } + interface Signature { +>Signature : Signature + + getDeclaration(): SignatureDeclaration; +>getDeclaration : () => SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration + + getTypeParameters(): Type[]; +>getTypeParameters : () => Type[] +>Type : Type + + getParameters(): Symbol[]; +>getParameters : () => Symbol[] +>Symbol : Symbol + + getReturnType(): Type; +>getReturnType : () => Type +>Type : Type + + getDocumentationComment(): SymbolDisplayPart[]; +>getDocumentationComment : () => SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface SourceFile { +>SourceFile : SourceFile + + getScriptSnapshot(): IScriptSnapshot; +>getScriptSnapshot : () => IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot + + getNamedDeclarations(): Declaration[]; +>getNamedDeclarations : () => Declaration[] +>Declaration : Declaration + + update(scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; +>update : (scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange) => SourceFile +>scriptSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>version : string +>isOpen : boolean +>textChangeRange : TextChangeRange +>TextChangeRange : TextChangeRange +>SourceFile : SourceFile + } + /** + * Represents an immutable snapshot of a script at a specified time.Once acquired, the + * snapshot is observably immutable. i.e. the same calls with the same parameters will return + * the same values. + */ + interface IScriptSnapshot { +>IScriptSnapshot : IScriptSnapshot + + /** Gets a portion of the script snapshot specified by [start, end). */ + getText(start: number, end: number): string; +>getText : (start: number, end: number) => string +>start : number +>end : number + + /** Gets the length of this script snapshot. */ + getLength(): number; +>getLength : () => number + + /** + * This call returns the array containing the start position of every line. + * i.e."[0, 10, 55]". TODO: consider making this optional. The language service could + * always determine this (albeit in a more expensive manner). + */ + getLineStartPositions(): number[]; +>getLineStartPositions : () => number[] + + /** + * Gets the TextChangeRange that describe how the text changed between this text and + * an older version. This information is used by the incremental parser to determine + * what sections of the script need to be re-parsed. 'undefined' can be returned if the + * change range cannot be determined. However, in that case, incremental parsing will + * not happen and the entire document will be re - parsed. + */ + getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; +>getChangeRange : (oldSnapshot: IScriptSnapshot) => TextChangeRange +>oldSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>TextChangeRange : TextChangeRange + } + module ScriptSnapshot { +>ScriptSnapshot : typeof ScriptSnapshot + + function fromString(text: string): IScriptSnapshot; +>fromString : (text: string) => IScriptSnapshot +>text : string +>IScriptSnapshot : IScriptSnapshot + } + interface PreProcessedFileInfo { +>PreProcessedFileInfo : PreProcessedFileInfo + + referencedFiles: FileReference[]; +>referencedFiles : FileReference[] +>FileReference : FileReference + + importedFiles: FileReference[]; +>importedFiles : FileReference[] +>FileReference : FileReference + + isLibFile: boolean; +>isLibFile : boolean + } + interface Logger { +>Logger : Logger + + log(s: string): void; +>log : (s: string) => void +>s : string + } + interface LanguageServiceHost extends Logger { +>LanguageServiceHost : LanguageServiceHost +>Logger : Logger + + getCompilationSettings(): CompilerOptions; +>getCompilationSettings : () => CompilerOptions +>CompilerOptions : CompilerOptions + + getScriptFileNames(): string[]; +>getScriptFileNames : () => string[] + + getScriptVersion(fileName: string): string; +>getScriptVersion : (fileName: string) => string +>fileName : string + + getScriptIsOpen(fileName: string): boolean; +>getScriptIsOpen : (fileName: string) => boolean +>fileName : string + + getScriptSnapshot(fileName: string): IScriptSnapshot; +>getScriptSnapshot : (fileName: string) => IScriptSnapshot +>fileName : string +>IScriptSnapshot : IScriptSnapshot + + getLocalizedDiagnosticMessages?(): any; +>getLocalizedDiagnosticMessages : () => any + + getCancellationToken?(): CancellationToken; +>getCancellationToken : () => CancellationToken +>CancellationToken : CancellationToken + + getCurrentDirectory(): string; +>getCurrentDirectory : () => string + + getDefaultLibFilename(options: CompilerOptions): string; +>getDefaultLibFilename : (options: CompilerOptions) => string +>options : CompilerOptions +>CompilerOptions : CompilerOptions + } + interface LanguageService { +>LanguageService : LanguageService + + cleanupSemanticCache(): void; +>cleanupSemanticCache : () => void + + getSyntacticDiagnostics(fileName: string): Diagnostic[]; +>getSyntacticDiagnostics : (fileName: string) => Diagnostic[] +>fileName : string +>Diagnostic : Diagnostic + + getSemanticDiagnostics(fileName: string): Diagnostic[]; +>getSemanticDiagnostics : (fileName: string) => Diagnostic[] +>fileName : string +>Diagnostic : Diagnostic + + getCompilerOptionsDiagnostics(): Diagnostic[]; +>getCompilerOptionsDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; +>getSyntacticClassifications : (fileName: string, span: TextSpan) => ClassifiedSpan[] +>fileName : string +>span : TextSpan +>TextSpan : TextSpan +>ClassifiedSpan : ClassifiedSpan + + getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; +>getSemanticClassifications : (fileName: string, span: TextSpan) => ClassifiedSpan[] +>fileName : string +>span : TextSpan +>TextSpan : TextSpan +>ClassifiedSpan : ClassifiedSpan + + getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; +>getCompletionsAtPosition : (fileName: string, position: number) => CompletionInfo +>fileName : string +>position : number +>CompletionInfo : CompletionInfo + + getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; +>getCompletionEntryDetails : (fileName: string, position: number, entryName: string) => CompletionEntryDetails +>fileName : string +>position : number +>entryName : string +>CompletionEntryDetails : CompletionEntryDetails + + getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; +>getQuickInfoAtPosition : (fileName: string, position: number) => QuickInfo +>fileName : string +>position : number +>QuickInfo : QuickInfo + + getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; +>getNameOrDottedNameSpan : (fileName: string, startPos: number, endPos: number) => TextSpan +>fileName : string +>startPos : number +>endPos : number +>TextSpan : TextSpan + + getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan; +>getBreakpointStatementAtPosition : (fileName: string, position: number) => TextSpan +>fileName : string +>position : number +>TextSpan : TextSpan + + getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems; +>getSignatureHelpItems : (fileName: string, position: number) => SignatureHelpItems +>fileName : string +>position : number +>SignatureHelpItems : SignatureHelpItems + + getRenameInfo(fileName: string, position: number): RenameInfo; +>getRenameInfo : (fileName: string, position: number) => RenameInfo +>fileName : string +>position : number +>RenameInfo : RenameInfo + + findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[]; +>findRenameLocations : (fileName: string, position: number, findInStrings: boolean, findInComments: boolean) => RenameLocation[] +>fileName : string +>position : number +>findInStrings : boolean +>findInComments : boolean +>RenameLocation : RenameLocation + + getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; +>getDefinitionAtPosition : (fileName: string, position: number) => DefinitionInfo[] +>fileName : string +>position : number +>DefinitionInfo : DefinitionInfo + + getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; +>getReferencesAtPosition : (fileName: string, position: number) => ReferenceEntry[] +>fileName : string +>position : number +>ReferenceEntry : ReferenceEntry + + getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; +>getOccurrencesAtPosition : (fileName: string, position: number) => ReferenceEntry[] +>fileName : string +>position : number +>ReferenceEntry : ReferenceEntry + + getNavigateToItems(searchValue: string): NavigateToItem[]; +>getNavigateToItems : (searchValue: string) => NavigateToItem[] +>searchValue : string +>NavigateToItem : NavigateToItem + + getNavigationBarItems(fileName: string): NavigationBarItem[]; +>getNavigationBarItems : (fileName: string) => NavigationBarItem[] +>fileName : string +>NavigationBarItem : NavigationBarItem + + getOutliningSpans(fileName: string): OutliningSpan[]; +>getOutliningSpans : (fileName: string) => OutliningSpan[] +>fileName : string +>OutliningSpan : OutliningSpan + + getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; +>getTodoComments : (fileName: string, descriptors: TodoCommentDescriptor[]) => TodoComment[] +>fileName : string +>descriptors : TodoCommentDescriptor[] +>TodoCommentDescriptor : TodoCommentDescriptor +>TodoComment : TodoComment + + getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; +>getBraceMatchingAtPosition : (fileName: string, position: number) => TextSpan[] +>fileName : string +>position : number +>TextSpan : TextSpan + + getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number; +>getIndentationAtPosition : (fileName: string, position: number, options: EditorOptions) => number +>fileName : string +>position : number +>options : EditorOptions +>EditorOptions : EditorOptions + + getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[]; +>getFormattingEditsForRange : (fileName: string, start: number, end: number, options: FormatCodeOptions) => TextChange[] +>fileName : string +>start : number +>end : number +>options : FormatCodeOptions +>FormatCodeOptions : FormatCodeOptions +>TextChange : TextChange + + getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; +>getFormattingEditsForDocument : (fileName: string, options: FormatCodeOptions) => TextChange[] +>fileName : string +>options : FormatCodeOptions +>FormatCodeOptions : FormatCodeOptions +>TextChange : TextChange + + getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[]; +>getFormattingEditsAfterKeystroke : (fileName: string, position: number, key: string, options: FormatCodeOptions) => TextChange[] +>fileName : string +>position : number +>key : string +>options : FormatCodeOptions +>FormatCodeOptions : FormatCodeOptions +>TextChange : TextChange + + getEmitOutput(fileName: string): EmitOutput; +>getEmitOutput : (fileName: string) => EmitOutput +>fileName : string +>EmitOutput : EmitOutput + + getSourceFile(filename: string): SourceFile; +>getSourceFile : (filename: string) => SourceFile +>filename : string +>SourceFile : SourceFile + + dispose(): void; +>dispose : () => void + } + class TextSpan { +>TextSpan : TextSpan + + private _start; +>_start : any + + private _length; +>_length : any + + /** + * Creates a TextSpan instance beginning with the position Start and having the Length + * specified with length. + */ + constructor(start: number, length: number); +>start : number +>length : number + + toJSON(key: any): any; +>toJSON : (key: any) => any +>key : any + + start(): number; +>start : () => number + + length(): number; +>length : () => number + + end(): number; +>end : () => number + + isEmpty(): boolean; +>isEmpty : () => boolean + + /** + * Determines whether the position lies within the span. Returns true if the position is greater than or equal to Start and strictly less + * than End, otherwise false. + * @param position The position to check. + */ + containsPosition(position: number): boolean; +>containsPosition : (position: number) => boolean +>position : number + + /** + * Determines whether span falls completely within this span. Returns true if the specified span falls completely within this span, otherwise false. + * @param span The span to check. + */ + containsTextSpan(span: TextSpan): boolean; +>containsTextSpan : (span: TextSpan) => boolean +>span : TextSpan +>TextSpan : TextSpan + + /** + * Determines whether the given span overlaps this span. Two spans are considered to overlap + * if they have positions in common and neither is empty. Empty spans do not overlap with any + * other span. Returns true if the spans overlap, false otherwise. + * @param span The span to check. + */ + overlapsWith(span: TextSpan): boolean; +>overlapsWith : (span: TextSpan) => boolean +>span : TextSpan +>TextSpan : TextSpan + + /** + * Returns the overlap with the given span, or undefined if there is no overlap. + * @param span The span to check. + */ + overlap(span: TextSpan): TextSpan; +>overlap : (span: TextSpan) => TextSpan +>span : TextSpan +>TextSpan : TextSpan +>TextSpan : TextSpan + + /** + * Determines whether span intersects this span. Two spans are considered to + * intersect if they have positions in common or the end of one span + * coincides with the start of the other span. Returns true if the spans intersect, false otherwise. + * @param The span to check. + */ + intersectsWithTextSpan(span: TextSpan): boolean; +>intersectsWithTextSpan : (span: TextSpan) => boolean +>span : TextSpan +>TextSpan : TextSpan + + intersectsWith(start: number, length: number): boolean; +>intersectsWith : (start: number, length: number) => boolean +>start : number +>length : number + + /** + * Determines whether the given position intersects this span. + * A position is considered to intersect if it is between the start and + * end positions (inclusive) of this span. Returns true if the position intersects, false otherwise. + * @param position The position to check. + */ + intersectsWithPosition(position: number): boolean; +>intersectsWithPosition : (position: number) => boolean +>position : number + + /** + * Returns the intersection with the given span, or undefined if there is no intersection. + * @param span The span to check. + */ + intersection(span: TextSpan): TextSpan; +>intersection : (span: TextSpan) => TextSpan +>span : TextSpan +>TextSpan : TextSpan +>TextSpan : TextSpan + + /** + * Creates a new TextSpan from the given start and end positions + * as opposed to a position and length. + */ + static fromBounds(start: number, end: number): TextSpan; +>fromBounds : (start: number, end: number) => TextSpan +>start : number +>end : number +>TextSpan : TextSpan + } + class TextChangeRange { +>TextChangeRange : TextChangeRange + + static unchanged: TextChangeRange; +>unchanged : TextChangeRange +>TextChangeRange : TextChangeRange + + private _span; +>_span : any + + private _newLength; +>_newLength : any + + /** + * Initializes a new instance of TextChangeRange. + */ + constructor(span: TextSpan, newLength: number); +>span : TextSpan +>TextSpan : TextSpan +>newLength : number + + /** + * The span of text before the edit which is being changed + */ + span(): TextSpan; +>span : () => TextSpan +>TextSpan : TextSpan + + /** + * Width of the span after the edit. A 0 here would represent a delete + */ + newLength(): number; +>newLength : () => number + + newSpan(): TextSpan; +>newSpan : () => TextSpan +>TextSpan : TextSpan + + isUnchanged(): boolean; +>isUnchanged : () => boolean + + /** + * Called to merge all the changes that occurred across several versions of a script snapshot + * into a single change. i.e. if a user keeps making successive edits to a script we will + * have a text change from V1 to V2, V2 to V3, ..., Vn. + * + * This function will then merge those changes into a single change range valid between V1 and + * Vn. + */ + static collapseChangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; +>collapseChangesAcrossMultipleVersions : (changes: TextChangeRange[]) => TextChangeRange +>changes : TextChangeRange[] +>TextChangeRange : TextChangeRange +>TextChangeRange : TextChangeRange + } + interface ClassifiedSpan { +>ClassifiedSpan : ClassifiedSpan + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + classificationType: string; +>classificationType : string + } + interface NavigationBarItem { +>NavigationBarItem : NavigationBarItem + + text: string; +>text : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + spans: TextSpan[]; +>spans : TextSpan[] +>TextSpan : TextSpan + + childItems: NavigationBarItem[]; +>childItems : NavigationBarItem[] +>NavigationBarItem : NavigationBarItem + + indent: number; +>indent : number + + bolded: boolean; +>bolded : boolean + + grayed: boolean; +>grayed : boolean + } + interface TodoCommentDescriptor { +>TodoCommentDescriptor : TodoCommentDescriptor + + text: string; +>text : string + + priority: number; +>priority : number + } + interface TodoComment { +>TodoComment : TodoComment + + descriptor: TodoCommentDescriptor; +>descriptor : TodoCommentDescriptor +>TodoCommentDescriptor : TodoCommentDescriptor + + message: string; +>message : string + + position: number; +>position : number + } + class TextChange { +>TextChange : TextChange + + span: TextSpan; +>span : TextSpan +>TextSpan : TextSpan + + newText: string; +>newText : string + } + interface RenameLocation { +>RenameLocation : RenameLocation + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + fileName: string; +>fileName : string + } + interface ReferenceEntry { +>ReferenceEntry : ReferenceEntry + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + fileName: string; +>fileName : string + + isWriteAccess: boolean; +>isWriteAccess : boolean + } + interface NavigateToItem { +>NavigateToItem : NavigateToItem + + name: string; +>name : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + matchKind: string; +>matchKind : string + + fileName: string; +>fileName : string + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + containerName: string; +>containerName : string + + containerKind: string; +>containerKind : string + } + interface EditorOptions { +>EditorOptions : EditorOptions + + IndentSize: number; +>IndentSize : number + + TabSize: number; +>TabSize : number + + NewLineCharacter: string; +>NewLineCharacter : string + + ConvertTabsToSpaces: boolean; +>ConvertTabsToSpaces : boolean + } + interface FormatCodeOptions extends EditorOptions { +>FormatCodeOptions : FormatCodeOptions +>EditorOptions : EditorOptions + + InsertSpaceAfterCommaDelimiter: boolean; +>InsertSpaceAfterCommaDelimiter : boolean + + InsertSpaceAfterSemicolonInForStatements: boolean; +>InsertSpaceAfterSemicolonInForStatements : boolean + + InsertSpaceBeforeAndAfterBinaryOperators: boolean; +>InsertSpaceBeforeAndAfterBinaryOperators : boolean + + InsertSpaceAfterKeywordsInControlFlowStatements: boolean; +>InsertSpaceAfterKeywordsInControlFlowStatements : boolean + + InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; +>InsertSpaceAfterFunctionKeywordForAnonymousFunctions : boolean + + InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; +>InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis : boolean + + PlaceOpenBraceOnNewLineForFunctions: boolean; +>PlaceOpenBraceOnNewLineForFunctions : boolean + + PlaceOpenBraceOnNewLineForControlBlocks: boolean; +>PlaceOpenBraceOnNewLineForControlBlocks : boolean + } + interface DefinitionInfo { +>DefinitionInfo : DefinitionInfo + + fileName: string; +>fileName : string + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + kind: string; +>kind : string + + name: string; +>name : string + + containerKind: string; +>containerKind : string + + containerName: string; +>containerName : string + } + enum SymbolDisplayPartKind { +>SymbolDisplayPartKind : SymbolDisplayPartKind + + aliasName = 0, +>aliasName : SymbolDisplayPartKind + + className = 1, +>className : SymbolDisplayPartKind + + enumName = 2, +>enumName : SymbolDisplayPartKind + + fieldName = 3, +>fieldName : SymbolDisplayPartKind + + interfaceName = 4, +>interfaceName : SymbolDisplayPartKind + + keyword = 5, +>keyword : SymbolDisplayPartKind + + lineBreak = 6, +>lineBreak : SymbolDisplayPartKind + + numericLiteral = 7, +>numericLiteral : SymbolDisplayPartKind + + stringLiteral = 8, +>stringLiteral : SymbolDisplayPartKind + + localName = 9, +>localName : SymbolDisplayPartKind + + methodName = 10, +>methodName : SymbolDisplayPartKind + + moduleName = 11, +>moduleName : SymbolDisplayPartKind + + operator = 12, +>operator : SymbolDisplayPartKind + + parameterName = 13, +>parameterName : SymbolDisplayPartKind + + propertyName = 14, +>propertyName : SymbolDisplayPartKind + + punctuation = 15, +>punctuation : SymbolDisplayPartKind + + space = 16, +>space : SymbolDisplayPartKind + + text = 17, +>text : SymbolDisplayPartKind + + typeParameterName = 18, +>typeParameterName : SymbolDisplayPartKind + + enumMemberName = 19, +>enumMemberName : SymbolDisplayPartKind + + functionName = 20, +>functionName : SymbolDisplayPartKind + + regularExpressionLiteral = 21, +>regularExpressionLiteral : SymbolDisplayPartKind + } + interface SymbolDisplayPart { +>SymbolDisplayPart : SymbolDisplayPart + + text: string; +>text : string + + kind: string; +>kind : string + } + interface QuickInfo { +>QuickInfo : QuickInfo + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + displayParts: SymbolDisplayPart[]; +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface RenameInfo { +>RenameInfo : RenameInfo + + canRename: boolean; +>canRename : boolean + + localizedErrorMessage: string; +>localizedErrorMessage : string + + displayName: string; +>displayName : string + + fullDisplayName: string; +>fullDisplayName : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + triggerSpan: TextSpan; +>triggerSpan : TextSpan +>TextSpan : TextSpan + } + interface SignatureHelpParameter { +>SignatureHelpParameter : SignatureHelpParameter + + name: string; +>name : string + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + displayParts: SymbolDisplayPart[]; +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + isOptional: boolean; +>isOptional : boolean + } + /** + * Represents a single signature to show in signature help. + * The id is used for subsequent calls into the language service to ask questions about the + * signature help item in the context of any documents that have been updated. i.e. after + * an edit has happened, while signature help is still active, the host can ask important + * questions like 'what parameter is the user currently contained within?'. + */ + interface SignatureHelpItem { +>SignatureHelpItem : SignatureHelpItem + + isVariadic: boolean; +>isVariadic : boolean + + prefixDisplayParts: SymbolDisplayPart[]; +>prefixDisplayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + suffixDisplayParts: SymbolDisplayPart[]; +>suffixDisplayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + separatorDisplayParts: SymbolDisplayPart[]; +>separatorDisplayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + parameters: SignatureHelpParameter[]; +>parameters : SignatureHelpParameter[] +>SignatureHelpParameter : SignatureHelpParameter + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + /** + * Represents a set of signature help items, and the preferred item that should be selected. + */ + interface SignatureHelpItems { +>SignatureHelpItems : SignatureHelpItems + + items: SignatureHelpItem[]; +>items : SignatureHelpItem[] +>SignatureHelpItem : SignatureHelpItem + + applicableSpan: TextSpan; +>applicableSpan : TextSpan +>TextSpan : TextSpan + + selectedItemIndex: number; +>selectedItemIndex : number + + argumentIndex: number; +>argumentIndex : number + + argumentCount: number; +>argumentCount : number + } + interface CompletionInfo { +>CompletionInfo : CompletionInfo + + isMemberCompletion: boolean; +>isMemberCompletion : boolean + + entries: CompletionEntry[]; +>entries : CompletionEntry[] +>CompletionEntry : CompletionEntry + } + interface CompletionEntry { +>CompletionEntry : CompletionEntry + + name: string; +>name : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + } + interface CompletionEntryDetails { +>CompletionEntryDetails : CompletionEntryDetails + + name: string; +>name : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + displayParts: SymbolDisplayPart[]; +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface OutliningSpan { +>OutliningSpan : OutliningSpan + + /** The span of the document to actually collapse. */ + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + /** The span of the document to display when the user hovers over the collapsed span. */ + hintSpan: TextSpan; +>hintSpan : TextSpan +>TextSpan : TextSpan + + /** The text to display in the editor for the collapsed region. */ + bannerText: string; +>bannerText : string + + /** + * Whether or not this region should be automatically collapsed when + * the 'Collapse to Definitions' command is invoked. + */ + autoCollapse: boolean; +>autoCollapse : boolean + } + interface EmitOutput { +>EmitOutput : EmitOutput + + outputFiles: OutputFile[]; +>outputFiles : OutputFile[] +>OutputFile : OutputFile + + emitOutputStatus: EmitReturnStatus; +>emitOutputStatus : EmitReturnStatus +>EmitReturnStatus : EmitReturnStatus + } + const enum OutputFileType { +>OutputFileType : OutputFileType + + JavaScript = 0, +>JavaScript : OutputFileType + + SourceMap = 1, +>SourceMap : OutputFileType + + Declaration = 2, +>Declaration : OutputFileType + } + interface OutputFile { +>OutputFile : OutputFile + + name: string; +>name : string + + writeByteOrderMark: boolean; +>writeByteOrderMark : boolean + + text: string; +>text : string + } + const enum EndOfLineState { +>EndOfLineState : EndOfLineState + + Start = 0, +>Start : EndOfLineState + + InMultiLineCommentTrivia = 1, +>InMultiLineCommentTrivia : EndOfLineState + + InSingleQuoteStringLiteral = 2, +>InSingleQuoteStringLiteral : EndOfLineState + + InDoubleQuoteStringLiteral = 3, +>InDoubleQuoteStringLiteral : EndOfLineState + } + enum TokenClass { +>TokenClass : TokenClass + + Punctuation = 0, +>Punctuation : TokenClass + + Keyword = 1, +>Keyword : TokenClass + + Operator = 2, +>Operator : TokenClass + + Comment = 3, +>Comment : TokenClass + + Whitespace = 4, +>Whitespace : TokenClass + + Identifier = 5, +>Identifier : TokenClass + + NumberLiteral = 6, +>NumberLiteral : TokenClass + + StringLiteral = 7, +>StringLiteral : TokenClass + + RegExpLiteral = 8, +>RegExpLiteral : TokenClass + } + interface ClassificationResult { +>ClassificationResult : ClassificationResult + + finalLexState: EndOfLineState; +>finalLexState : EndOfLineState +>EndOfLineState : EndOfLineState + + entries: ClassificationInfo[]; +>entries : ClassificationInfo[] +>ClassificationInfo : ClassificationInfo + } + interface ClassificationInfo { +>ClassificationInfo : ClassificationInfo + + length: number; +>length : number + + classification: TokenClass; +>classification : TokenClass +>TokenClass : TokenClass + } + interface Classifier { +>Classifier : Classifier + + getClassificationsForLine(text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean): ClassificationResult; +>getClassificationsForLine : (text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean) => ClassificationResult +>text : string +>lexState : EndOfLineState +>EndOfLineState : EndOfLineState +>classifyKeywordsInGenerics : boolean +>ClassificationResult : ClassificationResult + } + interface DocumentRegistry { +>DocumentRegistry : DocumentRegistry + + acquireDocument(filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean): SourceFile; +>acquireDocument : (filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean) => SourceFile +>filename : string +>compilationSettings : CompilerOptions +>CompilerOptions : CompilerOptions +>scriptSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>version : string +>isOpen : boolean +>SourceFile : SourceFile + + updateDocument(sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; +>updateDocument : (sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange) => SourceFile +>sourceFile : SourceFile +>SourceFile : SourceFile +>filename : string +>compilationSettings : CompilerOptions +>CompilerOptions : CompilerOptions +>scriptSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>version : string +>isOpen : boolean +>textChangeRange : TextChangeRange +>TextChangeRange : TextChangeRange +>SourceFile : SourceFile + + releaseDocument(filename: string, compilationSettings: CompilerOptions): void; +>releaseDocument : (filename: string, compilationSettings: CompilerOptions) => void +>filename : string +>compilationSettings : CompilerOptions +>CompilerOptions : CompilerOptions + } + class ScriptElementKind { +>ScriptElementKind : ScriptElementKind + + static unknown: string; +>unknown : string + + static keyword: string; +>keyword : string + + static scriptElement: string; +>scriptElement : string + + static moduleElement: string; +>moduleElement : string + + static classElement: string; +>classElement : string + + static interfaceElement: string; +>interfaceElement : string + + static typeElement: string; +>typeElement : string + + static enumElement: string; +>enumElement : string + + static variableElement: string; +>variableElement : string + + static localVariableElement: string; +>localVariableElement : string + + static functionElement: string; +>functionElement : string + + static localFunctionElement: string; +>localFunctionElement : string + + static memberFunctionElement: string; +>memberFunctionElement : string + + static memberGetAccessorElement: string; +>memberGetAccessorElement : string + + static memberSetAccessorElement: string; +>memberSetAccessorElement : string + + static memberVariableElement: string; +>memberVariableElement : string + + static constructorImplementationElement: string; +>constructorImplementationElement : string + + static callSignatureElement: string; +>callSignatureElement : string + + static indexSignatureElement: string; +>indexSignatureElement : string + + static constructSignatureElement: string; +>constructSignatureElement : string + + static parameterElement: string; +>parameterElement : string + + static typeParameterElement: string; +>typeParameterElement : string + + static primitiveType: string; +>primitiveType : string + + static label: string; +>label : string + + static alias: string; +>alias : string + + static constElement: string; +>constElement : string + + static letElement: string; +>letElement : string + } + class ScriptElementKindModifier { +>ScriptElementKindModifier : ScriptElementKindModifier + + static none: string; +>none : string + + static publicMemberModifier: string; +>publicMemberModifier : string + + static privateMemberModifier: string; +>privateMemberModifier : string + + static protectedMemberModifier: string; +>protectedMemberModifier : string + + static exportedModifier: string; +>exportedModifier : string + + static ambientModifier: string; +>ambientModifier : string + + static staticModifier: string; +>staticModifier : string + } + class ClassificationTypeNames { +>ClassificationTypeNames : ClassificationTypeNames + + static comment: string; +>comment : string + + static identifier: string; +>identifier : string + + static keyword: string; +>keyword : string + + static numericLiteral: string; +>numericLiteral : string + + static operator: string; +>operator : string + + static stringLiteral: string; +>stringLiteral : string + + static whiteSpace: string; +>whiteSpace : string + + static text: string; +>text : string + + static punctuation: string; +>punctuation : string + + static className: string; +>className : string + + static enumName: string; +>enumName : string + + static interfaceName: string; +>interfaceName : string + + static moduleName: string; +>moduleName : string + + static typeParameterName: string; +>typeParameterName : string + + static typeAlias: string; +>typeAlias : string + } + interface DisplayPartsSymbolWriter extends SymbolWriter { +>DisplayPartsSymbolWriter : DisplayPartsSymbolWriter +>SymbolWriter : SymbolWriter + + displayParts(): SymbolDisplayPart[]; +>displayParts : () => SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + function displayPartsToString(displayParts: SymbolDisplayPart[]): string; +>displayPartsToString : (displayParts: SymbolDisplayPart[]) => string +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + function getDefaultCompilerOptions(): CompilerOptions; +>getDefaultCompilerOptions : () => CompilerOptions +>CompilerOptions : CompilerOptions + + class OperationCanceledException { +>OperationCanceledException : OperationCanceledException + } + class CancellationTokenObject { +>CancellationTokenObject : CancellationTokenObject + + private cancellationToken; +>cancellationToken : any + + static None: CancellationTokenObject; +>None : CancellationTokenObject +>CancellationTokenObject : CancellationTokenObject + + constructor(cancellationToken: CancellationToken); +>cancellationToken : CancellationToken +>CancellationToken : CancellationToken + + isCancellationRequested(): boolean; +>isCancellationRequested : () => boolean + + throwIfCancellationRequested(): void; +>throwIfCancellationRequested : () => void + } + function createDocumentRegistry(): DocumentRegistry; +>createDocumentRegistry : () => DocumentRegistry +>DocumentRegistry : DocumentRegistry + + function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; +>preProcessFile : (sourceText: string, readImportFiles?: boolean) => PreProcessedFileInfo +>sourceText : string +>readImportFiles : boolean +>PreProcessedFileInfo : PreProcessedFileInfo + + function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry): LanguageService; +>createLanguageService : (host: LanguageServiceHost, documentRegistry: DocumentRegistry) => LanguageService +>host : LanguageServiceHost +>LanguageServiceHost : LanguageServiceHost +>documentRegistry : DocumentRegistry +>DocumentRegistry : DocumentRegistry +>LanguageService : LanguageService + + function createClassifier(host: Logger): Classifier; +>createClassifier : (host: Logger) => Classifier +>host : Logger +>Logger : Logger +>Classifier : Classifier +} + diff --git a/tests/baselines/reference/APISample_standalone_compile.js b/tests/baselines/reference/APISample_standalone_compile.js new file mode 100644 index 00000000000..6ba3d4f6b1b --- /dev/null +++ b/tests/baselines/reference/APISample_standalone_compile.js @@ -0,0 +1,1862 @@ +//// [tests/cases/compiler/APISample_standalone_compile.ts] //// + +//// [APISample_standalone_compile.ts] + +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); + +var program = ts.createProgram(["file1.ts"], {}, undefined); +//// [typescriptServices.d.ts] +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + +declare module ts { + interface Map { + [index: string]: T; + } + interface TextRange { + pos: number; + end: number; + } + const enum SyntaxKind { + Unknown = 0, + EndOfFileToken = 1, + SingleLineCommentTrivia = 2, + MultiLineCommentTrivia = 3, + NewLineTrivia = 4, + WhitespaceTrivia = 5, + NumericLiteral = 6, + StringLiteral = 7, + RegularExpressionLiteral = 8, + NoSubstitutionTemplateLiteral = 9, + TemplateHead = 10, + TemplateMiddle = 11, + TemplateTail = 12, + OpenBraceToken = 13, + CloseBraceToken = 14, + OpenParenToken = 15, + CloseParenToken = 16, + OpenBracketToken = 17, + CloseBracketToken = 18, + DotToken = 19, + DotDotDotToken = 20, + SemicolonToken = 21, + CommaToken = 22, + LessThanToken = 23, + GreaterThanToken = 24, + LessThanEqualsToken = 25, + GreaterThanEqualsToken = 26, + EqualsEqualsToken = 27, + ExclamationEqualsToken = 28, + EqualsEqualsEqualsToken = 29, + ExclamationEqualsEqualsToken = 30, + EqualsGreaterThanToken = 31, + PlusToken = 32, + MinusToken = 33, + AsteriskToken = 34, + SlashToken = 35, + PercentToken = 36, + PlusPlusToken = 37, + MinusMinusToken = 38, + LessThanLessThanToken = 39, + GreaterThanGreaterThanToken = 40, + GreaterThanGreaterThanGreaterThanToken = 41, + AmpersandToken = 42, + BarToken = 43, + CaretToken = 44, + ExclamationToken = 45, + TildeToken = 46, + AmpersandAmpersandToken = 47, + BarBarToken = 48, + QuestionToken = 49, + ColonToken = 50, + EqualsToken = 51, + PlusEqualsToken = 52, + MinusEqualsToken = 53, + AsteriskEqualsToken = 54, + SlashEqualsToken = 55, + PercentEqualsToken = 56, + LessThanLessThanEqualsToken = 57, + GreaterThanGreaterThanEqualsToken = 58, + GreaterThanGreaterThanGreaterThanEqualsToken = 59, + AmpersandEqualsToken = 60, + BarEqualsToken = 61, + CaretEqualsToken = 62, + Identifier = 63, + BreakKeyword = 64, + CaseKeyword = 65, + CatchKeyword = 66, + ClassKeyword = 67, + ConstKeyword = 68, + ContinueKeyword = 69, + DebuggerKeyword = 70, + DefaultKeyword = 71, + DeleteKeyword = 72, + DoKeyword = 73, + ElseKeyword = 74, + EnumKeyword = 75, + ExportKeyword = 76, + ExtendsKeyword = 77, + FalseKeyword = 78, + FinallyKeyword = 79, + ForKeyword = 80, + FunctionKeyword = 81, + IfKeyword = 82, + ImportKeyword = 83, + InKeyword = 84, + InstanceOfKeyword = 85, + NewKeyword = 86, + NullKeyword = 87, + ReturnKeyword = 88, + SuperKeyword = 89, + SwitchKeyword = 90, + ThisKeyword = 91, + ThrowKeyword = 92, + TrueKeyword = 93, + TryKeyword = 94, + TypeOfKeyword = 95, + VarKeyword = 96, + VoidKeyword = 97, + WhileKeyword = 98, + WithKeyword = 99, + ImplementsKeyword = 100, + InterfaceKeyword = 101, + LetKeyword = 102, + PackageKeyword = 103, + PrivateKeyword = 104, + ProtectedKeyword = 105, + PublicKeyword = 106, + StaticKeyword = 107, + YieldKeyword = 108, + AnyKeyword = 109, + BooleanKeyword = 110, + ConstructorKeyword = 111, + DeclareKeyword = 112, + GetKeyword = 113, + ModuleKeyword = 114, + RequireKeyword = 115, + NumberKeyword = 116, + SetKeyword = 117, + StringKeyword = 118, + TypeKeyword = 119, + QualifiedName = 120, + ComputedPropertyName = 121, + TypeParameter = 122, + Parameter = 123, + Property = 124, + Method = 125, + Constructor = 126, + GetAccessor = 127, + SetAccessor = 128, + CallSignature = 129, + ConstructSignature = 130, + IndexSignature = 131, + TypeReference = 132, + FunctionType = 133, + ConstructorType = 134, + TypeQuery = 135, + TypeLiteral = 136, + ArrayType = 137, + TupleType = 138, + UnionType = 139, + ParenthesizedType = 140, + ArrayLiteralExpression = 141, + ObjectLiteralExpression = 142, + PropertyAccessExpression = 143, + ElementAccessExpression = 144, + CallExpression = 145, + NewExpression = 146, + TaggedTemplateExpression = 147, + TypeAssertionExpression = 148, + ParenthesizedExpression = 149, + FunctionExpression = 150, + ArrowFunction = 151, + DeleteExpression = 152, + TypeOfExpression = 153, + VoidExpression = 154, + PrefixUnaryExpression = 155, + PostfixUnaryExpression = 156, + BinaryExpression = 157, + ConditionalExpression = 158, + TemplateExpression = 159, + YieldExpression = 160, + OmittedExpression = 161, + TemplateSpan = 162, + Block = 163, + VariableStatement = 164, + EmptyStatement = 165, + ExpressionStatement = 166, + IfStatement = 167, + DoStatement = 168, + WhileStatement = 169, + ForStatement = 170, + ForInStatement = 171, + ContinueStatement = 172, + BreakStatement = 173, + ReturnStatement = 174, + WithStatement = 175, + SwitchStatement = 176, + LabeledStatement = 177, + ThrowStatement = 178, + TryStatement = 179, + TryBlock = 180, + FinallyBlock = 181, + DebuggerStatement = 182, + VariableDeclaration = 183, + FunctionDeclaration = 184, + ClassDeclaration = 185, + InterfaceDeclaration = 186, + TypeAliasDeclaration = 187, + EnumDeclaration = 188, + ModuleDeclaration = 189, + ModuleBlock = 190, + ImportDeclaration = 191, + ExportAssignment = 192, + ExternalModuleReference = 193, + CaseClause = 194, + DefaultClause = 195, + HeritageClause = 196, + CatchClause = 197, + PropertyAssignment = 198, + ShorthandPropertyAssignment = 199, + EnumMember = 200, + SourceFile = 201, + Program = 202, + SyntaxList = 203, + Count = 204, + FirstAssignment = 51, + LastAssignment = 62, + FirstReservedWord = 64, + LastReservedWord = 99, + FirstKeyword = 64, + LastKeyword = 119, + FirstFutureReservedWord = 100, + LastFutureReservedWord = 108, + FirstTypeNode = 132, + LastTypeNode = 140, + FirstPunctuation = 13, + LastPunctuation = 62, + FirstToken = 0, + LastToken = 119, + FirstTriviaToken = 2, + LastTriviaToken = 5, + FirstLiteralToken = 6, + LastLiteralToken = 9, + FirstTemplateToken = 9, + LastTemplateToken = 12, + FirstOperator = 21, + LastOperator = 62, + FirstBinaryOperator = 23, + LastBinaryOperator = 62, + FirstNode = 120, + } + const enum NodeFlags { + Export = 1, + Ambient = 2, + Public = 16, + Private = 32, + Protected = 64, + Static = 128, + MultiLine = 256, + Synthetic = 512, + DeclarationFile = 1024, + Let = 2048, + Const = 4096, + OctalLiteral = 8192, + Modifier = 243, + AccessibilityModifier = 112, + BlockScoped = 6144, + } + const enum ParserContextFlags { + StrictMode = 1, + DisallowIn = 2, + Yield = 4, + GeneratorParameter = 8, + ContainsError = 16, + HasPropagatedChildContainsErrorFlag = 32, + } + interface Node extends TextRange { + kind: SyntaxKind; + flags: NodeFlags; + parserContextFlags?: ParserContextFlags; + id?: number; + parent?: Node; + symbol?: Symbol; + locals?: SymbolTable; + nextContainer?: Node; + localSymbol?: Symbol; + modifiers?: ModifiersArray; + } + interface NodeArray extends Array, TextRange { + hasTrailingComma?: boolean; + } + interface ModifiersArray extends NodeArray { + flags: number; + } + interface Identifier extends PrimaryExpression { + text: string; + } + interface QualifiedName extends Node { + left: EntityName; + right: Identifier; + } + type EntityName = Identifier | QualifiedName; + type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; + interface Declaration extends Node { + _declarationBrand: any; + name?: DeclarationName; + } + interface ComputedPropertyName extends Node { + expression: Expression; + } + interface TypeParameterDeclaration extends Declaration { + name: Identifier; + constraint?: TypeNode; + expression?: Expression; + } + interface SignatureDeclaration extends Declaration { + typeParameters?: NodeArray; + parameters: NodeArray; + type?: TypeNode; + } + interface VariableDeclaration extends Declaration { + name: Identifier; + type?: TypeNode; + initializer?: Expression; + } + interface ParameterDeclaration extends Declaration { + dotDotDotToken?: Node; + name: Identifier; + questionToken?: Node; + type?: TypeNode | StringLiteralExpression; + initializer?: Expression; + } + interface PropertyDeclaration extends Declaration, ClassElement { + _propertyDeclarationBrand: any; + questionToken?: Node; + type?: TypeNode; + initializer?: Expression; + } + type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; + type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; + interface ObjectLiteralElement extends Declaration { + _objectLiteralBrandBrand: any; + } + interface ShorthandPropertyAssignment extends ObjectLiteralElement { + name: Identifier; + questionToken?: Node; + } + interface PropertyAssignment extends ObjectLiteralElement { + _propertyAssignmentBrand: any; + name: DeclarationName; + questionToken?: Node; + initializer: Expression; + } + /** + * Several node kinds share function-like features such as a signature, + * a name, and a body. These nodes should extend FunctionLikeDeclaration. + * Examples: + * FunctionDeclaration + * MethodDeclaration + * AccessorDeclaration + */ + interface FunctionLikeDeclaration extends SignatureDeclaration { + _functionLikeDeclarationBrand: any; + asteriskToken?: Node; + questionToken?: Node; + body?: Block | Expression; + } + interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { + name: Identifier; + body?: Block; + } + interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { + body?: Block; + } + interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { + body?: Block; + } + interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { + _accessorDeclarationBrand: any; + body: Block; + } + interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { + _indexSignatureDeclarationBrand: any; + } + interface TypeNode extends Node { + _typeNodeBrand: any; + } + interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { + _functionOrConstructorTypeNodeBrand: any; + } + interface TypeReferenceNode extends TypeNode { + typeName: EntityName; + typeArguments?: NodeArray; + } + interface TypeQueryNode extends TypeNode { + exprName: EntityName; + } + interface TypeLiteralNode extends TypeNode, Declaration { + members: NodeArray; + } + interface ArrayTypeNode extends TypeNode { + elementType: TypeNode; + } + interface TupleTypeNode extends TypeNode { + elementTypes: NodeArray; + } + interface UnionTypeNode extends TypeNode { + types: NodeArray; + } + interface ParenthesizedTypeNode extends TypeNode { + type: TypeNode; + } + interface Expression extends Node { + _expressionBrand: any; + contextualType?: Type; + } + interface UnaryExpression extends Expression { + _unaryExpressionBrand: any; + } + interface PrefixUnaryExpression extends UnaryExpression { + operator: SyntaxKind; + operand: UnaryExpression; + } + interface PostfixUnaryExpression extends PostfixExpression { + operand: LeftHandSideExpression; + operator: SyntaxKind; + } + interface PostfixExpression extends UnaryExpression { + _postfixExpressionBrand: any; + } + interface LeftHandSideExpression extends PostfixExpression { + _leftHandSideExpressionBrand: any; + } + interface MemberExpression extends LeftHandSideExpression { + _memberExpressionBrand: any; + } + interface PrimaryExpression extends MemberExpression { + _primaryExpressionBrand: any; + } + interface DeleteExpression extends UnaryExpression { + expression: UnaryExpression; + } + interface TypeOfExpression extends UnaryExpression { + expression: UnaryExpression; + } + interface VoidExpression extends UnaryExpression { + expression: UnaryExpression; + } + interface YieldExpression extends Expression { + asteriskToken?: Node; + expression: Expression; + } + interface BinaryExpression extends Expression { + left: Expression; + operator: SyntaxKind; + right: Expression; + } + interface ConditionalExpression extends Expression { + condition: Expression; + whenTrue: Expression; + whenFalse: Expression; + } + interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { + name?: Identifier; + body: Block | Expression; + } + interface LiteralExpression extends PrimaryExpression { + text: string; + isUnterminated?: boolean; + } + interface StringLiteralExpression extends LiteralExpression { + _stringLiteralExpressionBrand: any; + } + interface TemplateExpression extends PrimaryExpression { + head: LiteralExpression; + templateSpans: NodeArray; + } + interface TemplateSpan extends Node { + expression: Expression; + literal: LiteralExpression; + } + interface ParenthesizedExpression extends PrimaryExpression { + expression: Expression; + } + interface ArrayLiteralExpression extends PrimaryExpression { + elements: NodeArray; + } + interface ObjectLiteralExpression extends PrimaryExpression, Declaration { + properties: NodeArray; + } + interface PropertyAccessExpression extends MemberExpression { + expression: LeftHandSideExpression; + name: Identifier; + } + interface ElementAccessExpression extends MemberExpression { + expression: LeftHandSideExpression; + argumentExpression?: Expression; + } + interface CallExpression extends LeftHandSideExpression { + expression: LeftHandSideExpression; + typeArguments?: NodeArray; + arguments: NodeArray; + } + interface NewExpression extends CallExpression, PrimaryExpression { + } + interface TaggedTemplateExpression extends MemberExpression { + tag: LeftHandSideExpression; + template: LiteralExpression | TemplateExpression; + } + type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression; + interface TypeAssertion extends UnaryExpression { + type: TypeNode; + expression: UnaryExpression; + } + interface Statement extends Node, ModuleElement { + _statementBrand: any; + } + interface Block extends Statement { + statements: NodeArray; + } + interface VariableStatement extends Statement { + declarations: NodeArray; + } + interface ExpressionStatement extends Statement { + expression: Expression; + } + interface IfStatement extends Statement { + expression: Expression; + thenStatement: Statement; + elseStatement?: Statement; + } + interface IterationStatement extends Statement { + statement: Statement; + } + interface DoStatement extends IterationStatement { + expression: Expression; + } + interface WhileStatement extends IterationStatement { + expression: Expression; + } + interface ForStatement extends IterationStatement { + declarations?: NodeArray; + initializer?: Expression; + condition?: Expression; + iterator?: Expression; + } + interface ForInStatement extends IterationStatement { + declarations?: NodeArray; + variable?: Expression; + expression: Expression; + } + interface BreakOrContinueStatement extends Statement { + label?: Identifier; + } + interface ReturnStatement extends Statement { + expression?: Expression; + } + interface WithStatement extends Statement { + expression: Expression; + statement: Statement; + } + interface SwitchStatement extends Statement { + expression: Expression; + clauses: NodeArray; + } + interface CaseClause extends Node { + expression?: Expression; + statements: NodeArray; + } + interface DefaultClause extends Node { + statements: NodeArray; + } + type CaseOrDefaultClause = CaseClause | DefaultClause; + interface LabeledStatement extends Statement { + label: Identifier; + statement: Statement; + } + interface ThrowStatement extends Statement { + expression: Expression; + } + interface TryStatement extends Statement { + tryBlock: Block; + catchClause?: CatchClause; + finallyBlock?: Block; + } + interface CatchClause extends Declaration { + name: Identifier; + type?: TypeNode; + block: Block; + } + interface ModuleElement extends Node { + _moduleElementBrand: any; + } + interface ClassDeclaration extends Declaration, ModuleElement { + name: Identifier; + typeParameters?: NodeArray; + heritageClauses?: NodeArray; + members: NodeArray; + } + interface ClassElement extends Declaration { + _classElementBrand: any; + } + interface InterfaceDeclaration extends Declaration, ModuleElement { + name: Identifier; + typeParameters?: NodeArray; + heritageClauses?: NodeArray; + members: NodeArray; + } + interface HeritageClause extends Node { + token: SyntaxKind; + types?: NodeArray; + } + interface TypeAliasDeclaration extends Declaration, ModuleElement { + name: Identifier; + type: TypeNode; + } + interface EnumMember extends Declaration { + name: DeclarationName; + initializer?: Expression; + } + interface EnumDeclaration extends Declaration, ModuleElement { + name: Identifier; + members: NodeArray; + } + interface ModuleDeclaration extends Declaration, ModuleElement { + name: Identifier | LiteralExpression; + body: ModuleBlock | ModuleDeclaration; + } + interface ModuleBlock extends Node, ModuleElement { + statements: NodeArray; + } + interface ImportDeclaration extends Declaration, ModuleElement { + name: Identifier; + moduleReference: EntityName | ExternalModuleReference; + } + interface ExternalModuleReference extends Node { + expression?: Expression; + } + interface ExportAssignment extends Statement, ModuleElement { + exportName: Identifier; + } + interface FileReference extends TextRange { + filename: string; + } + interface CommentRange extends TextRange { + hasTrailingNewLine?: boolean; + } + interface SourceFile extends Declaration { + statements: NodeArray; + endOfFileToken: Node; + filename: string; + text: string; + getLineAndCharacterFromPosition(position: number): LineAndCharacter; + getPositionFromLineAndCharacter(line: number, character: number): number; + getLineStarts(): number[]; + amdDependencies: string[]; + amdModuleName: string; + referencedFiles: FileReference[]; + referenceDiagnostics: Diagnostic[]; + parseDiagnostics: Diagnostic[]; + grammarDiagnostics: Diagnostic[]; + getSyntacticDiagnostics(): Diagnostic[]; + semanticDiagnostics: Diagnostic[]; + hasNoDefaultLib: boolean; + externalModuleIndicator: Node; + nodeCount: number; + identifierCount: number; + symbolCount: number; + isOpen: boolean; + version: string; + languageVersion: ScriptTarget; + identifiers: Map; + } + interface Program { + getSourceFile(filename: string): SourceFile; + getSourceFiles(): SourceFile[]; + getCompilerOptions(): CompilerOptions; + getCompilerHost(): CompilerHost; + getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; + getGlobalDiagnostics(): Diagnostic[]; + getTypeChecker(fullTypeCheckMode: boolean): TypeChecker; + getCommonSourceDirectory(): string; + } + interface SourceMapSpan { + emittedLine: number; + emittedColumn: number; + sourceLine: number; + sourceColumn: number; + nameIndex?: number; + sourceIndex: number; + } + interface SourceMapData { + sourceMapFilePath: string; + jsSourceMappingURL: string; + sourceMapFile: string; + sourceMapSourceRoot: string; + sourceMapSources: string[]; + inputSourceFileNames: string[]; + sourceMapNames?: string[]; + sourceMapMappings: string; + sourceMapDecodedMappings: SourceMapSpan[]; + } + enum EmitReturnStatus { + Succeeded = 0, + AllOutputGenerationSkipped = 1, + JSGeneratedWithSemanticErrors = 2, + DeclarationGenerationSkipped = 3, + EmitErrorsEncountered = 4, + CompilerOptionsErrors = 5, + } + interface EmitResult { + emitResultStatus: EmitReturnStatus; + diagnostics: Diagnostic[]; + sourceMaps: SourceMapData[]; + } + interface TypeChecker { + getProgram(): Program; + getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; + getDeclarationDiagnostics(sourceFile: SourceFile): Diagnostic[]; + getGlobalDiagnostics(): Diagnostic[]; + getNodeCount(): number; + getIdentifierCount(): number; + getSymbolCount(): number; + getTypeCount(): number; + emitFiles(targetSourceFile?: SourceFile): EmitResult; + getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; + getDeclaredTypeOfSymbol(symbol: Symbol): Type; + getPropertiesOfType(type: Type): Symbol[]; + getPropertyOfType(type: Type, propertyName: string): Symbol; + getSignaturesOfType(type: Type, kind: SignatureKind): Signature[]; + getIndexTypeOfType(type: Type, kind: IndexKind): Type; + getReturnTypeOfSignature(signature: Signature): Type; + getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; + getSymbolAtLocation(node: Node): Symbol; + getShorthandAssignmentValueSymbol(location: Node): Symbol; + getTypeAtLocation(node: Node): Type; + typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; + symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; + getSymbolDisplayBuilder(): SymbolDisplayBuilder; + getFullyQualifiedName(symbol: Symbol): string; + getAugmentedPropertiesOfType(type: Type): Symbol[]; + getRootSymbols(symbol: Symbol): Symbol[]; + getContextualType(node: Expression): Type; + getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; + getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; + isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; + isUndefinedSymbol(symbol: Symbol): boolean; + isArgumentsSymbol(symbol: Symbol): boolean; + isEmitBlocked(sourceFile?: SourceFile): boolean; + getEnumMemberValue(node: EnumMember): number; + isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; + getAliasedSymbol(symbol: Symbol): Symbol; + } + interface SymbolDisplayBuilder { + buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void; + buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void; + buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + } + interface SymbolWriter { + writeKeyword(text: string): void; + writeOperator(text: string): void; + writePunctuation(text: string): void; + writeSpace(text: string): void; + writeStringLiteral(text: string): void; + writeParameter(text: string): void; + writeSymbol(text: string, symbol: Symbol): void; + writeLine(): void; + increaseIndent(): void; + decreaseIndent(): void; + clear(): void; + trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void; + } + const enum TypeFormatFlags { + None = 0, + WriteArrayAsGenericType = 1, + UseTypeOfFunction = 2, + NoTruncation = 4, + WriteArrowStyleSignature = 8, + WriteOwnNameForAnyLike = 16, + WriteTypeArgumentsOfSignature = 32, + InElementType = 64, + } + const enum SymbolFormatFlags { + None = 0, + WriteTypeParametersOrArguments = 1, + UseOnlyExternalAliasing = 2, + } + const enum SymbolAccessibility { + Accessible = 0, + NotAccessible = 1, + CannotBeNamed = 2, + } + interface SymbolVisibilityResult { + accessibility: SymbolAccessibility; + aliasesToMakeVisible?: ImportDeclaration[]; + errorSymbolName?: string; + errorNode?: Node; + } + interface SymbolAccessiblityResult extends SymbolVisibilityResult { + errorModuleName?: string; + } + interface EmitResolver { + getProgram(): Program; + getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; + getExpressionNamePrefix(node: Identifier): string; + getExportAssignmentName(node: SourceFile): string; + isReferencedImportDeclaration(node: ImportDeclaration): boolean; + isTopLevelValueImportWithEntityName(node: ImportDeclaration): boolean; + getNodeCheckFlags(node: Node): NodeCheckFlags; + getEnumMemberValue(node: EnumMember): number; + hasSemanticErrors(sourceFile?: SourceFile): boolean; + isDeclarationVisible(node: Declaration): boolean; + isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; + writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; + writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; + isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; + isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; + getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number; + isEmitBlocked(sourceFile?: SourceFile): boolean; + } + const enum SymbolFlags { + FunctionScopedVariable = 1, + BlockScopedVariable = 2, + Property = 4, + EnumMember = 8, + Function = 16, + Class = 32, + Interface = 64, + ConstEnum = 128, + RegularEnum = 256, + ValueModule = 512, + NamespaceModule = 1024, + TypeLiteral = 2048, + ObjectLiteral = 4096, + Method = 8192, + Constructor = 16384, + GetAccessor = 32768, + SetAccessor = 65536, + CallSignature = 131072, + ConstructSignature = 262144, + IndexSignature = 524288, + TypeParameter = 1048576, + TypeAlias = 2097152, + ExportValue = 4194304, + ExportType = 8388608, + ExportNamespace = 16777216, + Import = 33554432, + Instantiated = 67108864, + Merged = 134217728, + Transient = 268435456, + Prototype = 536870912, + UnionProperty = 1073741824, + Enum = 384, + Variable = 3, + Value = 107455, + Type = 3152352, + Namespace = 1536, + Module = 1536, + Accessor = 98304, + Signature = 917504, + FunctionScopedVariableExcludes = 107454, + BlockScopedVariableExcludes = 107455, + ParameterExcludes = 107455, + PropertyExcludes = 107455, + EnumMemberExcludes = 107455, + FunctionExcludes = 106927, + ClassExcludes = 3258879, + InterfaceExcludes = 3152288, + RegularEnumExcludes = 3258623, + ConstEnumExcludes = 3259263, + ValueModuleExcludes = 106639, + NamespaceModuleExcludes = 0, + MethodExcludes = 99263, + GetAccessorExcludes = 41919, + SetAccessorExcludes = 74687, + TypeParameterExcludes = 2103776, + TypeAliasExcludes = 3152352, + ImportExcludes = 33554432, + ModuleMember = 35653619, + ExportHasLocal = 944, + HasLocals = 1041936, + HasExports = 1952, + HasMembers = 6240, + IsContainer = 1048560, + PropertyOrAccessor = 98308, + Export = 29360128, + } + interface Symbol { + flags: SymbolFlags; + name: string; + id?: number; + mergeId?: number; + declarations?: Declaration[]; + parent?: Symbol; + members?: SymbolTable; + exports?: SymbolTable; + exportSymbol?: Symbol; + valueDeclaration?: Declaration; + constEnumOnlyModule?: boolean; + } + interface SymbolLinks { + target?: Symbol; + type?: Type; + declaredType?: Type; + mapper?: TypeMapper; + referenced?: boolean; + exportAssignSymbol?: Symbol; + unionType?: UnionType; + } + interface TransientSymbol extends Symbol, SymbolLinks { + } + interface SymbolTable { + [index: string]: Symbol; + } + const enum NodeCheckFlags { + TypeChecked = 1, + LexicalThis = 2, + CaptureThis = 4, + EmitExtends = 8, + SuperInstance = 16, + SuperStatic = 32, + ContextChecked = 64, + EnumValuesComputed = 128, + } + interface NodeLinks { + resolvedType?: Type; + resolvedSignature?: Signature; + resolvedSymbol?: Symbol; + flags?: NodeCheckFlags; + enumMemberValue?: number; + isIllegalTypeReferenceInConstraint?: boolean; + isVisible?: boolean; + localModuleName?: string; + assignmentChecks?: Map; + } + const enum TypeFlags { + Any = 1, + String = 2, + Number = 4, + Boolean = 8, + Void = 16, + Undefined = 32, + Null = 64, + Enum = 128, + StringLiteral = 256, + TypeParameter = 512, + Class = 1024, + Interface = 2048, + Reference = 4096, + Tuple = 8192, + Union = 16384, + Anonymous = 32768, + FromSignature = 65536, + Intrinsic = 127, + StringLike = 258, + NumberLike = 132, + ObjectType = 48128, + } + interface Type { + flags: TypeFlags; + id: number; + symbol?: Symbol; + } + interface IntrinsicType extends Type { + intrinsicName: string; + } + interface StringLiteralType extends Type { + text: string; + } + interface ObjectType extends Type { + } + interface InterfaceType extends ObjectType { + typeParameters: TypeParameter[]; + baseTypes: ObjectType[]; + declaredProperties: Symbol[]; + declaredCallSignatures: Signature[]; + declaredConstructSignatures: Signature[]; + declaredStringIndexType: Type; + declaredNumberIndexType: Type; + } + interface TypeReference extends ObjectType { + target: GenericType; + typeArguments: Type[]; + } + interface GenericType extends InterfaceType, TypeReference { + instantiations: Map; + openReferenceTargets: GenericType[]; + openReferenceChecks: Map; + } + interface TupleType extends ObjectType { + elementTypes: Type[]; + baseArrayType: TypeReference; + } + interface UnionType extends Type { + types: Type[]; + resolvedProperties: SymbolTable; + } + interface ResolvedType extends ObjectType, UnionType { + members: SymbolTable; + properties: Symbol[]; + callSignatures: Signature[]; + constructSignatures: Signature[]; + stringIndexType: Type; + numberIndexType: Type; + } + interface TypeParameter extends Type { + constraint: Type; + target?: TypeParameter; + mapper?: TypeMapper; + } + const enum SignatureKind { + Call = 0, + Construct = 1, + } + interface Signature { + declaration: SignatureDeclaration; + typeParameters: TypeParameter[]; + parameters: Symbol[]; + resolvedReturnType: Type; + minArgumentCount: number; + hasRestParameter: boolean; + hasStringLiterals: boolean; + target?: Signature; + mapper?: TypeMapper; + unionSignatures?: Signature[]; + erasedSignatureCache?: Signature; + isolatedSignatureType?: ObjectType; + } + const enum IndexKind { + String = 0, + Number = 1, + } + interface TypeMapper { + (t: Type): Type; + } + interface TypeInferences { + primary: Type[]; + secondary: Type[]; + } + interface InferenceContext { + typeParameters: TypeParameter[]; + inferUnionTypes: boolean; + inferences: TypeInferences[]; + inferredTypes: Type[]; + failedTypeParameterIndex?: number; + } + interface DiagnosticMessage { + key: string; + category: DiagnosticCategory; + code: number; + isEarly?: boolean; + } + interface DiagnosticMessageChain { + messageText: string; + category: DiagnosticCategory; + code: number; + next?: DiagnosticMessageChain; + } + interface Diagnostic { + file: SourceFile; + start: number; + length: number; + messageText: string; + category: DiagnosticCategory; + code: number; + /** + * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit + */ + isEarly?: boolean; + } + enum DiagnosticCategory { + Warning = 0, + Error = 1, + Message = 2, + } + interface CompilerOptions { + allowNonTsExtensions?: boolean; + charset?: string; + codepage?: number; + declaration?: boolean; + diagnostics?: boolean; + emitBOM?: boolean; + help?: boolean; + locale?: string; + mapRoot?: string; + module?: ModuleKind; + noEmitOnError?: boolean; + noErrorTruncation?: boolean; + noImplicitAny?: boolean; + noLib?: boolean; + noLibCheck?: boolean; + noResolve?: boolean; + out?: string; + outDir?: string; + preserveConstEnums?: boolean; + removeComments?: boolean; + sourceMap?: boolean; + sourceRoot?: string; + suppressImplicitAnyIndexErrors?: boolean; + target?: ScriptTarget; + version?: boolean; + watch?: boolean; + [option: string]: string | number | boolean; + } + const enum ModuleKind { + None = 0, + CommonJS = 1, + AMD = 2, + } + interface LineAndCharacter { + line: number; + character: number; + } + const enum ScriptTarget { + ES3 = 0, + ES5 = 1, + ES6 = 2, + Latest = 2, + } + interface ParsedCommandLine { + options: CompilerOptions; + filenames: string[]; + errors: Diagnostic[]; + } + interface CommandLineOption { + name: string; + type: string | Map; + shortName?: string; + description?: DiagnosticMessage; + paramType?: DiagnosticMessage; + error?: DiagnosticMessage; + } + const enum CharacterCodes { + nullCharacter = 0, + maxAsciiCharacter = 127, + lineFeed = 10, + carriageReturn = 13, + lineSeparator = 8232, + paragraphSeparator = 8233, + nextLine = 133, + space = 32, + nonBreakingSpace = 160, + enQuad = 8192, + emQuad = 8193, + enSpace = 8194, + emSpace = 8195, + threePerEmSpace = 8196, + fourPerEmSpace = 8197, + sixPerEmSpace = 8198, + figureSpace = 8199, + punctuationSpace = 8200, + thinSpace = 8201, + hairSpace = 8202, + zeroWidthSpace = 8203, + narrowNoBreakSpace = 8239, + ideographicSpace = 12288, + mathematicalSpace = 8287, + ogham = 5760, + _ = 95, + $ = 36, + _0 = 48, + _1 = 49, + _2 = 50, + _3 = 51, + _4 = 52, + _5 = 53, + _6 = 54, + _7 = 55, + _8 = 56, + _9 = 57, + a = 97, + b = 98, + c = 99, + d = 100, + e = 101, + f = 102, + g = 103, + h = 104, + i = 105, + j = 106, + k = 107, + l = 108, + m = 109, + n = 110, + o = 111, + p = 112, + q = 113, + r = 114, + s = 115, + t = 116, + u = 117, + v = 118, + w = 119, + x = 120, + y = 121, + z = 122, + A = 65, + B = 66, + C = 67, + D = 68, + E = 69, + F = 70, + G = 71, + H = 72, + I = 73, + J = 74, + K = 75, + L = 76, + M = 77, + N = 78, + O = 79, + P = 80, + Q = 81, + R = 82, + S = 83, + T = 84, + U = 85, + V = 86, + W = 87, + X = 88, + Y = 89, + Z = 90, + ampersand = 38, + asterisk = 42, + at = 64, + backslash = 92, + backtick = 96, + bar = 124, + caret = 94, + closeBrace = 125, + closeBracket = 93, + closeParen = 41, + colon = 58, + comma = 44, + dot = 46, + doubleQuote = 34, + equals = 61, + exclamation = 33, + greaterThan = 62, + lessThan = 60, + minus = 45, + openBrace = 123, + openBracket = 91, + openParen = 40, + percent = 37, + plus = 43, + question = 63, + semicolon = 59, + singleQuote = 39, + slash = 47, + tilde = 126, + backspace = 8, + formFeed = 12, + byteOrderMark = 65279, + tab = 9, + verticalTab = 11, + } + interface CancellationToken { + isCancellationRequested(): boolean; + } + interface CompilerHost { + getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; + getDefaultLibFilename(options: CompilerOptions): string; + getCancellationToken?(): CancellationToken; + writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; + getCurrentDirectory(): string; + getCanonicalFileName(fileName: string): string; + useCaseSensitiveFileNames(): boolean; + getNewLine(): string; + } +} +declare module ts { + interface ErrorCallback { + (message: DiagnosticMessage): void; + } + interface CommentCallback { + (pos: number, end: number): void; + } + interface Scanner { + getStartPos(): number; + getToken(): SyntaxKind; + getTextPos(): number; + getTokenPos(): number; + getTokenText(): string; + getTokenValue(): string; + hasPrecedingLineBreak(): boolean; + isIdentifier(): boolean; + isReservedWord(): boolean; + isUnterminated(): boolean; + reScanGreaterToken(): SyntaxKind; + reScanSlashToken(): SyntaxKind; + reScanTemplateToken(): SyntaxKind; + scan(): SyntaxKind; + setText(text: string): void; + setTextPos(textPos: number): void; + lookAhead(callback: () => T): T; + tryScan(callback: () => T): T; + } + function tokenToString(t: SyntaxKind): string; + function computeLineStarts(text: string): number[]; + function getPositionFromLineAndCharacter(lineStarts: number[], line: number, character: number): number; + function getLineAndCharacterOfPosition(lineStarts: number[], position: number): { + line: number; + character: number; + }; + function positionToLineAndCharacter(text: string, pos: number): { + line: number; + character: number; + }; + function isWhiteSpace(ch: number): boolean; + function isLineBreak(ch: number): boolean; + function isOctalDigit(ch: number): boolean; + function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean): number; + function getLeadingCommentRanges(text: string, pos: number): CommentRange[]; + function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; + function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; + function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; + function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner; +} +declare module ts { + function getNodeConstructor(kind: SyntaxKind): new () => Node; + function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; + function createCompilerHost(options: CompilerOptions): CompilerHost; + function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; + function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; +} +declare module ts { + function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; +} +declare module ts { + var servicesVersion: string; + interface Node { + getSourceFile(): SourceFile; + getChildCount(sourceFile?: SourceFile): number; + getChildAt(index: number, sourceFile?: SourceFile): Node; + getChildren(sourceFile?: SourceFile): Node[]; + getStart(sourceFile?: SourceFile): number; + getFullStart(): number; + getEnd(): number; + getWidth(sourceFile?: SourceFile): number; + getFullWidth(): number; + getLeadingTriviaWidth(sourceFile?: SourceFile): number; + getFullText(sourceFile?: SourceFile): string; + getText(sourceFile?: SourceFile): string; + getFirstToken(sourceFile?: SourceFile): Node; + getLastToken(sourceFile?: SourceFile): Node; + } + interface Symbol { + getFlags(): SymbolFlags; + getName(): string; + getDeclarations(): Declaration[]; + getDocumentationComment(): SymbolDisplayPart[]; + } + interface Type { + getFlags(): TypeFlags; + getSymbol(): Symbol; + getProperties(): Symbol[]; + getProperty(propertyName: string): Symbol; + getApparentProperties(): Symbol[]; + getCallSignatures(): Signature[]; + getConstructSignatures(): Signature[]; + getStringIndexType(): Type; + getNumberIndexType(): Type; + } + interface Signature { + getDeclaration(): SignatureDeclaration; + getTypeParameters(): Type[]; + getParameters(): Symbol[]; + getReturnType(): Type; + getDocumentationComment(): SymbolDisplayPart[]; + } + interface SourceFile { + getScriptSnapshot(): IScriptSnapshot; + getNamedDeclarations(): Declaration[]; + update(scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; + } + /** + * Represents an immutable snapshot of a script at a specified time.Once acquired, the + * snapshot is observably immutable. i.e. the same calls with the same parameters will return + * the same values. + */ + interface IScriptSnapshot { + /** Gets a portion of the script snapshot specified by [start, end). */ + getText(start: number, end: number): string; + /** Gets the length of this script snapshot. */ + getLength(): number; + /** + * This call returns the array containing the start position of every line. + * i.e."[0, 10, 55]". TODO: consider making this optional. The language service could + * always determine this (albeit in a more expensive manner). + */ + getLineStartPositions(): number[]; + /** + * Gets the TextChangeRange that describe how the text changed between this text and + * an older version. This information is used by the incremental parser to determine + * what sections of the script need to be re-parsed. 'undefined' can be returned if the + * change range cannot be determined. However, in that case, incremental parsing will + * not happen and the entire document will be re - parsed. + */ + getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; + } + module ScriptSnapshot { + function fromString(text: string): IScriptSnapshot; + } + interface PreProcessedFileInfo { + referencedFiles: FileReference[]; + importedFiles: FileReference[]; + isLibFile: boolean; + } + interface Logger { + log(s: string): void; + } + interface LanguageServiceHost extends Logger { + getCompilationSettings(): CompilerOptions; + getScriptFileNames(): string[]; + getScriptVersion(fileName: string): string; + getScriptIsOpen(fileName: string): boolean; + getScriptSnapshot(fileName: string): IScriptSnapshot; + getLocalizedDiagnosticMessages?(): any; + getCancellationToken?(): CancellationToken; + getCurrentDirectory(): string; + getDefaultLibFilename(options: CompilerOptions): string; + } + interface LanguageService { + cleanupSemanticCache(): void; + getSyntacticDiagnostics(fileName: string): Diagnostic[]; + getSemanticDiagnostics(fileName: string): Diagnostic[]; + getCompilerOptionsDiagnostics(): Diagnostic[]; + getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; + getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; + getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; + getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; + getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; + getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; + getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan; + getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems; + getRenameInfo(fileName: string, position: number): RenameInfo; + findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[]; + getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; + getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; + getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; + getNavigateToItems(searchValue: string): NavigateToItem[]; + getNavigationBarItems(fileName: string): NavigationBarItem[]; + getOutliningSpans(fileName: string): OutliningSpan[]; + getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; + getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; + getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number; + getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[]; + getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; + getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[]; + getEmitOutput(fileName: string): EmitOutput; + getSourceFile(filename: string): SourceFile; + dispose(): void; + } + class TextSpan { + private _start; + private _length; + /** + * Creates a TextSpan instance beginning with the position Start and having the Length + * specified with length. + */ + constructor(start: number, length: number); + toJSON(key: any): any; + start(): number; + length(): number; + end(): number; + isEmpty(): boolean; + /** + * Determines whether the position lies within the span. Returns true if the position is greater than or equal to Start and strictly less + * than End, otherwise false. + * @param position The position to check. + */ + containsPosition(position: number): boolean; + /** + * Determines whether span falls completely within this span. Returns true if the specified span falls completely within this span, otherwise false. + * @param span The span to check. + */ + containsTextSpan(span: TextSpan): boolean; + /** + * Determines whether the given span overlaps this span. Two spans are considered to overlap + * if they have positions in common and neither is empty. Empty spans do not overlap with any + * other span. Returns true if the spans overlap, false otherwise. + * @param span The span to check. + */ + overlapsWith(span: TextSpan): boolean; + /** + * Returns the overlap with the given span, or undefined if there is no overlap. + * @param span The span to check. + */ + overlap(span: TextSpan): TextSpan; + /** + * Determines whether span intersects this span. Two spans are considered to + * intersect if they have positions in common or the end of one span + * coincides with the start of the other span. Returns true if the spans intersect, false otherwise. + * @param The span to check. + */ + intersectsWithTextSpan(span: TextSpan): boolean; + intersectsWith(start: number, length: number): boolean; + /** + * Determines whether the given position intersects this span. + * A position is considered to intersect if it is between the start and + * end positions (inclusive) of this span. Returns true if the position intersects, false otherwise. + * @param position The position to check. + */ + intersectsWithPosition(position: number): boolean; + /** + * Returns the intersection with the given span, or undefined if there is no intersection. + * @param span The span to check. + */ + intersection(span: TextSpan): TextSpan; + /** + * Creates a new TextSpan from the given start and end positions + * as opposed to a position and length. + */ + static fromBounds(start: number, end: number): TextSpan; + } + class TextChangeRange { + static unchanged: TextChangeRange; + private _span; + private _newLength; + /** + * Initializes a new instance of TextChangeRange. + */ + constructor(span: TextSpan, newLength: number); + /** + * The span of text before the edit which is being changed + */ + span(): TextSpan; + /** + * Width of the span after the edit. A 0 here would represent a delete + */ + newLength(): number; + newSpan(): TextSpan; + isUnchanged(): boolean; + /** + * Called to merge all the changes that occurred across several versions of a script snapshot + * into a single change. i.e. if a user keeps making successive edits to a script we will + * have a text change from V1 to V2, V2 to V3, ..., Vn. + * + * This function will then merge those changes into a single change range valid between V1 and + * Vn. + */ + static collapseChangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; + } + interface ClassifiedSpan { + textSpan: TextSpan; + classificationType: string; + } + interface NavigationBarItem { + text: string; + kind: string; + kindModifiers: string; + spans: TextSpan[]; + childItems: NavigationBarItem[]; + indent: number; + bolded: boolean; + grayed: boolean; + } + interface TodoCommentDescriptor { + text: string; + priority: number; + } + interface TodoComment { + descriptor: TodoCommentDescriptor; + message: string; + position: number; + } + class TextChange { + span: TextSpan; + newText: string; + } + interface RenameLocation { + textSpan: TextSpan; + fileName: string; + } + interface ReferenceEntry { + textSpan: TextSpan; + fileName: string; + isWriteAccess: boolean; + } + interface NavigateToItem { + name: string; + kind: string; + kindModifiers: string; + matchKind: string; + fileName: string; + textSpan: TextSpan; + containerName: string; + containerKind: string; + } + interface EditorOptions { + IndentSize: number; + TabSize: number; + NewLineCharacter: string; + ConvertTabsToSpaces: boolean; + } + interface FormatCodeOptions extends EditorOptions { + InsertSpaceAfterCommaDelimiter: boolean; + InsertSpaceAfterSemicolonInForStatements: boolean; + InsertSpaceBeforeAndAfterBinaryOperators: boolean; + InsertSpaceAfterKeywordsInControlFlowStatements: boolean; + InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; + InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; + PlaceOpenBraceOnNewLineForFunctions: boolean; + PlaceOpenBraceOnNewLineForControlBlocks: boolean; + } + interface DefinitionInfo { + fileName: string; + textSpan: TextSpan; + kind: string; + name: string; + containerKind: string; + containerName: string; + } + enum SymbolDisplayPartKind { + aliasName = 0, + className = 1, + enumName = 2, + fieldName = 3, + interfaceName = 4, + keyword = 5, + lineBreak = 6, + numericLiteral = 7, + stringLiteral = 8, + localName = 9, + methodName = 10, + moduleName = 11, + operator = 12, + parameterName = 13, + propertyName = 14, + punctuation = 15, + space = 16, + text = 17, + typeParameterName = 18, + enumMemberName = 19, + functionName = 20, + regularExpressionLiteral = 21, + } + interface SymbolDisplayPart { + text: string; + kind: string; + } + interface QuickInfo { + kind: string; + kindModifiers: string; + textSpan: TextSpan; + displayParts: SymbolDisplayPart[]; + documentation: SymbolDisplayPart[]; + } + interface RenameInfo { + canRename: boolean; + localizedErrorMessage: string; + displayName: string; + fullDisplayName: string; + kind: string; + kindModifiers: string; + triggerSpan: TextSpan; + } + interface SignatureHelpParameter { + name: string; + documentation: SymbolDisplayPart[]; + displayParts: SymbolDisplayPart[]; + isOptional: boolean; + } + /** + * Represents a single signature to show in signature help. + * The id is used for subsequent calls into the language service to ask questions about the + * signature help item in the context of any documents that have been updated. i.e. after + * an edit has happened, while signature help is still active, the host can ask important + * questions like 'what parameter is the user currently contained within?'. + */ + interface SignatureHelpItem { + isVariadic: boolean; + prefixDisplayParts: SymbolDisplayPart[]; + suffixDisplayParts: SymbolDisplayPart[]; + separatorDisplayParts: SymbolDisplayPart[]; + parameters: SignatureHelpParameter[]; + documentation: SymbolDisplayPart[]; + } + /** + * Represents a set of signature help items, and the preferred item that should be selected. + */ + interface SignatureHelpItems { + items: SignatureHelpItem[]; + applicableSpan: TextSpan; + selectedItemIndex: number; + argumentIndex: number; + argumentCount: number; + } + interface CompletionInfo { + isMemberCompletion: boolean; + entries: CompletionEntry[]; + } + interface CompletionEntry { + name: string; + kind: string; + kindModifiers: string; + } + interface CompletionEntryDetails { + name: string; + kind: string; + kindModifiers: string; + displayParts: SymbolDisplayPart[]; + documentation: SymbolDisplayPart[]; + } + interface OutliningSpan { + /** The span of the document to actually collapse. */ + textSpan: TextSpan; + /** The span of the document to display when the user hovers over the collapsed span. */ + hintSpan: TextSpan; + /** The text to display in the editor for the collapsed region. */ + bannerText: string; + /** + * Whether or not this region should be automatically collapsed when + * the 'Collapse to Definitions' command is invoked. + */ + autoCollapse: boolean; + } + interface EmitOutput { + outputFiles: OutputFile[]; + emitOutputStatus: EmitReturnStatus; + } + const enum OutputFileType { + JavaScript = 0, + SourceMap = 1, + Declaration = 2, + } + interface OutputFile { + name: string; + writeByteOrderMark: boolean; + text: string; + } + const enum EndOfLineState { + Start = 0, + InMultiLineCommentTrivia = 1, + InSingleQuoteStringLiteral = 2, + InDoubleQuoteStringLiteral = 3, + } + enum TokenClass { + Punctuation = 0, + Keyword = 1, + Operator = 2, + Comment = 3, + Whitespace = 4, + Identifier = 5, + NumberLiteral = 6, + StringLiteral = 7, + RegExpLiteral = 8, + } + interface ClassificationResult { + finalLexState: EndOfLineState; + entries: ClassificationInfo[]; + } + interface ClassificationInfo { + length: number; + classification: TokenClass; + } + interface Classifier { + getClassificationsForLine(text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean): ClassificationResult; + } + interface DocumentRegistry { + acquireDocument(filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean): SourceFile; + updateDocument(sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; + releaseDocument(filename: string, compilationSettings: CompilerOptions): void; + } + class ScriptElementKind { + static unknown: string; + static keyword: string; + static scriptElement: string; + static moduleElement: string; + static classElement: string; + static interfaceElement: string; + static typeElement: string; + static enumElement: string; + static variableElement: string; + static localVariableElement: string; + static functionElement: string; + static localFunctionElement: string; + static memberFunctionElement: string; + static memberGetAccessorElement: string; + static memberSetAccessorElement: string; + static memberVariableElement: string; + static constructorImplementationElement: string; + static callSignatureElement: string; + static indexSignatureElement: string; + static constructSignatureElement: string; + static parameterElement: string; + static typeParameterElement: string; + static primitiveType: string; + static label: string; + static alias: string; + static constElement: string; + static letElement: string; + } + class ScriptElementKindModifier { + static none: string; + static publicMemberModifier: string; + static privateMemberModifier: string; + static protectedMemberModifier: string; + static exportedModifier: string; + static ambientModifier: string; + static staticModifier: string; + } + class ClassificationTypeNames { + static comment: string; + static identifier: string; + static keyword: string; + static numericLiteral: string; + static operator: string; + static stringLiteral: string; + static whiteSpace: string; + static text: string; + static punctuation: string; + static className: string; + static enumName: string; + static interfaceName: string; + static moduleName: string; + static typeParameterName: string; + static typeAlias: string; + } + interface DisplayPartsSymbolWriter extends SymbolWriter { + displayParts(): SymbolDisplayPart[]; + } + function displayPartsToString(displayParts: SymbolDisplayPart[]): string; + function getDefaultCompilerOptions(): CompilerOptions; + class OperationCanceledException { + } + class CancellationTokenObject { + private cancellationToken; + static None: CancellationTokenObject; + constructor(cancellationToken: CancellationToken); + isCancellationRequested(): boolean; + throwIfCancellationRequested(): void; + } + function createDocumentRegistry(): DocumentRegistry; + function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; + function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry): LanguageService; + function createClassifier(host: Logger): Classifier; +} + + +//// [APISample_standalone_compile.js] +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", 2 /* Latest */, "0.0"); +var program = ts.createProgram(["file1.ts"], {}, undefined); diff --git a/tests/baselines/reference/APISample_standalone_compile.types b/tests/baselines/reference/APISample_standalone_compile.types new file mode 100644 index 00000000000..465a89b8f97 --- /dev/null +++ b/tests/baselines/reference/APISample_standalone_compile.types @@ -0,0 +1,5756 @@ +=== tests/cases/compiler/APISample_standalone_compile.ts === + +var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); +>sourceFile : ts.SourceFile +>ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0") : ts.SourceFile +>ts.createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, version: string, isOpen?: boolean) => ts.SourceFile +>ts : typeof ts +>createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, version: string, isOpen?: boolean) => ts.SourceFile +>ts.ScriptTarget.Latest : ts.ScriptTarget +>ts.ScriptTarget : typeof ts.ScriptTarget +>ts : typeof ts +>ScriptTarget : typeof ts.ScriptTarget +>Latest : ts.ScriptTarget + +var program = ts.createProgram(["file1.ts"], {}, undefined); +>program : ts.Program +>ts.createProgram(["file1.ts"], {}, undefined) : ts.Program +>ts.createProgram : (rootNames: string[], options: ts.CompilerOptions, host: ts.CompilerHost) => ts.Program +>ts : typeof ts +>createProgram : (rootNames: string[], options: ts.CompilerOptions, host: ts.CompilerHost) => ts.Program +>["file1.ts"] : string[] +>{} : { [x: string]: undefined; } +>undefined : undefined + +=== typescriptServices.d.ts === +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + +declare module ts { +>ts : typeof ts + + interface Map { +>Map : Map +>T : T + + [index: string]: T; +>index : string +>T : T + } + interface TextRange { +>TextRange : TextRange + + pos: number; +>pos : number + + end: number; +>end : number + } + const enum SyntaxKind { +>SyntaxKind : SyntaxKind + + Unknown = 0, +>Unknown : SyntaxKind + + EndOfFileToken = 1, +>EndOfFileToken : SyntaxKind + + SingleLineCommentTrivia = 2, +>SingleLineCommentTrivia : SyntaxKind + + MultiLineCommentTrivia = 3, +>MultiLineCommentTrivia : SyntaxKind + + NewLineTrivia = 4, +>NewLineTrivia : SyntaxKind + + WhitespaceTrivia = 5, +>WhitespaceTrivia : SyntaxKind + + NumericLiteral = 6, +>NumericLiteral : SyntaxKind + + StringLiteral = 7, +>StringLiteral : SyntaxKind + + RegularExpressionLiteral = 8, +>RegularExpressionLiteral : SyntaxKind + + NoSubstitutionTemplateLiteral = 9, +>NoSubstitutionTemplateLiteral : SyntaxKind + + TemplateHead = 10, +>TemplateHead : SyntaxKind + + TemplateMiddle = 11, +>TemplateMiddle : SyntaxKind + + TemplateTail = 12, +>TemplateTail : SyntaxKind + + OpenBraceToken = 13, +>OpenBraceToken : SyntaxKind + + CloseBraceToken = 14, +>CloseBraceToken : SyntaxKind + + OpenParenToken = 15, +>OpenParenToken : SyntaxKind + + CloseParenToken = 16, +>CloseParenToken : SyntaxKind + + OpenBracketToken = 17, +>OpenBracketToken : SyntaxKind + + CloseBracketToken = 18, +>CloseBracketToken : SyntaxKind + + DotToken = 19, +>DotToken : SyntaxKind + + DotDotDotToken = 20, +>DotDotDotToken : SyntaxKind + + SemicolonToken = 21, +>SemicolonToken : SyntaxKind + + CommaToken = 22, +>CommaToken : SyntaxKind + + LessThanToken = 23, +>LessThanToken : SyntaxKind + + GreaterThanToken = 24, +>GreaterThanToken : SyntaxKind + + LessThanEqualsToken = 25, +>LessThanEqualsToken : SyntaxKind + + GreaterThanEqualsToken = 26, +>GreaterThanEqualsToken : SyntaxKind + + EqualsEqualsToken = 27, +>EqualsEqualsToken : SyntaxKind + + ExclamationEqualsToken = 28, +>ExclamationEqualsToken : SyntaxKind + + EqualsEqualsEqualsToken = 29, +>EqualsEqualsEqualsToken : SyntaxKind + + ExclamationEqualsEqualsToken = 30, +>ExclamationEqualsEqualsToken : SyntaxKind + + EqualsGreaterThanToken = 31, +>EqualsGreaterThanToken : SyntaxKind + + PlusToken = 32, +>PlusToken : SyntaxKind + + MinusToken = 33, +>MinusToken : SyntaxKind + + AsteriskToken = 34, +>AsteriskToken : SyntaxKind + + SlashToken = 35, +>SlashToken : SyntaxKind + + PercentToken = 36, +>PercentToken : SyntaxKind + + PlusPlusToken = 37, +>PlusPlusToken : SyntaxKind + + MinusMinusToken = 38, +>MinusMinusToken : SyntaxKind + + LessThanLessThanToken = 39, +>LessThanLessThanToken : SyntaxKind + + GreaterThanGreaterThanToken = 40, +>GreaterThanGreaterThanToken : SyntaxKind + + GreaterThanGreaterThanGreaterThanToken = 41, +>GreaterThanGreaterThanGreaterThanToken : SyntaxKind + + AmpersandToken = 42, +>AmpersandToken : SyntaxKind + + BarToken = 43, +>BarToken : SyntaxKind + + CaretToken = 44, +>CaretToken : SyntaxKind + + ExclamationToken = 45, +>ExclamationToken : SyntaxKind + + TildeToken = 46, +>TildeToken : SyntaxKind + + AmpersandAmpersandToken = 47, +>AmpersandAmpersandToken : SyntaxKind + + BarBarToken = 48, +>BarBarToken : SyntaxKind + + QuestionToken = 49, +>QuestionToken : SyntaxKind + + ColonToken = 50, +>ColonToken : SyntaxKind + + EqualsToken = 51, +>EqualsToken : SyntaxKind + + PlusEqualsToken = 52, +>PlusEqualsToken : SyntaxKind + + MinusEqualsToken = 53, +>MinusEqualsToken : SyntaxKind + + AsteriskEqualsToken = 54, +>AsteriskEqualsToken : SyntaxKind + + SlashEqualsToken = 55, +>SlashEqualsToken : SyntaxKind + + PercentEqualsToken = 56, +>PercentEqualsToken : SyntaxKind + + LessThanLessThanEqualsToken = 57, +>LessThanLessThanEqualsToken : SyntaxKind + + GreaterThanGreaterThanEqualsToken = 58, +>GreaterThanGreaterThanEqualsToken : SyntaxKind + + GreaterThanGreaterThanGreaterThanEqualsToken = 59, +>GreaterThanGreaterThanGreaterThanEqualsToken : SyntaxKind + + AmpersandEqualsToken = 60, +>AmpersandEqualsToken : SyntaxKind + + BarEqualsToken = 61, +>BarEqualsToken : SyntaxKind + + CaretEqualsToken = 62, +>CaretEqualsToken : SyntaxKind + + Identifier = 63, +>Identifier : SyntaxKind + + BreakKeyword = 64, +>BreakKeyword : SyntaxKind + + CaseKeyword = 65, +>CaseKeyword : SyntaxKind + + CatchKeyword = 66, +>CatchKeyword : SyntaxKind + + ClassKeyword = 67, +>ClassKeyword : SyntaxKind + + ConstKeyword = 68, +>ConstKeyword : SyntaxKind + + ContinueKeyword = 69, +>ContinueKeyword : SyntaxKind + + DebuggerKeyword = 70, +>DebuggerKeyword : SyntaxKind + + DefaultKeyword = 71, +>DefaultKeyword : SyntaxKind + + DeleteKeyword = 72, +>DeleteKeyword : SyntaxKind + + DoKeyword = 73, +>DoKeyword : SyntaxKind + + ElseKeyword = 74, +>ElseKeyword : SyntaxKind + + EnumKeyword = 75, +>EnumKeyword : SyntaxKind + + ExportKeyword = 76, +>ExportKeyword : SyntaxKind + + ExtendsKeyword = 77, +>ExtendsKeyword : SyntaxKind + + FalseKeyword = 78, +>FalseKeyword : SyntaxKind + + FinallyKeyword = 79, +>FinallyKeyword : SyntaxKind + + ForKeyword = 80, +>ForKeyword : SyntaxKind + + FunctionKeyword = 81, +>FunctionKeyword : SyntaxKind + + IfKeyword = 82, +>IfKeyword : SyntaxKind + + ImportKeyword = 83, +>ImportKeyword : SyntaxKind + + InKeyword = 84, +>InKeyword : SyntaxKind + + InstanceOfKeyword = 85, +>InstanceOfKeyword : SyntaxKind + + NewKeyword = 86, +>NewKeyword : SyntaxKind + + NullKeyword = 87, +>NullKeyword : SyntaxKind + + ReturnKeyword = 88, +>ReturnKeyword : SyntaxKind + + SuperKeyword = 89, +>SuperKeyword : SyntaxKind + + SwitchKeyword = 90, +>SwitchKeyword : SyntaxKind + + ThisKeyword = 91, +>ThisKeyword : SyntaxKind + + ThrowKeyword = 92, +>ThrowKeyword : SyntaxKind + + TrueKeyword = 93, +>TrueKeyword : SyntaxKind + + TryKeyword = 94, +>TryKeyword : SyntaxKind + + TypeOfKeyword = 95, +>TypeOfKeyword : SyntaxKind + + VarKeyword = 96, +>VarKeyword : SyntaxKind + + VoidKeyword = 97, +>VoidKeyword : SyntaxKind + + WhileKeyword = 98, +>WhileKeyword : SyntaxKind + + WithKeyword = 99, +>WithKeyword : SyntaxKind + + ImplementsKeyword = 100, +>ImplementsKeyword : SyntaxKind + + InterfaceKeyword = 101, +>InterfaceKeyword : SyntaxKind + + LetKeyword = 102, +>LetKeyword : SyntaxKind + + PackageKeyword = 103, +>PackageKeyword : SyntaxKind + + PrivateKeyword = 104, +>PrivateKeyword : SyntaxKind + + ProtectedKeyword = 105, +>ProtectedKeyword : SyntaxKind + + PublicKeyword = 106, +>PublicKeyword : SyntaxKind + + StaticKeyword = 107, +>StaticKeyword : SyntaxKind + + YieldKeyword = 108, +>YieldKeyword : SyntaxKind + + AnyKeyword = 109, +>AnyKeyword : SyntaxKind + + BooleanKeyword = 110, +>BooleanKeyword : SyntaxKind + + ConstructorKeyword = 111, +>ConstructorKeyword : SyntaxKind + + DeclareKeyword = 112, +>DeclareKeyword : SyntaxKind + + GetKeyword = 113, +>GetKeyword : SyntaxKind + + ModuleKeyword = 114, +>ModuleKeyword : SyntaxKind + + RequireKeyword = 115, +>RequireKeyword : SyntaxKind + + NumberKeyword = 116, +>NumberKeyword : SyntaxKind + + SetKeyword = 117, +>SetKeyword : SyntaxKind + + StringKeyword = 118, +>StringKeyword : SyntaxKind + + TypeKeyword = 119, +>TypeKeyword : SyntaxKind + + QualifiedName = 120, +>QualifiedName : SyntaxKind + + ComputedPropertyName = 121, +>ComputedPropertyName : SyntaxKind + + TypeParameter = 122, +>TypeParameter : SyntaxKind + + Parameter = 123, +>Parameter : SyntaxKind + + Property = 124, +>Property : SyntaxKind + + Method = 125, +>Method : SyntaxKind + + Constructor = 126, +>Constructor : SyntaxKind + + GetAccessor = 127, +>GetAccessor : SyntaxKind + + SetAccessor = 128, +>SetAccessor : SyntaxKind + + CallSignature = 129, +>CallSignature : SyntaxKind + + ConstructSignature = 130, +>ConstructSignature : SyntaxKind + + IndexSignature = 131, +>IndexSignature : SyntaxKind + + TypeReference = 132, +>TypeReference : SyntaxKind + + FunctionType = 133, +>FunctionType : SyntaxKind + + ConstructorType = 134, +>ConstructorType : SyntaxKind + + TypeQuery = 135, +>TypeQuery : SyntaxKind + + TypeLiteral = 136, +>TypeLiteral : SyntaxKind + + ArrayType = 137, +>ArrayType : SyntaxKind + + TupleType = 138, +>TupleType : SyntaxKind + + UnionType = 139, +>UnionType : SyntaxKind + + ParenthesizedType = 140, +>ParenthesizedType : SyntaxKind + + ArrayLiteralExpression = 141, +>ArrayLiteralExpression : SyntaxKind + + ObjectLiteralExpression = 142, +>ObjectLiteralExpression : SyntaxKind + + PropertyAccessExpression = 143, +>PropertyAccessExpression : SyntaxKind + + ElementAccessExpression = 144, +>ElementAccessExpression : SyntaxKind + + CallExpression = 145, +>CallExpression : SyntaxKind + + NewExpression = 146, +>NewExpression : SyntaxKind + + TaggedTemplateExpression = 147, +>TaggedTemplateExpression : SyntaxKind + + TypeAssertionExpression = 148, +>TypeAssertionExpression : SyntaxKind + + ParenthesizedExpression = 149, +>ParenthesizedExpression : SyntaxKind + + FunctionExpression = 150, +>FunctionExpression : SyntaxKind + + ArrowFunction = 151, +>ArrowFunction : SyntaxKind + + DeleteExpression = 152, +>DeleteExpression : SyntaxKind + + TypeOfExpression = 153, +>TypeOfExpression : SyntaxKind + + VoidExpression = 154, +>VoidExpression : SyntaxKind + + PrefixUnaryExpression = 155, +>PrefixUnaryExpression : SyntaxKind + + PostfixUnaryExpression = 156, +>PostfixUnaryExpression : SyntaxKind + + BinaryExpression = 157, +>BinaryExpression : SyntaxKind + + ConditionalExpression = 158, +>ConditionalExpression : SyntaxKind + + TemplateExpression = 159, +>TemplateExpression : SyntaxKind + + YieldExpression = 160, +>YieldExpression : SyntaxKind + + OmittedExpression = 161, +>OmittedExpression : SyntaxKind + + TemplateSpan = 162, +>TemplateSpan : SyntaxKind + + Block = 163, +>Block : SyntaxKind + + VariableStatement = 164, +>VariableStatement : SyntaxKind + + EmptyStatement = 165, +>EmptyStatement : SyntaxKind + + ExpressionStatement = 166, +>ExpressionStatement : SyntaxKind + + IfStatement = 167, +>IfStatement : SyntaxKind + + DoStatement = 168, +>DoStatement : SyntaxKind + + WhileStatement = 169, +>WhileStatement : SyntaxKind + + ForStatement = 170, +>ForStatement : SyntaxKind + + ForInStatement = 171, +>ForInStatement : SyntaxKind + + ContinueStatement = 172, +>ContinueStatement : SyntaxKind + + BreakStatement = 173, +>BreakStatement : SyntaxKind + + ReturnStatement = 174, +>ReturnStatement : SyntaxKind + + WithStatement = 175, +>WithStatement : SyntaxKind + + SwitchStatement = 176, +>SwitchStatement : SyntaxKind + + LabeledStatement = 177, +>LabeledStatement : SyntaxKind + + ThrowStatement = 178, +>ThrowStatement : SyntaxKind + + TryStatement = 179, +>TryStatement : SyntaxKind + + TryBlock = 180, +>TryBlock : SyntaxKind + + FinallyBlock = 181, +>FinallyBlock : SyntaxKind + + DebuggerStatement = 182, +>DebuggerStatement : SyntaxKind + + VariableDeclaration = 183, +>VariableDeclaration : SyntaxKind + + FunctionDeclaration = 184, +>FunctionDeclaration : SyntaxKind + + ClassDeclaration = 185, +>ClassDeclaration : SyntaxKind + + InterfaceDeclaration = 186, +>InterfaceDeclaration : SyntaxKind + + TypeAliasDeclaration = 187, +>TypeAliasDeclaration : SyntaxKind + + EnumDeclaration = 188, +>EnumDeclaration : SyntaxKind + + ModuleDeclaration = 189, +>ModuleDeclaration : SyntaxKind + + ModuleBlock = 190, +>ModuleBlock : SyntaxKind + + ImportDeclaration = 191, +>ImportDeclaration : SyntaxKind + + ExportAssignment = 192, +>ExportAssignment : SyntaxKind + + ExternalModuleReference = 193, +>ExternalModuleReference : SyntaxKind + + CaseClause = 194, +>CaseClause : SyntaxKind + + DefaultClause = 195, +>DefaultClause : SyntaxKind + + HeritageClause = 196, +>HeritageClause : SyntaxKind + + CatchClause = 197, +>CatchClause : SyntaxKind + + PropertyAssignment = 198, +>PropertyAssignment : SyntaxKind + + ShorthandPropertyAssignment = 199, +>ShorthandPropertyAssignment : SyntaxKind + + EnumMember = 200, +>EnumMember : SyntaxKind + + SourceFile = 201, +>SourceFile : SyntaxKind + + Program = 202, +>Program : SyntaxKind + + SyntaxList = 203, +>SyntaxList : SyntaxKind + + Count = 204, +>Count : SyntaxKind + + FirstAssignment = 51, +>FirstAssignment : SyntaxKind + + LastAssignment = 62, +>LastAssignment : SyntaxKind + + FirstReservedWord = 64, +>FirstReservedWord : SyntaxKind + + LastReservedWord = 99, +>LastReservedWord : SyntaxKind + + FirstKeyword = 64, +>FirstKeyword : SyntaxKind + + LastKeyword = 119, +>LastKeyword : SyntaxKind + + FirstFutureReservedWord = 100, +>FirstFutureReservedWord : SyntaxKind + + LastFutureReservedWord = 108, +>LastFutureReservedWord : SyntaxKind + + FirstTypeNode = 132, +>FirstTypeNode : SyntaxKind + + LastTypeNode = 140, +>LastTypeNode : SyntaxKind + + FirstPunctuation = 13, +>FirstPunctuation : SyntaxKind + + LastPunctuation = 62, +>LastPunctuation : SyntaxKind + + FirstToken = 0, +>FirstToken : SyntaxKind + + LastToken = 119, +>LastToken : SyntaxKind + + FirstTriviaToken = 2, +>FirstTriviaToken : SyntaxKind + + LastTriviaToken = 5, +>LastTriviaToken : SyntaxKind + + FirstLiteralToken = 6, +>FirstLiteralToken : SyntaxKind + + LastLiteralToken = 9, +>LastLiteralToken : SyntaxKind + + FirstTemplateToken = 9, +>FirstTemplateToken : SyntaxKind + + LastTemplateToken = 12, +>LastTemplateToken : SyntaxKind + + FirstOperator = 21, +>FirstOperator : SyntaxKind + + LastOperator = 62, +>LastOperator : SyntaxKind + + FirstBinaryOperator = 23, +>FirstBinaryOperator : SyntaxKind + + LastBinaryOperator = 62, +>LastBinaryOperator : SyntaxKind + + FirstNode = 120, +>FirstNode : SyntaxKind + } + const enum NodeFlags { +>NodeFlags : NodeFlags + + Export = 1, +>Export : NodeFlags + + Ambient = 2, +>Ambient : NodeFlags + + Public = 16, +>Public : NodeFlags + + Private = 32, +>Private : NodeFlags + + Protected = 64, +>Protected : NodeFlags + + Static = 128, +>Static : NodeFlags + + MultiLine = 256, +>MultiLine : NodeFlags + + Synthetic = 512, +>Synthetic : NodeFlags + + DeclarationFile = 1024, +>DeclarationFile : NodeFlags + + Let = 2048, +>Let : NodeFlags + + Const = 4096, +>Const : NodeFlags + + OctalLiteral = 8192, +>OctalLiteral : NodeFlags + + Modifier = 243, +>Modifier : NodeFlags + + AccessibilityModifier = 112, +>AccessibilityModifier : NodeFlags + + BlockScoped = 6144, +>BlockScoped : NodeFlags + } + const enum ParserContextFlags { +>ParserContextFlags : ParserContextFlags + + StrictMode = 1, +>StrictMode : ParserContextFlags + + DisallowIn = 2, +>DisallowIn : ParserContextFlags + + Yield = 4, +>Yield : ParserContextFlags + + GeneratorParameter = 8, +>GeneratorParameter : ParserContextFlags + + ContainsError = 16, +>ContainsError : ParserContextFlags + + HasPropagatedChildContainsErrorFlag = 32, +>HasPropagatedChildContainsErrorFlag : ParserContextFlags + } + interface Node extends TextRange { +>Node : Node +>TextRange : TextRange + + kind: SyntaxKind; +>kind : SyntaxKind +>SyntaxKind : SyntaxKind + + flags: NodeFlags; +>flags : NodeFlags +>NodeFlags : NodeFlags + + parserContextFlags?: ParserContextFlags; +>parserContextFlags : ParserContextFlags +>ParserContextFlags : ParserContextFlags + + id?: number; +>id : number + + parent?: Node; +>parent : Node +>Node : Node + + symbol?: Symbol; +>symbol : Symbol +>Symbol : Symbol + + locals?: SymbolTable; +>locals : SymbolTable +>SymbolTable : SymbolTable + + nextContainer?: Node; +>nextContainer : Node +>Node : Node + + localSymbol?: Symbol; +>localSymbol : Symbol +>Symbol : Symbol + + modifiers?: ModifiersArray; +>modifiers : ModifiersArray +>ModifiersArray : ModifiersArray + } + interface NodeArray extends Array, TextRange { +>NodeArray : NodeArray +>T : T +>Array : T[] +>T : T +>TextRange : TextRange + + hasTrailingComma?: boolean; +>hasTrailingComma : boolean + } + interface ModifiersArray extends NodeArray { +>ModifiersArray : ModifiersArray +>NodeArray : NodeArray +>Node : Node + + flags: number; +>flags : number + } + interface Identifier extends PrimaryExpression { +>Identifier : Identifier +>PrimaryExpression : PrimaryExpression + + text: string; +>text : string + } + interface QualifiedName extends Node { +>QualifiedName : QualifiedName +>Node : Node + + left: EntityName; +>left : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName + + right: Identifier; +>right : Identifier +>Identifier : Identifier + } + type EntityName = Identifier | QualifiedName; +>EntityName : Identifier | QualifiedName +>Identifier : Identifier +>QualifiedName : QualifiedName + + type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName +>Identifier : Identifier +>LiteralExpression : LiteralExpression +>ComputedPropertyName : ComputedPropertyName + + interface Declaration extends Node { +>Declaration : Declaration +>Node : Node + + _declarationBrand: any; +>_declarationBrand : any + + name?: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName + } + interface ComputedPropertyName extends Node { +>ComputedPropertyName : ComputedPropertyName +>Node : Node + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface TypeParameterDeclaration extends Declaration { +>TypeParameterDeclaration : TypeParameterDeclaration +>Declaration : Declaration + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + constraint?: TypeNode; +>constraint : TypeNode +>TypeNode : TypeNode + + expression?: Expression; +>expression : Expression +>Expression : Expression + } + interface SignatureDeclaration extends Declaration { +>SignatureDeclaration : SignatureDeclaration +>Declaration : Declaration + + typeParameters?: NodeArray; +>typeParameters : NodeArray +>NodeArray : NodeArray +>TypeParameterDeclaration : TypeParameterDeclaration + + parameters: NodeArray; +>parameters : NodeArray +>NodeArray : NodeArray +>ParameterDeclaration : ParameterDeclaration + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + } + interface VariableDeclaration extends Declaration { +>VariableDeclaration : VariableDeclaration +>Declaration : Declaration + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + interface ParameterDeclaration extends Declaration { +>ParameterDeclaration : ParameterDeclaration +>Declaration : Declaration + + dotDotDotToken?: Node; +>dotDotDotToken : Node +>Node : Node + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + questionToken?: Node; +>questionToken : Node +>Node : Node + + type?: TypeNode | StringLiteralExpression; +>type : TypeNode | StringLiteralExpression +>TypeNode : TypeNode +>StringLiteralExpression : StringLiteralExpression + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + interface PropertyDeclaration extends Declaration, ClassElement { +>PropertyDeclaration : PropertyDeclaration +>Declaration : Declaration +>ClassElement : ClassElement + + _propertyDeclarationBrand: any; +>_propertyDeclarationBrand : any + + questionToken?: Node; +>questionToken : Node +>Node : Node + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; +>VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration +>VariableDeclaration : VariableDeclaration +>ParameterDeclaration : ParameterDeclaration + + type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; +>VariableOrParameterOrPropertyDeclaration : ParameterDeclaration | VariableDeclaration | PropertyDeclaration +>VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration +>PropertyDeclaration : PropertyDeclaration + + interface ObjectLiteralElement extends Declaration { +>ObjectLiteralElement : ObjectLiteralElement +>Declaration : Declaration + + _objectLiteralBrandBrand: any; +>_objectLiteralBrandBrand : any + } + interface ShorthandPropertyAssignment extends ObjectLiteralElement { +>ShorthandPropertyAssignment : ShorthandPropertyAssignment +>ObjectLiteralElement : ObjectLiteralElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + questionToken?: Node; +>questionToken : Node +>Node : Node + } + interface PropertyAssignment extends ObjectLiteralElement { +>PropertyAssignment : PropertyAssignment +>ObjectLiteralElement : ObjectLiteralElement + + _propertyAssignmentBrand: any; +>_propertyAssignmentBrand : any + + name: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName + + questionToken?: Node; +>questionToken : Node +>Node : Node + + initializer: Expression; +>initializer : Expression +>Expression : Expression + } + /** + * Several node kinds share function-like features such as a signature, + * a name, and a body. These nodes should extend FunctionLikeDeclaration. + * Examples: + * FunctionDeclaration + * MethodDeclaration + * AccessorDeclaration + */ + interface FunctionLikeDeclaration extends SignatureDeclaration { +>FunctionLikeDeclaration : FunctionLikeDeclaration +>SignatureDeclaration : SignatureDeclaration + + _functionLikeDeclarationBrand: any; +>_functionLikeDeclarationBrand : any + + asteriskToken?: Node; +>asteriskToken : Node +>Node : Node + + questionToken?: Node; +>questionToken : Node +>Node : Node + + body?: Block | Expression; +>body : Expression | Block +>Block : Block +>Expression : Expression + } + interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { +>FunctionDeclaration : FunctionDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>Statement : Statement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + body?: Block; +>body : Block +>Block : Block + } + interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { +>MethodDeclaration : MethodDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>ClassElement : ClassElement +>ObjectLiteralElement : ObjectLiteralElement + + body?: Block; +>body : Block +>Block : Block + } + interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { +>ConstructorDeclaration : ConstructorDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>ClassElement : ClassElement + + body?: Block; +>body : Block +>Block : Block + } + interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { +>AccessorDeclaration : AccessorDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>ClassElement : ClassElement +>ObjectLiteralElement : ObjectLiteralElement + + _accessorDeclarationBrand: any; +>_accessorDeclarationBrand : any + + body: Block; +>body : Block +>Block : Block + } + interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { +>IndexSignatureDeclaration : IndexSignatureDeclaration +>SignatureDeclaration : SignatureDeclaration +>ClassElement : ClassElement + + _indexSignatureDeclarationBrand: any; +>_indexSignatureDeclarationBrand : any + } + interface TypeNode extends Node { +>TypeNode : TypeNode +>Node : Node + + _typeNodeBrand: any; +>_typeNodeBrand : any + } + interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { +>FunctionOrConstructorTypeNode : FunctionOrConstructorTypeNode +>TypeNode : TypeNode +>SignatureDeclaration : SignatureDeclaration + + _functionOrConstructorTypeNodeBrand: any; +>_functionOrConstructorTypeNodeBrand : any + } + interface TypeReferenceNode extends TypeNode { +>TypeReferenceNode : TypeReferenceNode +>TypeNode : TypeNode + + typeName: EntityName; +>typeName : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName + + typeArguments?: NodeArray; +>typeArguments : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + } + interface TypeQueryNode extends TypeNode { +>TypeQueryNode : TypeQueryNode +>TypeNode : TypeNode + + exprName: EntityName; +>exprName : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName + } + interface TypeLiteralNode extends TypeNode, Declaration { +>TypeLiteralNode : TypeLiteralNode +>TypeNode : TypeNode +>Declaration : Declaration + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>Node : Node + } + interface ArrayTypeNode extends TypeNode { +>ArrayTypeNode : ArrayTypeNode +>TypeNode : TypeNode + + elementType: TypeNode; +>elementType : TypeNode +>TypeNode : TypeNode + } + interface TupleTypeNode extends TypeNode { +>TupleTypeNode : TupleTypeNode +>TypeNode : TypeNode + + elementTypes: NodeArray; +>elementTypes : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + } + interface UnionTypeNode extends TypeNode { +>UnionTypeNode : UnionTypeNode +>TypeNode : TypeNode + + types: NodeArray; +>types : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + } + interface ParenthesizedTypeNode extends TypeNode { +>ParenthesizedTypeNode : ParenthesizedTypeNode +>TypeNode : TypeNode + + type: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + } + interface Expression extends Node { +>Expression : Expression +>Node : Node + + _expressionBrand: any; +>_expressionBrand : any + + contextualType?: Type; +>contextualType : Type +>Type : Type + } + interface UnaryExpression extends Expression { +>UnaryExpression : UnaryExpression +>Expression : Expression + + _unaryExpressionBrand: any; +>_unaryExpressionBrand : any + } + interface PrefixUnaryExpression extends UnaryExpression { +>PrefixUnaryExpression : PrefixUnaryExpression +>UnaryExpression : UnaryExpression + + operator: SyntaxKind; +>operator : SyntaxKind +>SyntaxKind : SyntaxKind + + operand: UnaryExpression; +>operand : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface PostfixUnaryExpression extends PostfixExpression { +>PostfixUnaryExpression : PostfixUnaryExpression +>PostfixExpression : PostfixExpression + + operand: LeftHandSideExpression; +>operand : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + operator: SyntaxKind; +>operator : SyntaxKind +>SyntaxKind : SyntaxKind + } + interface PostfixExpression extends UnaryExpression { +>PostfixExpression : PostfixExpression +>UnaryExpression : UnaryExpression + + _postfixExpressionBrand: any; +>_postfixExpressionBrand : any + } + interface LeftHandSideExpression extends PostfixExpression { +>LeftHandSideExpression : LeftHandSideExpression +>PostfixExpression : PostfixExpression + + _leftHandSideExpressionBrand: any; +>_leftHandSideExpressionBrand : any + } + interface MemberExpression extends LeftHandSideExpression { +>MemberExpression : MemberExpression +>LeftHandSideExpression : LeftHandSideExpression + + _memberExpressionBrand: any; +>_memberExpressionBrand : any + } + interface PrimaryExpression extends MemberExpression { +>PrimaryExpression : PrimaryExpression +>MemberExpression : MemberExpression + + _primaryExpressionBrand: any; +>_primaryExpressionBrand : any + } + interface DeleteExpression extends UnaryExpression { +>DeleteExpression : DeleteExpression +>UnaryExpression : UnaryExpression + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface TypeOfExpression extends UnaryExpression { +>TypeOfExpression : TypeOfExpression +>UnaryExpression : UnaryExpression + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface VoidExpression extends UnaryExpression { +>VoidExpression : VoidExpression +>UnaryExpression : UnaryExpression + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface YieldExpression extends Expression { +>YieldExpression : YieldExpression +>Expression : Expression + + asteriskToken?: Node; +>asteriskToken : Node +>Node : Node + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface BinaryExpression extends Expression { +>BinaryExpression : BinaryExpression +>Expression : Expression + + left: Expression; +>left : Expression +>Expression : Expression + + operator: SyntaxKind; +>operator : SyntaxKind +>SyntaxKind : SyntaxKind + + right: Expression; +>right : Expression +>Expression : Expression + } + interface ConditionalExpression extends Expression { +>ConditionalExpression : ConditionalExpression +>Expression : Expression + + condition: Expression; +>condition : Expression +>Expression : Expression + + whenTrue: Expression; +>whenTrue : Expression +>Expression : Expression + + whenFalse: Expression; +>whenFalse : Expression +>Expression : Expression + } + interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { +>FunctionExpression : FunctionExpression +>PrimaryExpression : PrimaryExpression +>FunctionLikeDeclaration : FunctionLikeDeclaration + + name?: Identifier; +>name : Identifier +>Identifier : Identifier + + body: Block | Expression; +>body : Expression | Block +>Block : Block +>Expression : Expression + } + interface LiteralExpression extends PrimaryExpression { +>LiteralExpression : LiteralExpression +>PrimaryExpression : PrimaryExpression + + text: string; +>text : string + + isUnterminated?: boolean; +>isUnterminated : boolean + } + interface StringLiteralExpression extends LiteralExpression { +>StringLiteralExpression : StringLiteralExpression +>LiteralExpression : LiteralExpression + + _stringLiteralExpressionBrand: any; +>_stringLiteralExpressionBrand : any + } + interface TemplateExpression extends PrimaryExpression { +>TemplateExpression : TemplateExpression +>PrimaryExpression : PrimaryExpression + + head: LiteralExpression; +>head : LiteralExpression +>LiteralExpression : LiteralExpression + + templateSpans: NodeArray; +>templateSpans : NodeArray +>NodeArray : NodeArray +>TemplateSpan : TemplateSpan + } + interface TemplateSpan extends Node { +>TemplateSpan : TemplateSpan +>Node : Node + + expression: Expression; +>expression : Expression +>Expression : Expression + + literal: LiteralExpression; +>literal : LiteralExpression +>LiteralExpression : LiteralExpression + } + interface ParenthesizedExpression extends PrimaryExpression { +>ParenthesizedExpression : ParenthesizedExpression +>PrimaryExpression : PrimaryExpression + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface ArrayLiteralExpression extends PrimaryExpression { +>ArrayLiteralExpression : ArrayLiteralExpression +>PrimaryExpression : PrimaryExpression + + elements: NodeArray; +>elements : NodeArray +>NodeArray : NodeArray +>Expression : Expression + } + interface ObjectLiteralExpression extends PrimaryExpression, Declaration { +>ObjectLiteralExpression : ObjectLiteralExpression +>PrimaryExpression : PrimaryExpression +>Declaration : Declaration + + properties: NodeArray; +>properties : NodeArray +>NodeArray : NodeArray +>ObjectLiteralElement : ObjectLiteralElement + } + interface PropertyAccessExpression extends MemberExpression { +>PropertyAccessExpression : PropertyAccessExpression +>MemberExpression : MemberExpression + + expression: LeftHandSideExpression; +>expression : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + name: Identifier; +>name : Identifier +>Identifier : Identifier + } + interface ElementAccessExpression extends MemberExpression { +>ElementAccessExpression : ElementAccessExpression +>MemberExpression : MemberExpression + + expression: LeftHandSideExpression; +>expression : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + argumentExpression?: Expression; +>argumentExpression : Expression +>Expression : Expression + } + interface CallExpression extends LeftHandSideExpression { +>CallExpression : CallExpression +>LeftHandSideExpression : LeftHandSideExpression + + expression: LeftHandSideExpression; +>expression : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + typeArguments?: NodeArray; +>typeArguments : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + + arguments: NodeArray; +>arguments : NodeArray +>NodeArray : NodeArray +>Expression : Expression + } + interface NewExpression extends CallExpression, PrimaryExpression { +>NewExpression : NewExpression +>CallExpression : CallExpression +>PrimaryExpression : PrimaryExpression + } + interface TaggedTemplateExpression extends MemberExpression { +>TaggedTemplateExpression : TaggedTemplateExpression +>MemberExpression : MemberExpression + + tag: LeftHandSideExpression; +>tag : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + template: LiteralExpression | TemplateExpression; +>template : LiteralExpression | TemplateExpression +>LiteralExpression : LiteralExpression +>TemplateExpression : TemplateExpression + } + type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression; +>CallLikeExpression : CallExpression | NewExpression | TaggedTemplateExpression +>CallExpression : CallExpression +>NewExpression : NewExpression +>TaggedTemplateExpression : TaggedTemplateExpression + + interface TypeAssertion extends UnaryExpression { +>TypeAssertion : TypeAssertion +>UnaryExpression : UnaryExpression + + type: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface Statement extends Node, ModuleElement { +>Statement : Statement +>Node : Node +>ModuleElement : ModuleElement + + _statementBrand: any; +>_statementBrand : any + } + interface Block extends Statement { +>Block : Block +>Statement : Statement + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>Statement : Statement + } + interface VariableStatement extends Statement { +>VariableStatement : VariableStatement +>Statement : Statement + + declarations: NodeArray; +>declarations : NodeArray +>NodeArray : NodeArray +>VariableDeclaration : VariableDeclaration + } + interface ExpressionStatement extends Statement { +>ExpressionStatement : ExpressionStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface IfStatement extends Statement { +>IfStatement : IfStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + + thenStatement: Statement; +>thenStatement : Statement +>Statement : Statement + + elseStatement?: Statement; +>elseStatement : Statement +>Statement : Statement + } + interface IterationStatement extends Statement { +>IterationStatement : IterationStatement +>Statement : Statement + + statement: Statement; +>statement : Statement +>Statement : Statement + } + interface DoStatement extends IterationStatement { +>DoStatement : DoStatement +>IterationStatement : IterationStatement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface WhileStatement extends IterationStatement { +>WhileStatement : WhileStatement +>IterationStatement : IterationStatement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface ForStatement extends IterationStatement { +>ForStatement : ForStatement +>IterationStatement : IterationStatement + + declarations?: NodeArray; +>declarations : NodeArray +>NodeArray : NodeArray +>VariableDeclaration : VariableDeclaration + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + + condition?: Expression; +>condition : Expression +>Expression : Expression + + iterator?: Expression; +>iterator : Expression +>Expression : Expression + } + interface ForInStatement extends IterationStatement { +>ForInStatement : ForInStatement +>IterationStatement : IterationStatement + + declarations?: NodeArray; +>declarations : NodeArray +>NodeArray : NodeArray +>VariableDeclaration : VariableDeclaration + + variable?: Expression; +>variable : Expression +>Expression : Expression + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface BreakOrContinueStatement extends Statement { +>BreakOrContinueStatement : BreakOrContinueStatement +>Statement : Statement + + label?: Identifier; +>label : Identifier +>Identifier : Identifier + } + interface ReturnStatement extends Statement { +>ReturnStatement : ReturnStatement +>Statement : Statement + + expression?: Expression; +>expression : Expression +>Expression : Expression + } + interface WithStatement extends Statement { +>WithStatement : WithStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + + statement: Statement; +>statement : Statement +>Statement : Statement + } + interface SwitchStatement extends Statement { +>SwitchStatement : SwitchStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + + clauses: NodeArray; +>clauses : NodeArray +>NodeArray : NodeArray +>CaseOrDefaultClause : CaseClause | DefaultClause + } + interface CaseClause extends Node { +>CaseClause : CaseClause +>Node : Node + + expression?: Expression; +>expression : Expression +>Expression : Expression + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>Statement : Statement + } + interface DefaultClause extends Node { +>DefaultClause : DefaultClause +>Node : Node + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>Statement : Statement + } + type CaseOrDefaultClause = CaseClause | DefaultClause; +>CaseOrDefaultClause : CaseClause | DefaultClause +>CaseClause : CaseClause +>DefaultClause : DefaultClause + + interface LabeledStatement extends Statement { +>LabeledStatement : LabeledStatement +>Statement : Statement + + label: Identifier; +>label : Identifier +>Identifier : Identifier + + statement: Statement; +>statement : Statement +>Statement : Statement + } + interface ThrowStatement extends Statement { +>ThrowStatement : ThrowStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface TryStatement extends Statement { +>TryStatement : TryStatement +>Statement : Statement + + tryBlock: Block; +>tryBlock : Block +>Block : Block + + catchClause?: CatchClause; +>catchClause : CatchClause +>CatchClause : CatchClause + + finallyBlock?: Block; +>finallyBlock : Block +>Block : Block + } + interface CatchClause extends Declaration { +>CatchClause : CatchClause +>Declaration : Declaration + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + block: Block; +>block : Block +>Block : Block + } + interface ModuleElement extends Node { +>ModuleElement : ModuleElement +>Node : Node + + _moduleElementBrand: any; +>_moduleElementBrand : any + } + interface ClassDeclaration extends Declaration, ModuleElement { +>ClassDeclaration : ClassDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + typeParameters?: NodeArray; +>typeParameters : NodeArray +>NodeArray : NodeArray +>TypeParameterDeclaration : TypeParameterDeclaration + + heritageClauses?: NodeArray; +>heritageClauses : NodeArray +>NodeArray : NodeArray +>HeritageClause : HeritageClause + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>ClassElement : ClassElement + } + interface ClassElement extends Declaration { +>ClassElement : ClassElement +>Declaration : Declaration + + _classElementBrand: any; +>_classElementBrand : any + } + interface InterfaceDeclaration extends Declaration, ModuleElement { +>InterfaceDeclaration : InterfaceDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + typeParameters?: NodeArray; +>typeParameters : NodeArray +>NodeArray : NodeArray +>TypeParameterDeclaration : TypeParameterDeclaration + + heritageClauses?: NodeArray; +>heritageClauses : NodeArray +>NodeArray : NodeArray +>HeritageClause : HeritageClause + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>Declaration : Declaration + } + interface HeritageClause extends Node { +>HeritageClause : HeritageClause +>Node : Node + + token: SyntaxKind; +>token : SyntaxKind +>SyntaxKind : SyntaxKind + + types?: NodeArray; +>types : NodeArray +>NodeArray : NodeArray +>TypeReferenceNode : TypeReferenceNode + } + interface TypeAliasDeclaration extends Declaration, ModuleElement { +>TypeAliasDeclaration : TypeAliasDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + type: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + } + interface EnumMember extends Declaration { +>EnumMember : EnumMember +>Declaration : Declaration + + name: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + interface EnumDeclaration extends Declaration, ModuleElement { +>EnumDeclaration : EnumDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>EnumMember : EnumMember + } + interface ModuleDeclaration extends Declaration, ModuleElement { +>ModuleDeclaration : ModuleDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier | LiteralExpression; +>name : Identifier | LiteralExpression +>Identifier : Identifier +>LiteralExpression : LiteralExpression + + body: ModuleBlock | ModuleDeclaration; +>body : ModuleDeclaration | ModuleBlock +>ModuleBlock : ModuleBlock +>ModuleDeclaration : ModuleDeclaration + } + interface ModuleBlock extends Node, ModuleElement { +>ModuleBlock : ModuleBlock +>Node : Node +>ModuleElement : ModuleElement + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>ModuleElement : ModuleElement + } + interface ImportDeclaration extends Declaration, ModuleElement { +>ImportDeclaration : ImportDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + moduleReference: EntityName | ExternalModuleReference; +>moduleReference : Identifier | QualifiedName | ExternalModuleReference +>EntityName : Identifier | QualifiedName +>ExternalModuleReference : ExternalModuleReference + } + interface ExternalModuleReference extends Node { +>ExternalModuleReference : ExternalModuleReference +>Node : Node + + expression?: Expression; +>expression : Expression +>Expression : Expression + } + interface ExportAssignment extends Statement, ModuleElement { +>ExportAssignment : ExportAssignment +>Statement : Statement +>ModuleElement : ModuleElement + + exportName: Identifier; +>exportName : Identifier +>Identifier : Identifier + } + interface FileReference extends TextRange { +>FileReference : FileReference +>TextRange : TextRange + + filename: string; +>filename : string + } + interface CommentRange extends TextRange { +>CommentRange : CommentRange +>TextRange : TextRange + + hasTrailingNewLine?: boolean; +>hasTrailingNewLine : boolean + } + interface SourceFile extends Declaration { +>SourceFile : SourceFile +>Declaration : Declaration + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>ModuleElement : ModuleElement + + endOfFileToken: Node; +>endOfFileToken : Node +>Node : Node + + filename: string; +>filename : string + + text: string; +>text : string + + getLineAndCharacterFromPosition(position: number): LineAndCharacter; +>getLineAndCharacterFromPosition : (position: number) => LineAndCharacter +>position : number +>LineAndCharacter : LineAndCharacter + + getPositionFromLineAndCharacter(line: number, character: number): number; +>getPositionFromLineAndCharacter : (line: number, character: number) => number +>line : number +>character : number + + getLineStarts(): number[]; +>getLineStarts : () => number[] + + amdDependencies: string[]; +>amdDependencies : string[] + + amdModuleName: string; +>amdModuleName : string + + referencedFiles: FileReference[]; +>referencedFiles : FileReference[] +>FileReference : FileReference + + referenceDiagnostics: Diagnostic[]; +>referenceDiagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + parseDiagnostics: Diagnostic[]; +>parseDiagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + grammarDiagnostics: Diagnostic[]; +>grammarDiagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + getSyntacticDiagnostics(): Diagnostic[]; +>getSyntacticDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + semanticDiagnostics: Diagnostic[]; +>semanticDiagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + hasNoDefaultLib: boolean; +>hasNoDefaultLib : boolean + + externalModuleIndicator: Node; +>externalModuleIndicator : Node +>Node : Node + + nodeCount: number; +>nodeCount : number + + identifierCount: number; +>identifierCount : number + + symbolCount: number; +>symbolCount : number + + isOpen: boolean; +>isOpen : boolean + + version: string; +>version : string + + languageVersion: ScriptTarget; +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget + + identifiers: Map; +>identifiers : Map +>Map : Map + } + interface Program { +>Program : Program + + getSourceFile(filename: string): SourceFile; +>getSourceFile : (filename: string) => SourceFile +>filename : string +>SourceFile : SourceFile + + getSourceFiles(): SourceFile[]; +>getSourceFiles : () => SourceFile[] +>SourceFile : SourceFile + + getCompilerOptions(): CompilerOptions; +>getCompilerOptions : () => CompilerOptions +>CompilerOptions : CompilerOptions + + getCompilerHost(): CompilerHost; +>getCompilerHost : () => CompilerHost +>CompilerHost : CompilerHost + + getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; +>getDiagnostics : (sourceFile?: SourceFile) => Diagnostic[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Diagnostic : Diagnostic + + getGlobalDiagnostics(): Diagnostic[]; +>getGlobalDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + getTypeChecker(fullTypeCheckMode: boolean): TypeChecker; +>getTypeChecker : (fullTypeCheckMode: boolean) => TypeChecker +>fullTypeCheckMode : boolean +>TypeChecker : TypeChecker + + getCommonSourceDirectory(): string; +>getCommonSourceDirectory : () => string + } + interface SourceMapSpan { +>SourceMapSpan : SourceMapSpan + + emittedLine: number; +>emittedLine : number + + emittedColumn: number; +>emittedColumn : number + + sourceLine: number; +>sourceLine : number + + sourceColumn: number; +>sourceColumn : number + + nameIndex?: number; +>nameIndex : number + + sourceIndex: number; +>sourceIndex : number + } + interface SourceMapData { +>SourceMapData : SourceMapData + + sourceMapFilePath: string; +>sourceMapFilePath : string + + jsSourceMappingURL: string; +>jsSourceMappingURL : string + + sourceMapFile: string; +>sourceMapFile : string + + sourceMapSourceRoot: string; +>sourceMapSourceRoot : string + + sourceMapSources: string[]; +>sourceMapSources : string[] + + inputSourceFileNames: string[]; +>inputSourceFileNames : string[] + + sourceMapNames?: string[]; +>sourceMapNames : string[] + + sourceMapMappings: string; +>sourceMapMappings : string + + sourceMapDecodedMappings: SourceMapSpan[]; +>sourceMapDecodedMappings : SourceMapSpan[] +>SourceMapSpan : SourceMapSpan + } + enum EmitReturnStatus { +>EmitReturnStatus : EmitReturnStatus + + Succeeded = 0, +>Succeeded : EmitReturnStatus + + AllOutputGenerationSkipped = 1, +>AllOutputGenerationSkipped : EmitReturnStatus + + JSGeneratedWithSemanticErrors = 2, +>JSGeneratedWithSemanticErrors : EmitReturnStatus + + DeclarationGenerationSkipped = 3, +>DeclarationGenerationSkipped : EmitReturnStatus + + EmitErrorsEncountered = 4, +>EmitErrorsEncountered : EmitReturnStatus + + CompilerOptionsErrors = 5, +>CompilerOptionsErrors : EmitReturnStatus + } + interface EmitResult { +>EmitResult : EmitResult + + emitResultStatus: EmitReturnStatus; +>emitResultStatus : EmitReturnStatus +>EmitReturnStatus : EmitReturnStatus + + diagnostics: Diagnostic[]; +>diagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + sourceMaps: SourceMapData[]; +>sourceMaps : SourceMapData[] +>SourceMapData : SourceMapData + } + interface TypeChecker { +>TypeChecker : TypeChecker + + getProgram(): Program; +>getProgram : () => Program +>Program : Program + + getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; +>getDiagnostics : (sourceFile?: SourceFile) => Diagnostic[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Diagnostic : Diagnostic + + getDeclarationDiagnostics(sourceFile: SourceFile): Diagnostic[]; +>getDeclarationDiagnostics : (sourceFile: SourceFile) => Diagnostic[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Diagnostic : Diagnostic + + getGlobalDiagnostics(): Diagnostic[]; +>getGlobalDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + getNodeCount(): number; +>getNodeCount : () => number + + getIdentifierCount(): number; +>getIdentifierCount : () => number + + getSymbolCount(): number; +>getSymbolCount : () => number + + getTypeCount(): number; +>getTypeCount : () => number + + emitFiles(targetSourceFile?: SourceFile): EmitResult; +>emitFiles : (targetSourceFile?: SourceFile) => EmitResult +>targetSourceFile : SourceFile +>SourceFile : SourceFile +>EmitResult : EmitResult + + getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; +>getTypeOfSymbolAtLocation : (symbol: Symbol, node: Node) => Type +>symbol : Symbol +>Symbol : Symbol +>node : Node +>Node : Node +>Type : Type + + getDeclaredTypeOfSymbol(symbol: Symbol): Type; +>getDeclaredTypeOfSymbol : (symbol: Symbol) => Type +>symbol : Symbol +>Symbol : Symbol +>Type : Type + + getPropertiesOfType(type: Type): Symbol[]; +>getPropertiesOfType : (type: Type) => Symbol[] +>type : Type +>Type : Type +>Symbol : Symbol + + getPropertyOfType(type: Type, propertyName: string): Symbol; +>getPropertyOfType : (type: Type, propertyName: string) => Symbol +>type : Type +>Type : Type +>propertyName : string +>Symbol : Symbol + + getSignaturesOfType(type: Type, kind: SignatureKind): Signature[]; +>getSignaturesOfType : (type: Type, kind: SignatureKind) => Signature[] +>type : Type +>Type : Type +>kind : SignatureKind +>SignatureKind : SignatureKind +>Signature : Signature + + getIndexTypeOfType(type: Type, kind: IndexKind): Type; +>getIndexTypeOfType : (type: Type, kind: IndexKind) => Type +>type : Type +>Type : Type +>kind : IndexKind +>IndexKind : IndexKind +>Type : Type + + getReturnTypeOfSignature(signature: Signature): Type; +>getReturnTypeOfSignature : (signature: Signature) => Type +>signature : Signature +>Signature : Signature +>Type : Type + + getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; +>getSymbolsInScope : (location: Node, meaning: SymbolFlags) => Symbol[] +>location : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags +>Symbol : Symbol + + getSymbolAtLocation(node: Node): Symbol; +>getSymbolAtLocation : (node: Node) => Symbol +>node : Node +>Node : Node +>Symbol : Symbol + + getShorthandAssignmentValueSymbol(location: Node): Symbol; +>getShorthandAssignmentValueSymbol : (location: Node) => Symbol +>location : Node +>Node : Node +>Symbol : Symbol + + getTypeAtLocation(node: Node): Type; +>getTypeAtLocation : (node: Node) => Type +>node : Node +>Node : Node +>Type : Type + + typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; +>typeToString : (type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => string +>type : Type +>Type : Type +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; +>symbolToString : (symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) => string +>symbol : Symbol +>Symbol : Symbol +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags + + getSymbolDisplayBuilder(): SymbolDisplayBuilder; +>getSymbolDisplayBuilder : () => SymbolDisplayBuilder +>SymbolDisplayBuilder : SymbolDisplayBuilder + + getFullyQualifiedName(symbol: Symbol): string; +>getFullyQualifiedName : (symbol: Symbol) => string +>symbol : Symbol +>Symbol : Symbol + + getAugmentedPropertiesOfType(type: Type): Symbol[]; +>getAugmentedPropertiesOfType : (type: Type) => Symbol[] +>type : Type +>Type : Type +>Symbol : Symbol + + getRootSymbols(symbol: Symbol): Symbol[]; +>getRootSymbols : (symbol: Symbol) => Symbol[] +>symbol : Symbol +>Symbol : Symbol +>Symbol : Symbol + + getContextualType(node: Expression): Type; +>getContextualType : (node: Expression) => Type +>node : Expression +>Expression : Expression +>Type : Type + + getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; +>getResolvedSignature : (node: CallExpression | NewExpression | TaggedTemplateExpression, candidatesOutArray?: Signature[]) => Signature +>node : CallExpression | NewExpression | TaggedTemplateExpression +>CallLikeExpression : CallExpression | NewExpression | TaggedTemplateExpression +>candidatesOutArray : Signature[] +>Signature : Signature +>Signature : Signature + + getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; +>getSignatureFromDeclaration : (declaration: SignatureDeclaration) => Signature +>declaration : SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration +>Signature : Signature + + isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; +>isImplementationOfOverload : (node: FunctionLikeDeclaration) => boolean +>node : FunctionLikeDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration + + isUndefinedSymbol(symbol: Symbol): boolean; +>isUndefinedSymbol : (symbol: Symbol) => boolean +>symbol : Symbol +>Symbol : Symbol + + isArgumentsSymbol(symbol: Symbol): boolean; +>isArgumentsSymbol : (symbol: Symbol) => boolean +>symbol : Symbol +>Symbol : Symbol + + isEmitBlocked(sourceFile?: SourceFile): boolean; +>isEmitBlocked : (sourceFile?: SourceFile) => boolean +>sourceFile : SourceFile +>SourceFile : SourceFile + + getEnumMemberValue(node: EnumMember): number; +>getEnumMemberValue : (node: EnumMember) => number +>node : EnumMember +>EnumMember : EnumMember + + isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; +>isValidPropertyAccess : (node: QualifiedName | PropertyAccessExpression, propertyName: string) => boolean +>node : QualifiedName | PropertyAccessExpression +>PropertyAccessExpression : PropertyAccessExpression +>QualifiedName : QualifiedName +>propertyName : string + + getAliasedSymbol(symbol: Symbol): Symbol; +>getAliasedSymbol : (symbol: Symbol) => Symbol +>symbol : Symbol +>Symbol : Symbol +>Symbol : Symbol + } + interface SymbolDisplayBuilder { +>SymbolDisplayBuilder : SymbolDisplayBuilder + + buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildTypeDisplay : (type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>type : Type +>Type : Type +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void; +>buildSymbolDisplay : (symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags) => void +>symbol : Symbol +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags +>flags : SymbolFormatFlags +>SymbolFormatFlags : SymbolFormatFlags + + buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildSignatureDisplay : (signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>signatures : Signature +>Signature : Signature +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildParameterDisplay : (parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>parameter : Symbol +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildTypeParameterDisplay : (tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>tp : TypeParameter +>TypeParameter : TypeParameter +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void; +>buildTypeParameterDisplayFromSymbol : (symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags) => void +>symbol : Symbol +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaraiton : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildDisplayForParametersAndDelimiters : (parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>parameters : Symbol[] +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildDisplayForTypeParametersAndDelimiters : (typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>typeParameters : TypeParameter[] +>TypeParameter : TypeParameter +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildReturnTypeDisplay : (signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>signature : Signature +>Signature : Signature +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + } + interface SymbolWriter { +>SymbolWriter : SymbolWriter + + writeKeyword(text: string): void; +>writeKeyword : (text: string) => void +>text : string + + writeOperator(text: string): void; +>writeOperator : (text: string) => void +>text : string + + writePunctuation(text: string): void; +>writePunctuation : (text: string) => void +>text : string + + writeSpace(text: string): void; +>writeSpace : (text: string) => void +>text : string + + writeStringLiteral(text: string): void; +>writeStringLiteral : (text: string) => void +>text : string + + writeParameter(text: string): void; +>writeParameter : (text: string) => void +>text : string + + writeSymbol(text: string, symbol: Symbol): void; +>writeSymbol : (text: string, symbol: Symbol) => void +>text : string +>symbol : Symbol +>Symbol : Symbol + + writeLine(): void; +>writeLine : () => void + + increaseIndent(): void; +>increaseIndent : () => void + + decreaseIndent(): void; +>decreaseIndent : () => void + + clear(): void; +>clear : () => void + + trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void; +>trackSymbol : (symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) => void +>symbol : Symbol +>Symbol : Symbol +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags + } + const enum TypeFormatFlags { +>TypeFormatFlags : TypeFormatFlags + + None = 0, +>None : TypeFormatFlags + + WriteArrayAsGenericType = 1, +>WriteArrayAsGenericType : TypeFormatFlags + + UseTypeOfFunction = 2, +>UseTypeOfFunction : TypeFormatFlags + + NoTruncation = 4, +>NoTruncation : TypeFormatFlags + + WriteArrowStyleSignature = 8, +>WriteArrowStyleSignature : TypeFormatFlags + + WriteOwnNameForAnyLike = 16, +>WriteOwnNameForAnyLike : TypeFormatFlags + + WriteTypeArgumentsOfSignature = 32, +>WriteTypeArgumentsOfSignature : TypeFormatFlags + + InElementType = 64, +>InElementType : TypeFormatFlags + } + const enum SymbolFormatFlags { +>SymbolFormatFlags : SymbolFormatFlags + + None = 0, +>None : SymbolFormatFlags + + WriteTypeParametersOrArguments = 1, +>WriteTypeParametersOrArguments : SymbolFormatFlags + + UseOnlyExternalAliasing = 2, +>UseOnlyExternalAliasing : SymbolFormatFlags + } + const enum SymbolAccessibility { +>SymbolAccessibility : SymbolAccessibility + + Accessible = 0, +>Accessible : SymbolAccessibility + + NotAccessible = 1, +>NotAccessible : SymbolAccessibility + + CannotBeNamed = 2, +>CannotBeNamed : SymbolAccessibility + } + interface SymbolVisibilityResult { +>SymbolVisibilityResult : SymbolVisibilityResult + + accessibility: SymbolAccessibility; +>accessibility : SymbolAccessibility +>SymbolAccessibility : SymbolAccessibility + + aliasesToMakeVisible?: ImportDeclaration[]; +>aliasesToMakeVisible : ImportDeclaration[] +>ImportDeclaration : ImportDeclaration + + errorSymbolName?: string; +>errorSymbolName : string + + errorNode?: Node; +>errorNode : Node +>Node : Node + } + interface SymbolAccessiblityResult extends SymbolVisibilityResult { +>SymbolAccessiblityResult : SymbolAccessiblityResult +>SymbolVisibilityResult : SymbolVisibilityResult + + errorModuleName?: string; +>errorModuleName : string + } + interface EmitResolver { +>EmitResolver : EmitResolver + + getProgram(): Program; +>getProgram : () => Program +>Program : Program + + getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; +>getLocalNameOfContainer : (container: EnumDeclaration | ModuleDeclaration) => string +>container : EnumDeclaration | ModuleDeclaration +>ModuleDeclaration : ModuleDeclaration +>EnumDeclaration : EnumDeclaration + + getExpressionNamePrefix(node: Identifier): string; +>getExpressionNamePrefix : (node: Identifier) => string +>node : Identifier +>Identifier : Identifier + + getExportAssignmentName(node: SourceFile): string; +>getExportAssignmentName : (node: SourceFile) => string +>node : SourceFile +>SourceFile : SourceFile + + isReferencedImportDeclaration(node: ImportDeclaration): boolean; +>isReferencedImportDeclaration : (node: ImportDeclaration) => boolean +>node : ImportDeclaration +>ImportDeclaration : ImportDeclaration + + isTopLevelValueImportWithEntityName(node: ImportDeclaration): boolean; +>isTopLevelValueImportWithEntityName : (node: ImportDeclaration) => boolean +>node : ImportDeclaration +>ImportDeclaration : ImportDeclaration + + getNodeCheckFlags(node: Node): NodeCheckFlags; +>getNodeCheckFlags : (node: Node) => NodeCheckFlags +>node : Node +>Node : Node +>NodeCheckFlags : NodeCheckFlags + + getEnumMemberValue(node: EnumMember): number; +>getEnumMemberValue : (node: EnumMember) => number +>node : EnumMember +>EnumMember : EnumMember + + hasSemanticErrors(sourceFile?: SourceFile): boolean; +>hasSemanticErrors : (sourceFile?: SourceFile) => boolean +>sourceFile : SourceFile +>SourceFile : SourceFile + + isDeclarationVisible(node: Declaration): boolean; +>isDeclarationVisible : (node: Declaration) => boolean +>node : Declaration +>Declaration : Declaration + + isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; +>isImplementationOfOverload : (node: FunctionLikeDeclaration) => boolean +>node : FunctionLikeDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration + + writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; +>writeTypeOfDeclaration : (declaration: ParameterDeclaration | VariableDeclaration | AccessorDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void +>declaration : ParameterDeclaration | VariableDeclaration | AccessorDeclaration +>AccessorDeclaration : AccessorDeclaration +>VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags +>writer : SymbolWriter +>SymbolWriter : SymbolWriter + + writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; +>writeReturnTypeOfSignatureDeclaration : (signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void +>signatureDeclaration : SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags +>writer : SymbolWriter +>SymbolWriter : SymbolWriter + + isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; +>isSymbolAccessible : (symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags) => SymbolAccessiblityResult +>symbol : Symbol +>Symbol : Symbol +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags +>SymbolAccessiblityResult : SymbolAccessiblityResult + + isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; +>isEntityNameVisible : (entityName: Identifier | QualifiedName, enclosingDeclaration: Node) => SymbolVisibilityResult +>entityName : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName +>enclosingDeclaration : Node +>Node : Node +>SymbolVisibilityResult : SymbolVisibilityResult + + getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number; +>getConstantValue : (node: PropertyAccessExpression | ElementAccessExpression) => number +>node : PropertyAccessExpression | ElementAccessExpression +>PropertyAccessExpression : PropertyAccessExpression +>ElementAccessExpression : ElementAccessExpression + + isEmitBlocked(sourceFile?: SourceFile): boolean; +>isEmitBlocked : (sourceFile?: SourceFile) => boolean +>sourceFile : SourceFile +>SourceFile : SourceFile + } + const enum SymbolFlags { +>SymbolFlags : SymbolFlags + + FunctionScopedVariable = 1, +>FunctionScopedVariable : SymbolFlags + + BlockScopedVariable = 2, +>BlockScopedVariable : SymbolFlags + + Property = 4, +>Property : SymbolFlags + + EnumMember = 8, +>EnumMember : SymbolFlags + + Function = 16, +>Function : SymbolFlags + + Class = 32, +>Class : SymbolFlags + + Interface = 64, +>Interface : SymbolFlags + + ConstEnum = 128, +>ConstEnum : SymbolFlags + + RegularEnum = 256, +>RegularEnum : SymbolFlags + + ValueModule = 512, +>ValueModule : SymbolFlags + + NamespaceModule = 1024, +>NamespaceModule : SymbolFlags + + TypeLiteral = 2048, +>TypeLiteral : SymbolFlags + + ObjectLiteral = 4096, +>ObjectLiteral : SymbolFlags + + Method = 8192, +>Method : SymbolFlags + + Constructor = 16384, +>Constructor : SymbolFlags + + GetAccessor = 32768, +>GetAccessor : SymbolFlags + + SetAccessor = 65536, +>SetAccessor : SymbolFlags + + CallSignature = 131072, +>CallSignature : SymbolFlags + + ConstructSignature = 262144, +>ConstructSignature : SymbolFlags + + IndexSignature = 524288, +>IndexSignature : SymbolFlags + + TypeParameter = 1048576, +>TypeParameter : SymbolFlags + + TypeAlias = 2097152, +>TypeAlias : SymbolFlags + + ExportValue = 4194304, +>ExportValue : SymbolFlags + + ExportType = 8388608, +>ExportType : SymbolFlags + + ExportNamespace = 16777216, +>ExportNamespace : SymbolFlags + + Import = 33554432, +>Import : SymbolFlags + + Instantiated = 67108864, +>Instantiated : SymbolFlags + + Merged = 134217728, +>Merged : SymbolFlags + + Transient = 268435456, +>Transient : SymbolFlags + + Prototype = 536870912, +>Prototype : SymbolFlags + + UnionProperty = 1073741824, +>UnionProperty : SymbolFlags + + Enum = 384, +>Enum : SymbolFlags + + Variable = 3, +>Variable : SymbolFlags + + Value = 107455, +>Value : SymbolFlags + + Type = 3152352, +>Type : SymbolFlags + + Namespace = 1536, +>Namespace : SymbolFlags + + Module = 1536, +>Module : SymbolFlags + + Accessor = 98304, +>Accessor : SymbolFlags + + Signature = 917504, +>Signature : SymbolFlags + + FunctionScopedVariableExcludes = 107454, +>FunctionScopedVariableExcludes : SymbolFlags + + BlockScopedVariableExcludes = 107455, +>BlockScopedVariableExcludes : SymbolFlags + + ParameterExcludes = 107455, +>ParameterExcludes : SymbolFlags + + PropertyExcludes = 107455, +>PropertyExcludes : SymbolFlags + + EnumMemberExcludes = 107455, +>EnumMemberExcludes : SymbolFlags + + FunctionExcludes = 106927, +>FunctionExcludes : SymbolFlags + + ClassExcludes = 3258879, +>ClassExcludes : SymbolFlags + + InterfaceExcludes = 3152288, +>InterfaceExcludes : SymbolFlags + + RegularEnumExcludes = 3258623, +>RegularEnumExcludes : SymbolFlags + + ConstEnumExcludes = 3259263, +>ConstEnumExcludes : SymbolFlags + + ValueModuleExcludes = 106639, +>ValueModuleExcludes : SymbolFlags + + NamespaceModuleExcludes = 0, +>NamespaceModuleExcludes : SymbolFlags + + MethodExcludes = 99263, +>MethodExcludes : SymbolFlags + + GetAccessorExcludes = 41919, +>GetAccessorExcludes : SymbolFlags + + SetAccessorExcludes = 74687, +>SetAccessorExcludes : SymbolFlags + + TypeParameterExcludes = 2103776, +>TypeParameterExcludes : SymbolFlags + + TypeAliasExcludes = 3152352, +>TypeAliasExcludes : SymbolFlags + + ImportExcludes = 33554432, +>ImportExcludes : SymbolFlags + + ModuleMember = 35653619, +>ModuleMember : SymbolFlags + + ExportHasLocal = 944, +>ExportHasLocal : SymbolFlags + + HasLocals = 1041936, +>HasLocals : SymbolFlags + + HasExports = 1952, +>HasExports : SymbolFlags + + HasMembers = 6240, +>HasMembers : SymbolFlags + + IsContainer = 1048560, +>IsContainer : SymbolFlags + + PropertyOrAccessor = 98308, +>PropertyOrAccessor : SymbolFlags + + Export = 29360128, +>Export : SymbolFlags + } + interface Symbol { +>Symbol : Symbol + + flags: SymbolFlags; +>flags : SymbolFlags +>SymbolFlags : SymbolFlags + + name: string; +>name : string + + id?: number; +>id : number + + mergeId?: number; +>mergeId : number + + declarations?: Declaration[]; +>declarations : Declaration[] +>Declaration : Declaration + + parent?: Symbol; +>parent : Symbol +>Symbol : Symbol + + members?: SymbolTable; +>members : SymbolTable +>SymbolTable : SymbolTable + + exports?: SymbolTable; +>exports : SymbolTable +>SymbolTable : SymbolTable + + exportSymbol?: Symbol; +>exportSymbol : Symbol +>Symbol : Symbol + + valueDeclaration?: Declaration; +>valueDeclaration : Declaration +>Declaration : Declaration + + constEnumOnlyModule?: boolean; +>constEnumOnlyModule : boolean + } + interface SymbolLinks { +>SymbolLinks : SymbolLinks + + target?: Symbol; +>target : Symbol +>Symbol : Symbol + + type?: Type; +>type : Type +>Type : Type + + declaredType?: Type; +>declaredType : Type +>Type : Type + + mapper?: TypeMapper; +>mapper : TypeMapper +>TypeMapper : TypeMapper + + referenced?: boolean; +>referenced : boolean + + exportAssignSymbol?: Symbol; +>exportAssignSymbol : Symbol +>Symbol : Symbol + + unionType?: UnionType; +>unionType : UnionType +>UnionType : UnionType + } + interface TransientSymbol extends Symbol, SymbolLinks { +>TransientSymbol : TransientSymbol +>Symbol : Symbol +>SymbolLinks : SymbolLinks + } + interface SymbolTable { +>SymbolTable : SymbolTable + + [index: string]: Symbol; +>index : string +>Symbol : Symbol + } + const enum NodeCheckFlags { +>NodeCheckFlags : NodeCheckFlags + + TypeChecked = 1, +>TypeChecked : NodeCheckFlags + + LexicalThis = 2, +>LexicalThis : NodeCheckFlags + + CaptureThis = 4, +>CaptureThis : NodeCheckFlags + + EmitExtends = 8, +>EmitExtends : NodeCheckFlags + + SuperInstance = 16, +>SuperInstance : NodeCheckFlags + + SuperStatic = 32, +>SuperStatic : NodeCheckFlags + + ContextChecked = 64, +>ContextChecked : NodeCheckFlags + + EnumValuesComputed = 128, +>EnumValuesComputed : NodeCheckFlags + } + interface NodeLinks { +>NodeLinks : NodeLinks + + resolvedType?: Type; +>resolvedType : Type +>Type : Type + + resolvedSignature?: Signature; +>resolvedSignature : Signature +>Signature : Signature + + resolvedSymbol?: Symbol; +>resolvedSymbol : Symbol +>Symbol : Symbol + + flags?: NodeCheckFlags; +>flags : NodeCheckFlags +>NodeCheckFlags : NodeCheckFlags + + enumMemberValue?: number; +>enumMemberValue : number + + isIllegalTypeReferenceInConstraint?: boolean; +>isIllegalTypeReferenceInConstraint : boolean + + isVisible?: boolean; +>isVisible : boolean + + localModuleName?: string; +>localModuleName : string + + assignmentChecks?: Map; +>assignmentChecks : Map +>Map : Map + } + const enum TypeFlags { +>TypeFlags : TypeFlags + + Any = 1, +>Any : TypeFlags + + String = 2, +>String : TypeFlags + + Number = 4, +>Number : TypeFlags + + Boolean = 8, +>Boolean : TypeFlags + + Void = 16, +>Void : TypeFlags + + Undefined = 32, +>Undefined : TypeFlags + + Null = 64, +>Null : TypeFlags + + Enum = 128, +>Enum : TypeFlags + + StringLiteral = 256, +>StringLiteral : TypeFlags + + TypeParameter = 512, +>TypeParameter : TypeFlags + + Class = 1024, +>Class : TypeFlags + + Interface = 2048, +>Interface : TypeFlags + + Reference = 4096, +>Reference : TypeFlags + + Tuple = 8192, +>Tuple : TypeFlags + + Union = 16384, +>Union : TypeFlags + + Anonymous = 32768, +>Anonymous : TypeFlags + + FromSignature = 65536, +>FromSignature : TypeFlags + + Intrinsic = 127, +>Intrinsic : TypeFlags + + StringLike = 258, +>StringLike : TypeFlags + + NumberLike = 132, +>NumberLike : TypeFlags + + ObjectType = 48128, +>ObjectType : TypeFlags + } + interface Type { +>Type : Type + + flags: TypeFlags; +>flags : TypeFlags +>TypeFlags : TypeFlags + + id: number; +>id : number + + symbol?: Symbol; +>symbol : Symbol +>Symbol : Symbol + } + interface IntrinsicType extends Type { +>IntrinsicType : IntrinsicType +>Type : Type + + intrinsicName: string; +>intrinsicName : string + } + interface StringLiteralType extends Type { +>StringLiteralType : StringLiteralType +>Type : Type + + text: string; +>text : string + } + interface ObjectType extends Type { +>ObjectType : ObjectType +>Type : Type + } + interface InterfaceType extends ObjectType { +>InterfaceType : InterfaceType +>ObjectType : ObjectType + + typeParameters: TypeParameter[]; +>typeParameters : TypeParameter[] +>TypeParameter : TypeParameter + + baseTypes: ObjectType[]; +>baseTypes : ObjectType[] +>ObjectType : ObjectType + + declaredProperties: Symbol[]; +>declaredProperties : Symbol[] +>Symbol : Symbol + + declaredCallSignatures: Signature[]; +>declaredCallSignatures : Signature[] +>Signature : Signature + + declaredConstructSignatures: Signature[]; +>declaredConstructSignatures : Signature[] +>Signature : Signature + + declaredStringIndexType: Type; +>declaredStringIndexType : Type +>Type : Type + + declaredNumberIndexType: Type; +>declaredNumberIndexType : Type +>Type : Type + } + interface TypeReference extends ObjectType { +>TypeReference : TypeReference +>ObjectType : ObjectType + + target: GenericType; +>target : GenericType +>GenericType : GenericType + + typeArguments: Type[]; +>typeArguments : Type[] +>Type : Type + } + interface GenericType extends InterfaceType, TypeReference { +>GenericType : GenericType +>InterfaceType : InterfaceType +>TypeReference : TypeReference + + instantiations: Map; +>instantiations : Map +>Map : Map +>TypeReference : TypeReference + + openReferenceTargets: GenericType[]; +>openReferenceTargets : GenericType[] +>GenericType : GenericType + + openReferenceChecks: Map; +>openReferenceChecks : Map +>Map : Map + } + interface TupleType extends ObjectType { +>TupleType : TupleType +>ObjectType : ObjectType + + elementTypes: Type[]; +>elementTypes : Type[] +>Type : Type + + baseArrayType: TypeReference; +>baseArrayType : TypeReference +>TypeReference : TypeReference + } + interface UnionType extends Type { +>UnionType : UnionType +>Type : Type + + types: Type[]; +>types : Type[] +>Type : Type + + resolvedProperties: SymbolTable; +>resolvedProperties : SymbolTable +>SymbolTable : SymbolTable + } + interface ResolvedType extends ObjectType, UnionType { +>ResolvedType : ResolvedType +>ObjectType : ObjectType +>UnionType : UnionType + + members: SymbolTable; +>members : SymbolTable +>SymbolTable : SymbolTable + + properties: Symbol[]; +>properties : Symbol[] +>Symbol : Symbol + + callSignatures: Signature[]; +>callSignatures : Signature[] +>Signature : Signature + + constructSignatures: Signature[]; +>constructSignatures : Signature[] +>Signature : Signature + + stringIndexType: Type; +>stringIndexType : Type +>Type : Type + + numberIndexType: Type; +>numberIndexType : Type +>Type : Type + } + interface TypeParameter extends Type { +>TypeParameter : TypeParameter +>Type : Type + + constraint: Type; +>constraint : Type +>Type : Type + + target?: TypeParameter; +>target : TypeParameter +>TypeParameter : TypeParameter + + mapper?: TypeMapper; +>mapper : TypeMapper +>TypeMapper : TypeMapper + } + const enum SignatureKind { +>SignatureKind : SignatureKind + + Call = 0, +>Call : SignatureKind + + Construct = 1, +>Construct : SignatureKind + } + interface Signature { +>Signature : Signature + + declaration: SignatureDeclaration; +>declaration : SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration + + typeParameters: TypeParameter[]; +>typeParameters : TypeParameter[] +>TypeParameter : TypeParameter + + parameters: Symbol[]; +>parameters : Symbol[] +>Symbol : Symbol + + resolvedReturnType: Type; +>resolvedReturnType : Type +>Type : Type + + minArgumentCount: number; +>minArgumentCount : number + + hasRestParameter: boolean; +>hasRestParameter : boolean + + hasStringLiterals: boolean; +>hasStringLiterals : boolean + + target?: Signature; +>target : Signature +>Signature : Signature + + mapper?: TypeMapper; +>mapper : TypeMapper +>TypeMapper : TypeMapper + + unionSignatures?: Signature[]; +>unionSignatures : Signature[] +>Signature : Signature + + erasedSignatureCache?: Signature; +>erasedSignatureCache : Signature +>Signature : Signature + + isolatedSignatureType?: ObjectType; +>isolatedSignatureType : ObjectType +>ObjectType : ObjectType + } + const enum IndexKind { +>IndexKind : IndexKind + + String = 0, +>String : IndexKind + + Number = 1, +>Number : IndexKind + } + interface TypeMapper { +>TypeMapper : TypeMapper + + (t: Type): Type; +>t : Type +>Type : Type +>Type : Type + } + interface TypeInferences { +>TypeInferences : TypeInferences + + primary: Type[]; +>primary : Type[] +>Type : Type + + secondary: Type[]; +>secondary : Type[] +>Type : Type + } + interface InferenceContext { +>InferenceContext : InferenceContext + + typeParameters: TypeParameter[]; +>typeParameters : TypeParameter[] +>TypeParameter : TypeParameter + + inferUnionTypes: boolean; +>inferUnionTypes : boolean + + inferences: TypeInferences[]; +>inferences : TypeInferences[] +>TypeInferences : TypeInferences + + inferredTypes: Type[]; +>inferredTypes : Type[] +>Type : Type + + failedTypeParameterIndex?: number; +>failedTypeParameterIndex : number + } + interface DiagnosticMessage { +>DiagnosticMessage : DiagnosticMessage + + key: string; +>key : string + + category: DiagnosticCategory; +>category : DiagnosticCategory +>DiagnosticCategory : DiagnosticCategory + + code: number; +>code : number + + isEarly?: boolean; +>isEarly : boolean + } + interface DiagnosticMessageChain { +>DiagnosticMessageChain : DiagnosticMessageChain + + messageText: string; +>messageText : string + + category: DiagnosticCategory; +>category : DiagnosticCategory +>DiagnosticCategory : DiagnosticCategory + + code: number; +>code : number + + next?: DiagnosticMessageChain; +>next : DiagnosticMessageChain +>DiagnosticMessageChain : DiagnosticMessageChain + } + interface Diagnostic { +>Diagnostic : Diagnostic + + file: SourceFile; +>file : SourceFile +>SourceFile : SourceFile + + start: number; +>start : number + + length: number; +>length : number + + messageText: string; +>messageText : string + + category: DiagnosticCategory; +>category : DiagnosticCategory +>DiagnosticCategory : DiagnosticCategory + + code: number; +>code : number + + /** + * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit + */ + isEarly?: boolean; +>isEarly : boolean + } + enum DiagnosticCategory { +>DiagnosticCategory : DiagnosticCategory + + Warning = 0, +>Warning : DiagnosticCategory + + Error = 1, +>Error : DiagnosticCategory + + Message = 2, +>Message : DiagnosticCategory + } + interface CompilerOptions { +>CompilerOptions : CompilerOptions + + allowNonTsExtensions?: boolean; +>allowNonTsExtensions : boolean + + charset?: string; +>charset : string + + codepage?: number; +>codepage : number + + declaration?: boolean; +>declaration : boolean + + diagnostics?: boolean; +>diagnostics : boolean + + emitBOM?: boolean; +>emitBOM : boolean + + help?: boolean; +>help : boolean + + locale?: string; +>locale : string + + mapRoot?: string; +>mapRoot : string + + module?: ModuleKind; +>module : ModuleKind +>ModuleKind : ModuleKind + + noEmitOnError?: boolean; +>noEmitOnError : boolean + + noErrorTruncation?: boolean; +>noErrorTruncation : boolean + + noImplicitAny?: boolean; +>noImplicitAny : boolean + + noLib?: boolean; +>noLib : boolean + + noLibCheck?: boolean; +>noLibCheck : boolean + + noResolve?: boolean; +>noResolve : boolean + + out?: string; +>out : string + + outDir?: string; +>outDir : string + + preserveConstEnums?: boolean; +>preserveConstEnums : boolean + + removeComments?: boolean; +>removeComments : boolean + + sourceMap?: boolean; +>sourceMap : boolean + + sourceRoot?: string; +>sourceRoot : string + + suppressImplicitAnyIndexErrors?: boolean; +>suppressImplicitAnyIndexErrors : boolean + + target?: ScriptTarget; +>target : ScriptTarget +>ScriptTarget : ScriptTarget + + version?: boolean; +>version : boolean + + watch?: boolean; +>watch : boolean + + [option: string]: string | number | boolean; +>option : string + } + const enum ModuleKind { +>ModuleKind : ModuleKind + + None = 0, +>None : ModuleKind + + CommonJS = 1, +>CommonJS : ModuleKind + + AMD = 2, +>AMD : ModuleKind + } + interface LineAndCharacter { +>LineAndCharacter : LineAndCharacter + + line: number; +>line : number + + character: number; +>character : number + } + const enum ScriptTarget { +>ScriptTarget : ScriptTarget + + ES3 = 0, +>ES3 : ScriptTarget + + ES5 = 1, +>ES5 : ScriptTarget + + ES6 = 2, +>ES6 : ScriptTarget + + Latest = 2, +>Latest : ScriptTarget + } + interface ParsedCommandLine { +>ParsedCommandLine : ParsedCommandLine + + options: CompilerOptions; +>options : CompilerOptions +>CompilerOptions : CompilerOptions + + filenames: string[]; +>filenames : string[] + + errors: Diagnostic[]; +>errors : Diagnostic[] +>Diagnostic : Diagnostic + } + interface CommandLineOption { +>CommandLineOption : CommandLineOption + + name: string; +>name : string + + type: string | Map; +>type : string | Map +>Map : Map + + shortName?: string; +>shortName : string + + description?: DiagnosticMessage; +>description : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + + paramType?: DiagnosticMessage; +>paramType : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + + error?: DiagnosticMessage; +>error : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + } + const enum CharacterCodes { +>CharacterCodes : CharacterCodes + + nullCharacter = 0, +>nullCharacter : CharacterCodes + + maxAsciiCharacter = 127, +>maxAsciiCharacter : CharacterCodes + + lineFeed = 10, +>lineFeed : CharacterCodes + + carriageReturn = 13, +>carriageReturn : CharacterCodes + + lineSeparator = 8232, +>lineSeparator : CharacterCodes + + paragraphSeparator = 8233, +>paragraphSeparator : CharacterCodes + + nextLine = 133, +>nextLine : CharacterCodes + + space = 32, +>space : CharacterCodes + + nonBreakingSpace = 160, +>nonBreakingSpace : CharacterCodes + + enQuad = 8192, +>enQuad : CharacterCodes + + emQuad = 8193, +>emQuad : CharacterCodes + + enSpace = 8194, +>enSpace : CharacterCodes + + emSpace = 8195, +>emSpace : CharacterCodes + + threePerEmSpace = 8196, +>threePerEmSpace : CharacterCodes + + fourPerEmSpace = 8197, +>fourPerEmSpace : CharacterCodes + + sixPerEmSpace = 8198, +>sixPerEmSpace : CharacterCodes + + figureSpace = 8199, +>figureSpace : CharacterCodes + + punctuationSpace = 8200, +>punctuationSpace : CharacterCodes + + thinSpace = 8201, +>thinSpace : CharacterCodes + + hairSpace = 8202, +>hairSpace : CharacterCodes + + zeroWidthSpace = 8203, +>zeroWidthSpace : CharacterCodes + + narrowNoBreakSpace = 8239, +>narrowNoBreakSpace : CharacterCodes + + ideographicSpace = 12288, +>ideographicSpace : CharacterCodes + + mathematicalSpace = 8287, +>mathematicalSpace : CharacterCodes + + ogham = 5760, +>ogham : CharacterCodes + + _ = 95, +>_ : CharacterCodes + + $ = 36, +>$ : CharacterCodes + + _0 = 48, +>_0 : CharacterCodes + + _1 = 49, +>_1 : CharacterCodes + + _2 = 50, +>_2 : CharacterCodes + + _3 = 51, +>_3 : CharacterCodes + + _4 = 52, +>_4 : CharacterCodes + + _5 = 53, +>_5 : CharacterCodes + + _6 = 54, +>_6 : CharacterCodes + + _7 = 55, +>_7 : CharacterCodes + + _8 = 56, +>_8 : CharacterCodes + + _9 = 57, +>_9 : CharacterCodes + + a = 97, +>a : CharacterCodes + + b = 98, +>b : CharacterCodes + + c = 99, +>c : CharacterCodes + + d = 100, +>d : CharacterCodes + + e = 101, +>e : CharacterCodes + + f = 102, +>f : CharacterCodes + + g = 103, +>g : CharacterCodes + + h = 104, +>h : CharacterCodes + + i = 105, +>i : CharacterCodes + + j = 106, +>j : CharacterCodes + + k = 107, +>k : CharacterCodes + + l = 108, +>l : CharacterCodes + + m = 109, +>m : CharacterCodes + + n = 110, +>n : CharacterCodes + + o = 111, +>o : CharacterCodes + + p = 112, +>p : CharacterCodes + + q = 113, +>q : CharacterCodes + + r = 114, +>r : CharacterCodes + + s = 115, +>s : CharacterCodes + + t = 116, +>t : CharacterCodes + + u = 117, +>u : CharacterCodes + + v = 118, +>v : CharacterCodes + + w = 119, +>w : CharacterCodes + + x = 120, +>x : CharacterCodes + + y = 121, +>y : CharacterCodes + + z = 122, +>z : CharacterCodes + + A = 65, +>A : CharacterCodes + + B = 66, +>B : CharacterCodes + + C = 67, +>C : CharacterCodes + + D = 68, +>D : CharacterCodes + + E = 69, +>E : CharacterCodes + + F = 70, +>F : CharacterCodes + + G = 71, +>G : CharacterCodes + + H = 72, +>H : CharacterCodes + + I = 73, +>I : CharacterCodes + + J = 74, +>J : CharacterCodes + + K = 75, +>K : CharacterCodes + + L = 76, +>L : CharacterCodes + + M = 77, +>M : CharacterCodes + + N = 78, +>N : CharacterCodes + + O = 79, +>O : CharacterCodes + + P = 80, +>P : CharacterCodes + + Q = 81, +>Q : CharacterCodes + + R = 82, +>R : CharacterCodes + + S = 83, +>S : CharacterCodes + + T = 84, +>T : CharacterCodes + + U = 85, +>U : CharacterCodes + + V = 86, +>V : CharacterCodes + + W = 87, +>W : CharacterCodes + + X = 88, +>X : CharacterCodes + + Y = 89, +>Y : CharacterCodes + + Z = 90, +>Z : CharacterCodes + + ampersand = 38, +>ampersand : CharacterCodes + + asterisk = 42, +>asterisk : CharacterCodes + + at = 64, +>at : CharacterCodes + + backslash = 92, +>backslash : CharacterCodes + + backtick = 96, +>backtick : CharacterCodes + + bar = 124, +>bar : CharacterCodes + + caret = 94, +>caret : CharacterCodes + + closeBrace = 125, +>closeBrace : CharacterCodes + + closeBracket = 93, +>closeBracket : CharacterCodes + + closeParen = 41, +>closeParen : CharacterCodes + + colon = 58, +>colon : CharacterCodes + + comma = 44, +>comma : CharacterCodes + + dot = 46, +>dot : CharacterCodes + + doubleQuote = 34, +>doubleQuote : CharacterCodes + + equals = 61, +>equals : CharacterCodes + + exclamation = 33, +>exclamation : CharacterCodes + + greaterThan = 62, +>greaterThan : CharacterCodes + + lessThan = 60, +>lessThan : CharacterCodes + + minus = 45, +>minus : CharacterCodes + + openBrace = 123, +>openBrace : CharacterCodes + + openBracket = 91, +>openBracket : CharacterCodes + + openParen = 40, +>openParen : CharacterCodes + + percent = 37, +>percent : CharacterCodes + + plus = 43, +>plus : CharacterCodes + + question = 63, +>question : CharacterCodes + + semicolon = 59, +>semicolon : CharacterCodes + + singleQuote = 39, +>singleQuote : CharacterCodes + + slash = 47, +>slash : CharacterCodes + + tilde = 126, +>tilde : CharacterCodes + + backspace = 8, +>backspace : CharacterCodes + + formFeed = 12, +>formFeed : CharacterCodes + + byteOrderMark = 65279, +>byteOrderMark : CharacterCodes + + tab = 9, +>tab : CharacterCodes + + verticalTab = 11, +>verticalTab : CharacterCodes + } + interface CancellationToken { +>CancellationToken : CancellationToken + + isCancellationRequested(): boolean; +>isCancellationRequested : () => boolean + } + interface CompilerHost { +>CompilerHost : CompilerHost + + getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; +>getSourceFile : (filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void) => SourceFile +>filename : string +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget +>onError : (message: string) => void +>message : string +>SourceFile : SourceFile + + getDefaultLibFilename(options: CompilerOptions): string; +>getDefaultLibFilename : (options: CompilerOptions) => string +>options : CompilerOptions +>CompilerOptions : CompilerOptions + + getCancellationToken?(): CancellationToken; +>getCancellationToken : () => CancellationToken +>CancellationToken : CancellationToken + + writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; +>writeFile : (filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void) => void +>filename : string +>data : string +>writeByteOrderMark : boolean +>onError : (message: string) => void +>message : string + + getCurrentDirectory(): string; +>getCurrentDirectory : () => string + + getCanonicalFileName(fileName: string): string; +>getCanonicalFileName : (fileName: string) => string +>fileName : string + + useCaseSensitiveFileNames(): boolean; +>useCaseSensitiveFileNames : () => boolean + + getNewLine(): string; +>getNewLine : () => string + } +} +declare module ts { +>ts : typeof ts + + interface ErrorCallback { +>ErrorCallback : ErrorCallback + + (message: DiagnosticMessage): void; +>message : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + } + interface CommentCallback { +>CommentCallback : CommentCallback + + (pos: number, end: number): void; +>pos : number +>end : number + } + interface Scanner { +>Scanner : Scanner + + getStartPos(): number; +>getStartPos : () => number + + getToken(): SyntaxKind; +>getToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + getTextPos(): number; +>getTextPos : () => number + + getTokenPos(): number; +>getTokenPos : () => number + + getTokenText(): string; +>getTokenText : () => string + + getTokenValue(): string; +>getTokenValue : () => string + + hasPrecedingLineBreak(): boolean; +>hasPrecedingLineBreak : () => boolean + + isIdentifier(): boolean; +>isIdentifier : () => boolean + + isReservedWord(): boolean; +>isReservedWord : () => boolean + + isUnterminated(): boolean; +>isUnterminated : () => boolean + + reScanGreaterToken(): SyntaxKind; +>reScanGreaterToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + reScanSlashToken(): SyntaxKind; +>reScanSlashToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + reScanTemplateToken(): SyntaxKind; +>reScanTemplateToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + scan(): SyntaxKind; +>scan : () => SyntaxKind +>SyntaxKind : SyntaxKind + + setText(text: string): void; +>setText : (text: string) => void +>text : string + + setTextPos(textPos: number): void; +>setTextPos : (textPos: number) => void +>textPos : number + + lookAhead(callback: () => T): T; +>lookAhead : (callback: () => T) => T +>T : T +>callback : () => T +>T : T +>T : T + + tryScan(callback: () => T): T; +>tryScan : (callback: () => T) => T +>T : T +>callback : () => T +>T : T +>T : T + } + function tokenToString(t: SyntaxKind): string; +>tokenToString : (t: SyntaxKind) => string +>t : SyntaxKind +>SyntaxKind : SyntaxKind + + function computeLineStarts(text: string): number[]; +>computeLineStarts : (text: string) => number[] +>text : string + + function getPositionFromLineAndCharacter(lineStarts: number[], line: number, character: number): number; +>getPositionFromLineAndCharacter : (lineStarts: number[], line: number, character: number) => number +>lineStarts : number[] +>line : number +>character : number + + function getLineAndCharacterOfPosition(lineStarts: number[], position: number): { +>getLineAndCharacterOfPosition : (lineStarts: number[], position: number) => { line: number; character: number; } +>lineStarts : number[] +>position : number + + line: number; +>line : number + + character: number; +>character : number + + }; + function positionToLineAndCharacter(text: string, pos: number): { +>positionToLineAndCharacter : (text: string, pos: number) => { line: number; character: number; } +>text : string +>pos : number + + line: number; +>line : number + + character: number; +>character : number + + }; + function isWhiteSpace(ch: number): boolean; +>isWhiteSpace : (ch: number) => boolean +>ch : number + + function isLineBreak(ch: number): boolean; +>isLineBreak : (ch: number) => boolean +>ch : number + + function isOctalDigit(ch: number): boolean; +>isOctalDigit : (ch: number) => boolean +>ch : number + + function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean): number; +>skipTrivia : (text: string, pos: number, stopAfterLineBreak?: boolean) => number +>text : string +>pos : number +>stopAfterLineBreak : boolean + + function getLeadingCommentRanges(text: string, pos: number): CommentRange[]; +>getLeadingCommentRanges : (text: string, pos: number) => CommentRange[] +>text : string +>pos : number +>CommentRange : CommentRange + + function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; +>getTrailingCommentRanges : (text: string, pos: number) => CommentRange[] +>text : string +>pos : number +>CommentRange : CommentRange + + function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; +>isIdentifierStart : (ch: number, languageVersion: ScriptTarget) => boolean +>ch : number +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget + + function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; +>isIdentifierPart : (ch: number, languageVersion: ScriptTarget) => boolean +>ch : number +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget + + function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner; +>createScanner : (languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback) => Scanner +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget +>skipTrivia : boolean +>text : string +>onError : ErrorCallback +>ErrorCallback : ErrorCallback +>Scanner : Scanner +} +declare module ts { +>ts : typeof ts + + function getNodeConstructor(kind: SyntaxKind): new () => Node; +>getNodeConstructor : (kind: SyntaxKind) => new () => Node +>kind : SyntaxKind +>SyntaxKind : SyntaxKind +>Node : Node + + function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; +>forEachChild : (node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T) => T +>T : T +>node : Node +>Node : Node +>cbNode : (node: Node) => T +>node : Node +>Node : Node +>T : T +>cbNodes : (nodes: Node[]) => T +>nodes : Node[] +>Node : Node +>T : T +>T : T + + function createCompilerHost(options: CompilerOptions): CompilerHost; +>createCompilerHost : (options: CompilerOptions) => CompilerHost +>options : CompilerOptions +>CompilerOptions : CompilerOptions +>CompilerHost : CompilerHost + + function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; +>createSourceFile : (filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean) => SourceFile +>filename : string +>sourceText : string +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget +>version : string +>isOpen : boolean +>SourceFile : SourceFile + + function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; +>createProgram : (rootNames: string[], options: CompilerOptions, host: CompilerHost) => Program +>rootNames : string[] +>options : CompilerOptions +>CompilerOptions : CompilerOptions +>host : CompilerHost +>CompilerHost : CompilerHost +>Program : Program +} +declare module ts { +>ts : typeof ts + + function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; +>createTypeChecker : (program: Program, fullTypeCheck: boolean) => TypeChecker +>program : Program +>Program : Program +>fullTypeCheck : boolean +>TypeChecker : TypeChecker +} +declare module ts { +>ts : typeof ts + + var servicesVersion: string; +>servicesVersion : string + + interface Node { +>Node : Node + + getSourceFile(): SourceFile; +>getSourceFile : () => SourceFile +>SourceFile : SourceFile + + getChildCount(sourceFile?: SourceFile): number; +>getChildCount : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getChildAt(index: number, sourceFile?: SourceFile): Node; +>getChildAt : (index: number, sourceFile?: SourceFile) => Node +>index : number +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + + getChildren(sourceFile?: SourceFile): Node[]; +>getChildren : (sourceFile?: SourceFile) => Node[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + + getStart(sourceFile?: SourceFile): number; +>getStart : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFullStart(): number; +>getFullStart : () => number + + getEnd(): number; +>getEnd : () => number + + getWidth(sourceFile?: SourceFile): number; +>getWidth : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFullWidth(): number; +>getFullWidth : () => number + + getLeadingTriviaWidth(sourceFile?: SourceFile): number; +>getLeadingTriviaWidth : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFullText(sourceFile?: SourceFile): string; +>getFullText : (sourceFile?: SourceFile) => string +>sourceFile : SourceFile +>SourceFile : SourceFile + + getText(sourceFile?: SourceFile): string; +>getText : (sourceFile?: SourceFile) => string +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFirstToken(sourceFile?: SourceFile): Node; +>getFirstToken : (sourceFile?: SourceFile) => Node +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + + getLastToken(sourceFile?: SourceFile): Node; +>getLastToken : (sourceFile?: SourceFile) => Node +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + } + interface Symbol { +>Symbol : Symbol + + getFlags(): SymbolFlags; +>getFlags : () => SymbolFlags +>SymbolFlags : SymbolFlags + + getName(): string; +>getName : () => string + + getDeclarations(): Declaration[]; +>getDeclarations : () => Declaration[] +>Declaration : Declaration + + getDocumentationComment(): SymbolDisplayPart[]; +>getDocumentationComment : () => SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface Type { +>Type : Type + + getFlags(): TypeFlags; +>getFlags : () => TypeFlags +>TypeFlags : TypeFlags + + getSymbol(): Symbol; +>getSymbol : () => Symbol +>Symbol : Symbol + + getProperties(): Symbol[]; +>getProperties : () => Symbol[] +>Symbol : Symbol + + getProperty(propertyName: string): Symbol; +>getProperty : (propertyName: string) => Symbol +>propertyName : string +>Symbol : Symbol + + getApparentProperties(): Symbol[]; +>getApparentProperties : () => Symbol[] +>Symbol : Symbol + + getCallSignatures(): Signature[]; +>getCallSignatures : () => Signature[] +>Signature : Signature + + getConstructSignatures(): Signature[]; +>getConstructSignatures : () => Signature[] +>Signature : Signature + + getStringIndexType(): Type; +>getStringIndexType : () => Type +>Type : Type + + getNumberIndexType(): Type; +>getNumberIndexType : () => Type +>Type : Type + } + interface Signature { +>Signature : Signature + + getDeclaration(): SignatureDeclaration; +>getDeclaration : () => SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration + + getTypeParameters(): Type[]; +>getTypeParameters : () => Type[] +>Type : Type + + getParameters(): Symbol[]; +>getParameters : () => Symbol[] +>Symbol : Symbol + + getReturnType(): Type; +>getReturnType : () => Type +>Type : Type + + getDocumentationComment(): SymbolDisplayPart[]; +>getDocumentationComment : () => SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface SourceFile { +>SourceFile : SourceFile + + getScriptSnapshot(): IScriptSnapshot; +>getScriptSnapshot : () => IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot + + getNamedDeclarations(): Declaration[]; +>getNamedDeclarations : () => Declaration[] +>Declaration : Declaration + + update(scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; +>update : (scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange) => SourceFile +>scriptSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>version : string +>isOpen : boolean +>textChangeRange : TextChangeRange +>TextChangeRange : TextChangeRange +>SourceFile : SourceFile + } + /** + * Represents an immutable snapshot of a script at a specified time.Once acquired, the + * snapshot is observably immutable. i.e. the same calls with the same parameters will return + * the same values. + */ + interface IScriptSnapshot { +>IScriptSnapshot : IScriptSnapshot + + /** Gets a portion of the script snapshot specified by [start, end). */ + getText(start: number, end: number): string; +>getText : (start: number, end: number) => string +>start : number +>end : number + + /** Gets the length of this script snapshot. */ + getLength(): number; +>getLength : () => number + + /** + * This call returns the array containing the start position of every line. + * i.e."[0, 10, 55]". TODO: consider making this optional. The language service could + * always determine this (albeit in a more expensive manner). + */ + getLineStartPositions(): number[]; +>getLineStartPositions : () => number[] + + /** + * Gets the TextChangeRange that describe how the text changed between this text and + * an older version. This information is used by the incremental parser to determine + * what sections of the script need to be re-parsed. 'undefined' can be returned if the + * change range cannot be determined. However, in that case, incremental parsing will + * not happen and the entire document will be re - parsed. + */ + getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; +>getChangeRange : (oldSnapshot: IScriptSnapshot) => TextChangeRange +>oldSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>TextChangeRange : TextChangeRange + } + module ScriptSnapshot { +>ScriptSnapshot : typeof ScriptSnapshot + + function fromString(text: string): IScriptSnapshot; +>fromString : (text: string) => IScriptSnapshot +>text : string +>IScriptSnapshot : IScriptSnapshot + } + interface PreProcessedFileInfo { +>PreProcessedFileInfo : PreProcessedFileInfo + + referencedFiles: FileReference[]; +>referencedFiles : FileReference[] +>FileReference : FileReference + + importedFiles: FileReference[]; +>importedFiles : FileReference[] +>FileReference : FileReference + + isLibFile: boolean; +>isLibFile : boolean + } + interface Logger { +>Logger : Logger + + log(s: string): void; +>log : (s: string) => void +>s : string + } + interface LanguageServiceHost extends Logger { +>LanguageServiceHost : LanguageServiceHost +>Logger : Logger + + getCompilationSettings(): CompilerOptions; +>getCompilationSettings : () => CompilerOptions +>CompilerOptions : CompilerOptions + + getScriptFileNames(): string[]; +>getScriptFileNames : () => string[] + + getScriptVersion(fileName: string): string; +>getScriptVersion : (fileName: string) => string +>fileName : string + + getScriptIsOpen(fileName: string): boolean; +>getScriptIsOpen : (fileName: string) => boolean +>fileName : string + + getScriptSnapshot(fileName: string): IScriptSnapshot; +>getScriptSnapshot : (fileName: string) => IScriptSnapshot +>fileName : string +>IScriptSnapshot : IScriptSnapshot + + getLocalizedDiagnosticMessages?(): any; +>getLocalizedDiagnosticMessages : () => any + + getCancellationToken?(): CancellationToken; +>getCancellationToken : () => CancellationToken +>CancellationToken : CancellationToken + + getCurrentDirectory(): string; +>getCurrentDirectory : () => string + + getDefaultLibFilename(options: CompilerOptions): string; +>getDefaultLibFilename : (options: CompilerOptions) => string +>options : CompilerOptions +>CompilerOptions : CompilerOptions + } + interface LanguageService { +>LanguageService : LanguageService + + cleanupSemanticCache(): void; +>cleanupSemanticCache : () => void + + getSyntacticDiagnostics(fileName: string): Diagnostic[]; +>getSyntacticDiagnostics : (fileName: string) => Diagnostic[] +>fileName : string +>Diagnostic : Diagnostic + + getSemanticDiagnostics(fileName: string): Diagnostic[]; +>getSemanticDiagnostics : (fileName: string) => Diagnostic[] +>fileName : string +>Diagnostic : Diagnostic + + getCompilerOptionsDiagnostics(): Diagnostic[]; +>getCompilerOptionsDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; +>getSyntacticClassifications : (fileName: string, span: TextSpan) => ClassifiedSpan[] +>fileName : string +>span : TextSpan +>TextSpan : TextSpan +>ClassifiedSpan : ClassifiedSpan + + getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; +>getSemanticClassifications : (fileName: string, span: TextSpan) => ClassifiedSpan[] +>fileName : string +>span : TextSpan +>TextSpan : TextSpan +>ClassifiedSpan : ClassifiedSpan + + getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; +>getCompletionsAtPosition : (fileName: string, position: number) => CompletionInfo +>fileName : string +>position : number +>CompletionInfo : CompletionInfo + + getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; +>getCompletionEntryDetails : (fileName: string, position: number, entryName: string) => CompletionEntryDetails +>fileName : string +>position : number +>entryName : string +>CompletionEntryDetails : CompletionEntryDetails + + getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; +>getQuickInfoAtPosition : (fileName: string, position: number) => QuickInfo +>fileName : string +>position : number +>QuickInfo : QuickInfo + + getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; +>getNameOrDottedNameSpan : (fileName: string, startPos: number, endPos: number) => TextSpan +>fileName : string +>startPos : number +>endPos : number +>TextSpan : TextSpan + + getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan; +>getBreakpointStatementAtPosition : (fileName: string, position: number) => TextSpan +>fileName : string +>position : number +>TextSpan : TextSpan + + getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems; +>getSignatureHelpItems : (fileName: string, position: number) => SignatureHelpItems +>fileName : string +>position : number +>SignatureHelpItems : SignatureHelpItems + + getRenameInfo(fileName: string, position: number): RenameInfo; +>getRenameInfo : (fileName: string, position: number) => RenameInfo +>fileName : string +>position : number +>RenameInfo : RenameInfo + + findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[]; +>findRenameLocations : (fileName: string, position: number, findInStrings: boolean, findInComments: boolean) => RenameLocation[] +>fileName : string +>position : number +>findInStrings : boolean +>findInComments : boolean +>RenameLocation : RenameLocation + + getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; +>getDefinitionAtPosition : (fileName: string, position: number) => DefinitionInfo[] +>fileName : string +>position : number +>DefinitionInfo : DefinitionInfo + + getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; +>getReferencesAtPosition : (fileName: string, position: number) => ReferenceEntry[] +>fileName : string +>position : number +>ReferenceEntry : ReferenceEntry + + getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; +>getOccurrencesAtPosition : (fileName: string, position: number) => ReferenceEntry[] +>fileName : string +>position : number +>ReferenceEntry : ReferenceEntry + + getNavigateToItems(searchValue: string): NavigateToItem[]; +>getNavigateToItems : (searchValue: string) => NavigateToItem[] +>searchValue : string +>NavigateToItem : NavigateToItem + + getNavigationBarItems(fileName: string): NavigationBarItem[]; +>getNavigationBarItems : (fileName: string) => NavigationBarItem[] +>fileName : string +>NavigationBarItem : NavigationBarItem + + getOutliningSpans(fileName: string): OutliningSpan[]; +>getOutliningSpans : (fileName: string) => OutliningSpan[] +>fileName : string +>OutliningSpan : OutliningSpan + + getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; +>getTodoComments : (fileName: string, descriptors: TodoCommentDescriptor[]) => TodoComment[] +>fileName : string +>descriptors : TodoCommentDescriptor[] +>TodoCommentDescriptor : TodoCommentDescriptor +>TodoComment : TodoComment + + getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; +>getBraceMatchingAtPosition : (fileName: string, position: number) => TextSpan[] +>fileName : string +>position : number +>TextSpan : TextSpan + + getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number; +>getIndentationAtPosition : (fileName: string, position: number, options: EditorOptions) => number +>fileName : string +>position : number +>options : EditorOptions +>EditorOptions : EditorOptions + + getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[]; +>getFormattingEditsForRange : (fileName: string, start: number, end: number, options: FormatCodeOptions) => TextChange[] +>fileName : string +>start : number +>end : number +>options : FormatCodeOptions +>FormatCodeOptions : FormatCodeOptions +>TextChange : TextChange + + getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; +>getFormattingEditsForDocument : (fileName: string, options: FormatCodeOptions) => TextChange[] +>fileName : string +>options : FormatCodeOptions +>FormatCodeOptions : FormatCodeOptions +>TextChange : TextChange + + getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[]; +>getFormattingEditsAfterKeystroke : (fileName: string, position: number, key: string, options: FormatCodeOptions) => TextChange[] +>fileName : string +>position : number +>key : string +>options : FormatCodeOptions +>FormatCodeOptions : FormatCodeOptions +>TextChange : TextChange + + getEmitOutput(fileName: string): EmitOutput; +>getEmitOutput : (fileName: string) => EmitOutput +>fileName : string +>EmitOutput : EmitOutput + + getSourceFile(filename: string): SourceFile; +>getSourceFile : (filename: string) => SourceFile +>filename : string +>SourceFile : SourceFile + + dispose(): void; +>dispose : () => void + } + class TextSpan { +>TextSpan : TextSpan + + private _start; +>_start : any + + private _length; +>_length : any + + /** + * Creates a TextSpan instance beginning with the position Start and having the Length + * specified with length. + */ + constructor(start: number, length: number); +>start : number +>length : number + + toJSON(key: any): any; +>toJSON : (key: any) => any +>key : any + + start(): number; +>start : () => number + + length(): number; +>length : () => number + + end(): number; +>end : () => number + + isEmpty(): boolean; +>isEmpty : () => boolean + + /** + * Determines whether the position lies within the span. Returns true if the position is greater than or equal to Start and strictly less + * than End, otherwise false. + * @param position The position to check. + */ + containsPosition(position: number): boolean; +>containsPosition : (position: number) => boolean +>position : number + + /** + * Determines whether span falls completely within this span. Returns true if the specified span falls completely within this span, otherwise false. + * @param span The span to check. + */ + containsTextSpan(span: TextSpan): boolean; +>containsTextSpan : (span: TextSpan) => boolean +>span : TextSpan +>TextSpan : TextSpan + + /** + * Determines whether the given span overlaps this span. Two spans are considered to overlap + * if they have positions in common and neither is empty. Empty spans do not overlap with any + * other span. Returns true if the spans overlap, false otherwise. + * @param span The span to check. + */ + overlapsWith(span: TextSpan): boolean; +>overlapsWith : (span: TextSpan) => boolean +>span : TextSpan +>TextSpan : TextSpan + + /** + * Returns the overlap with the given span, or undefined if there is no overlap. + * @param span The span to check. + */ + overlap(span: TextSpan): TextSpan; +>overlap : (span: TextSpan) => TextSpan +>span : TextSpan +>TextSpan : TextSpan +>TextSpan : TextSpan + + /** + * Determines whether span intersects this span. Two spans are considered to + * intersect if they have positions in common or the end of one span + * coincides with the start of the other span. Returns true if the spans intersect, false otherwise. + * @param The span to check. + */ + intersectsWithTextSpan(span: TextSpan): boolean; +>intersectsWithTextSpan : (span: TextSpan) => boolean +>span : TextSpan +>TextSpan : TextSpan + + intersectsWith(start: number, length: number): boolean; +>intersectsWith : (start: number, length: number) => boolean +>start : number +>length : number + + /** + * Determines whether the given position intersects this span. + * A position is considered to intersect if it is between the start and + * end positions (inclusive) of this span. Returns true if the position intersects, false otherwise. + * @param position The position to check. + */ + intersectsWithPosition(position: number): boolean; +>intersectsWithPosition : (position: number) => boolean +>position : number + + /** + * Returns the intersection with the given span, or undefined if there is no intersection. + * @param span The span to check. + */ + intersection(span: TextSpan): TextSpan; +>intersection : (span: TextSpan) => TextSpan +>span : TextSpan +>TextSpan : TextSpan +>TextSpan : TextSpan + + /** + * Creates a new TextSpan from the given start and end positions + * as opposed to a position and length. + */ + static fromBounds(start: number, end: number): TextSpan; +>fromBounds : (start: number, end: number) => TextSpan +>start : number +>end : number +>TextSpan : TextSpan + } + class TextChangeRange { +>TextChangeRange : TextChangeRange + + static unchanged: TextChangeRange; +>unchanged : TextChangeRange +>TextChangeRange : TextChangeRange + + private _span; +>_span : any + + private _newLength; +>_newLength : any + + /** + * Initializes a new instance of TextChangeRange. + */ + constructor(span: TextSpan, newLength: number); +>span : TextSpan +>TextSpan : TextSpan +>newLength : number + + /** + * The span of text before the edit which is being changed + */ + span(): TextSpan; +>span : () => TextSpan +>TextSpan : TextSpan + + /** + * Width of the span after the edit. A 0 here would represent a delete + */ + newLength(): number; +>newLength : () => number + + newSpan(): TextSpan; +>newSpan : () => TextSpan +>TextSpan : TextSpan + + isUnchanged(): boolean; +>isUnchanged : () => boolean + + /** + * Called to merge all the changes that occurred across several versions of a script snapshot + * into a single change. i.e. if a user keeps making successive edits to a script we will + * have a text change from V1 to V2, V2 to V3, ..., Vn. + * + * This function will then merge those changes into a single change range valid between V1 and + * Vn. + */ + static collapseChangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; +>collapseChangesAcrossMultipleVersions : (changes: TextChangeRange[]) => TextChangeRange +>changes : TextChangeRange[] +>TextChangeRange : TextChangeRange +>TextChangeRange : TextChangeRange + } + interface ClassifiedSpan { +>ClassifiedSpan : ClassifiedSpan + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + classificationType: string; +>classificationType : string + } + interface NavigationBarItem { +>NavigationBarItem : NavigationBarItem + + text: string; +>text : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + spans: TextSpan[]; +>spans : TextSpan[] +>TextSpan : TextSpan + + childItems: NavigationBarItem[]; +>childItems : NavigationBarItem[] +>NavigationBarItem : NavigationBarItem + + indent: number; +>indent : number + + bolded: boolean; +>bolded : boolean + + grayed: boolean; +>grayed : boolean + } + interface TodoCommentDescriptor { +>TodoCommentDescriptor : TodoCommentDescriptor + + text: string; +>text : string + + priority: number; +>priority : number + } + interface TodoComment { +>TodoComment : TodoComment + + descriptor: TodoCommentDescriptor; +>descriptor : TodoCommentDescriptor +>TodoCommentDescriptor : TodoCommentDescriptor + + message: string; +>message : string + + position: number; +>position : number + } + class TextChange { +>TextChange : TextChange + + span: TextSpan; +>span : TextSpan +>TextSpan : TextSpan + + newText: string; +>newText : string + } + interface RenameLocation { +>RenameLocation : RenameLocation + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + fileName: string; +>fileName : string + } + interface ReferenceEntry { +>ReferenceEntry : ReferenceEntry + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + fileName: string; +>fileName : string + + isWriteAccess: boolean; +>isWriteAccess : boolean + } + interface NavigateToItem { +>NavigateToItem : NavigateToItem + + name: string; +>name : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + matchKind: string; +>matchKind : string + + fileName: string; +>fileName : string + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + containerName: string; +>containerName : string + + containerKind: string; +>containerKind : string + } + interface EditorOptions { +>EditorOptions : EditorOptions + + IndentSize: number; +>IndentSize : number + + TabSize: number; +>TabSize : number + + NewLineCharacter: string; +>NewLineCharacter : string + + ConvertTabsToSpaces: boolean; +>ConvertTabsToSpaces : boolean + } + interface FormatCodeOptions extends EditorOptions { +>FormatCodeOptions : FormatCodeOptions +>EditorOptions : EditorOptions + + InsertSpaceAfterCommaDelimiter: boolean; +>InsertSpaceAfterCommaDelimiter : boolean + + InsertSpaceAfterSemicolonInForStatements: boolean; +>InsertSpaceAfterSemicolonInForStatements : boolean + + InsertSpaceBeforeAndAfterBinaryOperators: boolean; +>InsertSpaceBeforeAndAfterBinaryOperators : boolean + + InsertSpaceAfterKeywordsInControlFlowStatements: boolean; +>InsertSpaceAfterKeywordsInControlFlowStatements : boolean + + InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; +>InsertSpaceAfterFunctionKeywordForAnonymousFunctions : boolean + + InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; +>InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis : boolean + + PlaceOpenBraceOnNewLineForFunctions: boolean; +>PlaceOpenBraceOnNewLineForFunctions : boolean + + PlaceOpenBraceOnNewLineForControlBlocks: boolean; +>PlaceOpenBraceOnNewLineForControlBlocks : boolean + } + interface DefinitionInfo { +>DefinitionInfo : DefinitionInfo + + fileName: string; +>fileName : string + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + kind: string; +>kind : string + + name: string; +>name : string + + containerKind: string; +>containerKind : string + + containerName: string; +>containerName : string + } + enum SymbolDisplayPartKind { +>SymbolDisplayPartKind : SymbolDisplayPartKind + + aliasName = 0, +>aliasName : SymbolDisplayPartKind + + className = 1, +>className : SymbolDisplayPartKind + + enumName = 2, +>enumName : SymbolDisplayPartKind + + fieldName = 3, +>fieldName : SymbolDisplayPartKind + + interfaceName = 4, +>interfaceName : SymbolDisplayPartKind + + keyword = 5, +>keyword : SymbolDisplayPartKind + + lineBreak = 6, +>lineBreak : SymbolDisplayPartKind + + numericLiteral = 7, +>numericLiteral : SymbolDisplayPartKind + + stringLiteral = 8, +>stringLiteral : SymbolDisplayPartKind + + localName = 9, +>localName : SymbolDisplayPartKind + + methodName = 10, +>methodName : SymbolDisplayPartKind + + moduleName = 11, +>moduleName : SymbolDisplayPartKind + + operator = 12, +>operator : SymbolDisplayPartKind + + parameterName = 13, +>parameterName : SymbolDisplayPartKind + + propertyName = 14, +>propertyName : SymbolDisplayPartKind + + punctuation = 15, +>punctuation : SymbolDisplayPartKind + + space = 16, +>space : SymbolDisplayPartKind + + text = 17, +>text : SymbolDisplayPartKind + + typeParameterName = 18, +>typeParameterName : SymbolDisplayPartKind + + enumMemberName = 19, +>enumMemberName : SymbolDisplayPartKind + + functionName = 20, +>functionName : SymbolDisplayPartKind + + regularExpressionLiteral = 21, +>regularExpressionLiteral : SymbolDisplayPartKind + } + interface SymbolDisplayPart { +>SymbolDisplayPart : SymbolDisplayPart + + text: string; +>text : string + + kind: string; +>kind : string + } + interface QuickInfo { +>QuickInfo : QuickInfo + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + displayParts: SymbolDisplayPart[]; +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface RenameInfo { +>RenameInfo : RenameInfo + + canRename: boolean; +>canRename : boolean + + localizedErrorMessage: string; +>localizedErrorMessage : string + + displayName: string; +>displayName : string + + fullDisplayName: string; +>fullDisplayName : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + triggerSpan: TextSpan; +>triggerSpan : TextSpan +>TextSpan : TextSpan + } + interface SignatureHelpParameter { +>SignatureHelpParameter : SignatureHelpParameter + + name: string; +>name : string + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + displayParts: SymbolDisplayPart[]; +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + isOptional: boolean; +>isOptional : boolean + } + /** + * Represents a single signature to show in signature help. + * The id is used for subsequent calls into the language service to ask questions about the + * signature help item in the context of any documents that have been updated. i.e. after + * an edit has happened, while signature help is still active, the host can ask important + * questions like 'what parameter is the user currently contained within?'. + */ + interface SignatureHelpItem { +>SignatureHelpItem : SignatureHelpItem + + isVariadic: boolean; +>isVariadic : boolean + + prefixDisplayParts: SymbolDisplayPart[]; +>prefixDisplayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + suffixDisplayParts: SymbolDisplayPart[]; +>suffixDisplayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + separatorDisplayParts: SymbolDisplayPart[]; +>separatorDisplayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + parameters: SignatureHelpParameter[]; +>parameters : SignatureHelpParameter[] +>SignatureHelpParameter : SignatureHelpParameter + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + /** + * Represents a set of signature help items, and the preferred item that should be selected. + */ + interface SignatureHelpItems { +>SignatureHelpItems : SignatureHelpItems + + items: SignatureHelpItem[]; +>items : SignatureHelpItem[] +>SignatureHelpItem : SignatureHelpItem + + applicableSpan: TextSpan; +>applicableSpan : TextSpan +>TextSpan : TextSpan + + selectedItemIndex: number; +>selectedItemIndex : number + + argumentIndex: number; +>argumentIndex : number + + argumentCount: number; +>argumentCount : number + } + interface CompletionInfo { +>CompletionInfo : CompletionInfo + + isMemberCompletion: boolean; +>isMemberCompletion : boolean + + entries: CompletionEntry[]; +>entries : CompletionEntry[] +>CompletionEntry : CompletionEntry + } + interface CompletionEntry { +>CompletionEntry : CompletionEntry + + name: string; +>name : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + } + interface CompletionEntryDetails { +>CompletionEntryDetails : CompletionEntryDetails + + name: string; +>name : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + displayParts: SymbolDisplayPart[]; +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface OutliningSpan { +>OutliningSpan : OutliningSpan + + /** The span of the document to actually collapse. */ + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + /** The span of the document to display when the user hovers over the collapsed span. */ + hintSpan: TextSpan; +>hintSpan : TextSpan +>TextSpan : TextSpan + + /** The text to display in the editor for the collapsed region. */ + bannerText: string; +>bannerText : string + + /** + * Whether or not this region should be automatically collapsed when + * the 'Collapse to Definitions' command is invoked. + */ + autoCollapse: boolean; +>autoCollapse : boolean + } + interface EmitOutput { +>EmitOutput : EmitOutput + + outputFiles: OutputFile[]; +>outputFiles : OutputFile[] +>OutputFile : OutputFile + + emitOutputStatus: EmitReturnStatus; +>emitOutputStatus : EmitReturnStatus +>EmitReturnStatus : EmitReturnStatus + } + const enum OutputFileType { +>OutputFileType : OutputFileType + + JavaScript = 0, +>JavaScript : OutputFileType + + SourceMap = 1, +>SourceMap : OutputFileType + + Declaration = 2, +>Declaration : OutputFileType + } + interface OutputFile { +>OutputFile : OutputFile + + name: string; +>name : string + + writeByteOrderMark: boolean; +>writeByteOrderMark : boolean + + text: string; +>text : string + } + const enum EndOfLineState { +>EndOfLineState : EndOfLineState + + Start = 0, +>Start : EndOfLineState + + InMultiLineCommentTrivia = 1, +>InMultiLineCommentTrivia : EndOfLineState + + InSingleQuoteStringLiteral = 2, +>InSingleQuoteStringLiteral : EndOfLineState + + InDoubleQuoteStringLiteral = 3, +>InDoubleQuoteStringLiteral : EndOfLineState + } + enum TokenClass { +>TokenClass : TokenClass + + Punctuation = 0, +>Punctuation : TokenClass + + Keyword = 1, +>Keyword : TokenClass + + Operator = 2, +>Operator : TokenClass + + Comment = 3, +>Comment : TokenClass + + Whitespace = 4, +>Whitespace : TokenClass + + Identifier = 5, +>Identifier : TokenClass + + NumberLiteral = 6, +>NumberLiteral : TokenClass + + StringLiteral = 7, +>StringLiteral : TokenClass + + RegExpLiteral = 8, +>RegExpLiteral : TokenClass + } + interface ClassificationResult { +>ClassificationResult : ClassificationResult + + finalLexState: EndOfLineState; +>finalLexState : EndOfLineState +>EndOfLineState : EndOfLineState + + entries: ClassificationInfo[]; +>entries : ClassificationInfo[] +>ClassificationInfo : ClassificationInfo + } + interface ClassificationInfo { +>ClassificationInfo : ClassificationInfo + + length: number; +>length : number + + classification: TokenClass; +>classification : TokenClass +>TokenClass : TokenClass + } + interface Classifier { +>Classifier : Classifier + + getClassificationsForLine(text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean): ClassificationResult; +>getClassificationsForLine : (text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean) => ClassificationResult +>text : string +>lexState : EndOfLineState +>EndOfLineState : EndOfLineState +>classifyKeywordsInGenerics : boolean +>ClassificationResult : ClassificationResult + } + interface DocumentRegistry { +>DocumentRegistry : DocumentRegistry + + acquireDocument(filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean): SourceFile; +>acquireDocument : (filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean) => SourceFile +>filename : string +>compilationSettings : CompilerOptions +>CompilerOptions : CompilerOptions +>scriptSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>version : string +>isOpen : boolean +>SourceFile : SourceFile + + updateDocument(sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; +>updateDocument : (sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange) => SourceFile +>sourceFile : SourceFile +>SourceFile : SourceFile +>filename : string +>compilationSettings : CompilerOptions +>CompilerOptions : CompilerOptions +>scriptSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>version : string +>isOpen : boolean +>textChangeRange : TextChangeRange +>TextChangeRange : TextChangeRange +>SourceFile : SourceFile + + releaseDocument(filename: string, compilationSettings: CompilerOptions): void; +>releaseDocument : (filename: string, compilationSettings: CompilerOptions) => void +>filename : string +>compilationSettings : CompilerOptions +>CompilerOptions : CompilerOptions + } + class ScriptElementKind { +>ScriptElementKind : ScriptElementKind + + static unknown: string; +>unknown : string + + static keyword: string; +>keyword : string + + static scriptElement: string; +>scriptElement : string + + static moduleElement: string; +>moduleElement : string + + static classElement: string; +>classElement : string + + static interfaceElement: string; +>interfaceElement : string + + static typeElement: string; +>typeElement : string + + static enumElement: string; +>enumElement : string + + static variableElement: string; +>variableElement : string + + static localVariableElement: string; +>localVariableElement : string + + static functionElement: string; +>functionElement : string + + static localFunctionElement: string; +>localFunctionElement : string + + static memberFunctionElement: string; +>memberFunctionElement : string + + static memberGetAccessorElement: string; +>memberGetAccessorElement : string + + static memberSetAccessorElement: string; +>memberSetAccessorElement : string + + static memberVariableElement: string; +>memberVariableElement : string + + static constructorImplementationElement: string; +>constructorImplementationElement : string + + static callSignatureElement: string; +>callSignatureElement : string + + static indexSignatureElement: string; +>indexSignatureElement : string + + static constructSignatureElement: string; +>constructSignatureElement : string + + static parameterElement: string; +>parameterElement : string + + static typeParameterElement: string; +>typeParameterElement : string + + static primitiveType: string; +>primitiveType : string + + static label: string; +>label : string + + static alias: string; +>alias : string + + static constElement: string; +>constElement : string + + static letElement: string; +>letElement : string + } + class ScriptElementKindModifier { +>ScriptElementKindModifier : ScriptElementKindModifier + + static none: string; +>none : string + + static publicMemberModifier: string; +>publicMemberModifier : string + + static privateMemberModifier: string; +>privateMemberModifier : string + + static protectedMemberModifier: string; +>protectedMemberModifier : string + + static exportedModifier: string; +>exportedModifier : string + + static ambientModifier: string; +>ambientModifier : string + + static staticModifier: string; +>staticModifier : string + } + class ClassificationTypeNames { +>ClassificationTypeNames : ClassificationTypeNames + + static comment: string; +>comment : string + + static identifier: string; +>identifier : string + + static keyword: string; +>keyword : string + + static numericLiteral: string; +>numericLiteral : string + + static operator: string; +>operator : string + + static stringLiteral: string; +>stringLiteral : string + + static whiteSpace: string; +>whiteSpace : string + + static text: string; +>text : string + + static punctuation: string; +>punctuation : string + + static className: string; +>className : string + + static enumName: string; +>enumName : string + + static interfaceName: string; +>interfaceName : string + + static moduleName: string; +>moduleName : string + + static typeParameterName: string; +>typeParameterName : string + + static typeAlias: string; +>typeAlias : string + } + interface DisplayPartsSymbolWriter extends SymbolWriter { +>DisplayPartsSymbolWriter : DisplayPartsSymbolWriter +>SymbolWriter : SymbolWriter + + displayParts(): SymbolDisplayPart[]; +>displayParts : () => SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + function displayPartsToString(displayParts: SymbolDisplayPart[]): string; +>displayPartsToString : (displayParts: SymbolDisplayPart[]) => string +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + function getDefaultCompilerOptions(): CompilerOptions; +>getDefaultCompilerOptions : () => CompilerOptions +>CompilerOptions : CompilerOptions + + class OperationCanceledException { +>OperationCanceledException : OperationCanceledException + } + class CancellationTokenObject { +>CancellationTokenObject : CancellationTokenObject + + private cancellationToken; +>cancellationToken : any + + static None: CancellationTokenObject; +>None : CancellationTokenObject +>CancellationTokenObject : CancellationTokenObject + + constructor(cancellationToken: CancellationToken); +>cancellationToken : CancellationToken +>CancellationToken : CancellationToken + + isCancellationRequested(): boolean; +>isCancellationRequested : () => boolean + + throwIfCancellationRequested(): void; +>throwIfCancellationRequested : () => void + } + function createDocumentRegistry(): DocumentRegistry; +>createDocumentRegistry : () => DocumentRegistry +>DocumentRegistry : DocumentRegistry + + function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; +>preProcessFile : (sourceText: string, readImportFiles?: boolean) => PreProcessedFileInfo +>sourceText : string +>readImportFiles : boolean +>PreProcessedFileInfo : PreProcessedFileInfo + + function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry): LanguageService; +>createLanguageService : (host: LanguageServiceHost, documentRegistry: DocumentRegistry) => LanguageService +>host : LanguageServiceHost +>LanguageServiceHost : LanguageServiceHost +>documentRegistry : DocumentRegistry +>DocumentRegistry : DocumentRegistry +>LanguageService : LanguageService + + function createClassifier(host: Logger): Classifier; +>createClassifier : (host: Logger) => Classifier +>host : Logger +>Logger : Logger +>Classifier : Classifier +} + From d385f2ebf405786fdab48f529336f427aa158caa Mon Sep 17 00:00:00 2001 From: Jason Freeman Date: Thu, 11 Dec 2014 16:49:24 -0800 Subject: [PATCH 127/141] Disable computed properties in TypeScript 1.4 --- .../diagnosticInformationMap.generated.ts | 1 + src/compiler/diagnosticMessages.json | 4 ++ src/compiler/parser.ts | 4 ++ .../FunctionDeclaration8_es6.errors.txt | 4 +- .../computedPropertyNames1.errors.txt | 13 +++++ .../reference/computedPropertyNames1.js | 14 ------ .../reference/computedPropertyNames1.types | 12 ----- .../computedPropertyNames2.errors.txt | 20 +++++++- .../reference/computedPropertyNames2.js | 48 ------------------- .../computedPropertyNames3.errors.txt | 20 +++++++- .../reference/computedPropertyNames3.js | 47 ------------------ ...omputedPropertyNamesOnOverloads.errors.txt | 5 +- .../parserComputedPropertyName12.errors.txt | 9 ++++ .../reference/parserComputedPropertyName12.js | 13 ----- .../parserComputedPropertyName12.types | 7 --- .../parserComputedPropertyName17.errors.txt | 7 +++ .../reference/parserComputedPropertyName17.js | 6 --- .../parserComputedPropertyName17.types | 7 --- .../parserComputedPropertyName2.errors.txt | 7 +++ .../reference/parserComputedPropertyName2.js | 5 -- .../parserComputedPropertyName2.types | 6 --- .../parserComputedPropertyName24.errors.txt | 9 ++++ .../reference/parserComputedPropertyName24.js | 17 ------- .../parserComputedPropertyName24.types | 8 ---- .../parserComputedPropertyName3.errors.txt | 7 +++ .../reference/parserComputedPropertyName3.js | 6 --- .../parserComputedPropertyName3.types | 6 --- .../parserComputedPropertyName35.errors.txt | 6 +-- .../parserComputedPropertyName37.errors.txt | 9 ++++ .../reference/parserComputedPropertyName37.js | 9 ---- .../parserComputedPropertyName37.types | 9 ---- .../parserComputedPropertyName38.errors.txt | 9 ++++ .../reference/parserComputedPropertyName38.js | 13 ----- .../parserComputedPropertyName38.types | 7 --- .../parserComputedPropertyName4.errors.txt | 7 +++ .../reference/parserComputedPropertyName4.js | 6 --- .../parserComputedPropertyName4.types | 6 --- .../parserComputedPropertyName40.errors.txt | 9 ++++ .../reference/parserComputedPropertyName40.js | 13 ----- .../parserComputedPropertyName40.types | 8 ---- .../parserComputedPropertyName41.errors.txt | 9 ++++ .../reference/parserComputedPropertyName41.js | 9 ---- .../parserComputedPropertyName41.types | 9 ---- .../parserComputedPropertyName6.errors.txt | 10 ++++ .../reference/parserComputedPropertyName6.js | 5 -- .../parserComputedPropertyName6.types | 9 ---- .../parserES5ComputedPropertyName2.errors.txt | 4 +- .../parserES5ComputedPropertyName3.errors.txt | 4 +- .../parserES5ComputedPropertyName4.errors.txt | 4 +- 49 files changed, 167 insertions(+), 319 deletions(-) create mode 100644 tests/baselines/reference/computedPropertyNames1.errors.txt delete mode 100644 tests/baselines/reference/computedPropertyNames1.js delete mode 100644 tests/baselines/reference/computedPropertyNames1.types delete mode 100644 tests/baselines/reference/computedPropertyNames2.js delete mode 100644 tests/baselines/reference/computedPropertyNames3.js create mode 100644 tests/baselines/reference/parserComputedPropertyName12.errors.txt delete mode 100644 tests/baselines/reference/parserComputedPropertyName12.js delete mode 100644 tests/baselines/reference/parserComputedPropertyName12.types create mode 100644 tests/baselines/reference/parserComputedPropertyName17.errors.txt delete mode 100644 tests/baselines/reference/parserComputedPropertyName17.js delete mode 100644 tests/baselines/reference/parserComputedPropertyName17.types create mode 100644 tests/baselines/reference/parserComputedPropertyName2.errors.txt delete mode 100644 tests/baselines/reference/parserComputedPropertyName2.js delete mode 100644 tests/baselines/reference/parserComputedPropertyName2.types create mode 100644 tests/baselines/reference/parserComputedPropertyName24.errors.txt delete mode 100644 tests/baselines/reference/parserComputedPropertyName24.js delete mode 100644 tests/baselines/reference/parserComputedPropertyName24.types create mode 100644 tests/baselines/reference/parserComputedPropertyName3.errors.txt delete mode 100644 tests/baselines/reference/parserComputedPropertyName3.js delete mode 100644 tests/baselines/reference/parserComputedPropertyName3.types create mode 100644 tests/baselines/reference/parserComputedPropertyName37.errors.txt delete mode 100644 tests/baselines/reference/parserComputedPropertyName37.js delete mode 100644 tests/baselines/reference/parserComputedPropertyName37.types create mode 100644 tests/baselines/reference/parserComputedPropertyName38.errors.txt delete mode 100644 tests/baselines/reference/parserComputedPropertyName38.js delete mode 100644 tests/baselines/reference/parserComputedPropertyName38.types create mode 100644 tests/baselines/reference/parserComputedPropertyName4.errors.txt delete mode 100644 tests/baselines/reference/parserComputedPropertyName4.js delete mode 100644 tests/baselines/reference/parserComputedPropertyName4.types create mode 100644 tests/baselines/reference/parserComputedPropertyName40.errors.txt delete mode 100644 tests/baselines/reference/parserComputedPropertyName40.js delete mode 100644 tests/baselines/reference/parserComputedPropertyName40.types create mode 100644 tests/baselines/reference/parserComputedPropertyName41.errors.txt delete mode 100644 tests/baselines/reference/parserComputedPropertyName41.js delete mode 100644 tests/baselines/reference/parserComputedPropertyName41.types create mode 100644 tests/baselines/reference/parserComputedPropertyName6.errors.txt delete mode 100644 tests/baselines/reference/parserComputedPropertyName6.js delete mode 100644 tests/baselines/reference/parserComputedPropertyName6.types diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 6ce7579588e..52b03653df1 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -431,5 +431,6 @@ module ts { You_cannot_rename_this_element: { code: 8000, category: DiagnosticCategory.Error, key: "You cannot rename this element." }, yield_expressions_are_not_currently_supported: { code: 9000, category: DiagnosticCategory.Error, key: "'yield' expressions are not currently supported." }, generators_are_not_currently_supported: { code: 9001, category: DiagnosticCategory.Error, key: "'generators' are not currently supported." }, + Computed_property_names_are_not_currently_supported: { code: 9002, category: DiagnosticCategory.Error, key: "Computed property names are not currently supported." }, }; } \ No newline at end of file diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 3e5ac7ae1d6..2f5c5c69955 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1723,5 +1723,9 @@ "'generators' are not currently supported.": { "category": "Error", "code": 9001 + }, + "Computed property names are not currently supported.": { + "category": "Error", + "code": 9002 } } diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 2c8a09faaa1..ecf7085d9ec 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -4901,6 +4901,10 @@ module ts { } function checkComputedPropertyName(node: ComputedPropertyName) { + // Since computed properties are not supported in the type checker, disallow them in TypeScript 1.4 + // Once full support is added, remove this error. + return grammarErrorOnNode(node, Diagnostics.Computed_property_names_are_not_currently_supported); + if (languageVersion < ScriptTarget.ES6) { return grammarErrorOnNode(node, Diagnostics.Computed_property_names_are_only_available_when_targeting_ECMAScript_6_and_higher); } diff --git a/tests/baselines/reference/FunctionDeclaration8_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration8_es6.errors.txt index 5232c8f1608..08d151203c9 100644 --- a/tests/baselines/reference/FunctionDeclaration8_es6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration8_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts(1,11): error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher. +tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts(1,11): error TS9002: Computed property names are not currently supported. ==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts (1 errors) ==== var v = { [yield]: foo } ~~~~~~~ -!!! error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher. \ No newline at end of file +!!! error TS9002: Computed property names are not currently supported. \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNames1.errors.txt b/tests/baselines/reference/computedPropertyNames1.errors.txt new file mode 100644 index 00000000000..02abbcd6b2d --- /dev/null +++ b/tests/baselines/reference/computedPropertyNames1.errors.txt @@ -0,0 +1,13 @@ +tests/cases/conformance/es6/computedProperties/computedPropertyNames1.ts(2,9): error TS9002: Computed property names are not currently supported. +tests/cases/conformance/es6/computedProperties/computedPropertyNames1.ts(3,9): error TS9002: Computed property names are not currently supported. + + +==== tests/cases/conformance/es6/computedProperties/computedPropertyNames1.ts (2 errors) ==== + var v = { + get [0 + 1]() { return 0 }, + ~~~~~~~ +!!! error TS9002: Computed property names are not currently supported. + set [0 + 1](v: string) { } //No error + ~~~~~~~ +!!! error TS9002: Computed property names are not currently supported. + } \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNames1.js b/tests/baselines/reference/computedPropertyNames1.js deleted file mode 100644 index 8f3e448d698..00000000000 --- a/tests/baselines/reference/computedPropertyNames1.js +++ /dev/null @@ -1,14 +0,0 @@ -//// [computedPropertyNames1.ts] -var v = { - get [0 + 1]() { return 0 }, - set [0 + 1](v: string) { } //No error -} - -//// [computedPropertyNames1.js] -var v = { - get [0 + 1]() { - return 0; - }, - set [0 + 1](v) { - } //No error -}; diff --git a/tests/baselines/reference/computedPropertyNames1.types b/tests/baselines/reference/computedPropertyNames1.types deleted file mode 100644 index b44aa3c69d0..00000000000 --- a/tests/baselines/reference/computedPropertyNames1.types +++ /dev/null @@ -1,12 +0,0 @@ -=== tests/cases/conformance/es6/computedProperties/computedPropertyNames1.ts === -var v = { ->v : {} ->{ get [0 + 1]() { return 0 }, set [0 + 1](v: string) { } //No error} : {} - - get [0 + 1]() { return 0 }, ->0 + 1 : number - - set [0 + 1](v: string) { } //No error ->0 + 1 : number ->v : string -} diff --git a/tests/baselines/reference/computedPropertyNames2.errors.txt b/tests/baselines/reference/computedPropertyNames2.errors.txt index d0fd1de4576..e7cc84a8f6e 100644 --- a/tests/baselines/reference/computedPropertyNames2.errors.txt +++ b/tests/baselines/reference/computedPropertyNames2.errors.txt @@ -1,19 +1,37 @@ +tests/cases/conformance/es6/computedProperties/computedPropertyNames2.ts(4,5): error TS9002: Computed property names are not currently supported. +tests/cases/conformance/es6/computedProperties/computedPropertyNames2.ts(5,12): error TS9002: Computed property names are not currently supported. +tests/cases/conformance/es6/computedProperties/computedPropertyNames2.ts(6,9): error TS9002: Computed property names are not currently supported. +tests/cases/conformance/es6/computedProperties/computedPropertyNames2.ts(7,9): error TS9002: Computed property names are not currently supported. +tests/cases/conformance/es6/computedProperties/computedPropertyNames2.ts(8,16): error TS9002: Computed property names are not currently supported. +tests/cases/conformance/es6/computedProperties/computedPropertyNames2.ts(9,16): error TS9002: Computed property names are not currently supported. tests/cases/conformance/es6/computedProperties/computedPropertyNames2.ts(6,9): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/conformance/es6/computedProperties/computedPropertyNames2.ts(8,16): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. -==== tests/cases/conformance/es6/computedProperties/computedPropertyNames2.ts (2 errors) ==== +==== tests/cases/conformance/es6/computedProperties/computedPropertyNames2.ts (8 errors) ==== var methodName = "method"; var accessorName = "accessor"; class C { [methodName]() { } + ~~~~~~~~~~~~ +!!! error TS9002: Computed property names are not currently supported. static [methodName]() { } + ~~~~~~~~~~~~ +!!! error TS9002: Computed property names are not currently supported. get [accessorName]() { } ~~~~~~~~~~~~~~ +!!! error TS9002: Computed property names are not currently supported. + ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. set [accessorName](v) { } + ~~~~~~~~~~~~~~ +!!! error TS9002: Computed property names are not currently supported. static get [accessorName]() { } ~~~~~~~~~~~~~~ +!!! error TS9002: Computed property names are not currently supported. + ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. static set [accessorName](v) { } + ~~~~~~~~~~~~~~ +!!! error TS9002: Computed property names are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNames2.js b/tests/baselines/reference/computedPropertyNames2.js deleted file mode 100644 index 78d53ef94fc..00000000000 --- a/tests/baselines/reference/computedPropertyNames2.js +++ /dev/null @@ -1,48 +0,0 @@ -//// [computedPropertyNames2.ts] -var methodName = "method"; -var accessorName = "accessor"; -class C { - [methodName]() { } - static [methodName]() { } - get [accessorName]() { } - set [accessorName](v) { } - static get [accessorName]() { } - static set [accessorName](v) { } -} - -//// [computedPropertyNames2.js] -var methodName = "method"; -var accessorName = "accessor"; -var C = (function () { - function C() { - } - C.prototype[methodName] = function () { - }; - C[methodName] = function () { - }; - Object.defineProperty(C.prototype, accessorName, { - get: function () { - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C.prototype, accessorName, { - set: function (v) { - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C, accessorName, { - get: function () { - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C, accessorName, { - set: function (v) { - }, - enumerable: true, - configurable: true - }); - return C; -})(); diff --git a/tests/baselines/reference/computedPropertyNames3.errors.txt b/tests/baselines/reference/computedPropertyNames3.errors.txt index 37a4ddaf1c0..a1d6e09421b 100644 --- a/tests/baselines/reference/computedPropertyNames3.errors.txt +++ b/tests/baselines/reference/computedPropertyNames3.errors.txt @@ -1,18 +1,36 @@ +tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(3,5): error TS9002: Computed property names are not currently supported. +tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(4,12): error TS9002: Computed property names are not currently supported. +tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(5,9): error TS9002: Computed property names are not currently supported. +tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(6,9): error TS9002: Computed property names are not currently supported. +tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(7,16): error TS9002: Computed property names are not currently supported. +tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(8,16): error TS9002: Computed property names are not currently supported. tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(5,9): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(7,16): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. -==== tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts (2 errors) ==== +==== tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts (8 errors) ==== var id; class C { [0 + 1]() { } + ~~~~~~~ +!!! error TS9002: Computed property names are not currently supported. static [() => { }]() { } + ~~~~~~~~~~~ +!!! error TS9002: Computed property names are not currently supported. get [delete id]() { } ~~~~~~~~~~~ +!!! error TS9002: Computed property names are not currently supported. + ~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. set [[0, 1]](v) { } + ~~~~~~~~ +!!! error TS9002: Computed property names are not currently supported. static get [""]() { } ~~~~~~~~~~~~ +!!! error TS9002: Computed property names are not currently supported. + ~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. static set [id.toString()](v) { } + ~~~~~~~~~~~~~~~ +!!! error TS9002: Computed property names are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNames3.js b/tests/baselines/reference/computedPropertyNames3.js deleted file mode 100644 index fbd76bf48fc..00000000000 --- a/tests/baselines/reference/computedPropertyNames3.js +++ /dev/null @@ -1,47 +0,0 @@ -//// [computedPropertyNames3.ts] -var id; -class C { - [0 + 1]() { } - static [() => { }]() { } - get [delete id]() { } - set [[0, 1]](v) { } - static get [""]() { } - static set [id.toString()](v) { } -} - -//// [computedPropertyNames3.js] -var id; -var C = (function () { - function C() { - } - C.prototype[0 + 1] = function () { - }; - C[function () { - }] = function () { - }; - Object.defineProperty(C.prototype, delete id, { - get: function () { - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C.prototype, [0, 1], { - set: function (v) { - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C, "", { - get: function () { - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(C, id.toString(), { - set: function (v) { - }, - enumerable: true, - configurable: true - }); - return C; -})(); diff --git a/tests/baselines/reference/computedPropertyNamesOnOverloads.errors.txt b/tests/baselines/reference/computedPropertyNamesOnOverloads.errors.txt index b3c2957a13f..6329ab39f0f 100644 --- a/tests/baselines/reference/computedPropertyNamesOnOverloads.errors.txt +++ b/tests/baselines/reference/computedPropertyNamesOnOverloads.errors.txt @@ -1,8 +1,9 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads.ts(4,5): error TS1168: Computed property names are not allowed in method overloads. tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads.ts(5,5): error TS1168: Computed property names are not allowed in method overloads. +tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads.ts(6,5): error TS9002: Computed property names are not currently supported. -==== tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads.ts (2 errors) ==== +==== tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads.ts (3 errors) ==== var methodName = "method"; var accessorName = "accessor"; class C { @@ -13,4 +14,6 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads. ~~~~~~~~~~~~ !!! error TS1168: Computed property names are not allowed in method overloads. [methodName](v?: string) { } + ~~~~~~~~~~~~ +!!! error TS9002: Computed property names are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName12.errors.txt b/tests/baselines/reference/parserComputedPropertyName12.errors.txt new file mode 100644 index 00000000000..c028275369d --- /dev/null +++ b/tests/baselines/reference/parserComputedPropertyName12.errors.txt @@ -0,0 +1,9 @@ +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName12.ts(2,4): error TS9002: Computed property names are not currently supported. + + +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName12.ts (1 errors) ==== + class C { + [e]() { } + ~~~ +!!! error TS9002: Computed property names are not currently supported. + } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName12.js b/tests/baselines/reference/parserComputedPropertyName12.js deleted file mode 100644 index 96e62b626e7..00000000000 --- a/tests/baselines/reference/parserComputedPropertyName12.js +++ /dev/null @@ -1,13 +0,0 @@ -//// [parserComputedPropertyName12.ts] -class C { - [e]() { } -} - -//// [parserComputedPropertyName12.js] -var C = (function () { - function C() { - } - C.prototype[e] = function () { - }; - return C; -})(); diff --git a/tests/baselines/reference/parserComputedPropertyName12.types b/tests/baselines/reference/parserComputedPropertyName12.types deleted file mode 100644 index fcc96bc4d51..00000000000 --- a/tests/baselines/reference/parserComputedPropertyName12.types +++ /dev/null @@ -1,7 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName12.ts === -class C { ->C : C - - [e]() { } ->e : unknown -} diff --git a/tests/baselines/reference/parserComputedPropertyName17.errors.txt b/tests/baselines/reference/parserComputedPropertyName17.errors.txt new file mode 100644 index 00000000000..f8b1a4866e8 --- /dev/null +++ b/tests/baselines/reference/parserComputedPropertyName17.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName17.ts(1,15): error TS9002: Computed property names are not currently supported. + + +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName17.ts (1 errors) ==== + var v = { set [e](v) { } } + ~~~ +!!! error TS9002: Computed property names are not currently supported. \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName17.js b/tests/baselines/reference/parserComputedPropertyName17.js deleted file mode 100644 index 98d61ab8bca..00000000000 --- a/tests/baselines/reference/parserComputedPropertyName17.js +++ /dev/null @@ -1,6 +0,0 @@ -//// [parserComputedPropertyName17.ts] -var v = { set [e](v) { } } - -//// [parserComputedPropertyName17.js] -var v = { set [e](v) { -} }; diff --git a/tests/baselines/reference/parserComputedPropertyName17.types b/tests/baselines/reference/parserComputedPropertyName17.types deleted file mode 100644 index 8ae109dda37..00000000000 --- a/tests/baselines/reference/parserComputedPropertyName17.types +++ /dev/null @@ -1,7 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName17.ts === -var v = { set [e](v) { } } ->v : {} ->{ set [e](v) { } } : {} ->e : unknown ->v : any - diff --git a/tests/baselines/reference/parserComputedPropertyName2.errors.txt b/tests/baselines/reference/parserComputedPropertyName2.errors.txt new file mode 100644 index 00000000000..9eb6cdd6004 --- /dev/null +++ b/tests/baselines/reference/parserComputedPropertyName2.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName2.ts(1,11): error TS9002: Computed property names are not currently supported. + + +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName2.ts (1 errors) ==== + var v = { [e]: 1 }; + ~~~ +!!! error TS9002: Computed property names are not currently supported. \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName2.js b/tests/baselines/reference/parserComputedPropertyName2.js deleted file mode 100644 index f3c41f963f5..00000000000 --- a/tests/baselines/reference/parserComputedPropertyName2.js +++ /dev/null @@ -1,5 +0,0 @@ -//// [parserComputedPropertyName2.ts] -var v = { [e]: 1 }; - -//// [parserComputedPropertyName2.js] -var v = { [e]: 1 }; diff --git a/tests/baselines/reference/parserComputedPropertyName2.types b/tests/baselines/reference/parserComputedPropertyName2.types deleted file mode 100644 index 8e533282e28..00000000000 --- a/tests/baselines/reference/parserComputedPropertyName2.types +++ /dev/null @@ -1,6 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName2.ts === -var v = { [e]: 1 }; ->v : {} ->{ [e]: 1 } : {} ->e : unknown - diff --git a/tests/baselines/reference/parserComputedPropertyName24.errors.txt b/tests/baselines/reference/parserComputedPropertyName24.errors.txt new file mode 100644 index 00000000000..fa7280a93e7 --- /dev/null +++ b/tests/baselines/reference/parserComputedPropertyName24.errors.txt @@ -0,0 +1,9 @@ +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName24.ts(2,9): error TS9002: Computed property names are not currently supported. + + +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName24.ts (1 errors) ==== + class C { + set [e](v) { } + ~~~ +!!! error TS9002: Computed property names are not currently supported. + } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName24.js b/tests/baselines/reference/parserComputedPropertyName24.js deleted file mode 100644 index 0b9467fb26d..00000000000 --- a/tests/baselines/reference/parserComputedPropertyName24.js +++ /dev/null @@ -1,17 +0,0 @@ -//// [parserComputedPropertyName24.ts] -class C { - set [e](v) { } -} - -//// [parserComputedPropertyName24.js] -var C = (function () { - function C() { - } - Object.defineProperty(C.prototype, e, { - set: function (v) { - }, - enumerable: true, - configurable: true - }); - return C; -})(); diff --git a/tests/baselines/reference/parserComputedPropertyName24.types b/tests/baselines/reference/parserComputedPropertyName24.types deleted file mode 100644 index d2de5244057..00000000000 --- a/tests/baselines/reference/parserComputedPropertyName24.types +++ /dev/null @@ -1,8 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName24.ts === -class C { ->C : C - - set [e](v) { } ->e : unknown ->v : any -} diff --git a/tests/baselines/reference/parserComputedPropertyName3.errors.txt b/tests/baselines/reference/parserComputedPropertyName3.errors.txt new file mode 100644 index 00000000000..b13f453cb89 --- /dev/null +++ b/tests/baselines/reference/parserComputedPropertyName3.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName3.ts(1,11): error TS9002: Computed property names are not currently supported. + + +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName3.ts (1 errors) ==== + var v = { [e]() { } }; + ~~~ +!!! error TS9002: Computed property names are not currently supported. \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName3.js b/tests/baselines/reference/parserComputedPropertyName3.js deleted file mode 100644 index 2e73fe87d3a..00000000000 --- a/tests/baselines/reference/parserComputedPropertyName3.js +++ /dev/null @@ -1,6 +0,0 @@ -//// [parserComputedPropertyName3.ts] -var v = { [e]() { } }; - -//// [parserComputedPropertyName3.js] -var v = { [e]() { -} }; diff --git a/tests/baselines/reference/parserComputedPropertyName3.types b/tests/baselines/reference/parserComputedPropertyName3.types deleted file mode 100644 index 8a5cfafbd40..00000000000 --- a/tests/baselines/reference/parserComputedPropertyName3.types +++ /dev/null @@ -1,6 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName3.ts === -var v = { [e]() { } }; ->v : {} ->{ [e]() { } } : {} ->e : unknown - diff --git a/tests/baselines/reference/parserComputedPropertyName35.errors.txt b/tests/baselines/reference/parserComputedPropertyName35.errors.txt index e603d1c73fd..d68f0eb1ec7 100644 --- a/tests/baselines/reference/parserComputedPropertyName35.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName35.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName35.ts(2,6): error TS1171: A comma expression is not allowed in a computed property name. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName35.ts(2,5): error TS9002: Computed property names are not currently supported. ==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName35.ts (1 errors) ==== var x = { [0, 1]: { } - ~~~~ -!!! error TS1171: A comma expression is not allowed in a computed property name. + ~~~~~~ +!!! error TS9002: Computed property names are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName37.errors.txt b/tests/baselines/reference/parserComputedPropertyName37.errors.txt new file mode 100644 index 00000000000..fa1acd5dbe0 --- /dev/null +++ b/tests/baselines/reference/parserComputedPropertyName37.errors.txt @@ -0,0 +1,9 @@ +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName37.ts(2,5): error TS9002: Computed property names are not currently supported. + + +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName37.ts (1 errors) ==== + var v = { + [public]: 0 + ~~~~~~~~ +!!! error TS9002: Computed property names are not currently supported. + }; \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName37.js b/tests/baselines/reference/parserComputedPropertyName37.js deleted file mode 100644 index eb16d5ade37..00000000000 --- a/tests/baselines/reference/parserComputedPropertyName37.js +++ /dev/null @@ -1,9 +0,0 @@ -//// [parserComputedPropertyName37.ts] -var v = { - [public]: 0 -}; - -//// [parserComputedPropertyName37.js] -var v = { - [public]: 0 -}; diff --git a/tests/baselines/reference/parserComputedPropertyName37.types b/tests/baselines/reference/parserComputedPropertyName37.types deleted file mode 100644 index ebcd0ca276c..00000000000 --- a/tests/baselines/reference/parserComputedPropertyName37.types +++ /dev/null @@ -1,9 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName37.ts === -var v = { ->v : {} ->{ [public]: 0} : {} - - [public]: 0 ->public : unknown - -}; diff --git a/tests/baselines/reference/parserComputedPropertyName38.errors.txt b/tests/baselines/reference/parserComputedPropertyName38.errors.txt new file mode 100644 index 00000000000..910a907ee0f --- /dev/null +++ b/tests/baselines/reference/parserComputedPropertyName38.errors.txt @@ -0,0 +1,9 @@ +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts(2,5): error TS9002: Computed property names are not currently supported. + + +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts (1 errors) ==== + class C { + [public]() { } + ~~~~~~~~ +!!! error TS9002: Computed property names are not currently supported. + } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName38.js b/tests/baselines/reference/parserComputedPropertyName38.js deleted file mode 100644 index 487ff4078fd..00000000000 --- a/tests/baselines/reference/parserComputedPropertyName38.js +++ /dev/null @@ -1,13 +0,0 @@ -//// [parserComputedPropertyName38.ts] -class C { - [public]() { } -} - -//// [parserComputedPropertyName38.js] -var C = (function () { - function C() { - } - C.prototype[public] = function () { - }; - return C; -})(); diff --git a/tests/baselines/reference/parserComputedPropertyName38.types b/tests/baselines/reference/parserComputedPropertyName38.types deleted file mode 100644 index c77b9fcc67f..00000000000 --- a/tests/baselines/reference/parserComputedPropertyName38.types +++ /dev/null @@ -1,7 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts === -class C { ->C : C - - [public]() { } ->public : unknown -} diff --git a/tests/baselines/reference/parserComputedPropertyName4.errors.txt b/tests/baselines/reference/parserComputedPropertyName4.errors.txt new file mode 100644 index 00000000000..c1137b15872 --- /dev/null +++ b/tests/baselines/reference/parserComputedPropertyName4.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName4.ts(1,15): error TS9002: Computed property names are not currently supported. + + +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName4.ts (1 errors) ==== + var v = { get [e]() { } }; + ~~~ +!!! error TS9002: Computed property names are not currently supported. \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName4.js b/tests/baselines/reference/parserComputedPropertyName4.js deleted file mode 100644 index a88545566e6..00000000000 --- a/tests/baselines/reference/parserComputedPropertyName4.js +++ /dev/null @@ -1,6 +0,0 @@ -//// [parserComputedPropertyName4.ts] -var v = { get [e]() { } }; - -//// [parserComputedPropertyName4.js] -var v = { get [e]() { -} }; diff --git a/tests/baselines/reference/parserComputedPropertyName4.types b/tests/baselines/reference/parserComputedPropertyName4.types deleted file mode 100644 index 32a1b44efeb..00000000000 --- a/tests/baselines/reference/parserComputedPropertyName4.types +++ /dev/null @@ -1,6 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName4.ts === -var v = { get [e]() { } }; ->v : {} ->{ get [e]() { } } : {} ->e : unknown - diff --git a/tests/baselines/reference/parserComputedPropertyName40.errors.txt b/tests/baselines/reference/parserComputedPropertyName40.errors.txt new file mode 100644 index 00000000000..93be0ad51b7 --- /dev/null +++ b/tests/baselines/reference/parserComputedPropertyName40.errors.txt @@ -0,0 +1,9 @@ +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName40.ts(2,5): error TS9002: Computed property names are not currently supported. + + +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName40.ts (1 errors) ==== + class C { + [a ? "" : ""]() {} + ~~~~~~~~~~~~~ +!!! error TS9002: Computed property names are not currently supported. + } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName40.js b/tests/baselines/reference/parserComputedPropertyName40.js deleted file mode 100644 index 5f6381360fc..00000000000 --- a/tests/baselines/reference/parserComputedPropertyName40.js +++ /dev/null @@ -1,13 +0,0 @@ -//// [parserComputedPropertyName40.ts] -class C { - [a ? "" : ""]() {} -} - -//// [parserComputedPropertyName40.js] -var C = (function () { - function C() { - } - C.prototype[a ? "" : ""] = function () { - }; - return C; -})(); diff --git a/tests/baselines/reference/parserComputedPropertyName40.types b/tests/baselines/reference/parserComputedPropertyName40.types deleted file mode 100644 index 1b0b3ae49f0..00000000000 --- a/tests/baselines/reference/parserComputedPropertyName40.types +++ /dev/null @@ -1,8 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName40.ts === -class C { ->C : C - - [a ? "" : ""]() {} ->a ? "" : "" : string ->a : unknown -} diff --git a/tests/baselines/reference/parserComputedPropertyName41.errors.txt b/tests/baselines/reference/parserComputedPropertyName41.errors.txt new file mode 100644 index 00000000000..eb5e9a9ebbf --- /dev/null +++ b/tests/baselines/reference/parserComputedPropertyName41.errors.txt @@ -0,0 +1,9 @@ +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName41.ts(2,5): error TS9002: Computed property names are not currently supported. + + +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName41.ts (1 errors) ==== + var v = { + [0 in []]: true + ~~~~~~~~~ +!!! error TS9002: Computed property names are not currently supported. + } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName41.js b/tests/baselines/reference/parserComputedPropertyName41.js deleted file mode 100644 index b19cc3e7b3f..00000000000 --- a/tests/baselines/reference/parserComputedPropertyName41.js +++ /dev/null @@ -1,9 +0,0 @@ -//// [parserComputedPropertyName41.ts] -var v = { - [0 in []]: true -} - -//// [parserComputedPropertyName41.js] -var v = { - [0 in []]: true -}; diff --git a/tests/baselines/reference/parserComputedPropertyName41.types b/tests/baselines/reference/parserComputedPropertyName41.types deleted file mode 100644 index 468a44e6b9e..00000000000 --- a/tests/baselines/reference/parserComputedPropertyName41.types +++ /dev/null @@ -1,9 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName41.ts === -var v = { ->v : {} ->{ [0 in []]: true} : {} - - [0 in []]: true ->0 in [] : boolean ->[] : undefined[] -} diff --git a/tests/baselines/reference/parserComputedPropertyName6.errors.txt b/tests/baselines/reference/parserComputedPropertyName6.errors.txt new file mode 100644 index 00000000000..893bf3da719 --- /dev/null +++ b/tests/baselines/reference/parserComputedPropertyName6.errors.txt @@ -0,0 +1,10 @@ +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName6.ts(1,11): error TS9002: Computed property names are not currently supported. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName6.ts(1,19): error TS9002: Computed property names are not currently supported. + + +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName6.ts (2 errors) ==== + var v = { [e]: 1, [e + e]: 2 }; + ~~~ +!!! error TS9002: Computed property names are not currently supported. + ~~~~~~~ +!!! error TS9002: Computed property names are not currently supported. \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName6.js b/tests/baselines/reference/parserComputedPropertyName6.js deleted file mode 100644 index b60ad66a9d8..00000000000 --- a/tests/baselines/reference/parserComputedPropertyName6.js +++ /dev/null @@ -1,5 +0,0 @@ -//// [parserComputedPropertyName6.ts] -var v = { [e]: 1, [e + e]: 2 }; - -//// [parserComputedPropertyName6.js] -var v = { [e]: 1, [e + e]: 2 }; diff --git a/tests/baselines/reference/parserComputedPropertyName6.types b/tests/baselines/reference/parserComputedPropertyName6.types deleted file mode 100644 index 5fa7e79c32c..00000000000 --- a/tests/baselines/reference/parserComputedPropertyName6.types +++ /dev/null @@ -1,9 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName6.ts === -var v = { [e]: 1, [e + e]: 2 }; ->v : {} ->{ [e]: 1, [e + e]: 2 } : {} ->e : unknown ->e + e : any ->e : unknown ->e : unknown - diff --git a/tests/baselines/reference/parserES5ComputedPropertyName2.errors.txt b/tests/baselines/reference/parserES5ComputedPropertyName2.errors.txt index dc7d7e7ba30..7b6b74b8fd8 100644 --- a/tests/baselines/reference/parserES5ComputedPropertyName2.errors.txt +++ b/tests/baselines/reference/parserES5ComputedPropertyName2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName2.ts(1,11): error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher. +tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName2.ts(1,11): error TS9002: Computed property names are not currently supported. ==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName2.ts (1 errors) ==== var v = { [e]: 1 }; ~~~ -!!! error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher. \ No newline at end of file +!!! error TS9002: Computed property names are not currently supported. \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ComputedPropertyName3.errors.txt b/tests/baselines/reference/parserES5ComputedPropertyName3.errors.txt index 376c1a29ae4..669fd190265 100644 --- a/tests/baselines/reference/parserES5ComputedPropertyName3.errors.txt +++ b/tests/baselines/reference/parserES5ComputedPropertyName3.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName3.ts(1,11): error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher. +tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName3.ts(1,11): error TS9002: Computed property names are not currently supported. ==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName3.ts (1 errors) ==== var v = { [e]() { } }; ~~~ -!!! error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher. \ No newline at end of file +!!! error TS9002: Computed property names are not currently supported. \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ComputedPropertyName4.errors.txt b/tests/baselines/reference/parserES5ComputedPropertyName4.errors.txt index e0b816f157c..af0c6e858ad 100644 --- a/tests/baselines/reference/parserES5ComputedPropertyName4.errors.txt +++ b/tests/baselines/reference/parserES5ComputedPropertyName4.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName4.ts(1,15): error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher. +tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName4.ts(1,15): error TS9002: Computed property names are not currently supported. ==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName4.ts (1 errors) ==== var v = { get [e]() { } }; ~~~ -!!! error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher. \ No newline at end of file +!!! error TS9002: Computed property names are not currently supported. \ No newline at end of file From 7df3a407c2de3421912dec86e6e816b8ceeaf909 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Thu, 11 Dec 2014 16:56:10 -0800 Subject: [PATCH 128/141] Make the compiler resilient to encountering merge conflict markers in a source code file. --- .../diagnosticInformationMap.generated.ts | 1 + src/compiler/diagnosticMessages.json | 4 + src/compiler/scanner.ts | 82 ++++++++++++++++++- src/compiler/types.ts | 3 +- src/services/services.ts | 1 + .../conflictMarkerTrivia1.errors.txt | 25 ++++++ tests/cases/compiler/conflictMarkerTrivia1.ts | 7 ++ .../cases/fourslash/formatConflictMarker1.ts | 18 ++++ 8 files changed, 138 insertions(+), 3 deletions(-) create mode 100644 tests/baselines/reference/conflictMarkerTrivia1.errors.txt create mode 100644 tests/cases/compiler/conflictMarkerTrivia1.ts create mode 100644 tests/cases/fourslash/formatConflictMarker1.ts diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 17dbae83bf2..0e9bc25aba9 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -144,6 +144,7 @@ module ts { Array_element_destructuring_pattern_expected: { code: 1181, category: DiagnosticCategory.Error, key: "Array element destructuring pattern expected." }, A_destructuring_declaration_must_have_an_initializer: { code: 1182, category: DiagnosticCategory.Error, key: "A destructuring declaration must have an initializer." }, Destructuring_declarations_are_not_allowed_in_ambient_contexts: { code: 1183, category: DiagnosticCategory.Error, key: "Destructuring declarations are not allowed in ambient contexts." }, + Merge_conflict_marker_encountered: { code: 1184, category: DiagnosticCategory.Error, key: "Merge conflict marker encountered." }, Duplicate_identifier_0: { code: 2300, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'." }, Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: DiagnosticCategory.Error, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." }, Static_members_cannot_reference_class_type_parameters: { code: 2302, category: DiagnosticCategory.Error, key: "Static members cannot reference class type parameters." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index a06b71d460e..3f547474b26 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -568,6 +568,10 @@ "category": "Error", "code": 1183 }, + "Merge conflict marker encountered.": { + "category": "Error", + "code": 1184 + }, "Duplicate identifier '{0}'.": { "category": "Error", diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index 877a5ba187f..357e04b7004 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -333,10 +333,14 @@ module ts { var ch = text.charCodeAt(pos); switch (ch) { case CharacterCodes.carriageReturn: - if (text.charCodeAt(pos + 1) === CharacterCodes.lineFeed) pos++; + if (text.charCodeAt(pos + 1) === CharacterCodes.lineFeed) { + pos++; + } case CharacterCodes.lineFeed: pos++; - if (stopAfterLineBreak) return pos; + if (stopAfterLineBreak) { + return pos; + } continue; case CharacterCodes.tab: case CharacterCodes.verticalTab: @@ -367,6 +371,14 @@ module ts { continue; } break; + case CharacterCodes.lessThan: + case CharacterCodes.equals: + case CharacterCodes.greaterThan: + if (isConflictMarkerTrivia(text, pos)) { + pos = scanConflictMarkerTrivia(text, pos); + continue; + } + // fall through default: if (ch > CharacterCodes.maxAsciiCharacter && (isWhiteSpace(ch) || isLineBreak(ch))) { pos++; @@ -378,6 +390,39 @@ module ts { } } + function isConflictMarkerTrivia(text: string, pos: number) { + // Conflict markers must be at the start of a line. + if (pos > 0 && isLineBreak(text.charCodeAt(pos - 1))) { + var ch = text.charCodeAt(pos); + + // All conflict markers the same character repeated seven times. If it is a + // <<<<<<< or >>>>>>> marker then it is also followd by a space. + var markerLength = "<<<<<<<".length; + + if ((pos + markerLength) < text.length) { + for (var i = 0, n = markerLength; i < n; i++) { + if (text.charCodeAt(pos + i) !== ch) { + return false; + } + } + + return ch === CharacterCodes.equals || + text.charCodeAt(pos + markerLength) === CharacterCodes.space; + } + } + + return false; + } + + function scanConflictMarkerTrivia(text: string, pos: number) { + var len = text.length; + while (pos < len && !isLineBreak(text.charCodeAt(pos))) { + pos++; + } + + return pos; + } + // Extract comments from the given source text starting at the given position. If trailing is false, whitespace is skipped until // the first line break and comments between that location and the next token are returned. If trailing is true, comments occurring // between the given position and the next line break are returned. The return value is an array containing a TextRange for each @@ -1010,6 +1055,17 @@ module ts { case CharacterCodes.semicolon: return pos++, token = SyntaxKind.SemicolonToken; case CharacterCodes.lessThan: + if (isConflictMarkerTrivia(text, pos)) { + error(Diagnostics.Merge_conflict_marker_encountered); + pos = scanConflictMarkerTrivia(text, pos); + if (skipTrivia) { + continue; + } + else { + return token = SyntaxKind.ConflictMarkerTrivia; + } + } + if (text.charCodeAt(pos + 1) === CharacterCodes.lessThan) { if (text.charCodeAt(pos + 2) === CharacterCodes.equals) { return pos += 3, token = SyntaxKind.LessThanLessThanEqualsToken; @@ -1021,6 +1077,17 @@ module ts { } return pos++, token = SyntaxKind.LessThanToken; case CharacterCodes.equals: + if (isConflictMarkerTrivia(text, pos)) { + error(Diagnostics.Merge_conflict_marker_encountered); + pos = scanConflictMarkerTrivia(text, pos); + if (skipTrivia) { + continue; + } + else { + return token = SyntaxKind.ConflictMarkerTrivia; + } + } + if (text.charCodeAt(pos + 1) === CharacterCodes.equals) { if (text.charCodeAt(pos + 2) === CharacterCodes.equals) { return pos += 3, token = SyntaxKind.EqualsEqualsEqualsToken; @@ -1032,6 +1099,17 @@ module ts { } return pos++, token = SyntaxKind.EqualsToken; case CharacterCodes.greaterThan: + if (isConflictMarkerTrivia(text, pos)) { + error(Diagnostics.Merge_conflict_marker_encountered); + pos = scanConflictMarkerTrivia(text, pos); + if (skipTrivia) { + continue; + } + else { + return token = SyntaxKind.ConflictMarkerTrivia; + } + } + return pos++, token = SyntaxKind.GreaterThanToken; case CharacterCodes.question: return pos++, token = SyntaxKind.QuestionToken; diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 8398387094a..8506646c410 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -15,6 +15,7 @@ module ts { MultiLineCommentTrivia, NewLineTrivia, WhitespaceTrivia, + ConflictMarkerTrivia, // Literals NumericLiteral, StringLiteral, @@ -266,7 +267,7 @@ module ts { FirstToken = Unknown, LastToken = TypeKeyword, FirstTriviaToken = SingleLineCommentTrivia, - LastTriviaToken = WhitespaceTrivia, + LastTriviaToken = ConflictMarkerTrivia, FirstLiteralToken = NumericLiteral, LastLiteralToken = NoSubstitutionTemplateLiteral, FirstTemplateToken = NoSubstitutionTemplateLiteral, diff --git a/src/services/services.ts b/src/services/services.ts index 74e7f924a20..0fe3dc271df 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -5780,6 +5780,7 @@ module ts { return TokenClass.StringLiteral; case SyntaxKind.RegularExpressionLiteral: return TokenClass.RegExpLiteral; + case SyntaxKind.ConflictMarkerTrivia: case SyntaxKind.MultiLineCommentTrivia: case SyntaxKind.SingleLineCommentTrivia: return TokenClass.Comment; diff --git a/tests/baselines/reference/conflictMarkerTrivia1.errors.txt b/tests/baselines/reference/conflictMarkerTrivia1.errors.txt new file mode 100644 index 00000000000..79513821a00 --- /dev/null +++ b/tests/baselines/reference/conflictMarkerTrivia1.errors.txt @@ -0,0 +1,25 @@ +tests/cases/compiler/conflictMarkerTrivia1.ts(2,1): error TS1184: Merge conflict marker encountered. +tests/cases/compiler/conflictMarkerTrivia1.ts(4,1): error TS1184: Merge conflict marker encountered. +tests/cases/compiler/conflictMarkerTrivia1.ts(6,1): error TS1184: Merge conflict marker encountered. +tests/cases/compiler/conflictMarkerTrivia1.ts(3,5): error TS2300: Duplicate identifier 'v'. +tests/cases/compiler/conflictMarkerTrivia1.ts(5,5): error TS2300: Duplicate identifier 'v'. + + +==== tests/cases/compiler/conflictMarkerTrivia1.ts (5 errors) ==== + class C { + <<<<<<< HEAD + +!!! error TS1184: Merge conflict marker encountered. + v = 1; + ~ +!!! error TS2300: Duplicate identifier 'v'. + ======= + +!!! error TS1184: Merge conflict marker encountered. + v = 2; + ~ +!!! error TS2300: Duplicate identifier 'v'. + >>>>>>> Branch-a + +!!! error TS1184: Merge conflict marker encountered. + } \ No newline at end of file diff --git a/tests/cases/compiler/conflictMarkerTrivia1.ts b/tests/cases/compiler/conflictMarkerTrivia1.ts new file mode 100644 index 00000000000..c8d14df38f7 --- /dev/null +++ b/tests/cases/compiler/conflictMarkerTrivia1.ts @@ -0,0 +1,7 @@ +class C { +<<<<<<< HEAD + v = 1; +======= + v = 2; +>>>>>>> Branch-a +} \ No newline at end of file diff --git a/tests/cases/fourslash/formatConflictMarker1.ts b/tests/cases/fourslash/formatConflictMarker1.ts new file mode 100644 index 00000000000..88c97032411 --- /dev/null +++ b/tests/cases/fourslash/formatConflictMarker1.ts @@ -0,0 +1,18 @@ +/// + +////class C { +////<<<<<<< HEAD +//// v = 1; +////======= +////v = 2; +////>>>>>>> Branch - a +////} + +format.document(); +verify.currentFileContentIs("class C {\r\n\ +<<<<<<< HEAD\r\n\ + v = 1;\r\n\ +=======\r\n\ + v = 2;\r\n\ +>>>>>>> Branch - a\r\n\ +}"); \ No newline at end of file From 402c57cf7e09e366fed384d0be80343cad8cdd06 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Thu, 11 Dec 2014 17:04:21 -0800 Subject: [PATCH 129/141] Adding classification test. --- .../cases/unittests/services/colorization.ts | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/tests/cases/unittests/services/colorization.ts b/tests/cases/unittests/services/colorization.ts index b29f119f944..44804e4f9f5 100644 --- a/tests/cases/unittests/services/colorization.ts +++ b/tests/cases/unittests/services/colorization.ts @@ -317,7 +317,9 @@ describe('Colorization', function () { operator("<"), identifier("number"), finalEndOfLineState(ts.EndOfLineState.Start)); + }); + it("ClassifiesConflictTokens", () => { // no longer in something that looks generic. test("Foo number", ts.EndOfLineState.Start, @@ -327,6 +329,33 @@ describe('Colorization', function () { operator(">"), keyword("number"), finalEndOfLineState(ts.EndOfLineState.Start)); + + // Test conflict markers. + test( +"class C {\r\n\ +<<<<<<< HEAD\r\n\ + v = 1;\r\n\ +=======\r\n\ + v = 2;\r\n\ +>>>>>>> Branch - a\r\n\ +}", + ts.EndOfLineState.Start, + keyword("class"), + identifier("C"), + punctuation("{"), + comment("<<<<<<< HEAD"), + identifier("v"), + operator("="), + numberLiteral("1"), + punctuation(";"), + comment("======="), + identifier("v"), + operator("="), + numberLiteral("2"), + punctuation(";"), + comment(">>>>>>> Branch - a"), + punctuation("}"), + finalEndOfLineState(ts.EndOfLineState.Start)); }); }); }); \ No newline at end of file From de73d50ee926632590bf05f78bb701249817ac6d Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Wed, 10 Dec 2014 09:03:12 -0800 Subject: [PATCH 130/141] Remove compiletionSettings handeling from shims --- src/compiler/types.ts | 12 +-- src/harness/fourslash.ts | 20 ++-- src/harness/harnessLanguageService.ts | 4 +- src/services/shims.ts | 131 +------------------------- 4 files changed, 20 insertions(+), 147 deletions(-) diff --git a/src/compiler/types.ts b/src/compiler/types.ts index ac5dff627d5..9fd6d3d3968 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1425,9 +1425,9 @@ module ts { } export const enum ModuleKind { - None, - CommonJS, - AMD, + None = 0, + CommonJS = 1, + AMD = 2, } export interface LineAndCharacter { @@ -1440,9 +1440,9 @@ module ts { export const enum ScriptTarget { - ES3, - ES5, - ES6, + ES3 = 0, + ES5 = 1, + ES6 = 2, Latest = ES6, } diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index ac64e4c906e..a732a1de55b 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -145,14 +145,14 @@ module FourSlash { testOptMetadataNames.mapRoot, testOptMetadataNames.module, testOptMetadataNames.out, testOptMetadataNames.outDir, testOptMetadataNames.sourceMap, testOptMetadataNames.sourceRoot] - function convertGlobalOptionsToCompilationSettings(globalOptions: { [idx: string]: string }): ts.CompilationSettings { - var settings: ts.CompilationSettings = {}; + function convertGlobalOptionsToCompilerOptions(globalOptions: { [idx: string]: string }): ts.CompilerOptions { + var settings: ts.CompilerOptions = {}; // Convert all property in globalOptions into ts.CompilationSettings for (var prop in globalOptions) { if (globalOptions.hasOwnProperty(prop)) { switch (prop) { case testOptMetadataNames.declaration: - settings.generateDeclarationFiles = true; + settings.declaration = true; break; case testOptMetadataNames.mapRoot: settings.mapRoot = globalOptions[prop]; @@ -161,24 +161,24 @@ module FourSlash { // create appropriate external module target for CompilationSettings switch (globalOptions[prop]) { case "AMD": - settings.moduleGenTarget = ts.ModuleGenTarget.Asynchronous; + settings.module = ts.ModuleKind.AMD; break; case "CommonJS": - settings.moduleGenTarget = ts.ModuleGenTarget.Synchronous; + settings.module = ts.ModuleKind.CommonJS; break; default: - settings.moduleGenTarget = ts.ModuleGenTarget.Unspecified; + settings.module = ts.ModuleKind.None; break; } break; case testOptMetadataNames.out: - settings.outFileOption = globalOptions[prop]; + settings.out = globalOptions[prop]; break; case testOptMetadataNames.outDir: - settings.outDirOption = globalOptions[prop]; + settings.outDir = globalOptions[prop]; break; case testOptMetadataNames.sourceMap: - settings.mapSourceFiles = true; + settings.sourceMap = true; break; case testOptMetadataNames.sourceRoot: settings.sourceRoot = globalOptions[prop]; @@ -300,7 +300,7 @@ module FourSlash { this.cancellationToken = new TestCancellationToken(); this.languageServiceShimHost = new Harness.LanguageService.TypeScriptLS(this.cancellationToken); - var compilationSettings = convertGlobalOptionsToCompilationSettings(this.testData.globalOptions); + var compilationSettings = convertGlobalOptionsToCompilerOptions(this.testData.globalOptions); this.languageServiceShimHost.setCompilationSettings(compilationSettings); var startResolveFileRef: FourSlashFile = undefined; diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts index a093c75829c..0aa1415cc99 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -137,7 +137,7 @@ module Harness.LanguageService { private ls: ts.LanguageServiceShim = null; private fileNameToScript: ts.Map = {}; - private settings: ts.CompilationSettings = {}; + private settings: ts.CompilerOptions = {}; constructor(private cancellationToken: ts.CancellationToken = CancellationToken.None) { } @@ -251,7 +251,7 @@ module Harness.LanguageService { return this.ls; } - public setCompilationSettings(settings: ts.CompilationSettings) { + public setCompilationSettings(settings: ts.CompilerOptions) { for (var key in settings) { if (settings.hasOwnProperty(key)) { this.settings[key] = settings[key]; diff --git a/src/services/shims.ts b/src/services/shims.ts index dfec12d0f79..710906430c9 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -169,131 +169,6 @@ module ts { getDefaultCompilationSettings(): string; } - /// TODO: delete this, it is only needed until the VS interface is updated - export const enum LanguageVersion { - EcmaScript3 = 0, - EcmaScript5 = 1, - EcmaScript6 = 2, - } - - export const enum ModuleGenTarget { - Unspecified = 0, - Synchronous = 1, - Asynchronous = 2, - } - - export interface CompilationSettings { - propagateEnumConstants?: boolean; - removeComments?: boolean; - watch?: boolean; - noResolve?: boolean; - allowAutomaticSemicolonInsertion?: boolean; - noImplicitAny?: boolean; - noLib?: boolean; - codeGenTarget?: LanguageVersion; - moduleGenTarget?: ModuleGenTarget; - outFileOption?: string; - outDirOption?: string; - mapSourceFiles?: boolean; - mapRoot?: string; - sourceRoot?: string; - generateDeclarationFiles?: boolean; - useCaseSensitiveFileResolution?: boolean; - gatherDiagnostics?: boolean; - codepage?: number; - emitBOM?: boolean; - - // Declare indexer signature - [index: string]: any; - } - - function languageVersionToScriptTarget(languageVersion: LanguageVersion): ScriptTarget { - if (typeof languageVersion === "undefined") return undefined; - - switch (languageVersion) { - case LanguageVersion.EcmaScript3: return ScriptTarget.ES3 - case LanguageVersion.EcmaScript5: return ScriptTarget.ES5; - case LanguageVersion.EcmaScript6: return ScriptTarget.ES6; - default: throw Error("unsupported LanguageVersion value: " + languageVersion); - } - } - - function moduleGenTargetToModuleKind(moduleGenTarget: ModuleGenTarget): ModuleKind { - if (typeof moduleGenTarget === "undefined") return undefined; - - switch (moduleGenTarget) { - case ModuleGenTarget.Asynchronous: return ModuleKind.AMD; - case ModuleGenTarget.Synchronous: return ModuleKind.CommonJS; - case ModuleGenTarget.Unspecified: return ModuleKind.None; - default: throw Error("unsupported ModuleGenTarget value: " + moduleGenTarget); - } - } - - function scriptTargetTolanguageVersion(scriptTarget: ScriptTarget): LanguageVersion { - if (typeof scriptTarget === "undefined") return undefined; - - switch (scriptTarget) { - case ScriptTarget.ES3: return LanguageVersion.EcmaScript3; - case ScriptTarget.ES5: return LanguageVersion.EcmaScript5; - case ScriptTarget.ES6: return LanguageVersion.EcmaScript6; - default: throw Error("unsupported ScriptTarget value: " + scriptTarget); - } - } - - function moduleKindToModuleGenTarget(moduleKind: ModuleKind): ModuleGenTarget { - if (typeof moduleKind === "undefined") return undefined; - - switch (moduleKind) { - case ModuleKind.AMD: return ModuleGenTarget.Asynchronous; - case ModuleKind.CommonJS: return ModuleGenTarget.Synchronous; - case ModuleKind.None: return ModuleGenTarget.Unspecified; - default: throw Error("unsupported ModuleKind value: " + moduleKind); - } - } - - function compilationSettingsToCompilerOptions(settings: CompilationSettings): CompilerOptions { - // TODO: we should not be converting, but use options all the way - var options: CompilerOptions = {}; - //options.propagateEnumConstants = settings.propagateEnumConstants; - options.removeComments = settings.removeComments; - options.noResolve = settings.noResolve; - options.noImplicitAny = settings.noImplicitAny; - options.noLib = settings.noLib; - options.target = languageVersionToScriptTarget(settings.codeGenTarget); - options.module = moduleGenTargetToModuleKind(settings.moduleGenTarget); - options.out = settings.outFileOption; - options.outDir = settings.outDirOption; - options.sourceMap = settings.mapSourceFiles; - options.mapRoot = settings.mapRoot; - options.sourceRoot = settings.sourceRoot; - options.declaration = settings.generateDeclarationFiles; - //options.useCaseSensitiveFileResolution = settings.useCaseSensitiveFileResolution; - options.codepage = settings.codepage; - options.emitBOM = settings.emitBOM; - return options; - } - - function compilerOptionsToCompilationSettings(options: CompilerOptions): CompilationSettings { - var settings: CompilationSettings = {}; - //options.propagateEnumConstants = settings.propagateEnumConstants; - settings.removeComments = options.removeComments; - settings.noResolve = options.noResolve; - settings.noImplicitAny = options.noImplicitAny; - settings.noLib = options.noLib; - settings.codeGenTarget = scriptTargetTolanguageVersion(options.target); - settings.moduleGenTarget = moduleKindToModuleGenTarget(options.module); - settings.outFileOption = options.out; - settings.outDirOption = options.outDir; - settings.mapSourceFiles = options.sourceMap; - settings.mapRoot = options.mapRoot; - settings.sourceRoot = options.sourceRoot; - settings.generateDeclarationFiles = options.declaration; - // settings.useCaseSensitiveFileResolution = options.useCaseSensitiveFileResolution; - settings.codepage = options.codepage; - settings.emitBOM = options.emitBOM; - return settings; - } - function logInternalError(logger: Logger, err: Error) { logger.log("*INTERNAL ERROR* - Exception in typescript services: " + err.message); } @@ -355,9 +230,7 @@ module ts { throw Error("LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings"); return null; } - var options = compilationSettingsToCompilerOptions(JSON.parse(settingsJson)); - - return options; + return JSON.parse(settingsJson); } public getScriptFileNames(): string[] { @@ -858,7 +731,7 @@ module ts { return this.forwardJSONCall( "getDefaultCompilationSettings()", () => { - return compilerOptionsToCompilationSettings(getDefaultCompilerOptions()); + return getDefaultCompilerOptions(); }); } } From 1049b7139d6a39d5c5a8e6aa175045da3c54c82a Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Wed, 10 Dec 2014 13:02:31 -0800 Subject: [PATCH 131/141] Respond to code review comments --- src/harness/fourslash.ts | 1 + src/services/shims.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index a732a1de55b..bb9be15b2ae 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -167,6 +167,7 @@ module FourSlash { settings.module = ts.ModuleKind.CommonJS; break; default: + ts.Debug.assert(typeof globalOptions[prop] === "undefined" || globalOptions[prop] === "None"); settings.module = ts.ModuleKind.None; break; } diff --git a/src/services/shims.ts b/src/services/shims.ts index 710906430c9..8fce67025fb 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -230,7 +230,7 @@ module ts { throw Error("LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings"); return null; } - return JSON.parse(settingsJson); + return JSON.parse(settingsJson); } public getScriptFileNames(): string[] { From b87839dfb186837af77b8d1263dec9bdd8c80004 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Wed, 10 Dec 2014 17:41:48 -0800 Subject: [PATCH 132/141] respond to code review commments --- src/harness/fourslash.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index bb9be15b2ae..e253f7b575b 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -167,7 +167,7 @@ module FourSlash { settings.module = ts.ModuleKind.CommonJS; break; default: - ts.Debug.assert(typeof globalOptions[prop] === "undefined" || globalOptions[prop] === "None"); + ts.Debug.assert(globalOptions[prop] === undefined || globalOptions[prop] === "None"); settings.module = ts.ModuleKind.None; break; } From 06d7ef14cf8a2e24dde96e508c916a69d06272cd Mon Sep 17 00:00:00 2001 From: Jason Freeman Date: Thu, 11 Dec 2014 17:22:22 -0800 Subject: [PATCH 133/141] Don't quote the word 'generators' in error messages --- src/compiler/diagnosticInformationMap.generated.ts | 2 +- src/compiler/diagnosticMessages.json | 2 +- src/compiler/parser.ts | 2 +- .../baselines/reference/FunctionDeclaration10_es6.errors.txt | 4 ++-- .../baselines/reference/FunctionDeclaration11_es6.errors.txt | 4 ++-- .../baselines/reference/FunctionDeclaration13_es6.errors.txt | 4 ++-- tests/baselines/reference/FunctionDeclaration1_es6.errors.txt | 4 ++-- tests/baselines/reference/FunctionDeclaration6_es6.errors.txt | 4 ++-- tests/baselines/reference/FunctionDeclaration7_es6.errors.txt | 4 ++-- tests/baselines/reference/FunctionDeclaration9_es6.errors.txt | 4 ++-- tests/baselines/reference/FunctionExpression1_es6.errors.txt | 4 ++-- tests/baselines/reference/FunctionExpression2_es6.errors.txt | 4 ++-- .../reference/FunctionPropertyAssignments1_es6.errors.txt | 4 ++-- .../reference/FunctionPropertyAssignments5_es6.errors.txt | 4 ++-- .../reference/MemberFunctionDeclaration1_es6.errors.txt | 4 ++-- .../reference/MemberFunctionDeclaration2_es6.errors.txt | 4 ++-- .../reference/MemberFunctionDeclaration3_es6.errors.txt | 4 ++-- .../reference/MemberFunctionDeclaration7_es6.errors.txt | 4 ++-- tests/baselines/reference/YieldExpression10_es6.errors.txt | 4 ++-- tests/baselines/reference/YieldExpression11_es6.errors.txt | 4 ++-- tests/baselines/reference/YieldExpression13_es6.errors.txt | 4 ++-- tests/baselines/reference/YieldExpression16_es6.errors.txt | 4 ++-- tests/baselines/reference/YieldExpression19_es6.errors.txt | 4 ++-- tests/baselines/reference/YieldExpression3_es6.errors.txt | 4 ++-- tests/baselines/reference/YieldExpression4_es6.errors.txt | 4 ++-- tests/baselines/reference/YieldExpression6_es6.errors.txt | 4 ++-- tests/baselines/reference/YieldExpression7_es6.errors.txt | 4 ++-- tests/baselines/reference/YieldExpression8_es6.errors.txt | 4 ++-- tests/baselines/reference/YieldExpression9_es6.errors.txt | 4 ++-- .../reference/templateStringInYieldKeyword.errors.txt | 4 ++-- .../templateStringWithEmbeddedYieldKeywordES6.errors.txt | 4 ++-- tests/baselines/reference/yieldExpression1.errors.txt | 4 ++-- 32 files changed, 61 insertions(+), 61 deletions(-) diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 52b03653df1..82357fcdbe0 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -430,7 +430,7 @@ module ts { Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7024, category: DiagnosticCategory.Error, key: "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." }, You_cannot_rename_this_element: { code: 8000, category: DiagnosticCategory.Error, key: "You cannot rename this element." }, yield_expressions_are_not_currently_supported: { code: 9000, category: DiagnosticCategory.Error, key: "'yield' expressions are not currently supported." }, - generators_are_not_currently_supported: { code: 9001, category: DiagnosticCategory.Error, key: "'generators' are not currently supported." }, + Generators_are_not_currently_supported: { code: 9001, category: DiagnosticCategory.Error, key: "Generators are not currently supported." }, Computed_property_names_are_not_currently_supported: { code: 9002, category: DiagnosticCategory.Error, key: "Computed property names are not currently supported." }, }; } \ No newline at end of file diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 2f5c5c69955..bb8c10738f6 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1720,7 +1720,7 @@ "category": "Error", "code": 9000 }, - "'generators' are not currently supported.": { + "Generators are not currently supported.": { "category": "Error", "code": 9001 }, diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index ecf7085d9ec..b490b1d6826 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -4410,7 +4410,7 @@ module ts { function checkForGenerator(node: FunctionLikeDeclaration) { if (node.asteriskToken) { - return grammarErrorOnNode(node.asteriskToken, Diagnostics.generators_are_not_currently_supported); + return grammarErrorOnNode(node.asteriskToken, Diagnostics.Generators_are_not_currently_supported); } } diff --git a/tests/baselines/reference/FunctionDeclaration10_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration10_es6.errors.txt index 8c1585c2ec6..8c6b09c82d6 100644 --- a/tests/baselines/reference/FunctionDeclaration10_es6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration10_es6.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts(1,10): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts(1,10): error TS9001: Generators are not currently supported. ==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts (1 errors) ==== function * foo(a = yield => yield) { ~ -!!! error TS9001: 'generators' are not currently supported. +!!! error TS9001: Generators are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/FunctionDeclaration11_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration11_es6.errors.txt index ae307281b75..1dd8c3f6a1b 100644 --- a/tests/baselines/reference/FunctionDeclaration11_es6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration11_es6.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration11_es6.ts(1,10): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration11_es6.ts(1,10): error TS9001: Generators are not currently supported. ==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration11_es6.ts (1 errors) ==== function * yield() { ~ -!!! error TS9001: 'generators' are not currently supported. +!!! error TS9001: Generators are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/FunctionDeclaration13_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration13_es6.errors.txt index 50b6b15d708..a46097e8a1a 100644 --- a/tests/baselines/reference/FunctionDeclaration13_es6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration13_es6.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration13_es6.ts(1,10): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration13_es6.ts(1,10): error TS9001: Generators are not currently supported. tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration13_es6.ts(3,11): error TS2304: Cannot find name 'yield'. ==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration13_es6.ts (2 errors) ==== function * foo() { ~ -!!! error TS9001: 'generators' are not currently supported. +!!! error TS9001: Generators are not currently supported. // Legal to use 'yield' in a type context. var v: yield; ~~~~~ diff --git a/tests/baselines/reference/FunctionDeclaration1_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration1_es6.errors.txt index b2fdfba350a..71b09983939 100644 --- a/tests/baselines/reference/FunctionDeclaration1_es6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration1_es6.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration1_es6.ts(1,10): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration1_es6.ts(1,10): error TS9001: Generators are not currently supported. ==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration1_es6.ts (1 errors) ==== function * foo() { ~ -!!! error TS9001: 'generators' are not currently supported. +!!! error TS9001: Generators are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/FunctionDeclaration6_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration6_es6.errors.txt index 657a227822d..b5ea3f494a7 100644 --- a/tests/baselines/reference/FunctionDeclaration6_es6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration6_es6.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts(1,9): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts(1,9): error TS9001: Generators are not currently supported. tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts(1,18): error TS2304: Cannot find name 'yield'. ==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts (2 errors) ==== function*foo(a = yield) { ~ -!!! error TS9001: 'generators' are not currently supported. +!!! error TS9001: Generators are not currently supported. ~~~~~ !!! error TS2304: Cannot find name 'yield'. } \ No newline at end of file diff --git a/tests/baselines/reference/FunctionDeclaration7_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration7_es6.errors.txt index f81fd628eb7..71aff1e2488 100644 --- a/tests/baselines/reference/FunctionDeclaration7_es6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration7_es6.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(1,9): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(1,9): error TS9001: Generators are not currently supported. tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(3,20): error TS2304: Cannot find name 'yield'. ==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts (2 errors) ==== function*bar() { ~ -!!! error TS9001: 'generators' are not currently supported. +!!! error TS9001: Generators are not currently supported. // 'yield' here is an identifier, and not a yield expression. function*foo(a = yield) { ~~~~~ diff --git a/tests/baselines/reference/FunctionDeclaration9_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration9_es6.errors.txt index 7d51bf56ca4..8de32cf0a00 100644 --- a/tests/baselines/reference/FunctionDeclaration9_es6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration9_es6.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration9_es6.ts(1,10): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration9_es6.ts(1,10): error TS9001: Generators are not currently supported. ==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration9_es6.ts (1 errors) ==== function * foo() { ~ -!!! error TS9001: 'generators' are not currently supported. +!!! error TS9001: Generators are not currently supported. var v = { [yield]: foo } } \ No newline at end of file diff --git a/tests/baselines/reference/FunctionExpression1_es6.errors.txt b/tests/baselines/reference/FunctionExpression1_es6.errors.txt index 10ac3379228..979178fd4b7 100644 --- a/tests/baselines/reference/FunctionExpression1_es6.errors.txt +++ b/tests/baselines/reference/FunctionExpression1_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/functionExpressions/FunctionExpression1_es6.ts(1,18): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/functionExpressions/FunctionExpression1_es6.ts(1,18): error TS9001: Generators are not currently supported. ==== tests/cases/conformance/es6/functionExpressions/FunctionExpression1_es6.ts (1 errors) ==== var v = function * () { } ~ -!!! error TS9001: 'generators' are not currently supported. \ No newline at end of file +!!! error TS9001: Generators are not currently supported. \ No newline at end of file diff --git a/tests/baselines/reference/FunctionExpression2_es6.errors.txt b/tests/baselines/reference/FunctionExpression2_es6.errors.txt index a95cffcdbeb..ab27947d7c5 100644 --- a/tests/baselines/reference/FunctionExpression2_es6.errors.txt +++ b/tests/baselines/reference/FunctionExpression2_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/functionExpressions/FunctionExpression2_es6.ts(1,18): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/functionExpressions/FunctionExpression2_es6.ts(1,18): error TS9001: Generators are not currently supported. ==== tests/cases/conformance/es6/functionExpressions/FunctionExpression2_es6.ts (1 errors) ==== var v = function * foo() { } ~ -!!! error TS9001: 'generators' are not currently supported. \ No newline at end of file +!!! error TS9001: Generators are not currently supported. \ No newline at end of file diff --git a/tests/baselines/reference/FunctionPropertyAssignments1_es6.errors.txt b/tests/baselines/reference/FunctionPropertyAssignments1_es6.errors.txt index 53b2a016317..bbabbc97463 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments1_es6.errors.txt +++ b/tests/baselines/reference/FunctionPropertyAssignments1_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments1_es6.ts(1,11): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments1_es6.ts(1,11): error TS9001: Generators are not currently supported. ==== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments1_es6.ts (1 errors) ==== var v = { *foo() { } } ~ -!!! error TS9001: 'generators' are not currently supported. \ No newline at end of file +!!! error TS9001: Generators are not currently supported. \ No newline at end of file diff --git a/tests/baselines/reference/FunctionPropertyAssignments5_es6.errors.txt b/tests/baselines/reference/FunctionPropertyAssignments5_es6.errors.txt index b3415c27f29..393ede66a60 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments5_es6.errors.txt +++ b/tests/baselines/reference/FunctionPropertyAssignments5_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts(1,11): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts(1,11): error TS9001: Generators are not currently supported. ==== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts (1 errors) ==== var v = { *[foo()]() { } } ~ -!!! error TS9001: 'generators' are not currently supported. \ No newline at end of file +!!! error TS9001: Generators are not currently supported. \ No newline at end of file diff --git a/tests/baselines/reference/MemberFunctionDeclaration1_es6.errors.txt b/tests/baselines/reference/MemberFunctionDeclaration1_es6.errors.txt index f50934ea705..9d4e312ed22 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration1_es6.errors.txt +++ b/tests/baselines/reference/MemberFunctionDeclaration1_es6.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration1_es6.ts(2,4): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration1_es6.ts(2,4): error TS9001: Generators are not currently supported. ==== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration1_es6.ts (1 errors) ==== class C { *foo() { } ~ -!!! error TS9001: 'generators' are not currently supported. +!!! error TS9001: Generators are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/MemberFunctionDeclaration2_es6.errors.txt b/tests/baselines/reference/MemberFunctionDeclaration2_es6.errors.txt index 667e0e5e58d..6373c800994 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration2_es6.errors.txt +++ b/tests/baselines/reference/MemberFunctionDeclaration2_es6.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration2_es6.ts(2,11): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration2_es6.ts(2,11): error TS9001: Generators are not currently supported. ==== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration2_es6.ts (1 errors) ==== class C { public * foo() { } ~ -!!! error TS9001: 'generators' are not currently supported. +!!! error TS9001: Generators are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/MemberFunctionDeclaration3_es6.errors.txt b/tests/baselines/reference/MemberFunctionDeclaration3_es6.errors.txt index b61137f1f3d..b43e266e2a5 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration3_es6.errors.txt +++ b/tests/baselines/reference/MemberFunctionDeclaration3_es6.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts(2,4): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts(2,4): error TS9001: Generators are not currently supported. ==== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts (1 errors) ==== class C { *[foo]() { } ~ -!!! error TS9001: 'generators' are not currently supported. +!!! error TS9001: Generators are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/MemberFunctionDeclaration7_es6.errors.txt b/tests/baselines/reference/MemberFunctionDeclaration7_es6.errors.txt index 40afaf5bc65..ea87da50ed3 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration7_es6.errors.txt +++ b/tests/baselines/reference/MemberFunctionDeclaration7_es6.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration7_es6.ts(2,4): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration7_es6.ts(2,4): error TS9001: Generators are not currently supported. ==== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration7_es6.ts (1 errors) ==== class C { *foo() { } ~ -!!! error TS9001: 'generators' are not currently supported. +!!! error TS9001: Generators are not currently supported. } \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression10_es6.errors.txt b/tests/baselines/reference/YieldExpression10_es6.errors.txt index e2e52a0c5be..41d6bb5bf24 100644 --- a/tests/baselines/reference/YieldExpression10_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression10_es6.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression10_es6.ts(1,11): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/yieldExpressions/YieldExpression10_es6.ts(1,11): error TS9001: Generators are not currently supported. ==== tests/cases/conformance/es6/yieldExpressions/YieldExpression10_es6.ts (1 errors) ==== var v = { * foo() { ~ -!!! error TS9001: 'generators' are not currently supported. +!!! error TS9001: Generators are not currently supported. yield(foo); } } diff --git a/tests/baselines/reference/YieldExpression11_es6.errors.txt b/tests/baselines/reference/YieldExpression11_es6.errors.txt index 534d8b17bf2..eea108619bc 100644 --- a/tests/baselines/reference/YieldExpression11_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression11_es6.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts(2,3): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts(2,3): error TS9001: Generators are not currently supported. ==== tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts (1 errors) ==== class C { *foo() { ~ -!!! error TS9001: 'generators' are not currently supported. +!!! error TS9001: Generators are not currently supported. yield(foo); } } \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression13_es6.errors.txt b/tests/baselines/reference/YieldExpression13_es6.errors.txt index 1d2cd4e3c25..185fb2f6193 100644 --- a/tests/baselines/reference/YieldExpression13_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression13_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression13_es6.ts(1,9): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/yieldExpressions/YieldExpression13_es6.ts(1,9): error TS9001: Generators are not currently supported. ==== tests/cases/conformance/es6/yieldExpressions/YieldExpression13_es6.ts (1 errors) ==== function* foo() { yield } ~ -!!! error TS9001: 'generators' are not currently supported. \ No newline at end of file +!!! error TS9001: Generators are not currently supported. \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression16_es6.errors.txt b/tests/baselines/reference/YieldExpression16_es6.errors.txt index 1963539d4a8..54536a7d4fe 100644 --- a/tests/baselines/reference/YieldExpression16_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression16_es6.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts(1,9): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts(1,9): error TS9001: Generators are not currently supported. ==== tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts (1 errors) ==== function* foo() { ~ -!!! error TS9001: 'generators' are not currently supported. +!!! error TS9001: Generators are not currently supported. function bar() { yield foo; } diff --git a/tests/baselines/reference/YieldExpression19_es6.errors.txt b/tests/baselines/reference/YieldExpression19_es6.errors.txt index a427ab18f70..81cf0e2063c 100644 --- a/tests/baselines/reference/YieldExpression19_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression19_es6.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression19_es6.ts(1,9): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/yieldExpressions/YieldExpression19_es6.ts(1,9): error TS9001: Generators are not currently supported. ==== tests/cases/conformance/es6/yieldExpressions/YieldExpression19_es6.ts (1 errors) ==== function*foo() { ~ -!!! error TS9001: 'generators' are not currently supported. +!!! error TS9001: Generators are not currently supported. function bar() { function* quux() { yield(foo); diff --git a/tests/baselines/reference/YieldExpression3_es6.errors.txt b/tests/baselines/reference/YieldExpression3_es6.errors.txt index 9983eefc9a6..91da79fbb53 100644 --- a/tests/baselines/reference/YieldExpression3_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression3_es6.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression3_es6.ts(1,9): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/yieldExpressions/YieldExpression3_es6.ts(1,9): error TS9001: Generators are not currently supported. ==== tests/cases/conformance/es6/yieldExpressions/YieldExpression3_es6.ts (1 errors) ==== function* foo() { ~ -!!! error TS9001: 'generators' are not currently supported. +!!! error TS9001: Generators are not currently supported. yield yield } \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression4_es6.errors.txt b/tests/baselines/reference/YieldExpression4_es6.errors.txt index 58d1326ba59..ca7ed3d354c 100644 --- a/tests/baselines/reference/YieldExpression4_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression4_es6.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression4_es6.ts(1,9): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/yieldExpressions/YieldExpression4_es6.ts(1,9): error TS9001: Generators are not currently supported. ==== tests/cases/conformance/es6/yieldExpressions/YieldExpression4_es6.ts (1 errors) ==== function* foo() { ~ -!!! error TS9001: 'generators' are not currently supported. +!!! error TS9001: Generators are not currently supported. yield; yield; } \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression6_es6.errors.txt b/tests/baselines/reference/YieldExpression6_es6.errors.txt index 5ef38d249d5..d8ce78a300f 100644 --- a/tests/baselines/reference/YieldExpression6_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression6_es6.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression6_es6.ts(1,9): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/yieldExpressions/YieldExpression6_es6.ts(1,9): error TS9001: Generators are not currently supported. ==== tests/cases/conformance/es6/yieldExpressions/YieldExpression6_es6.ts (1 errors) ==== function* foo() { ~ -!!! error TS9001: 'generators' are not currently supported. +!!! error TS9001: Generators are not currently supported. yield*foo } \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression7_es6.errors.txt b/tests/baselines/reference/YieldExpression7_es6.errors.txt index 11914f6fbb4..87b15ac9f71 100644 --- a/tests/baselines/reference/YieldExpression7_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression7_es6.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression7_es6.ts(1,9): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/yieldExpressions/YieldExpression7_es6.ts(1,9): error TS9001: Generators are not currently supported. ==== tests/cases/conformance/es6/yieldExpressions/YieldExpression7_es6.ts (1 errors) ==== function* foo() { ~ -!!! error TS9001: 'generators' are not currently supported. +!!! error TS9001: Generators are not currently supported. yield foo } \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression8_es6.errors.txt b/tests/baselines/reference/YieldExpression8_es6.errors.txt index 591c1fade08..77bd03382aa 100644 --- a/tests/baselines/reference/YieldExpression8_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression8_es6.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts(2,9): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts(2,9): error TS9001: Generators are not currently supported. tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts(1,1): error TS2304: Cannot find name 'yield'. @@ -8,6 +8,6 @@ tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts(1,1): error !!! error TS2304: Cannot find name 'yield'. function* foo() { ~ -!!! error TS9001: 'generators' are not currently supported. +!!! error TS9001: Generators are not currently supported. yield(foo); } \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression9_es6.errors.txt b/tests/baselines/reference/YieldExpression9_es6.errors.txt index 108028d2282..ae1b105903a 100644 --- a/tests/baselines/reference/YieldExpression9_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression9_es6.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression9_es6.ts(1,17): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/yieldExpressions/YieldExpression9_es6.ts(1,17): error TS9001: Generators are not currently supported. ==== tests/cases/conformance/es6/yieldExpressions/YieldExpression9_es6.ts (1 errors) ==== var v = function*() { ~ -!!! error TS9001: 'generators' are not currently supported. +!!! error TS9001: Generators are not currently supported. yield(foo); } \ No newline at end of file diff --git a/tests/baselines/reference/templateStringInYieldKeyword.errors.txt b/tests/baselines/reference/templateStringInYieldKeyword.errors.txt index b12b552d5f0..24d64d8f29e 100644 --- a/tests/baselines/reference/templateStringInYieldKeyword.errors.txt +++ b/tests/baselines/reference/templateStringInYieldKeyword.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts(1,9): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts(1,9): error TS9001: Generators are not currently supported. ==== tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts (1 errors) ==== function* gen() { ~ -!!! error TS9001: 'generators' are not currently supported. +!!! error TS9001: Generators are not currently supported. // Once this is supported, the inner expression does not need to be parenthesized. var x = yield `abc${ x }def`; } diff --git a/tests/baselines/reference/templateStringWithEmbeddedYieldKeywordES6.errors.txt b/tests/baselines/reference/templateStringWithEmbeddedYieldKeywordES6.errors.txt index 5270e79679e..20542cb12b7 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedYieldKeywordES6.errors.txt +++ b/tests/baselines/reference/templateStringWithEmbeddedYieldKeywordES6.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts(1,9): error TS9001: 'generators' are not currently supported. +tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts(1,9): error TS9001: Generators are not currently supported. ==== tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts (1 errors) ==== function* gen() { ~ -!!! error TS9001: 'generators' are not currently supported. +!!! error TS9001: Generators are not currently supported. // Once this is supported, yield *must* be parenthesized. var x = `abc${ yield 10 }def`; } diff --git a/tests/baselines/reference/yieldExpression1.errors.txt b/tests/baselines/reference/yieldExpression1.errors.txt index ecac77698c5..33d9c1bf62e 100644 --- a/tests/baselines/reference/yieldExpression1.errors.txt +++ b/tests/baselines/reference/yieldExpression1.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/yieldExpression1.ts(1,9): error TS9001: 'generators' are not currently supported. +tests/cases/compiler/yieldExpression1.ts(1,9): error TS9001: Generators are not currently supported. ==== tests/cases/compiler/yieldExpression1.ts (1 errors) ==== function* foo() { ~ -!!! error TS9001: 'generators' are not currently supported. +!!! error TS9001: Generators are not currently supported. yield } \ No newline at end of file From c8a2d5de1a7efe9573f55a8735a2e204a52c0931 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Thu, 11 Dec 2014 17:35:02 -0800 Subject: [PATCH 134/141] CR feedback. --- src/compiler/scanner.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index 357e04b7004..9853e22d9f1 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -371,6 +371,7 @@ module ts { continue; } break; + case CharacterCodes.lessThan: case CharacterCodes.equals: case CharacterCodes.greaterThan: @@ -378,7 +379,8 @@ module ts { pos = scanConflictMarkerTrivia(text, pos); continue; } - // fall through + break; + default: if (ch > CharacterCodes.maxAsciiCharacter && (isWhiteSpace(ch) || isLineBreak(ch))) { pos++; @@ -395,8 +397,8 @@ module ts { if (pos > 0 && isLineBreak(text.charCodeAt(pos - 1))) { var ch = text.charCodeAt(pos); - // All conflict markers the same character repeated seven times. If it is a - // <<<<<<< or >>>>>>> marker then it is also followd by a space. + // All conflict markers consist of the same character repeated seven times. If it is + // a <<<<<<< or >>>>>>> marker then it is also followd by a space. var markerLength = "<<<<<<<".length; if ((pos + markerLength) < text.length) { From 53bdd562c89e9e3006d8581bcd9875036d1c7ab8 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Thu, 11 Dec 2014 17:47:29 -0800 Subject: [PATCH 135/141] remove trailing comma --- src/compiler/commandLineParser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index ae4c751869c..fabc897a355 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -133,7 +133,7 @@ module ts { shortName: "w", type: "boolean", description: Diagnostics.Watch_input_files, - }, + } ]; var shortOptionNames: Map = {}; From 11dd1ca00f4e9ee99ab9a91ee81987f42e89f59b Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Thu, 11 Dec 2014 17:53:24 -0800 Subject: [PATCH 136/141] For 262 tests, emit a bit in the baseline stating if the node had an error or not. --- src/compiler/parser.ts | 16 ++++++++-------- src/harness/test262Runner.ts | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 6d23bd51c17..e75b195d776 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -9,9 +9,9 @@ module ts { export function getNodeConstructor(kind: SyntaxKind): new () => Node { return nodeConstructors[kind] || (nodeConstructors[kind] = objectAllocator.getNodeConstructor(kind)); } - + export function createNode(kind: SyntaxKind): Node { - return new (getNodeConstructor(kind))(); + return new (getNodeConstructor(kind))(); } // Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes @@ -286,11 +286,11 @@ module ts { } text = ""; } - + return text !== undefined ? createSourceFile(filename, text, languageVersion) : undefined; } - function writeFile(fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void) { + function writeFile(fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void) { function directoryExists(directoryPath: string): boolean { if (hasProperty(existingDirectories, directoryPath)) { return true; @@ -400,7 +400,7 @@ module ts { } return 0; } - + function fixupParentReferences(sourceFile: SourceFile) { // normally parent references are set during binding. // however here SourceFile data is used only for syntactic features so running the whole binding process is an overhead. @@ -422,7 +422,7 @@ module ts { forEachChild(sourceFile, walk); } - + function isEvalOrArgumentsIdentifier(node: Node): boolean { return node.kind === SyntaxKind.Identifier && ((node).text === "eval" || (node).text === "arguments"); @@ -434,8 +434,8 @@ module ts { var nodeText = getSourceTextOfNodeFromSourceFile(sourceFile,(node).expression); return nodeText === '"use strict"' || nodeText === "'use strict'"; } - - export function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes = false): SourceFile { + + export function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes = false): SourceFile { var parsingContext: ParsingContext; var identifiers: Map = {}; var identifierCount = 0; diff --git a/src/harness/test262Runner.ts b/src/harness/test262Runner.ts index b53011237b7..8c39880a81c 100644 --- a/src/harness/test262Runner.ts +++ b/src/harness/test262Runner.ts @@ -68,6 +68,7 @@ class Test262BaselineRunner extends RunnerBase { function serializeNode(n: ts.Node): any { var o: any = { kind: getKindName(n.kind) }; + o.containsParseError = ts.containsParseError(n); ts.forEach(Object.getOwnPropertyNames(n), propertyName => { switch (propertyName) { From c189011d39e50c390ce9293fbb5a538626802bd3 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Thu, 11 Dec 2014 17:47:29 -0800 Subject: [PATCH 137/141] remove trailing comma --- src/compiler/commandLineParser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index ae4c751869c..fabc897a355 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -133,7 +133,7 @@ module ts { shortName: "w", type: "boolean", description: Diagnostics.Watch_input_files, - }, + } ]; var shortOptionNames: Map = {}; From c5943de3cdade77886c43eacf13bf3dbb7f98e79 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 11 Dec 2014 23:54:03 -0800 Subject: [PATCH 138/141] Just temporarily removing the tests until we can get back into a good state. --- .../reference/APISample_node_compile.js | 1865 ------ .../reference/APISample_node_compile.types | 5749 ---------------- .../reference/APISample_standalone_compile.js | 1862 ------ .../APISample_standalone_compile.types | 5756 ----------------- .../cases/compiler/APISample_node_compile.ts | 11 - .../compiler/APISample_standalone_compile.ts | 7 - 6 files changed, 15250 deletions(-) delete mode 100644 tests/baselines/reference/APISample_node_compile.js delete mode 100644 tests/baselines/reference/APISample_node_compile.types delete mode 100644 tests/baselines/reference/APISample_standalone_compile.js delete mode 100644 tests/baselines/reference/APISample_standalone_compile.types delete mode 100644 tests/cases/compiler/APISample_node_compile.ts delete mode 100644 tests/cases/compiler/APISample_standalone_compile.ts diff --git a/tests/baselines/reference/APISample_node_compile.js b/tests/baselines/reference/APISample_node_compile.js deleted file mode 100644 index d4111bcafd4..00000000000 --- a/tests/baselines/reference/APISample_node_compile.js +++ /dev/null @@ -1,1865 +0,0 @@ -//// [tests/cases/compiler/APISample_node_compile.ts] //// - -//// [APISample_node_compile.ts] - -import ts = require("typescript"); - -var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); - -var program = ts.createProgram(["file1.ts"], {}, undefined); -//// [typescript.d.ts] -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ - -declare module "typescript" { - interface Map { - [index: string]: T; - } - interface TextRange { - pos: number; - end: number; - } - const enum SyntaxKind { - Unknown = 0, - EndOfFileToken = 1, - SingleLineCommentTrivia = 2, - MultiLineCommentTrivia = 3, - NewLineTrivia = 4, - WhitespaceTrivia = 5, - NumericLiteral = 6, - StringLiteral = 7, - RegularExpressionLiteral = 8, - NoSubstitutionTemplateLiteral = 9, - TemplateHead = 10, - TemplateMiddle = 11, - TemplateTail = 12, - OpenBraceToken = 13, - CloseBraceToken = 14, - OpenParenToken = 15, - CloseParenToken = 16, - OpenBracketToken = 17, - CloseBracketToken = 18, - DotToken = 19, - DotDotDotToken = 20, - SemicolonToken = 21, - CommaToken = 22, - LessThanToken = 23, - GreaterThanToken = 24, - LessThanEqualsToken = 25, - GreaterThanEqualsToken = 26, - EqualsEqualsToken = 27, - ExclamationEqualsToken = 28, - EqualsEqualsEqualsToken = 29, - ExclamationEqualsEqualsToken = 30, - EqualsGreaterThanToken = 31, - PlusToken = 32, - MinusToken = 33, - AsteriskToken = 34, - SlashToken = 35, - PercentToken = 36, - PlusPlusToken = 37, - MinusMinusToken = 38, - LessThanLessThanToken = 39, - GreaterThanGreaterThanToken = 40, - GreaterThanGreaterThanGreaterThanToken = 41, - AmpersandToken = 42, - BarToken = 43, - CaretToken = 44, - ExclamationToken = 45, - TildeToken = 46, - AmpersandAmpersandToken = 47, - BarBarToken = 48, - QuestionToken = 49, - ColonToken = 50, - EqualsToken = 51, - PlusEqualsToken = 52, - MinusEqualsToken = 53, - AsteriskEqualsToken = 54, - SlashEqualsToken = 55, - PercentEqualsToken = 56, - LessThanLessThanEqualsToken = 57, - GreaterThanGreaterThanEqualsToken = 58, - GreaterThanGreaterThanGreaterThanEqualsToken = 59, - AmpersandEqualsToken = 60, - BarEqualsToken = 61, - CaretEqualsToken = 62, - Identifier = 63, - BreakKeyword = 64, - CaseKeyword = 65, - CatchKeyword = 66, - ClassKeyword = 67, - ConstKeyword = 68, - ContinueKeyword = 69, - DebuggerKeyword = 70, - DefaultKeyword = 71, - DeleteKeyword = 72, - DoKeyword = 73, - ElseKeyword = 74, - EnumKeyword = 75, - ExportKeyword = 76, - ExtendsKeyword = 77, - FalseKeyword = 78, - FinallyKeyword = 79, - ForKeyword = 80, - FunctionKeyword = 81, - IfKeyword = 82, - ImportKeyword = 83, - InKeyword = 84, - InstanceOfKeyword = 85, - NewKeyword = 86, - NullKeyword = 87, - ReturnKeyword = 88, - SuperKeyword = 89, - SwitchKeyword = 90, - ThisKeyword = 91, - ThrowKeyword = 92, - TrueKeyword = 93, - TryKeyword = 94, - TypeOfKeyword = 95, - VarKeyword = 96, - VoidKeyword = 97, - WhileKeyword = 98, - WithKeyword = 99, - ImplementsKeyword = 100, - InterfaceKeyword = 101, - LetKeyword = 102, - PackageKeyword = 103, - PrivateKeyword = 104, - ProtectedKeyword = 105, - PublicKeyword = 106, - StaticKeyword = 107, - YieldKeyword = 108, - AnyKeyword = 109, - BooleanKeyword = 110, - ConstructorKeyword = 111, - DeclareKeyword = 112, - GetKeyword = 113, - ModuleKeyword = 114, - RequireKeyword = 115, - NumberKeyword = 116, - SetKeyword = 117, - StringKeyword = 118, - TypeKeyword = 119, - QualifiedName = 120, - ComputedPropertyName = 121, - TypeParameter = 122, - Parameter = 123, - Property = 124, - Method = 125, - Constructor = 126, - GetAccessor = 127, - SetAccessor = 128, - CallSignature = 129, - ConstructSignature = 130, - IndexSignature = 131, - TypeReference = 132, - FunctionType = 133, - ConstructorType = 134, - TypeQuery = 135, - TypeLiteral = 136, - ArrayType = 137, - TupleType = 138, - UnionType = 139, - ParenthesizedType = 140, - ArrayLiteralExpression = 141, - ObjectLiteralExpression = 142, - PropertyAccessExpression = 143, - ElementAccessExpression = 144, - CallExpression = 145, - NewExpression = 146, - TaggedTemplateExpression = 147, - TypeAssertionExpression = 148, - ParenthesizedExpression = 149, - FunctionExpression = 150, - ArrowFunction = 151, - DeleteExpression = 152, - TypeOfExpression = 153, - VoidExpression = 154, - PrefixUnaryExpression = 155, - PostfixUnaryExpression = 156, - BinaryExpression = 157, - ConditionalExpression = 158, - TemplateExpression = 159, - YieldExpression = 160, - OmittedExpression = 161, - TemplateSpan = 162, - Block = 163, - VariableStatement = 164, - EmptyStatement = 165, - ExpressionStatement = 166, - IfStatement = 167, - DoStatement = 168, - WhileStatement = 169, - ForStatement = 170, - ForInStatement = 171, - ContinueStatement = 172, - BreakStatement = 173, - ReturnStatement = 174, - WithStatement = 175, - SwitchStatement = 176, - LabeledStatement = 177, - ThrowStatement = 178, - TryStatement = 179, - TryBlock = 180, - FinallyBlock = 181, - DebuggerStatement = 182, - VariableDeclaration = 183, - FunctionDeclaration = 184, - ClassDeclaration = 185, - InterfaceDeclaration = 186, - TypeAliasDeclaration = 187, - EnumDeclaration = 188, - ModuleDeclaration = 189, - ModuleBlock = 190, - ImportDeclaration = 191, - ExportAssignment = 192, - ExternalModuleReference = 193, - CaseClause = 194, - DefaultClause = 195, - HeritageClause = 196, - CatchClause = 197, - PropertyAssignment = 198, - ShorthandPropertyAssignment = 199, - EnumMember = 200, - SourceFile = 201, - Program = 202, - SyntaxList = 203, - Count = 204, - FirstAssignment = 51, - LastAssignment = 62, - FirstReservedWord = 64, - LastReservedWord = 99, - FirstKeyword = 64, - LastKeyword = 119, - FirstFutureReservedWord = 100, - LastFutureReservedWord = 108, - FirstTypeNode = 132, - LastTypeNode = 140, - FirstPunctuation = 13, - LastPunctuation = 62, - FirstToken = 0, - LastToken = 119, - FirstTriviaToken = 2, - LastTriviaToken = 5, - FirstLiteralToken = 6, - LastLiteralToken = 9, - FirstTemplateToken = 9, - LastTemplateToken = 12, - FirstOperator = 21, - LastOperator = 62, - FirstBinaryOperator = 23, - LastBinaryOperator = 62, - FirstNode = 120, - } - const enum NodeFlags { - Export = 1, - Ambient = 2, - Public = 16, - Private = 32, - Protected = 64, - Static = 128, - MultiLine = 256, - Synthetic = 512, - DeclarationFile = 1024, - Let = 2048, - Const = 4096, - OctalLiteral = 8192, - Modifier = 243, - AccessibilityModifier = 112, - BlockScoped = 6144, - } - const enum ParserContextFlags { - StrictMode = 1, - DisallowIn = 2, - Yield = 4, - GeneratorParameter = 8, - ContainsError = 16, - HasPropagatedChildContainsErrorFlag = 32, - } - interface Node extends TextRange { - kind: SyntaxKind; - flags: NodeFlags; - parserContextFlags?: ParserContextFlags; - id?: number; - parent?: Node; - symbol?: Symbol; - locals?: SymbolTable; - nextContainer?: Node; - localSymbol?: Symbol; - modifiers?: ModifiersArray; - } - interface NodeArray extends Array, TextRange { - hasTrailingComma?: boolean; - } - interface ModifiersArray extends NodeArray { - flags: number; - } - interface Identifier extends PrimaryExpression { - text: string; - } - interface QualifiedName extends Node { - left: EntityName; - right: Identifier; - } - type EntityName = Identifier | QualifiedName; - type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; - interface Declaration extends Node { - _declarationBrand: any; - name?: DeclarationName; - } - interface ComputedPropertyName extends Node { - expression: Expression; - } - interface TypeParameterDeclaration extends Declaration { - name: Identifier; - constraint?: TypeNode; - expression?: Expression; - } - interface SignatureDeclaration extends Declaration { - typeParameters?: NodeArray; - parameters: NodeArray; - type?: TypeNode; - } - interface VariableDeclaration extends Declaration { - name: Identifier; - type?: TypeNode; - initializer?: Expression; - } - interface ParameterDeclaration extends Declaration { - dotDotDotToken?: Node; - name: Identifier; - questionToken?: Node; - type?: TypeNode | StringLiteralExpression; - initializer?: Expression; - } - interface PropertyDeclaration extends Declaration, ClassElement { - _propertyDeclarationBrand: any; - questionToken?: Node; - type?: TypeNode; - initializer?: Expression; - } - type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; - type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; - interface ObjectLiteralElement extends Declaration { - _objectLiteralBrandBrand: any; - } - interface ShorthandPropertyAssignment extends ObjectLiteralElement { - name: Identifier; - questionToken?: Node; - } - interface PropertyAssignment extends ObjectLiteralElement { - _propertyAssignmentBrand: any; - name: DeclarationName; - questionToken?: Node; - initializer: Expression; - } - /** - * Several node kinds share function-like features such as a signature, - * a name, and a body. These nodes should extend FunctionLikeDeclaration. - * Examples: - * FunctionDeclaration - * MethodDeclaration - * AccessorDeclaration - */ - interface FunctionLikeDeclaration extends SignatureDeclaration { - _functionLikeDeclarationBrand: any; - asteriskToken?: Node; - questionToken?: Node; - body?: Block | Expression; - } - interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { - name: Identifier; - body?: Block; - } - interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { - body?: Block; - } - interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { - body?: Block; - } - interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { - _accessorDeclarationBrand: any; - body: Block; - } - interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { - _indexSignatureDeclarationBrand: any; - } - interface TypeNode extends Node { - _typeNodeBrand: any; - } - interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { - _functionOrConstructorTypeNodeBrand: any; - } - interface TypeReferenceNode extends TypeNode { - typeName: EntityName; - typeArguments?: NodeArray; - } - interface TypeQueryNode extends TypeNode { - exprName: EntityName; - } - interface TypeLiteralNode extends TypeNode, Declaration { - members: NodeArray; - } - interface ArrayTypeNode extends TypeNode { - elementType: TypeNode; - } - interface TupleTypeNode extends TypeNode { - elementTypes: NodeArray; - } - interface UnionTypeNode extends TypeNode { - types: NodeArray; - } - interface ParenthesizedTypeNode extends TypeNode { - type: TypeNode; - } - interface Expression extends Node { - _expressionBrand: any; - contextualType?: Type; - } - interface UnaryExpression extends Expression { - _unaryExpressionBrand: any; - } - interface PrefixUnaryExpression extends UnaryExpression { - operator: SyntaxKind; - operand: UnaryExpression; - } - interface PostfixUnaryExpression extends PostfixExpression { - operand: LeftHandSideExpression; - operator: SyntaxKind; - } - interface PostfixExpression extends UnaryExpression { - _postfixExpressionBrand: any; - } - interface LeftHandSideExpression extends PostfixExpression { - _leftHandSideExpressionBrand: any; - } - interface MemberExpression extends LeftHandSideExpression { - _memberExpressionBrand: any; - } - interface PrimaryExpression extends MemberExpression { - _primaryExpressionBrand: any; - } - interface DeleteExpression extends UnaryExpression { - expression: UnaryExpression; - } - interface TypeOfExpression extends UnaryExpression { - expression: UnaryExpression; - } - interface VoidExpression extends UnaryExpression { - expression: UnaryExpression; - } - interface YieldExpression extends Expression { - asteriskToken?: Node; - expression: Expression; - } - interface BinaryExpression extends Expression { - left: Expression; - operator: SyntaxKind; - right: Expression; - } - interface ConditionalExpression extends Expression { - condition: Expression; - whenTrue: Expression; - whenFalse: Expression; - } - interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { - name?: Identifier; - body: Block | Expression; - } - interface LiteralExpression extends PrimaryExpression { - text: string; - isUnterminated?: boolean; - } - interface StringLiteralExpression extends LiteralExpression { - _stringLiteralExpressionBrand: any; - } - interface TemplateExpression extends PrimaryExpression { - head: LiteralExpression; - templateSpans: NodeArray; - } - interface TemplateSpan extends Node { - expression: Expression; - literal: LiteralExpression; - } - interface ParenthesizedExpression extends PrimaryExpression { - expression: Expression; - } - interface ArrayLiteralExpression extends PrimaryExpression { - elements: NodeArray; - } - interface ObjectLiteralExpression extends PrimaryExpression, Declaration { - properties: NodeArray; - } - interface PropertyAccessExpression extends MemberExpression { - expression: LeftHandSideExpression; - name: Identifier; - } - interface ElementAccessExpression extends MemberExpression { - expression: LeftHandSideExpression; - argumentExpression?: Expression; - } - interface CallExpression extends LeftHandSideExpression { - expression: LeftHandSideExpression; - typeArguments?: NodeArray; - arguments: NodeArray; - } - interface NewExpression extends CallExpression, PrimaryExpression { - } - interface TaggedTemplateExpression extends MemberExpression { - tag: LeftHandSideExpression; - template: LiteralExpression | TemplateExpression; - } - type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression; - interface TypeAssertion extends UnaryExpression { - type: TypeNode; - expression: UnaryExpression; - } - interface Statement extends Node, ModuleElement { - _statementBrand: any; - } - interface Block extends Statement { - statements: NodeArray; - } - interface VariableStatement extends Statement { - declarations: NodeArray; - } - interface ExpressionStatement extends Statement { - expression: Expression; - } - interface IfStatement extends Statement { - expression: Expression; - thenStatement: Statement; - elseStatement?: Statement; - } - interface IterationStatement extends Statement { - statement: Statement; - } - interface DoStatement extends IterationStatement { - expression: Expression; - } - interface WhileStatement extends IterationStatement { - expression: Expression; - } - interface ForStatement extends IterationStatement { - declarations?: NodeArray; - initializer?: Expression; - condition?: Expression; - iterator?: Expression; - } - interface ForInStatement extends IterationStatement { - declarations?: NodeArray; - variable?: Expression; - expression: Expression; - } - interface BreakOrContinueStatement extends Statement { - label?: Identifier; - } - interface ReturnStatement extends Statement { - expression?: Expression; - } - interface WithStatement extends Statement { - expression: Expression; - statement: Statement; - } - interface SwitchStatement extends Statement { - expression: Expression; - clauses: NodeArray; - } - interface CaseClause extends Node { - expression?: Expression; - statements: NodeArray; - } - interface DefaultClause extends Node { - statements: NodeArray; - } - type CaseOrDefaultClause = CaseClause | DefaultClause; - interface LabeledStatement extends Statement { - label: Identifier; - statement: Statement; - } - interface ThrowStatement extends Statement { - expression: Expression; - } - interface TryStatement extends Statement { - tryBlock: Block; - catchClause?: CatchClause; - finallyBlock?: Block; - } - interface CatchClause extends Declaration { - name: Identifier; - type?: TypeNode; - block: Block; - } - interface ModuleElement extends Node { - _moduleElementBrand: any; - } - interface ClassDeclaration extends Declaration, ModuleElement { - name: Identifier; - typeParameters?: NodeArray; - heritageClauses?: NodeArray; - members: NodeArray; - } - interface ClassElement extends Declaration { - _classElementBrand: any; - } - interface InterfaceDeclaration extends Declaration, ModuleElement { - name: Identifier; - typeParameters?: NodeArray; - heritageClauses?: NodeArray; - members: NodeArray; - } - interface HeritageClause extends Node { - token: SyntaxKind; - types?: NodeArray; - } - interface TypeAliasDeclaration extends Declaration, ModuleElement { - name: Identifier; - type: TypeNode; - } - interface EnumMember extends Declaration { - name: DeclarationName; - initializer?: Expression; - } - interface EnumDeclaration extends Declaration, ModuleElement { - name: Identifier; - members: NodeArray; - } - interface ModuleDeclaration extends Declaration, ModuleElement { - name: Identifier | LiteralExpression; - body: ModuleBlock | ModuleDeclaration; - } - interface ModuleBlock extends Node, ModuleElement { - statements: NodeArray; - } - interface ImportDeclaration extends Declaration, ModuleElement { - name: Identifier; - moduleReference: EntityName | ExternalModuleReference; - } - interface ExternalModuleReference extends Node { - expression?: Expression; - } - interface ExportAssignment extends Statement, ModuleElement { - exportName: Identifier; - } - interface FileReference extends TextRange { - filename: string; - } - interface CommentRange extends TextRange { - hasTrailingNewLine?: boolean; - } - interface SourceFile extends Declaration { - statements: NodeArray; - endOfFileToken: Node; - filename: string; - text: string; - getLineAndCharacterFromPosition(position: number): LineAndCharacter; - getPositionFromLineAndCharacter(line: number, character: number): number; - getLineStarts(): number[]; - amdDependencies: string[]; - amdModuleName: string; - referencedFiles: FileReference[]; - referenceDiagnostics: Diagnostic[]; - parseDiagnostics: Diagnostic[]; - grammarDiagnostics: Diagnostic[]; - getSyntacticDiagnostics(): Diagnostic[]; - semanticDiagnostics: Diagnostic[]; - hasNoDefaultLib: boolean; - externalModuleIndicator: Node; - nodeCount: number; - identifierCount: number; - symbolCount: number; - isOpen: boolean; - version: string; - languageVersion: ScriptTarget; - identifiers: Map; - } - interface Program { - getSourceFile(filename: string): SourceFile; - getSourceFiles(): SourceFile[]; - getCompilerOptions(): CompilerOptions; - getCompilerHost(): CompilerHost; - getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; - getGlobalDiagnostics(): Diagnostic[]; - getTypeChecker(fullTypeCheckMode: boolean): TypeChecker; - getCommonSourceDirectory(): string; - } - interface SourceMapSpan { - emittedLine: number; - emittedColumn: number; - sourceLine: number; - sourceColumn: number; - nameIndex?: number; - sourceIndex: number; - } - interface SourceMapData { - sourceMapFilePath: string; - jsSourceMappingURL: string; - sourceMapFile: string; - sourceMapSourceRoot: string; - sourceMapSources: string[]; - inputSourceFileNames: string[]; - sourceMapNames?: string[]; - sourceMapMappings: string; - sourceMapDecodedMappings: SourceMapSpan[]; - } - enum EmitReturnStatus { - Succeeded = 0, - AllOutputGenerationSkipped = 1, - JSGeneratedWithSemanticErrors = 2, - DeclarationGenerationSkipped = 3, - EmitErrorsEncountered = 4, - CompilerOptionsErrors = 5, - } - interface EmitResult { - emitResultStatus: EmitReturnStatus; - diagnostics: Diagnostic[]; - sourceMaps: SourceMapData[]; - } - interface TypeChecker { - getProgram(): Program; - getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; - getDeclarationDiagnostics(sourceFile: SourceFile): Diagnostic[]; - getGlobalDiagnostics(): Diagnostic[]; - getNodeCount(): number; - getIdentifierCount(): number; - getSymbolCount(): number; - getTypeCount(): number; - emitFiles(targetSourceFile?: SourceFile): EmitResult; - getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; - getDeclaredTypeOfSymbol(symbol: Symbol): Type; - getPropertiesOfType(type: Type): Symbol[]; - getPropertyOfType(type: Type, propertyName: string): Symbol; - getSignaturesOfType(type: Type, kind: SignatureKind): Signature[]; - getIndexTypeOfType(type: Type, kind: IndexKind): Type; - getReturnTypeOfSignature(signature: Signature): Type; - getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; - getSymbolAtLocation(node: Node): Symbol; - getShorthandAssignmentValueSymbol(location: Node): Symbol; - getTypeAtLocation(node: Node): Type; - typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; - symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; - getSymbolDisplayBuilder(): SymbolDisplayBuilder; - getFullyQualifiedName(symbol: Symbol): string; - getAugmentedPropertiesOfType(type: Type): Symbol[]; - getRootSymbols(symbol: Symbol): Symbol[]; - getContextualType(node: Expression): Type; - getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; - getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; - isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; - isUndefinedSymbol(symbol: Symbol): boolean; - isArgumentsSymbol(symbol: Symbol): boolean; - isEmitBlocked(sourceFile?: SourceFile): boolean; - getEnumMemberValue(node: EnumMember): number; - isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; - getAliasedSymbol(symbol: Symbol): Symbol; - } - interface SymbolDisplayBuilder { - buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void; - buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void; - buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - } - interface SymbolWriter { - writeKeyword(text: string): void; - writeOperator(text: string): void; - writePunctuation(text: string): void; - writeSpace(text: string): void; - writeStringLiteral(text: string): void; - writeParameter(text: string): void; - writeSymbol(text: string, symbol: Symbol): void; - writeLine(): void; - increaseIndent(): void; - decreaseIndent(): void; - clear(): void; - trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void; - } - const enum TypeFormatFlags { - None = 0, - WriteArrayAsGenericType = 1, - UseTypeOfFunction = 2, - NoTruncation = 4, - WriteArrowStyleSignature = 8, - WriteOwnNameForAnyLike = 16, - WriteTypeArgumentsOfSignature = 32, - InElementType = 64, - } - const enum SymbolFormatFlags { - None = 0, - WriteTypeParametersOrArguments = 1, - UseOnlyExternalAliasing = 2, - } - const enum SymbolAccessibility { - Accessible = 0, - NotAccessible = 1, - CannotBeNamed = 2, - } - interface SymbolVisibilityResult { - accessibility: SymbolAccessibility; - aliasesToMakeVisible?: ImportDeclaration[]; - errorSymbolName?: string; - errorNode?: Node; - } - interface SymbolAccessiblityResult extends SymbolVisibilityResult { - errorModuleName?: string; - } - interface EmitResolver { - getProgram(): Program; - getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; - getExpressionNamePrefix(node: Identifier): string; - getExportAssignmentName(node: SourceFile): string; - isReferencedImportDeclaration(node: ImportDeclaration): boolean; - isTopLevelValueImportWithEntityName(node: ImportDeclaration): boolean; - getNodeCheckFlags(node: Node): NodeCheckFlags; - getEnumMemberValue(node: EnumMember): number; - hasSemanticErrors(sourceFile?: SourceFile): boolean; - isDeclarationVisible(node: Declaration): boolean; - isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; - writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; - writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; - isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; - isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; - getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number; - isEmitBlocked(sourceFile?: SourceFile): boolean; - } - const enum SymbolFlags { - FunctionScopedVariable = 1, - BlockScopedVariable = 2, - Property = 4, - EnumMember = 8, - Function = 16, - Class = 32, - Interface = 64, - ConstEnum = 128, - RegularEnum = 256, - ValueModule = 512, - NamespaceModule = 1024, - TypeLiteral = 2048, - ObjectLiteral = 4096, - Method = 8192, - Constructor = 16384, - GetAccessor = 32768, - SetAccessor = 65536, - CallSignature = 131072, - ConstructSignature = 262144, - IndexSignature = 524288, - TypeParameter = 1048576, - TypeAlias = 2097152, - ExportValue = 4194304, - ExportType = 8388608, - ExportNamespace = 16777216, - Import = 33554432, - Instantiated = 67108864, - Merged = 134217728, - Transient = 268435456, - Prototype = 536870912, - UnionProperty = 1073741824, - Enum = 384, - Variable = 3, - Value = 107455, - Type = 3152352, - Namespace = 1536, - Module = 1536, - Accessor = 98304, - Signature = 917504, - FunctionScopedVariableExcludes = 107454, - BlockScopedVariableExcludes = 107455, - ParameterExcludes = 107455, - PropertyExcludes = 107455, - EnumMemberExcludes = 107455, - FunctionExcludes = 106927, - ClassExcludes = 3258879, - InterfaceExcludes = 3152288, - RegularEnumExcludes = 3258623, - ConstEnumExcludes = 3259263, - ValueModuleExcludes = 106639, - NamespaceModuleExcludes = 0, - MethodExcludes = 99263, - GetAccessorExcludes = 41919, - SetAccessorExcludes = 74687, - TypeParameterExcludes = 2103776, - TypeAliasExcludes = 3152352, - ImportExcludes = 33554432, - ModuleMember = 35653619, - ExportHasLocal = 944, - HasLocals = 1041936, - HasExports = 1952, - HasMembers = 6240, - IsContainer = 1048560, - PropertyOrAccessor = 98308, - Export = 29360128, - } - interface Symbol { - flags: SymbolFlags; - name: string; - id?: number; - mergeId?: number; - declarations?: Declaration[]; - parent?: Symbol; - members?: SymbolTable; - exports?: SymbolTable; - exportSymbol?: Symbol; - valueDeclaration?: Declaration; - constEnumOnlyModule?: boolean; - } - interface SymbolLinks { - target?: Symbol; - type?: Type; - declaredType?: Type; - mapper?: TypeMapper; - referenced?: boolean; - exportAssignSymbol?: Symbol; - unionType?: UnionType; - } - interface TransientSymbol extends Symbol, SymbolLinks { - } - interface SymbolTable { - [index: string]: Symbol; - } - const enum NodeCheckFlags { - TypeChecked = 1, - LexicalThis = 2, - CaptureThis = 4, - EmitExtends = 8, - SuperInstance = 16, - SuperStatic = 32, - ContextChecked = 64, - EnumValuesComputed = 128, - } - interface NodeLinks { - resolvedType?: Type; - resolvedSignature?: Signature; - resolvedSymbol?: Symbol; - flags?: NodeCheckFlags; - enumMemberValue?: number; - isIllegalTypeReferenceInConstraint?: boolean; - isVisible?: boolean; - localModuleName?: string; - assignmentChecks?: Map; - } - const enum TypeFlags { - Any = 1, - String = 2, - Number = 4, - Boolean = 8, - Void = 16, - Undefined = 32, - Null = 64, - Enum = 128, - StringLiteral = 256, - TypeParameter = 512, - Class = 1024, - Interface = 2048, - Reference = 4096, - Tuple = 8192, - Union = 16384, - Anonymous = 32768, - FromSignature = 65536, - Intrinsic = 127, - StringLike = 258, - NumberLike = 132, - ObjectType = 48128, - } - interface Type { - flags: TypeFlags; - id: number; - symbol?: Symbol; - } - interface IntrinsicType extends Type { - intrinsicName: string; - } - interface StringLiteralType extends Type { - text: string; - } - interface ObjectType extends Type { - } - interface InterfaceType extends ObjectType { - typeParameters: TypeParameter[]; - baseTypes: ObjectType[]; - declaredProperties: Symbol[]; - declaredCallSignatures: Signature[]; - declaredConstructSignatures: Signature[]; - declaredStringIndexType: Type; - declaredNumberIndexType: Type; - } - interface TypeReference extends ObjectType { - target: GenericType; - typeArguments: Type[]; - } - interface GenericType extends InterfaceType, TypeReference { - instantiations: Map; - openReferenceTargets: GenericType[]; - openReferenceChecks: Map; - } - interface TupleType extends ObjectType { - elementTypes: Type[]; - baseArrayType: TypeReference; - } - interface UnionType extends Type { - types: Type[]; - resolvedProperties: SymbolTable; - } - interface ResolvedType extends ObjectType, UnionType { - members: SymbolTable; - properties: Symbol[]; - callSignatures: Signature[]; - constructSignatures: Signature[]; - stringIndexType: Type; - numberIndexType: Type; - } - interface TypeParameter extends Type { - constraint: Type; - target?: TypeParameter; - mapper?: TypeMapper; - } - const enum SignatureKind { - Call = 0, - Construct = 1, - } - interface Signature { - declaration: SignatureDeclaration; - typeParameters: TypeParameter[]; - parameters: Symbol[]; - resolvedReturnType: Type; - minArgumentCount: number; - hasRestParameter: boolean; - hasStringLiterals: boolean; - target?: Signature; - mapper?: TypeMapper; - unionSignatures?: Signature[]; - erasedSignatureCache?: Signature; - isolatedSignatureType?: ObjectType; - } - const enum IndexKind { - String = 0, - Number = 1, - } - interface TypeMapper { - (t: Type): Type; - } - interface TypeInferences { - primary: Type[]; - secondary: Type[]; - } - interface InferenceContext { - typeParameters: TypeParameter[]; - inferUnionTypes: boolean; - inferences: TypeInferences[]; - inferredTypes: Type[]; - failedTypeParameterIndex?: number; - } - interface DiagnosticMessage { - key: string; - category: DiagnosticCategory; - code: number; - isEarly?: boolean; - } - interface DiagnosticMessageChain { - messageText: string; - category: DiagnosticCategory; - code: number; - next?: DiagnosticMessageChain; - } - interface Diagnostic { - file: SourceFile; - start: number; - length: number; - messageText: string; - category: DiagnosticCategory; - code: number; - /** - * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit - */ - isEarly?: boolean; - } - enum DiagnosticCategory { - Warning = 0, - Error = 1, - Message = 2, - } - interface CompilerOptions { - allowNonTsExtensions?: boolean; - charset?: string; - codepage?: number; - declaration?: boolean; - diagnostics?: boolean; - emitBOM?: boolean; - help?: boolean; - locale?: string; - mapRoot?: string; - module?: ModuleKind; - noEmitOnError?: boolean; - noErrorTruncation?: boolean; - noImplicitAny?: boolean; - noLib?: boolean; - noLibCheck?: boolean; - noResolve?: boolean; - out?: string; - outDir?: string; - preserveConstEnums?: boolean; - removeComments?: boolean; - sourceMap?: boolean; - sourceRoot?: string; - suppressImplicitAnyIndexErrors?: boolean; - target?: ScriptTarget; - version?: boolean; - watch?: boolean; - [option: string]: string | number | boolean; - } - const enum ModuleKind { - None = 0, - CommonJS = 1, - AMD = 2, - } - interface LineAndCharacter { - line: number; - character: number; - } - const enum ScriptTarget { - ES3 = 0, - ES5 = 1, - ES6 = 2, - Latest = 2, - } - interface ParsedCommandLine { - options: CompilerOptions; - filenames: string[]; - errors: Diagnostic[]; - } - interface CommandLineOption { - name: string; - type: string | Map; - shortName?: string; - description?: DiagnosticMessage; - paramType?: DiagnosticMessage; - error?: DiagnosticMessage; - } - const enum CharacterCodes { - nullCharacter = 0, - maxAsciiCharacter = 127, - lineFeed = 10, - carriageReturn = 13, - lineSeparator = 8232, - paragraphSeparator = 8233, - nextLine = 133, - space = 32, - nonBreakingSpace = 160, - enQuad = 8192, - emQuad = 8193, - enSpace = 8194, - emSpace = 8195, - threePerEmSpace = 8196, - fourPerEmSpace = 8197, - sixPerEmSpace = 8198, - figureSpace = 8199, - punctuationSpace = 8200, - thinSpace = 8201, - hairSpace = 8202, - zeroWidthSpace = 8203, - narrowNoBreakSpace = 8239, - ideographicSpace = 12288, - mathematicalSpace = 8287, - ogham = 5760, - _ = 95, - $ = 36, - _0 = 48, - _1 = 49, - _2 = 50, - _3 = 51, - _4 = 52, - _5 = 53, - _6 = 54, - _7 = 55, - _8 = 56, - _9 = 57, - a = 97, - b = 98, - c = 99, - d = 100, - e = 101, - f = 102, - g = 103, - h = 104, - i = 105, - j = 106, - k = 107, - l = 108, - m = 109, - n = 110, - o = 111, - p = 112, - q = 113, - r = 114, - s = 115, - t = 116, - u = 117, - v = 118, - w = 119, - x = 120, - y = 121, - z = 122, - A = 65, - B = 66, - C = 67, - D = 68, - E = 69, - F = 70, - G = 71, - H = 72, - I = 73, - J = 74, - K = 75, - L = 76, - M = 77, - N = 78, - O = 79, - P = 80, - Q = 81, - R = 82, - S = 83, - T = 84, - U = 85, - V = 86, - W = 87, - X = 88, - Y = 89, - Z = 90, - ampersand = 38, - asterisk = 42, - at = 64, - backslash = 92, - backtick = 96, - bar = 124, - caret = 94, - closeBrace = 125, - closeBracket = 93, - closeParen = 41, - colon = 58, - comma = 44, - dot = 46, - doubleQuote = 34, - equals = 61, - exclamation = 33, - greaterThan = 62, - lessThan = 60, - minus = 45, - openBrace = 123, - openBracket = 91, - openParen = 40, - percent = 37, - plus = 43, - question = 63, - semicolon = 59, - singleQuote = 39, - slash = 47, - tilde = 126, - backspace = 8, - formFeed = 12, - byteOrderMark = 65279, - tab = 9, - verticalTab = 11, - } - interface CancellationToken { - isCancellationRequested(): boolean; - } - interface CompilerHost { - getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; - getDefaultLibFilename(options: CompilerOptions): string; - getCancellationToken?(): CancellationToken; - writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; - getCurrentDirectory(): string; - getCanonicalFileName(fileName: string): string; - useCaseSensitiveFileNames(): boolean; - getNewLine(): string; - } -} -declare module "typescript" { - interface ErrorCallback { - (message: DiagnosticMessage): void; - } - interface CommentCallback { - (pos: number, end: number): void; - } - interface Scanner { - getStartPos(): number; - getToken(): SyntaxKind; - getTextPos(): number; - getTokenPos(): number; - getTokenText(): string; - getTokenValue(): string; - hasPrecedingLineBreak(): boolean; - isIdentifier(): boolean; - isReservedWord(): boolean; - isUnterminated(): boolean; - reScanGreaterToken(): SyntaxKind; - reScanSlashToken(): SyntaxKind; - reScanTemplateToken(): SyntaxKind; - scan(): SyntaxKind; - setText(text: string): void; - setTextPos(textPos: number): void; - lookAhead(callback: () => T): T; - tryScan(callback: () => T): T; - } - function tokenToString(t: SyntaxKind): string; - function computeLineStarts(text: string): number[]; - function getPositionFromLineAndCharacter(lineStarts: number[], line: number, character: number): number; - function getLineAndCharacterOfPosition(lineStarts: number[], position: number): { - line: number; - character: number; - }; - function positionToLineAndCharacter(text: string, pos: number): { - line: number; - character: number; - }; - function isWhiteSpace(ch: number): boolean; - function isLineBreak(ch: number): boolean; - function isOctalDigit(ch: number): boolean; - function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean): number; - function getLeadingCommentRanges(text: string, pos: number): CommentRange[]; - function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; - function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; - function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; - function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner; -} -declare module "typescript" { - function getNodeConstructor(kind: SyntaxKind): new () => Node; - function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; - function createCompilerHost(options: CompilerOptions): CompilerHost; - function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; - function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; -} -declare module "typescript" { - function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; -} -declare module "typescript" { - var servicesVersion: string; - interface Node { - getSourceFile(): SourceFile; - getChildCount(sourceFile?: SourceFile): number; - getChildAt(index: number, sourceFile?: SourceFile): Node; - getChildren(sourceFile?: SourceFile): Node[]; - getStart(sourceFile?: SourceFile): number; - getFullStart(): number; - getEnd(): number; - getWidth(sourceFile?: SourceFile): number; - getFullWidth(): number; - getLeadingTriviaWidth(sourceFile?: SourceFile): number; - getFullText(sourceFile?: SourceFile): string; - getText(sourceFile?: SourceFile): string; - getFirstToken(sourceFile?: SourceFile): Node; - getLastToken(sourceFile?: SourceFile): Node; - } - interface Symbol { - getFlags(): SymbolFlags; - getName(): string; - getDeclarations(): Declaration[]; - getDocumentationComment(): SymbolDisplayPart[]; - } - interface Type { - getFlags(): TypeFlags; - getSymbol(): Symbol; - getProperties(): Symbol[]; - getProperty(propertyName: string): Symbol; - getApparentProperties(): Symbol[]; - getCallSignatures(): Signature[]; - getConstructSignatures(): Signature[]; - getStringIndexType(): Type; - getNumberIndexType(): Type; - } - interface Signature { - getDeclaration(): SignatureDeclaration; - getTypeParameters(): Type[]; - getParameters(): Symbol[]; - getReturnType(): Type; - getDocumentationComment(): SymbolDisplayPart[]; - } - interface SourceFile { - getScriptSnapshot(): IScriptSnapshot; - getNamedDeclarations(): Declaration[]; - update(scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; - } - /** - * Represents an immutable snapshot of a script at a specified time.Once acquired, the - * snapshot is observably immutable. i.e. the same calls with the same parameters will return - * the same values. - */ - interface IScriptSnapshot { - /** Gets a portion of the script snapshot specified by [start, end). */ - getText(start: number, end: number): string; - /** Gets the length of this script snapshot. */ - getLength(): number; - /** - * This call returns the array containing the start position of every line. - * i.e."[0, 10, 55]". TODO: consider making this optional. The language service could - * always determine this (albeit in a more expensive manner). - */ - getLineStartPositions(): number[]; - /** - * Gets the TextChangeRange that describe how the text changed between this text and - * an older version. This information is used by the incremental parser to determine - * what sections of the script need to be re-parsed. 'undefined' can be returned if the - * change range cannot be determined. However, in that case, incremental parsing will - * not happen and the entire document will be re - parsed. - */ - getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; - } - module ScriptSnapshot { - function fromString(text: string): IScriptSnapshot; - } - interface PreProcessedFileInfo { - referencedFiles: FileReference[]; - importedFiles: FileReference[]; - isLibFile: boolean; - } - interface Logger { - log(s: string): void; - } - interface LanguageServiceHost extends Logger { - getCompilationSettings(): CompilerOptions; - getScriptFileNames(): string[]; - getScriptVersion(fileName: string): string; - getScriptIsOpen(fileName: string): boolean; - getScriptSnapshot(fileName: string): IScriptSnapshot; - getLocalizedDiagnosticMessages?(): any; - getCancellationToken?(): CancellationToken; - getCurrentDirectory(): string; - getDefaultLibFilename(options: CompilerOptions): string; - } - interface LanguageService { - cleanupSemanticCache(): void; - getSyntacticDiagnostics(fileName: string): Diagnostic[]; - getSemanticDiagnostics(fileName: string): Diagnostic[]; - getCompilerOptionsDiagnostics(): Diagnostic[]; - getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; - getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; - getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; - getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; - getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; - getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; - getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan; - getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems; - getRenameInfo(fileName: string, position: number): RenameInfo; - findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[]; - getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; - getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; - getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; - getNavigateToItems(searchValue: string): NavigateToItem[]; - getNavigationBarItems(fileName: string): NavigationBarItem[]; - getOutliningSpans(fileName: string): OutliningSpan[]; - getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; - getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; - getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number; - getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[]; - getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; - getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[]; - getEmitOutput(fileName: string): EmitOutput; - getSourceFile(filename: string): SourceFile; - dispose(): void; - } - class TextSpan { - private _start; - private _length; - /** - * Creates a TextSpan instance beginning with the position Start and having the Length - * specified with length. - */ - constructor(start: number, length: number); - toJSON(key: any): any; - start(): number; - length(): number; - end(): number; - isEmpty(): boolean; - /** - * Determines whether the position lies within the span. Returns true if the position is greater than or equal to Start and strictly less - * than End, otherwise false. - * @param position The position to check. - */ - containsPosition(position: number): boolean; - /** - * Determines whether span falls completely within this span. Returns true if the specified span falls completely within this span, otherwise false. - * @param span The span to check. - */ - containsTextSpan(span: TextSpan): boolean; - /** - * Determines whether the given span overlaps this span. Two spans are considered to overlap - * if they have positions in common and neither is empty. Empty spans do not overlap with any - * other span. Returns true if the spans overlap, false otherwise. - * @param span The span to check. - */ - overlapsWith(span: TextSpan): boolean; - /** - * Returns the overlap with the given span, or undefined if there is no overlap. - * @param span The span to check. - */ - overlap(span: TextSpan): TextSpan; - /** - * Determines whether span intersects this span. Two spans are considered to - * intersect if they have positions in common or the end of one span - * coincides with the start of the other span. Returns true if the spans intersect, false otherwise. - * @param The span to check. - */ - intersectsWithTextSpan(span: TextSpan): boolean; - intersectsWith(start: number, length: number): boolean; - /** - * Determines whether the given position intersects this span. - * A position is considered to intersect if it is between the start and - * end positions (inclusive) of this span. Returns true if the position intersects, false otherwise. - * @param position The position to check. - */ - intersectsWithPosition(position: number): boolean; - /** - * Returns the intersection with the given span, or undefined if there is no intersection. - * @param span The span to check. - */ - intersection(span: TextSpan): TextSpan; - /** - * Creates a new TextSpan from the given start and end positions - * as opposed to a position and length. - */ - static fromBounds(start: number, end: number): TextSpan; - } - class TextChangeRange { - static unchanged: TextChangeRange; - private _span; - private _newLength; - /** - * Initializes a new instance of TextChangeRange. - */ - constructor(span: TextSpan, newLength: number); - /** - * The span of text before the edit which is being changed - */ - span(): TextSpan; - /** - * Width of the span after the edit. A 0 here would represent a delete - */ - newLength(): number; - newSpan(): TextSpan; - isUnchanged(): boolean; - /** - * Called to merge all the changes that occurred across several versions of a script snapshot - * into a single change. i.e. if a user keeps making successive edits to a script we will - * have a text change from V1 to V2, V2 to V3, ..., Vn. - * - * This function will then merge those changes into a single change range valid between V1 and - * Vn. - */ - static collapseChangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; - } - interface ClassifiedSpan { - textSpan: TextSpan; - classificationType: string; - } - interface NavigationBarItem { - text: string; - kind: string; - kindModifiers: string; - spans: TextSpan[]; - childItems: NavigationBarItem[]; - indent: number; - bolded: boolean; - grayed: boolean; - } - interface TodoCommentDescriptor { - text: string; - priority: number; - } - interface TodoComment { - descriptor: TodoCommentDescriptor; - message: string; - position: number; - } - class TextChange { - span: TextSpan; - newText: string; - } - interface RenameLocation { - textSpan: TextSpan; - fileName: string; - } - interface ReferenceEntry { - textSpan: TextSpan; - fileName: string; - isWriteAccess: boolean; - } - interface NavigateToItem { - name: string; - kind: string; - kindModifiers: string; - matchKind: string; - fileName: string; - textSpan: TextSpan; - containerName: string; - containerKind: string; - } - interface EditorOptions { - IndentSize: number; - TabSize: number; - NewLineCharacter: string; - ConvertTabsToSpaces: boolean; - } - interface FormatCodeOptions extends EditorOptions { - InsertSpaceAfterCommaDelimiter: boolean; - InsertSpaceAfterSemicolonInForStatements: boolean; - InsertSpaceBeforeAndAfterBinaryOperators: boolean; - InsertSpaceAfterKeywordsInControlFlowStatements: boolean; - InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; - InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; - PlaceOpenBraceOnNewLineForFunctions: boolean; - PlaceOpenBraceOnNewLineForControlBlocks: boolean; - } - interface DefinitionInfo { - fileName: string; - textSpan: TextSpan; - kind: string; - name: string; - containerKind: string; - containerName: string; - } - enum SymbolDisplayPartKind { - aliasName = 0, - className = 1, - enumName = 2, - fieldName = 3, - interfaceName = 4, - keyword = 5, - lineBreak = 6, - numericLiteral = 7, - stringLiteral = 8, - localName = 9, - methodName = 10, - moduleName = 11, - operator = 12, - parameterName = 13, - propertyName = 14, - punctuation = 15, - space = 16, - text = 17, - typeParameterName = 18, - enumMemberName = 19, - functionName = 20, - regularExpressionLiteral = 21, - } - interface SymbolDisplayPart { - text: string; - kind: string; - } - interface QuickInfo { - kind: string; - kindModifiers: string; - textSpan: TextSpan; - displayParts: SymbolDisplayPart[]; - documentation: SymbolDisplayPart[]; - } - interface RenameInfo { - canRename: boolean; - localizedErrorMessage: string; - displayName: string; - fullDisplayName: string; - kind: string; - kindModifiers: string; - triggerSpan: TextSpan; - } - interface SignatureHelpParameter { - name: string; - documentation: SymbolDisplayPart[]; - displayParts: SymbolDisplayPart[]; - isOptional: boolean; - } - /** - * Represents a single signature to show in signature help. - * The id is used for subsequent calls into the language service to ask questions about the - * signature help item in the context of any documents that have been updated. i.e. after - * an edit has happened, while signature help is still active, the host can ask important - * questions like 'what parameter is the user currently contained within?'. - */ - interface SignatureHelpItem { - isVariadic: boolean; - prefixDisplayParts: SymbolDisplayPart[]; - suffixDisplayParts: SymbolDisplayPart[]; - separatorDisplayParts: SymbolDisplayPart[]; - parameters: SignatureHelpParameter[]; - documentation: SymbolDisplayPart[]; - } - /** - * Represents a set of signature help items, and the preferred item that should be selected. - */ - interface SignatureHelpItems { - items: SignatureHelpItem[]; - applicableSpan: TextSpan; - selectedItemIndex: number; - argumentIndex: number; - argumentCount: number; - } - interface CompletionInfo { - isMemberCompletion: boolean; - entries: CompletionEntry[]; - } - interface CompletionEntry { - name: string; - kind: string; - kindModifiers: string; - } - interface CompletionEntryDetails { - name: string; - kind: string; - kindModifiers: string; - displayParts: SymbolDisplayPart[]; - documentation: SymbolDisplayPart[]; - } - interface OutliningSpan { - /** The span of the document to actually collapse. */ - textSpan: TextSpan; - /** The span of the document to display when the user hovers over the collapsed span. */ - hintSpan: TextSpan; - /** The text to display in the editor for the collapsed region. */ - bannerText: string; - /** - * Whether or not this region should be automatically collapsed when - * the 'Collapse to Definitions' command is invoked. - */ - autoCollapse: boolean; - } - interface EmitOutput { - outputFiles: OutputFile[]; - emitOutputStatus: EmitReturnStatus; - } - const enum OutputFileType { - JavaScript = 0, - SourceMap = 1, - Declaration = 2, - } - interface OutputFile { - name: string; - writeByteOrderMark: boolean; - text: string; - } - const enum EndOfLineState { - Start = 0, - InMultiLineCommentTrivia = 1, - InSingleQuoteStringLiteral = 2, - InDoubleQuoteStringLiteral = 3, - } - enum TokenClass { - Punctuation = 0, - Keyword = 1, - Operator = 2, - Comment = 3, - Whitespace = 4, - Identifier = 5, - NumberLiteral = 6, - StringLiteral = 7, - RegExpLiteral = 8, - } - interface ClassificationResult { - finalLexState: EndOfLineState; - entries: ClassificationInfo[]; - } - interface ClassificationInfo { - length: number; - classification: TokenClass; - } - interface Classifier { - getClassificationsForLine(text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean): ClassificationResult; - } - interface DocumentRegistry { - acquireDocument(filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean): SourceFile; - updateDocument(sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; - releaseDocument(filename: string, compilationSettings: CompilerOptions): void; - } - class ScriptElementKind { - static unknown: string; - static keyword: string; - static scriptElement: string; - static moduleElement: string; - static classElement: string; - static interfaceElement: string; - static typeElement: string; - static enumElement: string; - static variableElement: string; - static localVariableElement: string; - static functionElement: string; - static localFunctionElement: string; - static memberFunctionElement: string; - static memberGetAccessorElement: string; - static memberSetAccessorElement: string; - static memberVariableElement: string; - static constructorImplementationElement: string; - static callSignatureElement: string; - static indexSignatureElement: string; - static constructSignatureElement: string; - static parameterElement: string; - static typeParameterElement: string; - static primitiveType: string; - static label: string; - static alias: string; - static constElement: string; - static letElement: string; - } - class ScriptElementKindModifier { - static none: string; - static publicMemberModifier: string; - static privateMemberModifier: string; - static protectedMemberModifier: string; - static exportedModifier: string; - static ambientModifier: string; - static staticModifier: string; - } - class ClassificationTypeNames { - static comment: string; - static identifier: string; - static keyword: string; - static numericLiteral: string; - static operator: string; - static stringLiteral: string; - static whiteSpace: string; - static text: string; - static punctuation: string; - static className: string; - static enumName: string; - static interfaceName: string; - static moduleName: string; - static typeParameterName: string; - static typeAlias: string; - } - interface DisplayPartsSymbolWriter extends SymbolWriter { - displayParts(): SymbolDisplayPart[]; - } - function displayPartsToString(displayParts: SymbolDisplayPart[]): string; - function getDefaultCompilerOptions(): CompilerOptions; - class OperationCanceledException { - } - class CancellationTokenObject { - private cancellationToken; - static None: CancellationTokenObject; - constructor(cancellationToken: CancellationToken); - isCancellationRequested(): boolean; - throwIfCancellationRequested(): void; - } - function createDocumentRegistry(): DocumentRegistry; - function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; - function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry): LanguageService; - function createClassifier(host: Logger): Classifier; -} - - -//// [APISample_node_compile.js] -var ts = require("typescript"); -var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", 2 /* Latest */, "0.0"); -var program = ts.createProgram(["file1.ts"], {}, undefined); diff --git a/tests/baselines/reference/APISample_node_compile.types b/tests/baselines/reference/APISample_node_compile.types deleted file mode 100644 index 347c5aa358e..00000000000 --- a/tests/baselines/reference/APISample_node_compile.types +++ /dev/null @@ -1,5749 +0,0 @@ -=== tests/cases/compiler/APISample_node_compile.ts === - -import ts = require("typescript"); ->ts : typeof ts - -var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); ->sourceFile : ts.SourceFile ->ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0") : ts.SourceFile ->ts.createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, version: string, isOpen?: boolean) => ts.SourceFile ->ts : typeof ts ->createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, version: string, isOpen?: boolean) => ts.SourceFile ->ts.ScriptTarget.Latest : ts.ScriptTarget ->ts.ScriptTarget : typeof ts.ScriptTarget ->ts : typeof ts ->ScriptTarget : typeof ts.ScriptTarget ->Latest : ts.ScriptTarget - -var program = ts.createProgram(["file1.ts"], {}, undefined); ->program : ts.Program ->ts.createProgram(["file1.ts"], {}, undefined) : ts.Program ->ts.createProgram : (rootNames: string[], options: ts.CompilerOptions, host: ts.CompilerHost) => ts.Program ->ts : typeof ts ->createProgram : (rootNames: string[], options: ts.CompilerOptions, host: ts.CompilerHost) => ts.Program ->["file1.ts"] : string[] ->{} : { [x: string]: undefined; } ->undefined : undefined - -=== typescript.d.ts === -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ - -declare module "typescript" { - interface Map { ->Map : Map ->T : T - - [index: string]: T; ->index : string ->T : T - } - interface TextRange { ->TextRange : TextRange - - pos: number; ->pos : number - - end: number; ->end : number - } - const enum SyntaxKind { ->SyntaxKind : SyntaxKind - - Unknown = 0, ->Unknown : SyntaxKind - - EndOfFileToken = 1, ->EndOfFileToken : SyntaxKind - - SingleLineCommentTrivia = 2, ->SingleLineCommentTrivia : SyntaxKind - - MultiLineCommentTrivia = 3, ->MultiLineCommentTrivia : SyntaxKind - - NewLineTrivia = 4, ->NewLineTrivia : SyntaxKind - - WhitespaceTrivia = 5, ->WhitespaceTrivia : SyntaxKind - - NumericLiteral = 6, ->NumericLiteral : SyntaxKind - - StringLiteral = 7, ->StringLiteral : SyntaxKind - - RegularExpressionLiteral = 8, ->RegularExpressionLiteral : SyntaxKind - - NoSubstitutionTemplateLiteral = 9, ->NoSubstitutionTemplateLiteral : SyntaxKind - - TemplateHead = 10, ->TemplateHead : SyntaxKind - - TemplateMiddle = 11, ->TemplateMiddle : SyntaxKind - - TemplateTail = 12, ->TemplateTail : SyntaxKind - - OpenBraceToken = 13, ->OpenBraceToken : SyntaxKind - - CloseBraceToken = 14, ->CloseBraceToken : SyntaxKind - - OpenParenToken = 15, ->OpenParenToken : SyntaxKind - - CloseParenToken = 16, ->CloseParenToken : SyntaxKind - - OpenBracketToken = 17, ->OpenBracketToken : SyntaxKind - - CloseBracketToken = 18, ->CloseBracketToken : SyntaxKind - - DotToken = 19, ->DotToken : SyntaxKind - - DotDotDotToken = 20, ->DotDotDotToken : SyntaxKind - - SemicolonToken = 21, ->SemicolonToken : SyntaxKind - - CommaToken = 22, ->CommaToken : SyntaxKind - - LessThanToken = 23, ->LessThanToken : SyntaxKind - - GreaterThanToken = 24, ->GreaterThanToken : SyntaxKind - - LessThanEqualsToken = 25, ->LessThanEqualsToken : SyntaxKind - - GreaterThanEqualsToken = 26, ->GreaterThanEqualsToken : SyntaxKind - - EqualsEqualsToken = 27, ->EqualsEqualsToken : SyntaxKind - - ExclamationEqualsToken = 28, ->ExclamationEqualsToken : SyntaxKind - - EqualsEqualsEqualsToken = 29, ->EqualsEqualsEqualsToken : SyntaxKind - - ExclamationEqualsEqualsToken = 30, ->ExclamationEqualsEqualsToken : SyntaxKind - - EqualsGreaterThanToken = 31, ->EqualsGreaterThanToken : SyntaxKind - - PlusToken = 32, ->PlusToken : SyntaxKind - - MinusToken = 33, ->MinusToken : SyntaxKind - - AsteriskToken = 34, ->AsteriskToken : SyntaxKind - - SlashToken = 35, ->SlashToken : SyntaxKind - - PercentToken = 36, ->PercentToken : SyntaxKind - - PlusPlusToken = 37, ->PlusPlusToken : SyntaxKind - - MinusMinusToken = 38, ->MinusMinusToken : SyntaxKind - - LessThanLessThanToken = 39, ->LessThanLessThanToken : SyntaxKind - - GreaterThanGreaterThanToken = 40, ->GreaterThanGreaterThanToken : SyntaxKind - - GreaterThanGreaterThanGreaterThanToken = 41, ->GreaterThanGreaterThanGreaterThanToken : SyntaxKind - - AmpersandToken = 42, ->AmpersandToken : SyntaxKind - - BarToken = 43, ->BarToken : SyntaxKind - - CaretToken = 44, ->CaretToken : SyntaxKind - - ExclamationToken = 45, ->ExclamationToken : SyntaxKind - - TildeToken = 46, ->TildeToken : SyntaxKind - - AmpersandAmpersandToken = 47, ->AmpersandAmpersandToken : SyntaxKind - - BarBarToken = 48, ->BarBarToken : SyntaxKind - - QuestionToken = 49, ->QuestionToken : SyntaxKind - - ColonToken = 50, ->ColonToken : SyntaxKind - - EqualsToken = 51, ->EqualsToken : SyntaxKind - - PlusEqualsToken = 52, ->PlusEqualsToken : SyntaxKind - - MinusEqualsToken = 53, ->MinusEqualsToken : SyntaxKind - - AsteriskEqualsToken = 54, ->AsteriskEqualsToken : SyntaxKind - - SlashEqualsToken = 55, ->SlashEqualsToken : SyntaxKind - - PercentEqualsToken = 56, ->PercentEqualsToken : SyntaxKind - - LessThanLessThanEqualsToken = 57, ->LessThanLessThanEqualsToken : SyntaxKind - - GreaterThanGreaterThanEqualsToken = 58, ->GreaterThanGreaterThanEqualsToken : SyntaxKind - - GreaterThanGreaterThanGreaterThanEqualsToken = 59, ->GreaterThanGreaterThanGreaterThanEqualsToken : SyntaxKind - - AmpersandEqualsToken = 60, ->AmpersandEqualsToken : SyntaxKind - - BarEqualsToken = 61, ->BarEqualsToken : SyntaxKind - - CaretEqualsToken = 62, ->CaretEqualsToken : SyntaxKind - - Identifier = 63, ->Identifier : SyntaxKind - - BreakKeyword = 64, ->BreakKeyword : SyntaxKind - - CaseKeyword = 65, ->CaseKeyword : SyntaxKind - - CatchKeyword = 66, ->CatchKeyword : SyntaxKind - - ClassKeyword = 67, ->ClassKeyword : SyntaxKind - - ConstKeyword = 68, ->ConstKeyword : SyntaxKind - - ContinueKeyword = 69, ->ContinueKeyword : SyntaxKind - - DebuggerKeyword = 70, ->DebuggerKeyword : SyntaxKind - - DefaultKeyword = 71, ->DefaultKeyword : SyntaxKind - - DeleteKeyword = 72, ->DeleteKeyword : SyntaxKind - - DoKeyword = 73, ->DoKeyword : SyntaxKind - - ElseKeyword = 74, ->ElseKeyword : SyntaxKind - - EnumKeyword = 75, ->EnumKeyword : SyntaxKind - - ExportKeyword = 76, ->ExportKeyword : SyntaxKind - - ExtendsKeyword = 77, ->ExtendsKeyword : SyntaxKind - - FalseKeyword = 78, ->FalseKeyword : SyntaxKind - - FinallyKeyword = 79, ->FinallyKeyword : SyntaxKind - - ForKeyword = 80, ->ForKeyword : SyntaxKind - - FunctionKeyword = 81, ->FunctionKeyword : SyntaxKind - - IfKeyword = 82, ->IfKeyword : SyntaxKind - - ImportKeyword = 83, ->ImportKeyword : SyntaxKind - - InKeyword = 84, ->InKeyword : SyntaxKind - - InstanceOfKeyword = 85, ->InstanceOfKeyword : SyntaxKind - - NewKeyword = 86, ->NewKeyword : SyntaxKind - - NullKeyword = 87, ->NullKeyword : SyntaxKind - - ReturnKeyword = 88, ->ReturnKeyword : SyntaxKind - - SuperKeyword = 89, ->SuperKeyword : SyntaxKind - - SwitchKeyword = 90, ->SwitchKeyword : SyntaxKind - - ThisKeyword = 91, ->ThisKeyword : SyntaxKind - - ThrowKeyword = 92, ->ThrowKeyword : SyntaxKind - - TrueKeyword = 93, ->TrueKeyword : SyntaxKind - - TryKeyword = 94, ->TryKeyword : SyntaxKind - - TypeOfKeyword = 95, ->TypeOfKeyword : SyntaxKind - - VarKeyword = 96, ->VarKeyword : SyntaxKind - - VoidKeyword = 97, ->VoidKeyword : SyntaxKind - - WhileKeyword = 98, ->WhileKeyword : SyntaxKind - - WithKeyword = 99, ->WithKeyword : SyntaxKind - - ImplementsKeyword = 100, ->ImplementsKeyword : SyntaxKind - - InterfaceKeyword = 101, ->InterfaceKeyword : SyntaxKind - - LetKeyword = 102, ->LetKeyword : SyntaxKind - - PackageKeyword = 103, ->PackageKeyword : SyntaxKind - - PrivateKeyword = 104, ->PrivateKeyword : SyntaxKind - - ProtectedKeyword = 105, ->ProtectedKeyword : SyntaxKind - - PublicKeyword = 106, ->PublicKeyword : SyntaxKind - - StaticKeyword = 107, ->StaticKeyword : SyntaxKind - - YieldKeyword = 108, ->YieldKeyword : SyntaxKind - - AnyKeyword = 109, ->AnyKeyword : SyntaxKind - - BooleanKeyword = 110, ->BooleanKeyword : SyntaxKind - - ConstructorKeyword = 111, ->ConstructorKeyword : SyntaxKind - - DeclareKeyword = 112, ->DeclareKeyword : SyntaxKind - - GetKeyword = 113, ->GetKeyword : SyntaxKind - - ModuleKeyword = 114, ->ModuleKeyword : SyntaxKind - - RequireKeyword = 115, ->RequireKeyword : SyntaxKind - - NumberKeyword = 116, ->NumberKeyword : SyntaxKind - - SetKeyword = 117, ->SetKeyword : SyntaxKind - - StringKeyword = 118, ->StringKeyword : SyntaxKind - - TypeKeyword = 119, ->TypeKeyword : SyntaxKind - - QualifiedName = 120, ->QualifiedName : SyntaxKind - - ComputedPropertyName = 121, ->ComputedPropertyName : SyntaxKind - - TypeParameter = 122, ->TypeParameter : SyntaxKind - - Parameter = 123, ->Parameter : SyntaxKind - - Property = 124, ->Property : SyntaxKind - - Method = 125, ->Method : SyntaxKind - - Constructor = 126, ->Constructor : SyntaxKind - - GetAccessor = 127, ->GetAccessor : SyntaxKind - - SetAccessor = 128, ->SetAccessor : SyntaxKind - - CallSignature = 129, ->CallSignature : SyntaxKind - - ConstructSignature = 130, ->ConstructSignature : SyntaxKind - - IndexSignature = 131, ->IndexSignature : SyntaxKind - - TypeReference = 132, ->TypeReference : SyntaxKind - - FunctionType = 133, ->FunctionType : SyntaxKind - - ConstructorType = 134, ->ConstructorType : SyntaxKind - - TypeQuery = 135, ->TypeQuery : SyntaxKind - - TypeLiteral = 136, ->TypeLiteral : SyntaxKind - - ArrayType = 137, ->ArrayType : SyntaxKind - - TupleType = 138, ->TupleType : SyntaxKind - - UnionType = 139, ->UnionType : SyntaxKind - - ParenthesizedType = 140, ->ParenthesizedType : SyntaxKind - - ArrayLiteralExpression = 141, ->ArrayLiteralExpression : SyntaxKind - - ObjectLiteralExpression = 142, ->ObjectLiteralExpression : SyntaxKind - - PropertyAccessExpression = 143, ->PropertyAccessExpression : SyntaxKind - - ElementAccessExpression = 144, ->ElementAccessExpression : SyntaxKind - - CallExpression = 145, ->CallExpression : SyntaxKind - - NewExpression = 146, ->NewExpression : SyntaxKind - - TaggedTemplateExpression = 147, ->TaggedTemplateExpression : SyntaxKind - - TypeAssertionExpression = 148, ->TypeAssertionExpression : SyntaxKind - - ParenthesizedExpression = 149, ->ParenthesizedExpression : SyntaxKind - - FunctionExpression = 150, ->FunctionExpression : SyntaxKind - - ArrowFunction = 151, ->ArrowFunction : SyntaxKind - - DeleteExpression = 152, ->DeleteExpression : SyntaxKind - - TypeOfExpression = 153, ->TypeOfExpression : SyntaxKind - - VoidExpression = 154, ->VoidExpression : SyntaxKind - - PrefixUnaryExpression = 155, ->PrefixUnaryExpression : SyntaxKind - - PostfixUnaryExpression = 156, ->PostfixUnaryExpression : SyntaxKind - - BinaryExpression = 157, ->BinaryExpression : SyntaxKind - - ConditionalExpression = 158, ->ConditionalExpression : SyntaxKind - - TemplateExpression = 159, ->TemplateExpression : SyntaxKind - - YieldExpression = 160, ->YieldExpression : SyntaxKind - - OmittedExpression = 161, ->OmittedExpression : SyntaxKind - - TemplateSpan = 162, ->TemplateSpan : SyntaxKind - - Block = 163, ->Block : SyntaxKind - - VariableStatement = 164, ->VariableStatement : SyntaxKind - - EmptyStatement = 165, ->EmptyStatement : SyntaxKind - - ExpressionStatement = 166, ->ExpressionStatement : SyntaxKind - - IfStatement = 167, ->IfStatement : SyntaxKind - - DoStatement = 168, ->DoStatement : SyntaxKind - - WhileStatement = 169, ->WhileStatement : SyntaxKind - - ForStatement = 170, ->ForStatement : SyntaxKind - - ForInStatement = 171, ->ForInStatement : SyntaxKind - - ContinueStatement = 172, ->ContinueStatement : SyntaxKind - - BreakStatement = 173, ->BreakStatement : SyntaxKind - - ReturnStatement = 174, ->ReturnStatement : SyntaxKind - - WithStatement = 175, ->WithStatement : SyntaxKind - - SwitchStatement = 176, ->SwitchStatement : SyntaxKind - - LabeledStatement = 177, ->LabeledStatement : SyntaxKind - - ThrowStatement = 178, ->ThrowStatement : SyntaxKind - - TryStatement = 179, ->TryStatement : SyntaxKind - - TryBlock = 180, ->TryBlock : SyntaxKind - - FinallyBlock = 181, ->FinallyBlock : SyntaxKind - - DebuggerStatement = 182, ->DebuggerStatement : SyntaxKind - - VariableDeclaration = 183, ->VariableDeclaration : SyntaxKind - - FunctionDeclaration = 184, ->FunctionDeclaration : SyntaxKind - - ClassDeclaration = 185, ->ClassDeclaration : SyntaxKind - - InterfaceDeclaration = 186, ->InterfaceDeclaration : SyntaxKind - - TypeAliasDeclaration = 187, ->TypeAliasDeclaration : SyntaxKind - - EnumDeclaration = 188, ->EnumDeclaration : SyntaxKind - - ModuleDeclaration = 189, ->ModuleDeclaration : SyntaxKind - - ModuleBlock = 190, ->ModuleBlock : SyntaxKind - - ImportDeclaration = 191, ->ImportDeclaration : SyntaxKind - - ExportAssignment = 192, ->ExportAssignment : SyntaxKind - - ExternalModuleReference = 193, ->ExternalModuleReference : SyntaxKind - - CaseClause = 194, ->CaseClause : SyntaxKind - - DefaultClause = 195, ->DefaultClause : SyntaxKind - - HeritageClause = 196, ->HeritageClause : SyntaxKind - - CatchClause = 197, ->CatchClause : SyntaxKind - - PropertyAssignment = 198, ->PropertyAssignment : SyntaxKind - - ShorthandPropertyAssignment = 199, ->ShorthandPropertyAssignment : SyntaxKind - - EnumMember = 200, ->EnumMember : SyntaxKind - - SourceFile = 201, ->SourceFile : SyntaxKind - - Program = 202, ->Program : SyntaxKind - - SyntaxList = 203, ->SyntaxList : SyntaxKind - - Count = 204, ->Count : SyntaxKind - - FirstAssignment = 51, ->FirstAssignment : SyntaxKind - - LastAssignment = 62, ->LastAssignment : SyntaxKind - - FirstReservedWord = 64, ->FirstReservedWord : SyntaxKind - - LastReservedWord = 99, ->LastReservedWord : SyntaxKind - - FirstKeyword = 64, ->FirstKeyword : SyntaxKind - - LastKeyword = 119, ->LastKeyword : SyntaxKind - - FirstFutureReservedWord = 100, ->FirstFutureReservedWord : SyntaxKind - - LastFutureReservedWord = 108, ->LastFutureReservedWord : SyntaxKind - - FirstTypeNode = 132, ->FirstTypeNode : SyntaxKind - - LastTypeNode = 140, ->LastTypeNode : SyntaxKind - - FirstPunctuation = 13, ->FirstPunctuation : SyntaxKind - - LastPunctuation = 62, ->LastPunctuation : SyntaxKind - - FirstToken = 0, ->FirstToken : SyntaxKind - - LastToken = 119, ->LastToken : SyntaxKind - - FirstTriviaToken = 2, ->FirstTriviaToken : SyntaxKind - - LastTriviaToken = 5, ->LastTriviaToken : SyntaxKind - - FirstLiteralToken = 6, ->FirstLiteralToken : SyntaxKind - - LastLiteralToken = 9, ->LastLiteralToken : SyntaxKind - - FirstTemplateToken = 9, ->FirstTemplateToken : SyntaxKind - - LastTemplateToken = 12, ->LastTemplateToken : SyntaxKind - - FirstOperator = 21, ->FirstOperator : SyntaxKind - - LastOperator = 62, ->LastOperator : SyntaxKind - - FirstBinaryOperator = 23, ->FirstBinaryOperator : SyntaxKind - - LastBinaryOperator = 62, ->LastBinaryOperator : SyntaxKind - - FirstNode = 120, ->FirstNode : SyntaxKind - } - const enum NodeFlags { ->NodeFlags : NodeFlags - - Export = 1, ->Export : NodeFlags - - Ambient = 2, ->Ambient : NodeFlags - - Public = 16, ->Public : NodeFlags - - Private = 32, ->Private : NodeFlags - - Protected = 64, ->Protected : NodeFlags - - Static = 128, ->Static : NodeFlags - - MultiLine = 256, ->MultiLine : NodeFlags - - Synthetic = 512, ->Synthetic : NodeFlags - - DeclarationFile = 1024, ->DeclarationFile : NodeFlags - - Let = 2048, ->Let : NodeFlags - - Const = 4096, ->Const : NodeFlags - - OctalLiteral = 8192, ->OctalLiteral : NodeFlags - - Modifier = 243, ->Modifier : NodeFlags - - AccessibilityModifier = 112, ->AccessibilityModifier : NodeFlags - - BlockScoped = 6144, ->BlockScoped : NodeFlags - } - const enum ParserContextFlags { ->ParserContextFlags : ParserContextFlags - - StrictMode = 1, ->StrictMode : ParserContextFlags - - DisallowIn = 2, ->DisallowIn : ParserContextFlags - - Yield = 4, ->Yield : ParserContextFlags - - GeneratorParameter = 8, ->GeneratorParameter : ParserContextFlags - - ContainsError = 16, ->ContainsError : ParserContextFlags - - HasPropagatedChildContainsErrorFlag = 32, ->HasPropagatedChildContainsErrorFlag : ParserContextFlags - } - interface Node extends TextRange { ->Node : Node ->TextRange : TextRange - - kind: SyntaxKind; ->kind : SyntaxKind ->SyntaxKind : SyntaxKind - - flags: NodeFlags; ->flags : NodeFlags ->NodeFlags : NodeFlags - - parserContextFlags?: ParserContextFlags; ->parserContextFlags : ParserContextFlags ->ParserContextFlags : ParserContextFlags - - id?: number; ->id : number - - parent?: Node; ->parent : Node ->Node : Node - - symbol?: Symbol; ->symbol : Symbol ->Symbol : Symbol - - locals?: SymbolTable; ->locals : SymbolTable ->SymbolTable : SymbolTable - - nextContainer?: Node; ->nextContainer : Node ->Node : Node - - localSymbol?: Symbol; ->localSymbol : Symbol ->Symbol : Symbol - - modifiers?: ModifiersArray; ->modifiers : ModifiersArray ->ModifiersArray : ModifiersArray - } - interface NodeArray extends Array, TextRange { ->NodeArray : NodeArray ->T : T ->Array : T[] ->T : T ->TextRange : TextRange - - hasTrailingComma?: boolean; ->hasTrailingComma : boolean - } - interface ModifiersArray extends NodeArray { ->ModifiersArray : ModifiersArray ->NodeArray : NodeArray ->Node : Node - - flags: number; ->flags : number - } - interface Identifier extends PrimaryExpression { ->Identifier : Identifier ->PrimaryExpression : PrimaryExpression - - text: string; ->text : string - } - interface QualifiedName extends Node { ->QualifiedName : QualifiedName ->Node : Node - - left: EntityName; ->left : Identifier | QualifiedName ->EntityName : Identifier | QualifiedName - - right: Identifier; ->right : Identifier ->Identifier : Identifier - } - type EntityName = Identifier | QualifiedName; ->EntityName : Identifier | QualifiedName ->Identifier : Identifier ->QualifiedName : QualifiedName - - type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName ->Identifier : Identifier ->LiteralExpression : LiteralExpression ->ComputedPropertyName : ComputedPropertyName - - interface Declaration extends Node { ->Declaration : Declaration ->Node : Node - - _declarationBrand: any; ->_declarationBrand : any - - name?: DeclarationName; ->name : Identifier | LiteralExpression | ComputedPropertyName ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName - } - interface ComputedPropertyName extends Node { ->ComputedPropertyName : ComputedPropertyName ->Node : Node - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface TypeParameterDeclaration extends Declaration { ->TypeParameterDeclaration : TypeParameterDeclaration ->Declaration : Declaration - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - constraint?: TypeNode; ->constraint : TypeNode ->TypeNode : TypeNode - - expression?: Expression; ->expression : Expression ->Expression : Expression - } - interface SignatureDeclaration extends Declaration { ->SignatureDeclaration : SignatureDeclaration ->Declaration : Declaration - - typeParameters?: NodeArray; ->typeParameters : NodeArray ->NodeArray : NodeArray ->TypeParameterDeclaration : TypeParameterDeclaration - - parameters: NodeArray; ->parameters : NodeArray ->NodeArray : NodeArray ->ParameterDeclaration : ParameterDeclaration - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - } - interface VariableDeclaration extends Declaration { ->VariableDeclaration : VariableDeclaration ->Declaration : Declaration - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - } - interface ParameterDeclaration extends Declaration { ->ParameterDeclaration : ParameterDeclaration ->Declaration : Declaration - - dotDotDotToken?: Node; ->dotDotDotToken : Node ->Node : Node - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - questionToken?: Node; ->questionToken : Node ->Node : Node - - type?: TypeNode | StringLiteralExpression; ->type : TypeNode | StringLiteralExpression ->TypeNode : TypeNode ->StringLiteralExpression : StringLiteralExpression - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - } - interface PropertyDeclaration extends Declaration, ClassElement { ->PropertyDeclaration : PropertyDeclaration ->Declaration : Declaration ->ClassElement : ClassElement - - _propertyDeclarationBrand: any; ->_propertyDeclarationBrand : any - - questionToken?: Node; ->questionToken : Node ->Node : Node - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - } - type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; ->VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration ->VariableDeclaration : VariableDeclaration ->ParameterDeclaration : ParameterDeclaration - - type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; ->VariableOrParameterOrPropertyDeclaration : ParameterDeclaration | VariableDeclaration | PropertyDeclaration ->VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration ->PropertyDeclaration : PropertyDeclaration - - interface ObjectLiteralElement extends Declaration { ->ObjectLiteralElement : ObjectLiteralElement ->Declaration : Declaration - - _objectLiteralBrandBrand: any; ->_objectLiteralBrandBrand : any - } - interface ShorthandPropertyAssignment extends ObjectLiteralElement { ->ShorthandPropertyAssignment : ShorthandPropertyAssignment ->ObjectLiteralElement : ObjectLiteralElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - questionToken?: Node; ->questionToken : Node ->Node : Node - } - interface PropertyAssignment extends ObjectLiteralElement { ->PropertyAssignment : PropertyAssignment ->ObjectLiteralElement : ObjectLiteralElement - - _propertyAssignmentBrand: any; ->_propertyAssignmentBrand : any - - name: DeclarationName; ->name : Identifier | LiteralExpression | ComputedPropertyName ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName - - questionToken?: Node; ->questionToken : Node ->Node : Node - - initializer: Expression; ->initializer : Expression ->Expression : Expression - } - /** - * Several node kinds share function-like features such as a signature, - * a name, and a body. These nodes should extend FunctionLikeDeclaration. - * Examples: - * FunctionDeclaration - * MethodDeclaration - * AccessorDeclaration - */ - interface FunctionLikeDeclaration extends SignatureDeclaration { ->FunctionLikeDeclaration : FunctionLikeDeclaration ->SignatureDeclaration : SignatureDeclaration - - _functionLikeDeclarationBrand: any; ->_functionLikeDeclarationBrand : any - - asteriskToken?: Node; ->asteriskToken : Node ->Node : Node - - questionToken?: Node; ->questionToken : Node ->Node : Node - - body?: Block | Expression; ->body : Expression | Block ->Block : Block ->Expression : Expression - } - interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { ->FunctionDeclaration : FunctionDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration ->Statement : Statement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - body?: Block; ->body : Block ->Block : Block - } - interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { ->MethodDeclaration : MethodDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration ->ClassElement : ClassElement ->ObjectLiteralElement : ObjectLiteralElement - - body?: Block; ->body : Block ->Block : Block - } - interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { ->ConstructorDeclaration : ConstructorDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration ->ClassElement : ClassElement - - body?: Block; ->body : Block ->Block : Block - } - interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { ->AccessorDeclaration : AccessorDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration ->ClassElement : ClassElement ->ObjectLiteralElement : ObjectLiteralElement - - _accessorDeclarationBrand: any; ->_accessorDeclarationBrand : any - - body: Block; ->body : Block ->Block : Block - } - interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { ->IndexSignatureDeclaration : IndexSignatureDeclaration ->SignatureDeclaration : SignatureDeclaration ->ClassElement : ClassElement - - _indexSignatureDeclarationBrand: any; ->_indexSignatureDeclarationBrand : any - } - interface TypeNode extends Node { ->TypeNode : TypeNode ->Node : Node - - _typeNodeBrand: any; ->_typeNodeBrand : any - } - interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { ->FunctionOrConstructorTypeNode : FunctionOrConstructorTypeNode ->TypeNode : TypeNode ->SignatureDeclaration : SignatureDeclaration - - _functionOrConstructorTypeNodeBrand: any; ->_functionOrConstructorTypeNodeBrand : any - } - interface TypeReferenceNode extends TypeNode { ->TypeReferenceNode : TypeReferenceNode ->TypeNode : TypeNode - - typeName: EntityName; ->typeName : Identifier | QualifiedName ->EntityName : Identifier | QualifiedName - - typeArguments?: NodeArray; ->typeArguments : NodeArray ->NodeArray : NodeArray ->TypeNode : TypeNode - } - interface TypeQueryNode extends TypeNode { ->TypeQueryNode : TypeQueryNode ->TypeNode : TypeNode - - exprName: EntityName; ->exprName : Identifier | QualifiedName ->EntityName : Identifier | QualifiedName - } - interface TypeLiteralNode extends TypeNode, Declaration { ->TypeLiteralNode : TypeLiteralNode ->TypeNode : TypeNode ->Declaration : Declaration - - members: NodeArray; ->members : NodeArray ->NodeArray : NodeArray ->Node : Node - } - interface ArrayTypeNode extends TypeNode { ->ArrayTypeNode : ArrayTypeNode ->TypeNode : TypeNode - - elementType: TypeNode; ->elementType : TypeNode ->TypeNode : TypeNode - } - interface TupleTypeNode extends TypeNode { ->TupleTypeNode : TupleTypeNode ->TypeNode : TypeNode - - elementTypes: NodeArray; ->elementTypes : NodeArray ->NodeArray : NodeArray ->TypeNode : TypeNode - } - interface UnionTypeNode extends TypeNode { ->UnionTypeNode : UnionTypeNode ->TypeNode : TypeNode - - types: NodeArray; ->types : NodeArray ->NodeArray : NodeArray ->TypeNode : TypeNode - } - interface ParenthesizedTypeNode extends TypeNode { ->ParenthesizedTypeNode : ParenthesizedTypeNode ->TypeNode : TypeNode - - type: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - } - interface Expression extends Node { ->Expression : Expression ->Node : Node - - _expressionBrand: any; ->_expressionBrand : any - - contextualType?: Type; ->contextualType : Type ->Type : Type - } - interface UnaryExpression extends Expression { ->UnaryExpression : UnaryExpression ->Expression : Expression - - _unaryExpressionBrand: any; ->_unaryExpressionBrand : any - } - interface PrefixUnaryExpression extends UnaryExpression { ->PrefixUnaryExpression : PrefixUnaryExpression ->UnaryExpression : UnaryExpression - - operator: SyntaxKind; ->operator : SyntaxKind ->SyntaxKind : SyntaxKind - - operand: UnaryExpression; ->operand : UnaryExpression ->UnaryExpression : UnaryExpression - } - interface PostfixUnaryExpression extends PostfixExpression { ->PostfixUnaryExpression : PostfixUnaryExpression ->PostfixExpression : PostfixExpression - - operand: LeftHandSideExpression; ->operand : LeftHandSideExpression ->LeftHandSideExpression : LeftHandSideExpression - - operator: SyntaxKind; ->operator : SyntaxKind ->SyntaxKind : SyntaxKind - } - interface PostfixExpression extends UnaryExpression { ->PostfixExpression : PostfixExpression ->UnaryExpression : UnaryExpression - - _postfixExpressionBrand: any; ->_postfixExpressionBrand : any - } - interface LeftHandSideExpression extends PostfixExpression { ->LeftHandSideExpression : LeftHandSideExpression ->PostfixExpression : PostfixExpression - - _leftHandSideExpressionBrand: any; ->_leftHandSideExpressionBrand : any - } - interface MemberExpression extends LeftHandSideExpression { ->MemberExpression : MemberExpression ->LeftHandSideExpression : LeftHandSideExpression - - _memberExpressionBrand: any; ->_memberExpressionBrand : any - } - interface PrimaryExpression extends MemberExpression { ->PrimaryExpression : PrimaryExpression ->MemberExpression : MemberExpression - - _primaryExpressionBrand: any; ->_primaryExpressionBrand : any - } - interface DeleteExpression extends UnaryExpression { ->DeleteExpression : DeleteExpression ->UnaryExpression : UnaryExpression - - expression: UnaryExpression; ->expression : UnaryExpression ->UnaryExpression : UnaryExpression - } - interface TypeOfExpression extends UnaryExpression { ->TypeOfExpression : TypeOfExpression ->UnaryExpression : UnaryExpression - - expression: UnaryExpression; ->expression : UnaryExpression ->UnaryExpression : UnaryExpression - } - interface VoidExpression extends UnaryExpression { ->VoidExpression : VoidExpression ->UnaryExpression : UnaryExpression - - expression: UnaryExpression; ->expression : UnaryExpression ->UnaryExpression : UnaryExpression - } - interface YieldExpression extends Expression { ->YieldExpression : YieldExpression ->Expression : Expression - - asteriskToken?: Node; ->asteriskToken : Node ->Node : Node - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface BinaryExpression extends Expression { ->BinaryExpression : BinaryExpression ->Expression : Expression - - left: Expression; ->left : Expression ->Expression : Expression - - operator: SyntaxKind; ->operator : SyntaxKind ->SyntaxKind : SyntaxKind - - right: Expression; ->right : Expression ->Expression : Expression - } - interface ConditionalExpression extends Expression { ->ConditionalExpression : ConditionalExpression ->Expression : Expression - - condition: Expression; ->condition : Expression ->Expression : Expression - - whenTrue: Expression; ->whenTrue : Expression ->Expression : Expression - - whenFalse: Expression; ->whenFalse : Expression ->Expression : Expression - } - interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { ->FunctionExpression : FunctionExpression ->PrimaryExpression : PrimaryExpression ->FunctionLikeDeclaration : FunctionLikeDeclaration - - name?: Identifier; ->name : Identifier ->Identifier : Identifier - - body: Block | Expression; ->body : Expression | Block ->Block : Block ->Expression : Expression - } - interface LiteralExpression extends PrimaryExpression { ->LiteralExpression : LiteralExpression ->PrimaryExpression : PrimaryExpression - - text: string; ->text : string - - isUnterminated?: boolean; ->isUnterminated : boolean - } - interface StringLiteralExpression extends LiteralExpression { ->StringLiteralExpression : StringLiteralExpression ->LiteralExpression : LiteralExpression - - _stringLiteralExpressionBrand: any; ->_stringLiteralExpressionBrand : any - } - interface TemplateExpression extends PrimaryExpression { ->TemplateExpression : TemplateExpression ->PrimaryExpression : PrimaryExpression - - head: LiteralExpression; ->head : LiteralExpression ->LiteralExpression : LiteralExpression - - templateSpans: NodeArray; ->templateSpans : NodeArray ->NodeArray : NodeArray ->TemplateSpan : TemplateSpan - } - interface TemplateSpan extends Node { ->TemplateSpan : TemplateSpan ->Node : Node - - expression: Expression; ->expression : Expression ->Expression : Expression - - literal: LiteralExpression; ->literal : LiteralExpression ->LiteralExpression : LiteralExpression - } - interface ParenthesizedExpression extends PrimaryExpression { ->ParenthesizedExpression : ParenthesizedExpression ->PrimaryExpression : PrimaryExpression - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface ArrayLiteralExpression extends PrimaryExpression { ->ArrayLiteralExpression : ArrayLiteralExpression ->PrimaryExpression : PrimaryExpression - - elements: NodeArray; ->elements : NodeArray ->NodeArray : NodeArray ->Expression : Expression - } - interface ObjectLiteralExpression extends PrimaryExpression, Declaration { ->ObjectLiteralExpression : ObjectLiteralExpression ->PrimaryExpression : PrimaryExpression ->Declaration : Declaration - - properties: NodeArray; ->properties : NodeArray ->NodeArray : NodeArray ->ObjectLiteralElement : ObjectLiteralElement - } - interface PropertyAccessExpression extends MemberExpression { ->PropertyAccessExpression : PropertyAccessExpression ->MemberExpression : MemberExpression - - expression: LeftHandSideExpression; ->expression : LeftHandSideExpression ->LeftHandSideExpression : LeftHandSideExpression - - name: Identifier; ->name : Identifier ->Identifier : Identifier - } - interface ElementAccessExpression extends MemberExpression { ->ElementAccessExpression : ElementAccessExpression ->MemberExpression : MemberExpression - - expression: LeftHandSideExpression; ->expression : LeftHandSideExpression ->LeftHandSideExpression : LeftHandSideExpression - - argumentExpression?: Expression; ->argumentExpression : Expression ->Expression : Expression - } - interface CallExpression extends LeftHandSideExpression { ->CallExpression : CallExpression ->LeftHandSideExpression : LeftHandSideExpression - - expression: LeftHandSideExpression; ->expression : LeftHandSideExpression ->LeftHandSideExpression : LeftHandSideExpression - - typeArguments?: NodeArray; ->typeArguments : NodeArray ->NodeArray : NodeArray ->TypeNode : TypeNode - - arguments: NodeArray; ->arguments : NodeArray ->NodeArray : NodeArray ->Expression : Expression - } - interface NewExpression extends CallExpression, PrimaryExpression { ->NewExpression : NewExpression ->CallExpression : CallExpression ->PrimaryExpression : PrimaryExpression - } - interface TaggedTemplateExpression extends MemberExpression { ->TaggedTemplateExpression : TaggedTemplateExpression ->MemberExpression : MemberExpression - - tag: LeftHandSideExpression; ->tag : LeftHandSideExpression ->LeftHandSideExpression : LeftHandSideExpression - - template: LiteralExpression | TemplateExpression; ->template : LiteralExpression | TemplateExpression ->LiteralExpression : LiteralExpression ->TemplateExpression : TemplateExpression - } - type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression; ->CallLikeExpression : CallExpression | NewExpression | TaggedTemplateExpression ->CallExpression : CallExpression ->NewExpression : NewExpression ->TaggedTemplateExpression : TaggedTemplateExpression - - interface TypeAssertion extends UnaryExpression { ->TypeAssertion : TypeAssertion ->UnaryExpression : UnaryExpression - - type: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - - expression: UnaryExpression; ->expression : UnaryExpression ->UnaryExpression : UnaryExpression - } - interface Statement extends Node, ModuleElement { ->Statement : Statement ->Node : Node ->ModuleElement : ModuleElement - - _statementBrand: any; ->_statementBrand : any - } - interface Block extends Statement { ->Block : Block ->Statement : Statement - - statements: NodeArray; ->statements : NodeArray ->NodeArray : NodeArray ->Statement : Statement - } - interface VariableStatement extends Statement { ->VariableStatement : VariableStatement ->Statement : Statement - - declarations: NodeArray; ->declarations : NodeArray ->NodeArray : NodeArray ->VariableDeclaration : VariableDeclaration - } - interface ExpressionStatement extends Statement { ->ExpressionStatement : ExpressionStatement ->Statement : Statement - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface IfStatement extends Statement { ->IfStatement : IfStatement ->Statement : Statement - - expression: Expression; ->expression : Expression ->Expression : Expression - - thenStatement: Statement; ->thenStatement : Statement ->Statement : Statement - - elseStatement?: Statement; ->elseStatement : Statement ->Statement : Statement - } - interface IterationStatement extends Statement { ->IterationStatement : IterationStatement ->Statement : Statement - - statement: Statement; ->statement : Statement ->Statement : Statement - } - interface DoStatement extends IterationStatement { ->DoStatement : DoStatement ->IterationStatement : IterationStatement - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface WhileStatement extends IterationStatement { ->WhileStatement : WhileStatement ->IterationStatement : IterationStatement - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface ForStatement extends IterationStatement { ->ForStatement : ForStatement ->IterationStatement : IterationStatement - - declarations?: NodeArray; ->declarations : NodeArray ->NodeArray : NodeArray ->VariableDeclaration : VariableDeclaration - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - - condition?: Expression; ->condition : Expression ->Expression : Expression - - iterator?: Expression; ->iterator : Expression ->Expression : Expression - } - interface ForInStatement extends IterationStatement { ->ForInStatement : ForInStatement ->IterationStatement : IterationStatement - - declarations?: NodeArray; ->declarations : NodeArray ->NodeArray : NodeArray ->VariableDeclaration : VariableDeclaration - - variable?: Expression; ->variable : Expression ->Expression : Expression - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface BreakOrContinueStatement extends Statement { ->BreakOrContinueStatement : BreakOrContinueStatement ->Statement : Statement - - label?: Identifier; ->label : Identifier ->Identifier : Identifier - } - interface ReturnStatement extends Statement { ->ReturnStatement : ReturnStatement ->Statement : Statement - - expression?: Expression; ->expression : Expression ->Expression : Expression - } - interface WithStatement extends Statement { ->WithStatement : WithStatement ->Statement : Statement - - expression: Expression; ->expression : Expression ->Expression : Expression - - statement: Statement; ->statement : Statement ->Statement : Statement - } - interface SwitchStatement extends Statement { ->SwitchStatement : SwitchStatement ->Statement : Statement - - expression: Expression; ->expression : Expression ->Expression : Expression - - clauses: NodeArray; ->clauses : NodeArray ->NodeArray : NodeArray ->CaseOrDefaultClause : CaseClause | DefaultClause - } - interface CaseClause extends Node { ->CaseClause : CaseClause ->Node : Node - - expression?: Expression; ->expression : Expression ->Expression : Expression - - statements: NodeArray; ->statements : NodeArray ->NodeArray : NodeArray ->Statement : Statement - } - interface DefaultClause extends Node { ->DefaultClause : DefaultClause ->Node : Node - - statements: NodeArray; ->statements : NodeArray ->NodeArray : NodeArray ->Statement : Statement - } - type CaseOrDefaultClause = CaseClause | DefaultClause; ->CaseOrDefaultClause : CaseClause | DefaultClause ->CaseClause : CaseClause ->DefaultClause : DefaultClause - - interface LabeledStatement extends Statement { ->LabeledStatement : LabeledStatement ->Statement : Statement - - label: Identifier; ->label : Identifier ->Identifier : Identifier - - statement: Statement; ->statement : Statement ->Statement : Statement - } - interface ThrowStatement extends Statement { ->ThrowStatement : ThrowStatement ->Statement : Statement - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface TryStatement extends Statement { ->TryStatement : TryStatement ->Statement : Statement - - tryBlock: Block; ->tryBlock : Block ->Block : Block - - catchClause?: CatchClause; ->catchClause : CatchClause ->CatchClause : CatchClause - - finallyBlock?: Block; ->finallyBlock : Block ->Block : Block - } - interface CatchClause extends Declaration { ->CatchClause : CatchClause ->Declaration : Declaration - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - - block: Block; ->block : Block ->Block : Block - } - interface ModuleElement extends Node { ->ModuleElement : ModuleElement ->Node : Node - - _moduleElementBrand: any; ->_moduleElementBrand : any - } - interface ClassDeclaration extends Declaration, ModuleElement { ->ClassDeclaration : ClassDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - typeParameters?: NodeArray; ->typeParameters : NodeArray ->NodeArray : NodeArray ->TypeParameterDeclaration : TypeParameterDeclaration - - heritageClauses?: NodeArray; ->heritageClauses : NodeArray ->NodeArray : NodeArray ->HeritageClause : HeritageClause - - members: NodeArray; ->members : NodeArray ->NodeArray : NodeArray ->ClassElement : ClassElement - } - interface ClassElement extends Declaration { ->ClassElement : ClassElement ->Declaration : Declaration - - _classElementBrand: any; ->_classElementBrand : any - } - interface InterfaceDeclaration extends Declaration, ModuleElement { ->InterfaceDeclaration : InterfaceDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - typeParameters?: NodeArray; ->typeParameters : NodeArray ->NodeArray : NodeArray ->TypeParameterDeclaration : TypeParameterDeclaration - - heritageClauses?: NodeArray; ->heritageClauses : NodeArray ->NodeArray : NodeArray ->HeritageClause : HeritageClause - - members: NodeArray; ->members : NodeArray ->NodeArray : NodeArray ->Declaration : Declaration - } - interface HeritageClause extends Node { ->HeritageClause : HeritageClause ->Node : Node - - token: SyntaxKind; ->token : SyntaxKind ->SyntaxKind : SyntaxKind - - types?: NodeArray; ->types : NodeArray ->NodeArray : NodeArray ->TypeReferenceNode : TypeReferenceNode - } - interface TypeAliasDeclaration extends Declaration, ModuleElement { ->TypeAliasDeclaration : TypeAliasDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - type: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - } - interface EnumMember extends Declaration { ->EnumMember : EnumMember ->Declaration : Declaration - - name: DeclarationName; ->name : Identifier | LiteralExpression | ComputedPropertyName ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - } - interface EnumDeclaration extends Declaration, ModuleElement { ->EnumDeclaration : EnumDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - members: NodeArray; ->members : NodeArray ->NodeArray : NodeArray ->EnumMember : EnumMember - } - interface ModuleDeclaration extends Declaration, ModuleElement { ->ModuleDeclaration : ModuleDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier | LiteralExpression; ->name : Identifier | LiteralExpression ->Identifier : Identifier ->LiteralExpression : LiteralExpression - - body: ModuleBlock | ModuleDeclaration; ->body : ModuleDeclaration | ModuleBlock ->ModuleBlock : ModuleBlock ->ModuleDeclaration : ModuleDeclaration - } - interface ModuleBlock extends Node, ModuleElement { ->ModuleBlock : ModuleBlock ->Node : Node ->ModuleElement : ModuleElement - - statements: NodeArray; ->statements : NodeArray ->NodeArray : NodeArray ->ModuleElement : ModuleElement - } - interface ImportDeclaration extends Declaration, ModuleElement { ->ImportDeclaration : ImportDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - moduleReference: EntityName | ExternalModuleReference; ->moduleReference : Identifier | QualifiedName | ExternalModuleReference ->EntityName : Identifier | QualifiedName ->ExternalModuleReference : ExternalModuleReference - } - interface ExternalModuleReference extends Node { ->ExternalModuleReference : ExternalModuleReference ->Node : Node - - expression?: Expression; ->expression : Expression ->Expression : Expression - } - interface ExportAssignment extends Statement, ModuleElement { ->ExportAssignment : ExportAssignment ->Statement : Statement ->ModuleElement : ModuleElement - - exportName: Identifier; ->exportName : Identifier ->Identifier : Identifier - } - interface FileReference extends TextRange { ->FileReference : FileReference ->TextRange : TextRange - - filename: string; ->filename : string - } - interface CommentRange extends TextRange { ->CommentRange : CommentRange ->TextRange : TextRange - - hasTrailingNewLine?: boolean; ->hasTrailingNewLine : boolean - } - interface SourceFile extends Declaration { ->SourceFile : SourceFile ->Declaration : Declaration - - statements: NodeArray; ->statements : NodeArray ->NodeArray : NodeArray ->ModuleElement : ModuleElement - - endOfFileToken: Node; ->endOfFileToken : Node ->Node : Node - - filename: string; ->filename : string - - text: string; ->text : string - - getLineAndCharacterFromPosition(position: number): LineAndCharacter; ->getLineAndCharacterFromPosition : (position: number) => LineAndCharacter ->position : number ->LineAndCharacter : LineAndCharacter - - getPositionFromLineAndCharacter(line: number, character: number): number; ->getPositionFromLineAndCharacter : (line: number, character: number) => number ->line : number ->character : number - - getLineStarts(): number[]; ->getLineStarts : () => number[] - - amdDependencies: string[]; ->amdDependencies : string[] - - amdModuleName: string; ->amdModuleName : string - - referencedFiles: FileReference[]; ->referencedFiles : FileReference[] ->FileReference : FileReference - - referenceDiagnostics: Diagnostic[]; ->referenceDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - parseDiagnostics: Diagnostic[]; ->parseDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - grammarDiagnostics: Diagnostic[]; ->grammarDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - getSyntacticDiagnostics(): Diagnostic[]; ->getSyntacticDiagnostics : () => Diagnostic[] ->Diagnostic : Diagnostic - - semanticDiagnostics: Diagnostic[]; ->semanticDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - hasNoDefaultLib: boolean; ->hasNoDefaultLib : boolean - - externalModuleIndicator: Node; ->externalModuleIndicator : Node ->Node : Node - - nodeCount: number; ->nodeCount : number - - identifierCount: number; ->identifierCount : number - - symbolCount: number; ->symbolCount : number - - isOpen: boolean; ->isOpen : boolean - - version: string; ->version : string - - languageVersion: ScriptTarget; ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget - - identifiers: Map; ->identifiers : Map ->Map : Map - } - interface Program { ->Program : Program - - getSourceFile(filename: string): SourceFile; ->getSourceFile : (filename: string) => SourceFile ->filename : string ->SourceFile : SourceFile - - getSourceFiles(): SourceFile[]; ->getSourceFiles : () => SourceFile[] ->SourceFile : SourceFile - - getCompilerOptions(): CompilerOptions; ->getCompilerOptions : () => CompilerOptions ->CompilerOptions : CompilerOptions - - getCompilerHost(): CompilerHost; ->getCompilerHost : () => CompilerHost ->CompilerHost : CompilerHost - - getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; ->getDiagnostics : (sourceFile?: SourceFile) => Diagnostic[] ->sourceFile : SourceFile ->SourceFile : SourceFile ->Diagnostic : Diagnostic - - getGlobalDiagnostics(): Diagnostic[]; ->getGlobalDiagnostics : () => Diagnostic[] ->Diagnostic : Diagnostic - - getTypeChecker(fullTypeCheckMode: boolean): TypeChecker; ->getTypeChecker : (fullTypeCheckMode: boolean) => TypeChecker ->fullTypeCheckMode : boolean ->TypeChecker : TypeChecker - - getCommonSourceDirectory(): string; ->getCommonSourceDirectory : () => string - } - interface SourceMapSpan { ->SourceMapSpan : SourceMapSpan - - emittedLine: number; ->emittedLine : number - - emittedColumn: number; ->emittedColumn : number - - sourceLine: number; ->sourceLine : number - - sourceColumn: number; ->sourceColumn : number - - nameIndex?: number; ->nameIndex : number - - sourceIndex: number; ->sourceIndex : number - } - interface SourceMapData { ->SourceMapData : SourceMapData - - sourceMapFilePath: string; ->sourceMapFilePath : string - - jsSourceMappingURL: string; ->jsSourceMappingURL : string - - sourceMapFile: string; ->sourceMapFile : string - - sourceMapSourceRoot: string; ->sourceMapSourceRoot : string - - sourceMapSources: string[]; ->sourceMapSources : string[] - - inputSourceFileNames: string[]; ->inputSourceFileNames : string[] - - sourceMapNames?: string[]; ->sourceMapNames : string[] - - sourceMapMappings: string; ->sourceMapMappings : string - - sourceMapDecodedMappings: SourceMapSpan[]; ->sourceMapDecodedMappings : SourceMapSpan[] ->SourceMapSpan : SourceMapSpan - } - enum EmitReturnStatus { ->EmitReturnStatus : EmitReturnStatus - - Succeeded = 0, ->Succeeded : EmitReturnStatus - - AllOutputGenerationSkipped = 1, ->AllOutputGenerationSkipped : EmitReturnStatus - - JSGeneratedWithSemanticErrors = 2, ->JSGeneratedWithSemanticErrors : EmitReturnStatus - - DeclarationGenerationSkipped = 3, ->DeclarationGenerationSkipped : EmitReturnStatus - - EmitErrorsEncountered = 4, ->EmitErrorsEncountered : EmitReturnStatus - - CompilerOptionsErrors = 5, ->CompilerOptionsErrors : EmitReturnStatus - } - interface EmitResult { ->EmitResult : EmitResult - - emitResultStatus: EmitReturnStatus; ->emitResultStatus : EmitReturnStatus ->EmitReturnStatus : EmitReturnStatus - - diagnostics: Diagnostic[]; ->diagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - sourceMaps: SourceMapData[]; ->sourceMaps : SourceMapData[] ->SourceMapData : SourceMapData - } - interface TypeChecker { ->TypeChecker : TypeChecker - - getProgram(): Program; ->getProgram : () => Program ->Program : Program - - getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; ->getDiagnostics : (sourceFile?: SourceFile) => Diagnostic[] ->sourceFile : SourceFile ->SourceFile : SourceFile ->Diagnostic : Diagnostic - - getDeclarationDiagnostics(sourceFile: SourceFile): Diagnostic[]; ->getDeclarationDiagnostics : (sourceFile: SourceFile) => Diagnostic[] ->sourceFile : SourceFile ->SourceFile : SourceFile ->Diagnostic : Diagnostic - - getGlobalDiagnostics(): Diagnostic[]; ->getGlobalDiagnostics : () => Diagnostic[] ->Diagnostic : Diagnostic - - getNodeCount(): number; ->getNodeCount : () => number - - getIdentifierCount(): number; ->getIdentifierCount : () => number - - getSymbolCount(): number; ->getSymbolCount : () => number - - getTypeCount(): number; ->getTypeCount : () => number - - emitFiles(targetSourceFile?: SourceFile): EmitResult; ->emitFiles : (targetSourceFile?: SourceFile) => EmitResult ->targetSourceFile : SourceFile ->SourceFile : SourceFile ->EmitResult : EmitResult - - getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; ->getTypeOfSymbolAtLocation : (symbol: Symbol, node: Node) => Type ->symbol : Symbol ->Symbol : Symbol ->node : Node ->Node : Node ->Type : Type - - getDeclaredTypeOfSymbol(symbol: Symbol): Type; ->getDeclaredTypeOfSymbol : (symbol: Symbol) => Type ->symbol : Symbol ->Symbol : Symbol ->Type : Type - - getPropertiesOfType(type: Type): Symbol[]; ->getPropertiesOfType : (type: Type) => Symbol[] ->type : Type ->Type : Type ->Symbol : Symbol - - getPropertyOfType(type: Type, propertyName: string): Symbol; ->getPropertyOfType : (type: Type, propertyName: string) => Symbol ->type : Type ->Type : Type ->propertyName : string ->Symbol : Symbol - - getSignaturesOfType(type: Type, kind: SignatureKind): Signature[]; ->getSignaturesOfType : (type: Type, kind: SignatureKind) => Signature[] ->type : Type ->Type : Type ->kind : SignatureKind ->SignatureKind : SignatureKind ->Signature : Signature - - getIndexTypeOfType(type: Type, kind: IndexKind): Type; ->getIndexTypeOfType : (type: Type, kind: IndexKind) => Type ->type : Type ->Type : Type ->kind : IndexKind ->IndexKind : IndexKind ->Type : Type - - getReturnTypeOfSignature(signature: Signature): Type; ->getReturnTypeOfSignature : (signature: Signature) => Type ->signature : Signature ->Signature : Signature ->Type : Type - - getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; ->getSymbolsInScope : (location: Node, meaning: SymbolFlags) => Symbol[] ->location : Node ->Node : Node ->meaning : SymbolFlags ->SymbolFlags : SymbolFlags ->Symbol : Symbol - - getSymbolAtLocation(node: Node): Symbol; ->getSymbolAtLocation : (node: Node) => Symbol ->node : Node ->Node : Node ->Symbol : Symbol - - getShorthandAssignmentValueSymbol(location: Node): Symbol; ->getShorthandAssignmentValueSymbol : (location: Node) => Symbol ->location : Node ->Node : Node ->Symbol : Symbol - - getTypeAtLocation(node: Node): Type; ->getTypeAtLocation : (node: Node) => Type ->node : Node ->Node : Node ->Type : Type - - typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; ->typeToString : (type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => string ->type : Type ->Type : Type ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; ->symbolToString : (symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) => string ->symbol : Symbol ->Symbol : Symbol ->enclosingDeclaration : Node ->Node : Node ->meaning : SymbolFlags ->SymbolFlags : SymbolFlags - - getSymbolDisplayBuilder(): SymbolDisplayBuilder; ->getSymbolDisplayBuilder : () => SymbolDisplayBuilder ->SymbolDisplayBuilder : SymbolDisplayBuilder - - getFullyQualifiedName(symbol: Symbol): string; ->getFullyQualifiedName : (symbol: Symbol) => string ->symbol : Symbol ->Symbol : Symbol - - getAugmentedPropertiesOfType(type: Type): Symbol[]; ->getAugmentedPropertiesOfType : (type: Type) => Symbol[] ->type : Type ->Type : Type ->Symbol : Symbol - - getRootSymbols(symbol: Symbol): Symbol[]; ->getRootSymbols : (symbol: Symbol) => Symbol[] ->symbol : Symbol ->Symbol : Symbol ->Symbol : Symbol - - getContextualType(node: Expression): Type; ->getContextualType : (node: Expression) => Type ->node : Expression ->Expression : Expression ->Type : Type - - getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; ->getResolvedSignature : (node: CallExpression | NewExpression | TaggedTemplateExpression, candidatesOutArray?: Signature[]) => Signature ->node : CallExpression | NewExpression | TaggedTemplateExpression ->CallLikeExpression : CallExpression | NewExpression | TaggedTemplateExpression ->candidatesOutArray : Signature[] ->Signature : Signature ->Signature : Signature - - getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; ->getSignatureFromDeclaration : (declaration: SignatureDeclaration) => Signature ->declaration : SignatureDeclaration ->SignatureDeclaration : SignatureDeclaration ->Signature : Signature - - isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; ->isImplementationOfOverload : (node: FunctionLikeDeclaration) => boolean ->node : FunctionLikeDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration - - isUndefinedSymbol(symbol: Symbol): boolean; ->isUndefinedSymbol : (symbol: Symbol) => boolean ->symbol : Symbol ->Symbol : Symbol - - isArgumentsSymbol(symbol: Symbol): boolean; ->isArgumentsSymbol : (symbol: Symbol) => boolean ->symbol : Symbol ->Symbol : Symbol - - isEmitBlocked(sourceFile?: SourceFile): boolean; ->isEmitBlocked : (sourceFile?: SourceFile) => boolean ->sourceFile : SourceFile ->SourceFile : SourceFile - - getEnumMemberValue(node: EnumMember): number; ->getEnumMemberValue : (node: EnumMember) => number ->node : EnumMember ->EnumMember : EnumMember - - isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; ->isValidPropertyAccess : (node: QualifiedName | PropertyAccessExpression, propertyName: string) => boolean ->node : QualifiedName | PropertyAccessExpression ->PropertyAccessExpression : PropertyAccessExpression ->QualifiedName : QualifiedName ->propertyName : string - - getAliasedSymbol(symbol: Symbol): Symbol; ->getAliasedSymbol : (symbol: Symbol) => Symbol ->symbol : Symbol ->Symbol : Symbol ->Symbol : Symbol - } - interface SymbolDisplayBuilder { ->SymbolDisplayBuilder : SymbolDisplayBuilder - - buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildTypeDisplay : (type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->type : Type ->Type : Type ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void; ->buildSymbolDisplay : (symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags) => void ->symbol : Symbol ->Symbol : Symbol ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->meaning : SymbolFlags ->SymbolFlags : SymbolFlags ->flags : SymbolFormatFlags ->SymbolFormatFlags : SymbolFormatFlags - - buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildSignatureDisplay : (signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->signatures : Signature ->Signature : Signature ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildParameterDisplay : (parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->parameter : Symbol ->Symbol : Symbol ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildTypeParameterDisplay : (tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->tp : TypeParameter ->TypeParameter : TypeParameter ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void; ->buildTypeParameterDisplayFromSymbol : (symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags) => void ->symbol : Symbol ->Symbol : Symbol ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaraiton : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildDisplayForParametersAndDelimiters : (parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->parameters : Symbol[] ->Symbol : Symbol ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildDisplayForTypeParametersAndDelimiters : (typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->typeParameters : TypeParameter[] ->TypeParameter : TypeParameter ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildReturnTypeDisplay : (signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->signature : Signature ->Signature : Signature ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - } - interface SymbolWriter { ->SymbolWriter : SymbolWriter - - writeKeyword(text: string): void; ->writeKeyword : (text: string) => void ->text : string - - writeOperator(text: string): void; ->writeOperator : (text: string) => void ->text : string - - writePunctuation(text: string): void; ->writePunctuation : (text: string) => void ->text : string - - writeSpace(text: string): void; ->writeSpace : (text: string) => void ->text : string - - writeStringLiteral(text: string): void; ->writeStringLiteral : (text: string) => void ->text : string - - writeParameter(text: string): void; ->writeParameter : (text: string) => void ->text : string - - writeSymbol(text: string, symbol: Symbol): void; ->writeSymbol : (text: string, symbol: Symbol) => void ->text : string ->symbol : Symbol ->Symbol : Symbol - - writeLine(): void; ->writeLine : () => void - - increaseIndent(): void; ->increaseIndent : () => void - - decreaseIndent(): void; ->decreaseIndent : () => void - - clear(): void; ->clear : () => void - - trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void; ->trackSymbol : (symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) => void ->symbol : Symbol ->Symbol : Symbol ->enclosingDeclaration : Node ->Node : Node ->meaning : SymbolFlags ->SymbolFlags : SymbolFlags - } - const enum TypeFormatFlags { ->TypeFormatFlags : TypeFormatFlags - - None = 0, ->None : TypeFormatFlags - - WriteArrayAsGenericType = 1, ->WriteArrayAsGenericType : TypeFormatFlags - - UseTypeOfFunction = 2, ->UseTypeOfFunction : TypeFormatFlags - - NoTruncation = 4, ->NoTruncation : TypeFormatFlags - - WriteArrowStyleSignature = 8, ->WriteArrowStyleSignature : TypeFormatFlags - - WriteOwnNameForAnyLike = 16, ->WriteOwnNameForAnyLike : TypeFormatFlags - - WriteTypeArgumentsOfSignature = 32, ->WriteTypeArgumentsOfSignature : TypeFormatFlags - - InElementType = 64, ->InElementType : TypeFormatFlags - } - const enum SymbolFormatFlags { ->SymbolFormatFlags : SymbolFormatFlags - - None = 0, ->None : SymbolFormatFlags - - WriteTypeParametersOrArguments = 1, ->WriteTypeParametersOrArguments : SymbolFormatFlags - - UseOnlyExternalAliasing = 2, ->UseOnlyExternalAliasing : SymbolFormatFlags - } - const enum SymbolAccessibility { ->SymbolAccessibility : SymbolAccessibility - - Accessible = 0, ->Accessible : SymbolAccessibility - - NotAccessible = 1, ->NotAccessible : SymbolAccessibility - - CannotBeNamed = 2, ->CannotBeNamed : SymbolAccessibility - } - interface SymbolVisibilityResult { ->SymbolVisibilityResult : SymbolVisibilityResult - - accessibility: SymbolAccessibility; ->accessibility : SymbolAccessibility ->SymbolAccessibility : SymbolAccessibility - - aliasesToMakeVisible?: ImportDeclaration[]; ->aliasesToMakeVisible : ImportDeclaration[] ->ImportDeclaration : ImportDeclaration - - errorSymbolName?: string; ->errorSymbolName : string - - errorNode?: Node; ->errorNode : Node ->Node : Node - } - interface SymbolAccessiblityResult extends SymbolVisibilityResult { ->SymbolAccessiblityResult : SymbolAccessiblityResult ->SymbolVisibilityResult : SymbolVisibilityResult - - errorModuleName?: string; ->errorModuleName : string - } - interface EmitResolver { ->EmitResolver : EmitResolver - - getProgram(): Program; ->getProgram : () => Program ->Program : Program - - getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; ->getLocalNameOfContainer : (container: EnumDeclaration | ModuleDeclaration) => string ->container : EnumDeclaration | ModuleDeclaration ->ModuleDeclaration : ModuleDeclaration ->EnumDeclaration : EnumDeclaration - - getExpressionNamePrefix(node: Identifier): string; ->getExpressionNamePrefix : (node: Identifier) => string ->node : Identifier ->Identifier : Identifier - - getExportAssignmentName(node: SourceFile): string; ->getExportAssignmentName : (node: SourceFile) => string ->node : SourceFile ->SourceFile : SourceFile - - isReferencedImportDeclaration(node: ImportDeclaration): boolean; ->isReferencedImportDeclaration : (node: ImportDeclaration) => boolean ->node : ImportDeclaration ->ImportDeclaration : ImportDeclaration - - isTopLevelValueImportWithEntityName(node: ImportDeclaration): boolean; ->isTopLevelValueImportWithEntityName : (node: ImportDeclaration) => boolean ->node : ImportDeclaration ->ImportDeclaration : ImportDeclaration - - getNodeCheckFlags(node: Node): NodeCheckFlags; ->getNodeCheckFlags : (node: Node) => NodeCheckFlags ->node : Node ->Node : Node ->NodeCheckFlags : NodeCheckFlags - - getEnumMemberValue(node: EnumMember): number; ->getEnumMemberValue : (node: EnumMember) => number ->node : EnumMember ->EnumMember : EnumMember - - hasSemanticErrors(sourceFile?: SourceFile): boolean; ->hasSemanticErrors : (sourceFile?: SourceFile) => boolean ->sourceFile : SourceFile ->SourceFile : SourceFile - - isDeclarationVisible(node: Declaration): boolean; ->isDeclarationVisible : (node: Declaration) => boolean ->node : Declaration ->Declaration : Declaration - - isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; ->isImplementationOfOverload : (node: FunctionLikeDeclaration) => boolean ->node : FunctionLikeDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration - - writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; ->writeTypeOfDeclaration : (declaration: ParameterDeclaration | VariableDeclaration | AccessorDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void ->declaration : ParameterDeclaration | VariableDeclaration | AccessorDeclaration ->AccessorDeclaration : AccessorDeclaration ->VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags ->writer : SymbolWriter ->SymbolWriter : SymbolWriter - - writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; ->writeReturnTypeOfSignatureDeclaration : (signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void ->signatureDeclaration : SignatureDeclaration ->SignatureDeclaration : SignatureDeclaration ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags ->writer : SymbolWriter ->SymbolWriter : SymbolWriter - - isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; ->isSymbolAccessible : (symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags) => SymbolAccessiblityResult ->symbol : Symbol ->Symbol : Symbol ->enclosingDeclaration : Node ->Node : Node ->meaning : SymbolFlags ->SymbolFlags : SymbolFlags ->SymbolAccessiblityResult : SymbolAccessiblityResult - - isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; ->isEntityNameVisible : (entityName: Identifier | QualifiedName, enclosingDeclaration: Node) => SymbolVisibilityResult ->entityName : Identifier | QualifiedName ->EntityName : Identifier | QualifiedName ->enclosingDeclaration : Node ->Node : Node ->SymbolVisibilityResult : SymbolVisibilityResult - - getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number; ->getConstantValue : (node: PropertyAccessExpression | ElementAccessExpression) => number ->node : PropertyAccessExpression | ElementAccessExpression ->PropertyAccessExpression : PropertyAccessExpression ->ElementAccessExpression : ElementAccessExpression - - isEmitBlocked(sourceFile?: SourceFile): boolean; ->isEmitBlocked : (sourceFile?: SourceFile) => boolean ->sourceFile : SourceFile ->SourceFile : SourceFile - } - const enum SymbolFlags { ->SymbolFlags : SymbolFlags - - FunctionScopedVariable = 1, ->FunctionScopedVariable : SymbolFlags - - BlockScopedVariable = 2, ->BlockScopedVariable : SymbolFlags - - Property = 4, ->Property : SymbolFlags - - EnumMember = 8, ->EnumMember : SymbolFlags - - Function = 16, ->Function : SymbolFlags - - Class = 32, ->Class : SymbolFlags - - Interface = 64, ->Interface : SymbolFlags - - ConstEnum = 128, ->ConstEnum : SymbolFlags - - RegularEnum = 256, ->RegularEnum : SymbolFlags - - ValueModule = 512, ->ValueModule : SymbolFlags - - NamespaceModule = 1024, ->NamespaceModule : SymbolFlags - - TypeLiteral = 2048, ->TypeLiteral : SymbolFlags - - ObjectLiteral = 4096, ->ObjectLiteral : SymbolFlags - - Method = 8192, ->Method : SymbolFlags - - Constructor = 16384, ->Constructor : SymbolFlags - - GetAccessor = 32768, ->GetAccessor : SymbolFlags - - SetAccessor = 65536, ->SetAccessor : SymbolFlags - - CallSignature = 131072, ->CallSignature : SymbolFlags - - ConstructSignature = 262144, ->ConstructSignature : SymbolFlags - - IndexSignature = 524288, ->IndexSignature : SymbolFlags - - TypeParameter = 1048576, ->TypeParameter : SymbolFlags - - TypeAlias = 2097152, ->TypeAlias : SymbolFlags - - ExportValue = 4194304, ->ExportValue : SymbolFlags - - ExportType = 8388608, ->ExportType : SymbolFlags - - ExportNamespace = 16777216, ->ExportNamespace : SymbolFlags - - Import = 33554432, ->Import : SymbolFlags - - Instantiated = 67108864, ->Instantiated : SymbolFlags - - Merged = 134217728, ->Merged : SymbolFlags - - Transient = 268435456, ->Transient : SymbolFlags - - Prototype = 536870912, ->Prototype : SymbolFlags - - UnionProperty = 1073741824, ->UnionProperty : SymbolFlags - - Enum = 384, ->Enum : SymbolFlags - - Variable = 3, ->Variable : SymbolFlags - - Value = 107455, ->Value : SymbolFlags - - Type = 3152352, ->Type : SymbolFlags - - Namespace = 1536, ->Namespace : SymbolFlags - - Module = 1536, ->Module : SymbolFlags - - Accessor = 98304, ->Accessor : SymbolFlags - - Signature = 917504, ->Signature : SymbolFlags - - FunctionScopedVariableExcludes = 107454, ->FunctionScopedVariableExcludes : SymbolFlags - - BlockScopedVariableExcludes = 107455, ->BlockScopedVariableExcludes : SymbolFlags - - ParameterExcludes = 107455, ->ParameterExcludes : SymbolFlags - - PropertyExcludes = 107455, ->PropertyExcludes : SymbolFlags - - EnumMemberExcludes = 107455, ->EnumMemberExcludes : SymbolFlags - - FunctionExcludes = 106927, ->FunctionExcludes : SymbolFlags - - ClassExcludes = 3258879, ->ClassExcludes : SymbolFlags - - InterfaceExcludes = 3152288, ->InterfaceExcludes : SymbolFlags - - RegularEnumExcludes = 3258623, ->RegularEnumExcludes : SymbolFlags - - ConstEnumExcludes = 3259263, ->ConstEnumExcludes : SymbolFlags - - ValueModuleExcludes = 106639, ->ValueModuleExcludes : SymbolFlags - - NamespaceModuleExcludes = 0, ->NamespaceModuleExcludes : SymbolFlags - - MethodExcludes = 99263, ->MethodExcludes : SymbolFlags - - GetAccessorExcludes = 41919, ->GetAccessorExcludes : SymbolFlags - - SetAccessorExcludes = 74687, ->SetAccessorExcludes : SymbolFlags - - TypeParameterExcludes = 2103776, ->TypeParameterExcludes : SymbolFlags - - TypeAliasExcludes = 3152352, ->TypeAliasExcludes : SymbolFlags - - ImportExcludes = 33554432, ->ImportExcludes : SymbolFlags - - ModuleMember = 35653619, ->ModuleMember : SymbolFlags - - ExportHasLocal = 944, ->ExportHasLocal : SymbolFlags - - HasLocals = 1041936, ->HasLocals : SymbolFlags - - HasExports = 1952, ->HasExports : SymbolFlags - - HasMembers = 6240, ->HasMembers : SymbolFlags - - IsContainer = 1048560, ->IsContainer : SymbolFlags - - PropertyOrAccessor = 98308, ->PropertyOrAccessor : SymbolFlags - - Export = 29360128, ->Export : SymbolFlags - } - interface Symbol { ->Symbol : Symbol - - flags: SymbolFlags; ->flags : SymbolFlags ->SymbolFlags : SymbolFlags - - name: string; ->name : string - - id?: number; ->id : number - - mergeId?: number; ->mergeId : number - - declarations?: Declaration[]; ->declarations : Declaration[] ->Declaration : Declaration - - parent?: Symbol; ->parent : Symbol ->Symbol : Symbol - - members?: SymbolTable; ->members : SymbolTable ->SymbolTable : SymbolTable - - exports?: SymbolTable; ->exports : SymbolTable ->SymbolTable : SymbolTable - - exportSymbol?: Symbol; ->exportSymbol : Symbol ->Symbol : Symbol - - valueDeclaration?: Declaration; ->valueDeclaration : Declaration ->Declaration : Declaration - - constEnumOnlyModule?: boolean; ->constEnumOnlyModule : boolean - } - interface SymbolLinks { ->SymbolLinks : SymbolLinks - - target?: Symbol; ->target : Symbol ->Symbol : Symbol - - type?: Type; ->type : Type ->Type : Type - - declaredType?: Type; ->declaredType : Type ->Type : Type - - mapper?: TypeMapper; ->mapper : TypeMapper ->TypeMapper : TypeMapper - - referenced?: boolean; ->referenced : boolean - - exportAssignSymbol?: Symbol; ->exportAssignSymbol : Symbol ->Symbol : Symbol - - unionType?: UnionType; ->unionType : UnionType ->UnionType : UnionType - } - interface TransientSymbol extends Symbol, SymbolLinks { ->TransientSymbol : TransientSymbol ->Symbol : Symbol ->SymbolLinks : SymbolLinks - } - interface SymbolTable { ->SymbolTable : SymbolTable - - [index: string]: Symbol; ->index : string ->Symbol : Symbol - } - const enum NodeCheckFlags { ->NodeCheckFlags : NodeCheckFlags - - TypeChecked = 1, ->TypeChecked : NodeCheckFlags - - LexicalThis = 2, ->LexicalThis : NodeCheckFlags - - CaptureThis = 4, ->CaptureThis : NodeCheckFlags - - EmitExtends = 8, ->EmitExtends : NodeCheckFlags - - SuperInstance = 16, ->SuperInstance : NodeCheckFlags - - SuperStatic = 32, ->SuperStatic : NodeCheckFlags - - ContextChecked = 64, ->ContextChecked : NodeCheckFlags - - EnumValuesComputed = 128, ->EnumValuesComputed : NodeCheckFlags - } - interface NodeLinks { ->NodeLinks : NodeLinks - - resolvedType?: Type; ->resolvedType : Type ->Type : Type - - resolvedSignature?: Signature; ->resolvedSignature : Signature ->Signature : Signature - - resolvedSymbol?: Symbol; ->resolvedSymbol : Symbol ->Symbol : Symbol - - flags?: NodeCheckFlags; ->flags : NodeCheckFlags ->NodeCheckFlags : NodeCheckFlags - - enumMemberValue?: number; ->enumMemberValue : number - - isIllegalTypeReferenceInConstraint?: boolean; ->isIllegalTypeReferenceInConstraint : boolean - - isVisible?: boolean; ->isVisible : boolean - - localModuleName?: string; ->localModuleName : string - - assignmentChecks?: Map; ->assignmentChecks : Map ->Map : Map - } - const enum TypeFlags { ->TypeFlags : TypeFlags - - Any = 1, ->Any : TypeFlags - - String = 2, ->String : TypeFlags - - Number = 4, ->Number : TypeFlags - - Boolean = 8, ->Boolean : TypeFlags - - Void = 16, ->Void : TypeFlags - - Undefined = 32, ->Undefined : TypeFlags - - Null = 64, ->Null : TypeFlags - - Enum = 128, ->Enum : TypeFlags - - StringLiteral = 256, ->StringLiteral : TypeFlags - - TypeParameter = 512, ->TypeParameter : TypeFlags - - Class = 1024, ->Class : TypeFlags - - Interface = 2048, ->Interface : TypeFlags - - Reference = 4096, ->Reference : TypeFlags - - Tuple = 8192, ->Tuple : TypeFlags - - Union = 16384, ->Union : TypeFlags - - Anonymous = 32768, ->Anonymous : TypeFlags - - FromSignature = 65536, ->FromSignature : TypeFlags - - Intrinsic = 127, ->Intrinsic : TypeFlags - - StringLike = 258, ->StringLike : TypeFlags - - NumberLike = 132, ->NumberLike : TypeFlags - - ObjectType = 48128, ->ObjectType : TypeFlags - } - interface Type { ->Type : Type - - flags: TypeFlags; ->flags : TypeFlags ->TypeFlags : TypeFlags - - id: number; ->id : number - - symbol?: Symbol; ->symbol : Symbol ->Symbol : Symbol - } - interface IntrinsicType extends Type { ->IntrinsicType : IntrinsicType ->Type : Type - - intrinsicName: string; ->intrinsicName : string - } - interface StringLiteralType extends Type { ->StringLiteralType : StringLiteralType ->Type : Type - - text: string; ->text : string - } - interface ObjectType extends Type { ->ObjectType : ObjectType ->Type : Type - } - interface InterfaceType extends ObjectType { ->InterfaceType : InterfaceType ->ObjectType : ObjectType - - typeParameters: TypeParameter[]; ->typeParameters : TypeParameter[] ->TypeParameter : TypeParameter - - baseTypes: ObjectType[]; ->baseTypes : ObjectType[] ->ObjectType : ObjectType - - declaredProperties: Symbol[]; ->declaredProperties : Symbol[] ->Symbol : Symbol - - declaredCallSignatures: Signature[]; ->declaredCallSignatures : Signature[] ->Signature : Signature - - declaredConstructSignatures: Signature[]; ->declaredConstructSignatures : Signature[] ->Signature : Signature - - declaredStringIndexType: Type; ->declaredStringIndexType : Type ->Type : Type - - declaredNumberIndexType: Type; ->declaredNumberIndexType : Type ->Type : Type - } - interface TypeReference extends ObjectType { ->TypeReference : TypeReference ->ObjectType : ObjectType - - target: GenericType; ->target : GenericType ->GenericType : GenericType - - typeArguments: Type[]; ->typeArguments : Type[] ->Type : Type - } - interface GenericType extends InterfaceType, TypeReference { ->GenericType : GenericType ->InterfaceType : InterfaceType ->TypeReference : TypeReference - - instantiations: Map; ->instantiations : Map ->Map : Map ->TypeReference : TypeReference - - openReferenceTargets: GenericType[]; ->openReferenceTargets : GenericType[] ->GenericType : GenericType - - openReferenceChecks: Map; ->openReferenceChecks : Map ->Map : Map - } - interface TupleType extends ObjectType { ->TupleType : TupleType ->ObjectType : ObjectType - - elementTypes: Type[]; ->elementTypes : Type[] ->Type : Type - - baseArrayType: TypeReference; ->baseArrayType : TypeReference ->TypeReference : TypeReference - } - interface UnionType extends Type { ->UnionType : UnionType ->Type : Type - - types: Type[]; ->types : Type[] ->Type : Type - - resolvedProperties: SymbolTable; ->resolvedProperties : SymbolTable ->SymbolTable : SymbolTable - } - interface ResolvedType extends ObjectType, UnionType { ->ResolvedType : ResolvedType ->ObjectType : ObjectType ->UnionType : UnionType - - members: SymbolTable; ->members : SymbolTable ->SymbolTable : SymbolTable - - properties: Symbol[]; ->properties : Symbol[] ->Symbol : Symbol - - callSignatures: Signature[]; ->callSignatures : Signature[] ->Signature : Signature - - constructSignatures: Signature[]; ->constructSignatures : Signature[] ->Signature : Signature - - stringIndexType: Type; ->stringIndexType : Type ->Type : Type - - numberIndexType: Type; ->numberIndexType : Type ->Type : Type - } - interface TypeParameter extends Type { ->TypeParameter : TypeParameter ->Type : Type - - constraint: Type; ->constraint : Type ->Type : Type - - target?: TypeParameter; ->target : TypeParameter ->TypeParameter : TypeParameter - - mapper?: TypeMapper; ->mapper : TypeMapper ->TypeMapper : TypeMapper - } - const enum SignatureKind { ->SignatureKind : SignatureKind - - Call = 0, ->Call : SignatureKind - - Construct = 1, ->Construct : SignatureKind - } - interface Signature { ->Signature : Signature - - declaration: SignatureDeclaration; ->declaration : SignatureDeclaration ->SignatureDeclaration : SignatureDeclaration - - typeParameters: TypeParameter[]; ->typeParameters : TypeParameter[] ->TypeParameter : TypeParameter - - parameters: Symbol[]; ->parameters : Symbol[] ->Symbol : Symbol - - resolvedReturnType: Type; ->resolvedReturnType : Type ->Type : Type - - minArgumentCount: number; ->minArgumentCount : number - - hasRestParameter: boolean; ->hasRestParameter : boolean - - hasStringLiterals: boolean; ->hasStringLiterals : boolean - - target?: Signature; ->target : Signature ->Signature : Signature - - mapper?: TypeMapper; ->mapper : TypeMapper ->TypeMapper : TypeMapper - - unionSignatures?: Signature[]; ->unionSignatures : Signature[] ->Signature : Signature - - erasedSignatureCache?: Signature; ->erasedSignatureCache : Signature ->Signature : Signature - - isolatedSignatureType?: ObjectType; ->isolatedSignatureType : ObjectType ->ObjectType : ObjectType - } - const enum IndexKind { ->IndexKind : IndexKind - - String = 0, ->String : IndexKind - - Number = 1, ->Number : IndexKind - } - interface TypeMapper { ->TypeMapper : TypeMapper - - (t: Type): Type; ->t : Type ->Type : Type ->Type : Type - } - interface TypeInferences { ->TypeInferences : TypeInferences - - primary: Type[]; ->primary : Type[] ->Type : Type - - secondary: Type[]; ->secondary : Type[] ->Type : Type - } - interface InferenceContext { ->InferenceContext : InferenceContext - - typeParameters: TypeParameter[]; ->typeParameters : TypeParameter[] ->TypeParameter : TypeParameter - - inferUnionTypes: boolean; ->inferUnionTypes : boolean - - inferences: TypeInferences[]; ->inferences : TypeInferences[] ->TypeInferences : TypeInferences - - inferredTypes: Type[]; ->inferredTypes : Type[] ->Type : Type - - failedTypeParameterIndex?: number; ->failedTypeParameterIndex : number - } - interface DiagnosticMessage { ->DiagnosticMessage : DiagnosticMessage - - key: string; ->key : string - - category: DiagnosticCategory; ->category : DiagnosticCategory ->DiagnosticCategory : DiagnosticCategory - - code: number; ->code : number - - isEarly?: boolean; ->isEarly : boolean - } - interface DiagnosticMessageChain { ->DiagnosticMessageChain : DiagnosticMessageChain - - messageText: string; ->messageText : string - - category: DiagnosticCategory; ->category : DiagnosticCategory ->DiagnosticCategory : DiagnosticCategory - - code: number; ->code : number - - next?: DiagnosticMessageChain; ->next : DiagnosticMessageChain ->DiagnosticMessageChain : DiagnosticMessageChain - } - interface Diagnostic { ->Diagnostic : Diagnostic - - file: SourceFile; ->file : SourceFile ->SourceFile : SourceFile - - start: number; ->start : number - - length: number; ->length : number - - messageText: string; ->messageText : string - - category: DiagnosticCategory; ->category : DiagnosticCategory ->DiagnosticCategory : DiagnosticCategory - - code: number; ->code : number - - /** - * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit - */ - isEarly?: boolean; ->isEarly : boolean - } - enum DiagnosticCategory { ->DiagnosticCategory : DiagnosticCategory - - Warning = 0, ->Warning : DiagnosticCategory - - Error = 1, ->Error : DiagnosticCategory - - Message = 2, ->Message : DiagnosticCategory - } - interface CompilerOptions { ->CompilerOptions : CompilerOptions - - allowNonTsExtensions?: boolean; ->allowNonTsExtensions : boolean - - charset?: string; ->charset : string - - codepage?: number; ->codepage : number - - declaration?: boolean; ->declaration : boolean - - diagnostics?: boolean; ->diagnostics : boolean - - emitBOM?: boolean; ->emitBOM : boolean - - help?: boolean; ->help : boolean - - locale?: string; ->locale : string - - mapRoot?: string; ->mapRoot : string - - module?: ModuleKind; ->module : ModuleKind ->ModuleKind : ModuleKind - - noEmitOnError?: boolean; ->noEmitOnError : boolean - - noErrorTruncation?: boolean; ->noErrorTruncation : boolean - - noImplicitAny?: boolean; ->noImplicitAny : boolean - - noLib?: boolean; ->noLib : boolean - - noLibCheck?: boolean; ->noLibCheck : boolean - - noResolve?: boolean; ->noResolve : boolean - - out?: string; ->out : string - - outDir?: string; ->outDir : string - - preserveConstEnums?: boolean; ->preserveConstEnums : boolean - - removeComments?: boolean; ->removeComments : boolean - - sourceMap?: boolean; ->sourceMap : boolean - - sourceRoot?: string; ->sourceRoot : string - - suppressImplicitAnyIndexErrors?: boolean; ->suppressImplicitAnyIndexErrors : boolean - - target?: ScriptTarget; ->target : ScriptTarget ->ScriptTarget : ScriptTarget - - version?: boolean; ->version : boolean - - watch?: boolean; ->watch : boolean - - [option: string]: string | number | boolean; ->option : string - } - const enum ModuleKind { ->ModuleKind : ModuleKind - - None = 0, ->None : ModuleKind - - CommonJS = 1, ->CommonJS : ModuleKind - - AMD = 2, ->AMD : ModuleKind - } - interface LineAndCharacter { ->LineAndCharacter : LineAndCharacter - - line: number; ->line : number - - character: number; ->character : number - } - const enum ScriptTarget { ->ScriptTarget : ScriptTarget - - ES3 = 0, ->ES3 : ScriptTarget - - ES5 = 1, ->ES5 : ScriptTarget - - ES6 = 2, ->ES6 : ScriptTarget - - Latest = 2, ->Latest : ScriptTarget - } - interface ParsedCommandLine { ->ParsedCommandLine : ParsedCommandLine - - options: CompilerOptions; ->options : CompilerOptions ->CompilerOptions : CompilerOptions - - filenames: string[]; ->filenames : string[] - - errors: Diagnostic[]; ->errors : Diagnostic[] ->Diagnostic : Diagnostic - } - interface CommandLineOption { ->CommandLineOption : CommandLineOption - - name: string; ->name : string - - type: string | Map; ->type : string | Map ->Map : Map - - shortName?: string; ->shortName : string - - description?: DiagnosticMessage; ->description : DiagnosticMessage ->DiagnosticMessage : DiagnosticMessage - - paramType?: DiagnosticMessage; ->paramType : DiagnosticMessage ->DiagnosticMessage : DiagnosticMessage - - error?: DiagnosticMessage; ->error : DiagnosticMessage ->DiagnosticMessage : DiagnosticMessage - } - const enum CharacterCodes { ->CharacterCodes : CharacterCodes - - nullCharacter = 0, ->nullCharacter : CharacterCodes - - maxAsciiCharacter = 127, ->maxAsciiCharacter : CharacterCodes - - lineFeed = 10, ->lineFeed : CharacterCodes - - carriageReturn = 13, ->carriageReturn : CharacterCodes - - lineSeparator = 8232, ->lineSeparator : CharacterCodes - - paragraphSeparator = 8233, ->paragraphSeparator : CharacterCodes - - nextLine = 133, ->nextLine : CharacterCodes - - space = 32, ->space : CharacterCodes - - nonBreakingSpace = 160, ->nonBreakingSpace : CharacterCodes - - enQuad = 8192, ->enQuad : CharacterCodes - - emQuad = 8193, ->emQuad : CharacterCodes - - enSpace = 8194, ->enSpace : CharacterCodes - - emSpace = 8195, ->emSpace : CharacterCodes - - threePerEmSpace = 8196, ->threePerEmSpace : CharacterCodes - - fourPerEmSpace = 8197, ->fourPerEmSpace : CharacterCodes - - sixPerEmSpace = 8198, ->sixPerEmSpace : CharacterCodes - - figureSpace = 8199, ->figureSpace : CharacterCodes - - punctuationSpace = 8200, ->punctuationSpace : CharacterCodes - - thinSpace = 8201, ->thinSpace : CharacterCodes - - hairSpace = 8202, ->hairSpace : CharacterCodes - - zeroWidthSpace = 8203, ->zeroWidthSpace : CharacterCodes - - narrowNoBreakSpace = 8239, ->narrowNoBreakSpace : CharacterCodes - - ideographicSpace = 12288, ->ideographicSpace : CharacterCodes - - mathematicalSpace = 8287, ->mathematicalSpace : CharacterCodes - - ogham = 5760, ->ogham : CharacterCodes - - _ = 95, ->_ : CharacterCodes - - $ = 36, ->$ : CharacterCodes - - _0 = 48, ->_0 : CharacterCodes - - _1 = 49, ->_1 : CharacterCodes - - _2 = 50, ->_2 : CharacterCodes - - _3 = 51, ->_3 : CharacterCodes - - _4 = 52, ->_4 : CharacterCodes - - _5 = 53, ->_5 : CharacterCodes - - _6 = 54, ->_6 : CharacterCodes - - _7 = 55, ->_7 : CharacterCodes - - _8 = 56, ->_8 : CharacterCodes - - _9 = 57, ->_9 : CharacterCodes - - a = 97, ->a : CharacterCodes - - b = 98, ->b : CharacterCodes - - c = 99, ->c : CharacterCodes - - d = 100, ->d : CharacterCodes - - e = 101, ->e : CharacterCodes - - f = 102, ->f : CharacterCodes - - g = 103, ->g : CharacterCodes - - h = 104, ->h : CharacterCodes - - i = 105, ->i : CharacterCodes - - j = 106, ->j : CharacterCodes - - k = 107, ->k : CharacterCodes - - l = 108, ->l : CharacterCodes - - m = 109, ->m : CharacterCodes - - n = 110, ->n : CharacterCodes - - o = 111, ->o : CharacterCodes - - p = 112, ->p : CharacterCodes - - q = 113, ->q : CharacterCodes - - r = 114, ->r : CharacterCodes - - s = 115, ->s : CharacterCodes - - t = 116, ->t : CharacterCodes - - u = 117, ->u : CharacterCodes - - v = 118, ->v : CharacterCodes - - w = 119, ->w : CharacterCodes - - x = 120, ->x : CharacterCodes - - y = 121, ->y : CharacterCodes - - z = 122, ->z : CharacterCodes - - A = 65, ->A : CharacterCodes - - B = 66, ->B : CharacterCodes - - C = 67, ->C : CharacterCodes - - D = 68, ->D : CharacterCodes - - E = 69, ->E : CharacterCodes - - F = 70, ->F : CharacterCodes - - G = 71, ->G : CharacterCodes - - H = 72, ->H : CharacterCodes - - I = 73, ->I : CharacterCodes - - J = 74, ->J : CharacterCodes - - K = 75, ->K : CharacterCodes - - L = 76, ->L : CharacterCodes - - M = 77, ->M : CharacterCodes - - N = 78, ->N : CharacterCodes - - O = 79, ->O : CharacterCodes - - P = 80, ->P : CharacterCodes - - Q = 81, ->Q : CharacterCodes - - R = 82, ->R : CharacterCodes - - S = 83, ->S : CharacterCodes - - T = 84, ->T : CharacterCodes - - U = 85, ->U : CharacterCodes - - V = 86, ->V : CharacterCodes - - W = 87, ->W : CharacterCodes - - X = 88, ->X : CharacterCodes - - Y = 89, ->Y : CharacterCodes - - Z = 90, ->Z : CharacterCodes - - ampersand = 38, ->ampersand : CharacterCodes - - asterisk = 42, ->asterisk : CharacterCodes - - at = 64, ->at : CharacterCodes - - backslash = 92, ->backslash : CharacterCodes - - backtick = 96, ->backtick : CharacterCodes - - bar = 124, ->bar : CharacterCodes - - caret = 94, ->caret : CharacterCodes - - closeBrace = 125, ->closeBrace : CharacterCodes - - closeBracket = 93, ->closeBracket : CharacterCodes - - closeParen = 41, ->closeParen : CharacterCodes - - colon = 58, ->colon : CharacterCodes - - comma = 44, ->comma : CharacterCodes - - dot = 46, ->dot : CharacterCodes - - doubleQuote = 34, ->doubleQuote : CharacterCodes - - equals = 61, ->equals : CharacterCodes - - exclamation = 33, ->exclamation : CharacterCodes - - greaterThan = 62, ->greaterThan : CharacterCodes - - lessThan = 60, ->lessThan : CharacterCodes - - minus = 45, ->minus : CharacterCodes - - openBrace = 123, ->openBrace : CharacterCodes - - openBracket = 91, ->openBracket : CharacterCodes - - openParen = 40, ->openParen : CharacterCodes - - percent = 37, ->percent : CharacterCodes - - plus = 43, ->plus : CharacterCodes - - question = 63, ->question : CharacterCodes - - semicolon = 59, ->semicolon : CharacterCodes - - singleQuote = 39, ->singleQuote : CharacterCodes - - slash = 47, ->slash : CharacterCodes - - tilde = 126, ->tilde : CharacterCodes - - backspace = 8, ->backspace : CharacterCodes - - formFeed = 12, ->formFeed : CharacterCodes - - byteOrderMark = 65279, ->byteOrderMark : CharacterCodes - - tab = 9, ->tab : CharacterCodes - - verticalTab = 11, ->verticalTab : CharacterCodes - } - interface CancellationToken { ->CancellationToken : CancellationToken - - isCancellationRequested(): boolean; ->isCancellationRequested : () => boolean - } - interface CompilerHost { ->CompilerHost : CompilerHost - - getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; ->getSourceFile : (filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void) => SourceFile ->filename : string ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget ->onError : (message: string) => void ->message : string ->SourceFile : SourceFile - - getDefaultLibFilename(options: CompilerOptions): string; ->getDefaultLibFilename : (options: CompilerOptions) => string ->options : CompilerOptions ->CompilerOptions : CompilerOptions - - getCancellationToken?(): CancellationToken; ->getCancellationToken : () => CancellationToken ->CancellationToken : CancellationToken - - writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; ->writeFile : (filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void) => void ->filename : string ->data : string ->writeByteOrderMark : boolean ->onError : (message: string) => void ->message : string - - getCurrentDirectory(): string; ->getCurrentDirectory : () => string - - getCanonicalFileName(fileName: string): string; ->getCanonicalFileName : (fileName: string) => string ->fileName : string - - useCaseSensitiveFileNames(): boolean; ->useCaseSensitiveFileNames : () => boolean - - getNewLine(): string; ->getNewLine : () => string - } -} -declare module "typescript" { - interface ErrorCallback { ->ErrorCallback : ErrorCallback - - (message: DiagnosticMessage): void; ->message : DiagnosticMessage ->DiagnosticMessage : DiagnosticMessage - } - interface CommentCallback { ->CommentCallback : CommentCallback - - (pos: number, end: number): void; ->pos : number ->end : number - } - interface Scanner { ->Scanner : Scanner - - getStartPos(): number; ->getStartPos : () => number - - getToken(): SyntaxKind; ->getToken : () => SyntaxKind ->SyntaxKind : SyntaxKind - - getTextPos(): number; ->getTextPos : () => number - - getTokenPos(): number; ->getTokenPos : () => number - - getTokenText(): string; ->getTokenText : () => string - - getTokenValue(): string; ->getTokenValue : () => string - - hasPrecedingLineBreak(): boolean; ->hasPrecedingLineBreak : () => boolean - - isIdentifier(): boolean; ->isIdentifier : () => boolean - - isReservedWord(): boolean; ->isReservedWord : () => boolean - - isUnterminated(): boolean; ->isUnterminated : () => boolean - - reScanGreaterToken(): SyntaxKind; ->reScanGreaterToken : () => SyntaxKind ->SyntaxKind : SyntaxKind - - reScanSlashToken(): SyntaxKind; ->reScanSlashToken : () => SyntaxKind ->SyntaxKind : SyntaxKind - - reScanTemplateToken(): SyntaxKind; ->reScanTemplateToken : () => SyntaxKind ->SyntaxKind : SyntaxKind - - scan(): SyntaxKind; ->scan : () => SyntaxKind ->SyntaxKind : SyntaxKind - - setText(text: string): void; ->setText : (text: string) => void ->text : string - - setTextPos(textPos: number): void; ->setTextPos : (textPos: number) => void ->textPos : number - - lookAhead(callback: () => T): T; ->lookAhead : (callback: () => T) => T ->T : T ->callback : () => T ->T : T ->T : T - - tryScan(callback: () => T): T; ->tryScan : (callback: () => T) => T ->T : T ->callback : () => T ->T : T ->T : T - } - function tokenToString(t: SyntaxKind): string; ->tokenToString : (t: SyntaxKind) => string ->t : SyntaxKind ->SyntaxKind : SyntaxKind - - function computeLineStarts(text: string): number[]; ->computeLineStarts : (text: string) => number[] ->text : string - - function getPositionFromLineAndCharacter(lineStarts: number[], line: number, character: number): number; ->getPositionFromLineAndCharacter : (lineStarts: number[], line: number, character: number) => number ->lineStarts : number[] ->line : number ->character : number - - function getLineAndCharacterOfPosition(lineStarts: number[], position: number): { ->getLineAndCharacterOfPosition : (lineStarts: number[], position: number) => { line: number; character: number; } ->lineStarts : number[] ->position : number - - line: number; ->line : number - - character: number; ->character : number - - }; - function positionToLineAndCharacter(text: string, pos: number): { ->positionToLineAndCharacter : (text: string, pos: number) => { line: number; character: number; } ->text : string ->pos : number - - line: number; ->line : number - - character: number; ->character : number - - }; - function isWhiteSpace(ch: number): boolean; ->isWhiteSpace : (ch: number) => boolean ->ch : number - - function isLineBreak(ch: number): boolean; ->isLineBreak : (ch: number) => boolean ->ch : number - - function isOctalDigit(ch: number): boolean; ->isOctalDigit : (ch: number) => boolean ->ch : number - - function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean): number; ->skipTrivia : (text: string, pos: number, stopAfterLineBreak?: boolean) => number ->text : string ->pos : number ->stopAfterLineBreak : boolean - - function getLeadingCommentRanges(text: string, pos: number): CommentRange[]; ->getLeadingCommentRanges : (text: string, pos: number) => CommentRange[] ->text : string ->pos : number ->CommentRange : CommentRange - - function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; ->getTrailingCommentRanges : (text: string, pos: number) => CommentRange[] ->text : string ->pos : number ->CommentRange : CommentRange - - function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; ->isIdentifierStart : (ch: number, languageVersion: ScriptTarget) => boolean ->ch : number ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget - - function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; ->isIdentifierPart : (ch: number, languageVersion: ScriptTarget) => boolean ->ch : number ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget - - function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner; ->createScanner : (languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback) => Scanner ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget ->skipTrivia : boolean ->text : string ->onError : ErrorCallback ->ErrorCallback : ErrorCallback ->Scanner : Scanner -} -declare module "typescript" { - function getNodeConstructor(kind: SyntaxKind): new () => Node; ->getNodeConstructor : (kind: SyntaxKind) => new () => Node ->kind : SyntaxKind ->SyntaxKind : SyntaxKind ->Node : Node - - function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; ->forEachChild : (node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T) => T ->T : T ->node : Node ->Node : Node ->cbNode : (node: Node) => T ->node : Node ->Node : Node ->T : T ->cbNodes : (nodes: Node[]) => T ->nodes : Node[] ->Node : Node ->T : T ->T : T - - function createCompilerHost(options: CompilerOptions): CompilerHost; ->createCompilerHost : (options: CompilerOptions) => CompilerHost ->options : CompilerOptions ->CompilerOptions : CompilerOptions ->CompilerHost : CompilerHost - - function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; ->createSourceFile : (filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean) => SourceFile ->filename : string ->sourceText : string ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget ->version : string ->isOpen : boolean ->SourceFile : SourceFile - - function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; ->createProgram : (rootNames: string[], options: CompilerOptions, host: CompilerHost) => Program ->rootNames : string[] ->options : CompilerOptions ->CompilerOptions : CompilerOptions ->host : CompilerHost ->CompilerHost : CompilerHost ->Program : Program -} -declare module "typescript" { - function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; ->createTypeChecker : (program: Program, fullTypeCheck: boolean) => TypeChecker ->program : Program ->Program : Program ->fullTypeCheck : boolean ->TypeChecker : TypeChecker -} -declare module "typescript" { - var servicesVersion: string; ->servicesVersion : string - - interface Node { ->Node : Node - - getSourceFile(): SourceFile; ->getSourceFile : () => SourceFile ->SourceFile : SourceFile - - getChildCount(sourceFile?: SourceFile): number; ->getChildCount : (sourceFile?: SourceFile) => number ->sourceFile : SourceFile ->SourceFile : SourceFile - - getChildAt(index: number, sourceFile?: SourceFile): Node; ->getChildAt : (index: number, sourceFile?: SourceFile) => Node ->index : number ->sourceFile : SourceFile ->SourceFile : SourceFile ->Node : Node - - getChildren(sourceFile?: SourceFile): Node[]; ->getChildren : (sourceFile?: SourceFile) => Node[] ->sourceFile : SourceFile ->SourceFile : SourceFile ->Node : Node - - getStart(sourceFile?: SourceFile): number; ->getStart : (sourceFile?: SourceFile) => number ->sourceFile : SourceFile ->SourceFile : SourceFile - - getFullStart(): number; ->getFullStart : () => number - - getEnd(): number; ->getEnd : () => number - - getWidth(sourceFile?: SourceFile): number; ->getWidth : (sourceFile?: SourceFile) => number ->sourceFile : SourceFile ->SourceFile : SourceFile - - getFullWidth(): number; ->getFullWidth : () => number - - getLeadingTriviaWidth(sourceFile?: SourceFile): number; ->getLeadingTriviaWidth : (sourceFile?: SourceFile) => number ->sourceFile : SourceFile ->SourceFile : SourceFile - - getFullText(sourceFile?: SourceFile): string; ->getFullText : (sourceFile?: SourceFile) => string ->sourceFile : SourceFile ->SourceFile : SourceFile - - getText(sourceFile?: SourceFile): string; ->getText : (sourceFile?: SourceFile) => string ->sourceFile : SourceFile ->SourceFile : SourceFile - - getFirstToken(sourceFile?: SourceFile): Node; ->getFirstToken : (sourceFile?: SourceFile) => Node ->sourceFile : SourceFile ->SourceFile : SourceFile ->Node : Node - - getLastToken(sourceFile?: SourceFile): Node; ->getLastToken : (sourceFile?: SourceFile) => Node ->sourceFile : SourceFile ->SourceFile : SourceFile ->Node : Node - } - interface Symbol { ->Symbol : Symbol - - getFlags(): SymbolFlags; ->getFlags : () => SymbolFlags ->SymbolFlags : SymbolFlags - - getName(): string; ->getName : () => string - - getDeclarations(): Declaration[]; ->getDeclarations : () => Declaration[] ->Declaration : Declaration - - getDocumentationComment(): SymbolDisplayPart[]; ->getDocumentationComment : () => SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - interface Type { ->Type : Type - - getFlags(): TypeFlags; ->getFlags : () => TypeFlags ->TypeFlags : TypeFlags - - getSymbol(): Symbol; ->getSymbol : () => Symbol ->Symbol : Symbol - - getProperties(): Symbol[]; ->getProperties : () => Symbol[] ->Symbol : Symbol - - getProperty(propertyName: string): Symbol; ->getProperty : (propertyName: string) => Symbol ->propertyName : string ->Symbol : Symbol - - getApparentProperties(): Symbol[]; ->getApparentProperties : () => Symbol[] ->Symbol : Symbol - - getCallSignatures(): Signature[]; ->getCallSignatures : () => Signature[] ->Signature : Signature - - getConstructSignatures(): Signature[]; ->getConstructSignatures : () => Signature[] ->Signature : Signature - - getStringIndexType(): Type; ->getStringIndexType : () => Type ->Type : Type - - getNumberIndexType(): Type; ->getNumberIndexType : () => Type ->Type : Type - } - interface Signature { ->Signature : Signature - - getDeclaration(): SignatureDeclaration; ->getDeclaration : () => SignatureDeclaration ->SignatureDeclaration : SignatureDeclaration - - getTypeParameters(): Type[]; ->getTypeParameters : () => Type[] ->Type : Type - - getParameters(): Symbol[]; ->getParameters : () => Symbol[] ->Symbol : Symbol - - getReturnType(): Type; ->getReturnType : () => Type ->Type : Type - - getDocumentationComment(): SymbolDisplayPart[]; ->getDocumentationComment : () => SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - interface SourceFile { ->SourceFile : SourceFile - - getScriptSnapshot(): IScriptSnapshot; ->getScriptSnapshot : () => IScriptSnapshot ->IScriptSnapshot : IScriptSnapshot - - getNamedDeclarations(): Declaration[]; ->getNamedDeclarations : () => Declaration[] ->Declaration : Declaration - - update(scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; ->update : (scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange) => SourceFile ->scriptSnapshot : IScriptSnapshot ->IScriptSnapshot : IScriptSnapshot ->version : string ->isOpen : boolean ->textChangeRange : TextChangeRange ->TextChangeRange : TextChangeRange ->SourceFile : SourceFile - } - /** - * Represents an immutable snapshot of a script at a specified time.Once acquired, the - * snapshot is observably immutable. i.e. the same calls with the same parameters will return - * the same values. - */ - interface IScriptSnapshot { ->IScriptSnapshot : IScriptSnapshot - - /** Gets a portion of the script snapshot specified by [start, end). */ - getText(start: number, end: number): string; ->getText : (start: number, end: number) => string ->start : number ->end : number - - /** Gets the length of this script snapshot. */ - getLength(): number; ->getLength : () => number - - /** - * This call returns the array containing the start position of every line. - * i.e."[0, 10, 55]". TODO: consider making this optional. The language service could - * always determine this (albeit in a more expensive manner). - */ - getLineStartPositions(): number[]; ->getLineStartPositions : () => number[] - - /** - * Gets the TextChangeRange that describe how the text changed between this text and - * an older version. This information is used by the incremental parser to determine - * what sections of the script need to be re-parsed. 'undefined' can be returned if the - * change range cannot be determined. However, in that case, incremental parsing will - * not happen and the entire document will be re - parsed. - */ - getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; ->getChangeRange : (oldSnapshot: IScriptSnapshot) => TextChangeRange ->oldSnapshot : IScriptSnapshot ->IScriptSnapshot : IScriptSnapshot ->TextChangeRange : TextChangeRange - } - module ScriptSnapshot { ->ScriptSnapshot : typeof ScriptSnapshot - - function fromString(text: string): IScriptSnapshot; ->fromString : (text: string) => IScriptSnapshot ->text : string ->IScriptSnapshot : IScriptSnapshot - } - interface PreProcessedFileInfo { ->PreProcessedFileInfo : PreProcessedFileInfo - - referencedFiles: FileReference[]; ->referencedFiles : FileReference[] ->FileReference : FileReference - - importedFiles: FileReference[]; ->importedFiles : FileReference[] ->FileReference : FileReference - - isLibFile: boolean; ->isLibFile : boolean - } - interface Logger { ->Logger : Logger - - log(s: string): void; ->log : (s: string) => void ->s : string - } - interface LanguageServiceHost extends Logger { ->LanguageServiceHost : LanguageServiceHost ->Logger : Logger - - getCompilationSettings(): CompilerOptions; ->getCompilationSettings : () => CompilerOptions ->CompilerOptions : CompilerOptions - - getScriptFileNames(): string[]; ->getScriptFileNames : () => string[] - - getScriptVersion(fileName: string): string; ->getScriptVersion : (fileName: string) => string ->fileName : string - - getScriptIsOpen(fileName: string): boolean; ->getScriptIsOpen : (fileName: string) => boolean ->fileName : string - - getScriptSnapshot(fileName: string): IScriptSnapshot; ->getScriptSnapshot : (fileName: string) => IScriptSnapshot ->fileName : string ->IScriptSnapshot : IScriptSnapshot - - getLocalizedDiagnosticMessages?(): any; ->getLocalizedDiagnosticMessages : () => any - - getCancellationToken?(): CancellationToken; ->getCancellationToken : () => CancellationToken ->CancellationToken : CancellationToken - - getCurrentDirectory(): string; ->getCurrentDirectory : () => string - - getDefaultLibFilename(options: CompilerOptions): string; ->getDefaultLibFilename : (options: CompilerOptions) => string ->options : CompilerOptions ->CompilerOptions : CompilerOptions - } - interface LanguageService { ->LanguageService : LanguageService - - cleanupSemanticCache(): void; ->cleanupSemanticCache : () => void - - getSyntacticDiagnostics(fileName: string): Diagnostic[]; ->getSyntacticDiagnostics : (fileName: string) => Diagnostic[] ->fileName : string ->Diagnostic : Diagnostic - - getSemanticDiagnostics(fileName: string): Diagnostic[]; ->getSemanticDiagnostics : (fileName: string) => Diagnostic[] ->fileName : string ->Diagnostic : Diagnostic - - getCompilerOptionsDiagnostics(): Diagnostic[]; ->getCompilerOptionsDiagnostics : () => Diagnostic[] ->Diagnostic : Diagnostic - - getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; ->getSyntacticClassifications : (fileName: string, span: TextSpan) => ClassifiedSpan[] ->fileName : string ->span : TextSpan ->TextSpan : TextSpan ->ClassifiedSpan : ClassifiedSpan - - getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; ->getSemanticClassifications : (fileName: string, span: TextSpan) => ClassifiedSpan[] ->fileName : string ->span : TextSpan ->TextSpan : TextSpan ->ClassifiedSpan : ClassifiedSpan - - getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; ->getCompletionsAtPosition : (fileName: string, position: number) => CompletionInfo ->fileName : string ->position : number ->CompletionInfo : CompletionInfo - - getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; ->getCompletionEntryDetails : (fileName: string, position: number, entryName: string) => CompletionEntryDetails ->fileName : string ->position : number ->entryName : string ->CompletionEntryDetails : CompletionEntryDetails - - getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; ->getQuickInfoAtPosition : (fileName: string, position: number) => QuickInfo ->fileName : string ->position : number ->QuickInfo : QuickInfo - - getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; ->getNameOrDottedNameSpan : (fileName: string, startPos: number, endPos: number) => TextSpan ->fileName : string ->startPos : number ->endPos : number ->TextSpan : TextSpan - - getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan; ->getBreakpointStatementAtPosition : (fileName: string, position: number) => TextSpan ->fileName : string ->position : number ->TextSpan : TextSpan - - getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems; ->getSignatureHelpItems : (fileName: string, position: number) => SignatureHelpItems ->fileName : string ->position : number ->SignatureHelpItems : SignatureHelpItems - - getRenameInfo(fileName: string, position: number): RenameInfo; ->getRenameInfo : (fileName: string, position: number) => RenameInfo ->fileName : string ->position : number ->RenameInfo : RenameInfo - - findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[]; ->findRenameLocations : (fileName: string, position: number, findInStrings: boolean, findInComments: boolean) => RenameLocation[] ->fileName : string ->position : number ->findInStrings : boolean ->findInComments : boolean ->RenameLocation : RenameLocation - - getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; ->getDefinitionAtPosition : (fileName: string, position: number) => DefinitionInfo[] ->fileName : string ->position : number ->DefinitionInfo : DefinitionInfo - - getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; ->getReferencesAtPosition : (fileName: string, position: number) => ReferenceEntry[] ->fileName : string ->position : number ->ReferenceEntry : ReferenceEntry - - getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; ->getOccurrencesAtPosition : (fileName: string, position: number) => ReferenceEntry[] ->fileName : string ->position : number ->ReferenceEntry : ReferenceEntry - - getNavigateToItems(searchValue: string): NavigateToItem[]; ->getNavigateToItems : (searchValue: string) => NavigateToItem[] ->searchValue : string ->NavigateToItem : NavigateToItem - - getNavigationBarItems(fileName: string): NavigationBarItem[]; ->getNavigationBarItems : (fileName: string) => NavigationBarItem[] ->fileName : string ->NavigationBarItem : NavigationBarItem - - getOutliningSpans(fileName: string): OutliningSpan[]; ->getOutliningSpans : (fileName: string) => OutliningSpan[] ->fileName : string ->OutliningSpan : OutliningSpan - - getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; ->getTodoComments : (fileName: string, descriptors: TodoCommentDescriptor[]) => TodoComment[] ->fileName : string ->descriptors : TodoCommentDescriptor[] ->TodoCommentDescriptor : TodoCommentDescriptor ->TodoComment : TodoComment - - getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; ->getBraceMatchingAtPosition : (fileName: string, position: number) => TextSpan[] ->fileName : string ->position : number ->TextSpan : TextSpan - - getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number; ->getIndentationAtPosition : (fileName: string, position: number, options: EditorOptions) => number ->fileName : string ->position : number ->options : EditorOptions ->EditorOptions : EditorOptions - - getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[]; ->getFormattingEditsForRange : (fileName: string, start: number, end: number, options: FormatCodeOptions) => TextChange[] ->fileName : string ->start : number ->end : number ->options : FormatCodeOptions ->FormatCodeOptions : FormatCodeOptions ->TextChange : TextChange - - getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; ->getFormattingEditsForDocument : (fileName: string, options: FormatCodeOptions) => TextChange[] ->fileName : string ->options : FormatCodeOptions ->FormatCodeOptions : FormatCodeOptions ->TextChange : TextChange - - getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[]; ->getFormattingEditsAfterKeystroke : (fileName: string, position: number, key: string, options: FormatCodeOptions) => TextChange[] ->fileName : string ->position : number ->key : string ->options : FormatCodeOptions ->FormatCodeOptions : FormatCodeOptions ->TextChange : TextChange - - getEmitOutput(fileName: string): EmitOutput; ->getEmitOutput : (fileName: string) => EmitOutput ->fileName : string ->EmitOutput : EmitOutput - - getSourceFile(filename: string): SourceFile; ->getSourceFile : (filename: string) => SourceFile ->filename : string ->SourceFile : SourceFile - - dispose(): void; ->dispose : () => void - } - class TextSpan { ->TextSpan : TextSpan - - private _start; ->_start : any - - private _length; ->_length : any - - /** - * Creates a TextSpan instance beginning with the position Start and having the Length - * specified with length. - */ - constructor(start: number, length: number); ->start : number ->length : number - - toJSON(key: any): any; ->toJSON : (key: any) => any ->key : any - - start(): number; ->start : () => number - - length(): number; ->length : () => number - - end(): number; ->end : () => number - - isEmpty(): boolean; ->isEmpty : () => boolean - - /** - * Determines whether the position lies within the span. Returns true if the position is greater than or equal to Start and strictly less - * than End, otherwise false. - * @param position The position to check. - */ - containsPosition(position: number): boolean; ->containsPosition : (position: number) => boolean ->position : number - - /** - * Determines whether span falls completely within this span. Returns true if the specified span falls completely within this span, otherwise false. - * @param span The span to check. - */ - containsTextSpan(span: TextSpan): boolean; ->containsTextSpan : (span: TextSpan) => boolean ->span : TextSpan ->TextSpan : TextSpan - - /** - * Determines whether the given span overlaps this span. Two spans are considered to overlap - * if they have positions in common and neither is empty. Empty spans do not overlap with any - * other span. Returns true if the spans overlap, false otherwise. - * @param span The span to check. - */ - overlapsWith(span: TextSpan): boolean; ->overlapsWith : (span: TextSpan) => boolean ->span : TextSpan ->TextSpan : TextSpan - - /** - * Returns the overlap with the given span, or undefined if there is no overlap. - * @param span The span to check. - */ - overlap(span: TextSpan): TextSpan; ->overlap : (span: TextSpan) => TextSpan ->span : TextSpan ->TextSpan : TextSpan ->TextSpan : TextSpan - - /** - * Determines whether span intersects this span. Two spans are considered to - * intersect if they have positions in common or the end of one span - * coincides with the start of the other span. Returns true if the spans intersect, false otherwise. - * @param The span to check. - */ - intersectsWithTextSpan(span: TextSpan): boolean; ->intersectsWithTextSpan : (span: TextSpan) => boolean ->span : TextSpan ->TextSpan : TextSpan - - intersectsWith(start: number, length: number): boolean; ->intersectsWith : (start: number, length: number) => boolean ->start : number ->length : number - - /** - * Determines whether the given position intersects this span. - * A position is considered to intersect if it is between the start and - * end positions (inclusive) of this span. Returns true if the position intersects, false otherwise. - * @param position The position to check. - */ - intersectsWithPosition(position: number): boolean; ->intersectsWithPosition : (position: number) => boolean ->position : number - - /** - * Returns the intersection with the given span, or undefined if there is no intersection. - * @param span The span to check. - */ - intersection(span: TextSpan): TextSpan; ->intersection : (span: TextSpan) => TextSpan ->span : TextSpan ->TextSpan : TextSpan ->TextSpan : TextSpan - - /** - * Creates a new TextSpan from the given start and end positions - * as opposed to a position and length. - */ - static fromBounds(start: number, end: number): TextSpan; ->fromBounds : (start: number, end: number) => TextSpan ->start : number ->end : number ->TextSpan : TextSpan - } - class TextChangeRange { ->TextChangeRange : TextChangeRange - - static unchanged: TextChangeRange; ->unchanged : TextChangeRange ->TextChangeRange : TextChangeRange - - private _span; ->_span : any - - private _newLength; ->_newLength : any - - /** - * Initializes a new instance of TextChangeRange. - */ - constructor(span: TextSpan, newLength: number); ->span : TextSpan ->TextSpan : TextSpan ->newLength : number - - /** - * The span of text before the edit which is being changed - */ - span(): TextSpan; ->span : () => TextSpan ->TextSpan : TextSpan - - /** - * Width of the span after the edit. A 0 here would represent a delete - */ - newLength(): number; ->newLength : () => number - - newSpan(): TextSpan; ->newSpan : () => TextSpan ->TextSpan : TextSpan - - isUnchanged(): boolean; ->isUnchanged : () => boolean - - /** - * Called to merge all the changes that occurred across several versions of a script snapshot - * into a single change. i.e. if a user keeps making successive edits to a script we will - * have a text change from V1 to V2, V2 to V3, ..., Vn. - * - * This function will then merge those changes into a single change range valid between V1 and - * Vn. - */ - static collapseChangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; ->collapseChangesAcrossMultipleVersions : (changes: TextChangeRange[]) => TextChangeRange ->changes : TextChangeRange[] ->TextChangeRange : TextChangeRange ->TextChangeRange : TextChangeRange - } - interface ClassifiedSpan { ->ClassifiedSpan : ClassifiedSpan - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - classificationType: string; ->classificationType : string - } - interface NavigationBarItem { ->NavigationBarItem : NavigationBarItem - - text: string; ->text : string - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - - spans: TextSpan[]; ->spans : TextSpan[] ->TextSpan : TextSpan - - childItems: NavigationBarItem[]; ->childItems : NavigationBarItem[] ->NavigationBarItem : NavigationBarItem - - indent: number; ->indent : number - - bolded: boolean; ->bolded : boolean - - grayed: boolean; ->grayed : boolean - } - interface TodoCommentDescriptor { ->TodoCommentDescriptor : TodoCommentDescriptor - - text: string; ->text : string - - priority: number; ->priority : number - } - interface TodoComment { ->TodoComment : TodoComment - - descriptor: TodoCommentDescriptor; ->descriptor : TodoCommentDescriptor ->TodoCommentDescriptor : TodoCommentDescriptor - - message: string; ->message : string - - position: number; ->position : number - } - class TextChange { ->TextChange : TextChange - - span: TextSpan; ->span : TextSpan ->TextSpan : TextSpan - - newText: string; ->newText : string - } - interface RenameLocation { ->RenameLocation : RenameLocation - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - fileName: string; ->fileName : string - } - interface ReferenceEntry { ->ReferenceEntry : ReferenceEntry - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - fileName: string; ->fileName : string - - isWriteAccess: boolean; ->isWriteAccess : boolean - } - interface NavigateToItem { ->NavigateToItem : NavigateToItem - - name: string; ->name : string - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - - matchKind: string; ->matchKind : string - - fileName: string; ->fileName : string - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - containerName: string; ->containerName : string - - containerKind: string; ->containerKind : string - } - interface EditorOptions { ->EditorOptions : EditorOptions - - IndentSize: number; ->IndentSize : number - - TabSize: number; ->TabSize : number - - NewLineCharacter: string; ->NewLineCharacter : string - - ConvertTabsToSpaces: boolean; ->ConvertTabsToSpaces : boolean - } - interface FormatCodeOptions extends EditorOptions { ->FormatCodeOptions : FormatCodeOptions ->EditorOptions : EditorOptions - - InsertSpaceAfterCommaDelimiter: boolean; ->InsertSpaceAfterCommaDelimiter : boolean - - InsertSpaceAfterSemicolonInForStatements: boolean; ->InsertSpaceAfterSemicolonInForStatements : boolean - - InsertSpaceBeforeAndAfterBinaryOperators: boolean; ->InsertSpaceBeforeAndAfterBinaryOperators : boolean - - InsertSpaceAfterKeywordsInControlFlowStatements: boolean; ->InsertSpaceAfterKeywordsInControlFlowStatements : boolean - - InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; ->InsertSpaceAfterFunctionKeywordForAnonymousFunctions : boolean - - InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; ->InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis : boolean - - PlaceOpenBraceOnNewLineForFunctions: boolean; ->PlaceOpenBraceOnNewLineForFunctions : boolean - - PlaceOpenBraceOnNewLineForControlBlocks: boolean; ->PlaceOpenBraceOnNewLineForControlBlocks : boolean - } - interface DefinitionInfo { ->DefinitionInfo : DefinitionInfo - - fileName: string; ->fileName : string - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - kind: string; ->kind : string - - name: string; ->name : string - - containerKind: string; ->containerKind : string - - containerName: string; ->containerName : string - } - enum SymbolDisplayPartKind { ->SymbolDisplayPartKind : SymbolDisplayPartKind - - aliasName = 0, ->aliasName : SymbolDisplayPartKind - - className = 1, ->className : SymbolDisplayPartKind - - enumName = 2, ->enumName : SymbolDisplayPartKind - - fieldName = 3, ->fieldName : SymbolDisplayPartKind - - interfaceName = 4, ->interfaceName : SymbolDisplayPartKind - - keyword = 5, ->keyword : SymbolDisplayPartKind - - lineBreak = 6, ->lineBreak : SymbolDisplayPartKind - - numericLiteral = 7, ->numericLiteral : SymbolDisplayPartKind - - stringLiteral = 8, ->stringLiteral : SymbolDisplayPartKind - - localName = 9, ->localName : SymbolDisplayPartKind - - methodName = 10, ->methodName : SymbolDisplayPartKind - - moduleName = 11, ->moduleName : SymbolDisplayPartKind - - operator = 12, ->operator : SymbolDisplayPartKind - - parameterName = 13, ->parameterName : SymbolDisplayPartKind - - propertyName = 14, ->propertyName : SymbolDisplayPartKind - - punctuation = 15, ->punctuation : SymbolDisplayPartKind - - space = 16, ->space : SymbolDisplayPartKind - - text = 17, ->text : SymbolDisplayPartKind - - typeParameterName = 18, ->typeParameterName : SymbolDisplayPartKind - - enumMemberName = 19, ->enumMemberName : SymbolDisplayPartKind - - functionName = 20, ->functionName : SymbolDisplayPartKind - - regularExpressionLiteral = 21, ->regularExpressionLiteral : SymbolDisplayPartKind - } - interface SymbolDisplayPart { ->SymbolDisplayPart : SymbolDisplayPart - - text: string; ->text : string - - kind: string; ->kind : string - } - interface QuickInfo { ->QuickInfo : QuickInfo - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - displayParts: SymbolDisplayPart[]; ->displayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - documentation: SymbolDisplayPart[]; ->documentation : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - interface RenameInfo { ->RenameInfo : RenameInfo - - canRename: boolean; ->canRename : boolean - - localizedErrorMessage: string; ->localizedErrorMessage : string - - displayName: string; ->displayName : string - - fullDisplayName: string; ->fullDisplayName : string - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - - triggerSpan: TextSpan; ->triggerSpan : TextSpan ->TextSpan : TextSpan - } - interface SignatureHelpParameter { ->SignatureHelpParameter : SignatureHelpParameter - - name: string; ->name : string - - documentation: SymbolDisplayPart[]; ->documentation : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - displayParts: SymbolDisplayPart[]; ->displayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - isOptional: boolean; ->isOptional : boolean - } - /** - * Represents a single signature to show in signature help. - * The id is used for subsequent calls into the language service to ask questions about the - * signature help item in the context of any documents that have been updated. i.e. after - * an edit has happened, while signature help is still active, the host can ask important - * questions like 'what parameter is the user currently contained within?'. - */ - interface SignatureHelpItem { ->SignatureHelpItem : SignatureHelpItem - - isVariadic: boolean; ->isVariadic : boolean - - prefixDisplayParts: SymbolDisplayPart[]; ->prefixDisplayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - suffixDisplayParts: SymbolDisplayPart[]; ->suffixDisplayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - separatorDisplayParts: SymbolDisplayPart[]; ->separatorDisplayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - parameters: SignatureHelpParameter[]; ->parameters : SignatureHelpParameter[] ->SignatureHelpParameter : SignatureHelpParameter - - documentation: SymbolDisplayPart[]; ->documentation : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - /** - * Represents a set of signature help items, and the preferred item that should be selected. - */ - interface SignatureHelpItems { ->SignatureHelpItems : SignatureHelpItems - - items: SignatureHelpItem[]; ->items : SignatureHelpItem[] ->SignatureHelpItem : SignatureHelpItem - - applicableSpan: TextSpan; ->applicableSpan : TextSpan ->TextSpan : TextSpan - - selectedItemIndex: number; ->selectedItemIndex : number - - argumentIndex: number; ->argumentIndex : number - - argumentCount: number; ->argumentCount : number - } - interface CompletionInfo { ->CompletionInfo : CompletionInfo - - isMemberCompletion: boolean; ->isMemberCompletion : boolean - - entries: CompletionEntry[]; ->entries : CompletionEntry[] ->CompletionEntry : CompletionEntry - } - interface CompletionEntry { ->CompletionEntry : CompletionEntry - - name: string; ->name : string - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - } - interface CompletionEntryDetails { ->CompletionEntryDetails : CompletionEntryDetails - - name: string; ->name : string - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - - displayParts: SymbolDisplayPart[]; ->displayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - documentation: SymbolDisplayPart[]; ->documentation : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - interface OutliningSpan { ->OutliningSpan : OutliningSpan - - /** The span of the document to actually collapse. */ - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - /** The span of the document to display when the user hovers over the collapsed span. */ - hintSpan: TextSpan; ->hintSpan : TextSpan ->TextSpan : TextSpan - - /** The text to display in the editor for the collapsed region. */ - bannerText: string; ->bannerText : string - - /** - * Whether or not this region should be automatically collapsed when - * the 'Collapse to Definitions' command is invoked. - */ - autoCollapse: boolean; ->autoCollapse : boolean - } - interface EmitOutput { ->EmitOutput : EmitOutput - - outputFiles: OutputFile[]; ->outputFiles : OutputFile[] ->OutputFile : OutputFile - - emitOutputStatus: EmitReturnStatus; ->emitOutputStatus : EmitReturnStatus ->EmitReturnStatus : EmitReturnStatus - } - const enum OutputFileType { ->OutputFileType : OutputFileType - - JavaScript = 0, ->JavaScript : OutputFileType - - SourceMap = 1, ->SourceMap : OutputFileType - - Declaration = 2, ->Declaration : OutputFileType - } - interface OutputFile { ->OutputFile : OutputFile - - name: string; ->name : string - - writeByteOrderMark: boolean; ->writeByteOrderMark : boolean - - text: string; ->text : string - } - const enum EndOfLineState { ->EndOfLineState : EndOfLineState - - Start = 0, ->Start : EndOfLineState - - InMultiLineCommentTrivia = 1, ->InMultiLineCommentTrivia : EndOfLineState - - InSingleQuoteStringLiteral = 2, ->InSingleQuoteStringLiteral : EndOfLineState - - InDoubleQuoteStringLiteral = 3, ->InDoubleQuoteStringLiteral : EndOfLineState - } - enum TokenClass { ->TokenClass : TokenClass - - Punctuation = 0, ->Punctuation : TokenClass - - Keyword = 1, ->Keyword : TokenClass - - Operator = 2, ->Operator : TokenClass - - Comment = 3, ->Comment : TokenClass - - Whitespace = 4, ->Whitespace : TokenClass - - Identifier = 5, ->Identifier : TokenClass - - NumberLiteral = 6, ->NumberLiteral : TokenClass - - StringLiteral = 7, ->StringLiteral : TokenClass - - RegExpLiteral = 8, ->RegExpLiteral : TokenClass - } - interface ClassificationResult { ->ClassificationResult : ClassificationResult - - finalLexState: EndOfLineState; ->finalLexState : EndOfLineState ->EndOfLineState : EndOfLineState - - entries: ClassificationInfo[]; ->entries : ClassificationInfo[] ->ClassificationInfo : ClassificationInfo - } - interface ClassificationInfo { ->ClassificationInfo : ClassificationInfo - - length: number; ->length : number - - classification: TokenClass; ->classification : TokenClass ->TokenClass : TokenClass - } - interface Classifier { ->Classifier : Classifier - - getClassificationsForLine(text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean): ClassificationResult; ->getClassificationsForLine : (text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean) => ClassificationResult ->text : string ->lexState : EndOfLineState ->EndOfLineState : EndOfLineState ->classifyKeywordsInGenerics : boolean ->ClassificationResult : ClassificationResult - } - interface DocumentRegistry { ->DocumentRegistry : DocumentRegistry - - acquireDocument(filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean): SourceFile; ->acquireDocument : (filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean) => SourceFile ->filename : string ->compilationSettings : CompilerOptions ->CompilerOptions : CompilerOptions ->scriptSnapshot : IScriptSnapshot ->IScriptSnapshot : IScriptSnapshot ->version : string ->isOpen : boolean ->SourceFile : SourceFile - - updateDocument(sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; ->updateDocument : (sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange) => SourceFile ->sourceFile : SourceFile ->SourceFile : SourceFile ->filename : string ->compilationSettings : CompilerOptions ->CompilerOptions : CompilerOptions ->scriptSnapshot : IScriptSnapshot ->IScriptSnapshot : IScriptSnapshot ->version : string ->isOpen : boolean ->textChangeRange : TextChangeRange ->TextChangeRange : TextChangeRange ->SourceFile : SourceFile - - releaseDocument(filename: string, compilationSettings: CompilerOptions): void; ->releaseDocument : (filename: string, compilationSettings: CompilerOptions) => void ->filename : string ->compilationSettings : CompilerOptions ->CompilerOptions : CompilerOptions - } - class ScriptElementKind { ->ScriptElementKind : ScriptElementKind - - static unknown: string; ->unknown : string - - static keyword: string; ->keyword : string - - static scriptElement: string; ->scriptElement : string - - static moduleElement: string; ->moduleElement : string - - static classElement: string; ->classElement : string - - static interfaceElement: string; ->interfaceElement : string - - static typeElement: string; ->typeElement : string - - static enumElement: string; ->enumElement : string - - static variableElement: string; ->variableElement : string - - static localVariableElement: string; ->localVariableElement : string - - static functionElement: string; ->functionElement : string - - static localFunctionElement: string; ->localFunctionElement : string - - static memberFunctionElement: string; ->memberFunctionElement : string - - static memberGetAccessorElement: string; ->memberGetAccessorElement : string - - static memberSetAccessorElement: string; ->memberSetAccessorElement : string - - static memberVariableElement: string; ->memberVariableElement : string - - static constructorImplementationElement: string; ->constructorImplementationElement : string - - static callSignatureElement: string; ->callSignatureElement : string - - static indexSignatureElement: string; ->indexSignatureElement : string - - static constructSignatureElement: string; ->constructSignatureElement : string - - static parameterElement: string; ->parameterElement : string - - static typeParameterElement: string; ->typeParameterElement : string - - static primitiveType: string; ->primitiveType : string - - static label: string; ->label : string - - static alias: string; ->alias : string - - static constElement: string; ->constElement : string - - static letElement: string; ->letElement : string - } - class ScriptElementKindModifier { ->ScriptElementKindModifier : ScriptElementKindModifier - - static none: string; ->none : string - - static publicMemberModifier: string; ->publicMemberModifier : string - - static privateMemberModifier: string; ->privateMemberModifier : string - - static protectedMemberModifier: string; ->protectedMemberModifier : string - - static exportedModifier: string; ->exportedModifier : string - - static ambientModifier: string; ->ambientModifier : string - - static staticModifier: string; ->staticModifier : string - } - class ClassificationTypeNames { ->ClassificationTypeNames : ClassificationTypeNames - - static comment: string; ->comment : string - - static identifier: string; ->identifier : string - - static keyword: string; ->keyword : string - - static numericLiteral: string; ->numericLiteral : string - - static operator: string; ->operator : string - - static stringLiteral: string; ->stringLiteral : string - - static whiteSpace: string; ->whiteSpace : string - - static text: string; ->text : string - - static punctuation: string; ->punctuation : string - - static className: string; ->className : string - - static enumName: string; ->enumName : string - - static interfaceName: string; ->interfaceName : string - - static moduleName: string; ->moduleName : string - - static typeParameterName: string; ->typeParameterName : string - - static typeAlias: string; ->typeAlias : string - } - interface DisplayPartsSymbolWriter extends SymbolWriter { ->DisplayPartsSymbolWriter : DisplayPartsSymbolWriter ->SymbolWriter : SymbolWriter - - displayParts(): SymbolDisplayPart[]; ->displayParts : () => SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - function displayPartsToString(displayParts: SymbolDisplayPart[]): string; ->displayPartsToString : (displayParts: SymbolDisplayPart[]) => string ->displayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - function getDefaultCompilerOptions(): CompilerOptions; ->getDefaultCompilerOptions : () => CompilerOptions ->CompilerOptions : CompilerOptions - - class OperationCanceledException { ->OperationCanceledException : OperationCanceledException - } - class CancellationTokenObject { ->CancellationTokenObject : CancellationTokenObject - - private cancellationToken; ->cancellationToken : any - - static None: CancellationTokenObject; ->None : CancellationTokenObject ->CancellationTokenObject : CancellationTokenObject - - constructor(cancellationToken: CancellationToken); ->cancellationToken : CancellationToken ->CancellationToken : CancellationToken - - isCancellationRequested(): boolean; ->isCancellationRequested : () => boolean - - throwIfCancellationRequested(): void; ->throwIfCancellationRequested : () => void - } - function createDocumentRegistry(): DocumentRegistry; ->createDocumentRegistry : () => DocumentRegistry ->DocumentRegistry : DocumentRegistry - - function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; ->preProcessFile : (sourceText: string, readImportFiles?: boolean) => PreProcessedFileInfo ->sourceText : string ->readImportFiles : boolean ->PreProcessedFileInfo : PreProcessedFileInfo - - function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry): LanguageService; ->createLanguageService : (host: LanguageServiceHost, documentRegistry: DocumentRegistry) => LanguageService ->host : LanguageServiceHost ->LanguageServiceHost : LanguageServiceHost ->documentRegistry : DocumentRegistry ->DocumentRegistry : DocumentRegistry ->LanguageService : LanguageService - - function createClassifier(host: Logger): Classifier; ->createClassifier : (host: Logger) => Classifier ->host : Logger ->Logger : Logger ->Classifier : Classifier -} - diff --git a/tests/baselines/reference/APISample_standalone_compile.js b/tests/baselines/reference/APISample_standalone_compile.js deleted file mode 100644 index 6ba3d4f6b1b..00000000000 --- a/tests/baselines/reference/APISample_standalone_compile.js +++ /dev/null @@ -1,1862 +0,0 @@ -//// [tests/cases/compiler/APISample_standalone_compile.ts] //// - -//// [APISample_standalone_compile.ts] - -var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); - -var program = ts.createProgram(["file1.ts"], {}, undefined); -//// [typescriptServices.d.ts] -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ - -declare module ts { - interface Map { - [index: string]: T; - } - interface TextRange { - pos: number; - end: number; - } - const enum SyntaxKind { - Unknown = 0, - EndOfFileToken = 1, - SingleLineCommentTrivia = 2, - MultiLineCommentTrivia = 3, - NewLineTrivia = 4, - WhitespaceTrivia = 5, - NumericLiteral = 6, - StringLiteral = 7, - RegularExpressionLiteral = 8, - NoSubstitutionTemplateLiteral = 9, - TemplateHead = 10, - TemplateMiddle = 11, - TemplateTail = 12, - OpenBraceToken = 13, - CloseBraceToken = 14, - OpenParenToken = 15, - CloseParenToken = 16, - OpenBracketToken = 17, - CloseBracketToken = 18, - DotToken = 19, - DotDotDotToken = 20, - SemicolonToken = 21, - CommaToken = 22, - LessThanToken = 23, - GreaterThanToken = 24, - LessThanEqualsToken = 25, - GreaterThanEqualsToken = 26, - EqualsEqualsToken = 27, - ExclamationEqualsToken = 28, - EqualsEqualsEqualsToken = 29, - ExclamationEqualsEqualsToken = 30, - EqualsGreaterThanToken = 31, - PlusToken = 32, - MinusToken = 33, - AsteriskToken = 34, - SlashToken = 35, - PercentToken = 36, - PlusPlusToken = 37, - MinusMinusToken = 38, - LessThanLessThanToken = 39, - GreaterThanGreaterThanToken = 40, - GreaterThanGreaterThanGreaterThanToken = 41, - AmpersandToken = 42, - BarToken = 43, - CaretToken = 44, - ExclamationToken = 45, - TildeToken = 46, - AmpersandAmpersandToken = 47, - BarBarToken = 48, - QuestionToken = 49, - ColonToken = 50, - EqualsToken = 51, - PlusEqualsToken = 52, - MinusEqualsToken = 53, - AsteriskEqualsToken = 54, - SlashEqualsToken = 55, - PercentEqualsToken = 56, - LessThanLessThanEqualsToken = 57, - GreaterThanGreaterThanEqualsToken = 58, - GreaterThanGreaterThanGreaterThanEqualsToken = 59, - AmpersandEqualsToken = 60, - BarEqualsToken = 61, - CaretEqualsToken = 62, - Identifier = 63, - BreakKeyword = 64, - CaseKeyword = 65, - CatchKeyword = 66, - ClassKeyword = 67, - ConstKeyword = 68, - ContinueKeyword = 69, - DebuggerKeyword = 70, - DefaultKeyword = 71, - DeleteKeyword = 72, - DoKeyword = 73, - ElseKeyword = 74, - EnumKeyword = 75, - ExportKeyword = 76, - ExtendsKeyword = 77, - FalseKeyword = 78, - FinallyKeyword = 79, - ForKeyword = 80, - FunctionKeyword = 81, - IfKeyword = 82, - ImportKeyword = 83, - InKeyword = 84, - InstanceOfKeyword = 85, - NewKeyword = 86, - NullKeyword = 87, - ReturnKeyword = 88, - SuperKeyword = 89, - SwitchKeyword = 90, - ThisKeyword = 91, - ThrowKeyword = 92, - TrueKeyword = 93, - TryKeyword = 94, - TypeOfKeyword = 95, - VarKeyword = 96, - VoidKeyword = 97, - WhileKeyword = 98, - WithKeyword = 99, - ImplementsKeyword = 100, - InterfaceKeyword = 101, - LetKeyword = 102, - PackageKeyword = 103, - PrivateKeyword = 104, - ProtectedKeyword = 105, - PublicKeyword = 106, - StaticKeyword = 107, - YieldKeyword = 108, - AnyKeyword = 109, - BooleanKeyword = 110, - ConstructorKeyword = 111, - DeclareKeyword = 112, - GetKeyword = 113, - ModuleKeyword = 114, - RequireKeyword = 115, - NumberKeyword = 116, - SetKeyword = 117, - StringKeyword = 118, - TypeKeyword = 119, - QualifiedName = 120, - ComputedPropertyName = 121, - TypeParameter = 122, - Parameter = 123, - Property = 124, - Method = 125, - Constructor = 126, - GetAccessor = 127, - SetAccessor = 128, - CallSignature = 129, - ConstructSignature = 130, - IndexSignature = 131, - TypeReference = 132, - FunctionType = 133, - ConstructorType = 134, - TypeQuery = 135, - TypeLiteral = 136, - ArrayType = 137, - TupleType = 138, - UnionType = 139, - ParenthesizedType = 140, - ArrayLiteralExpression = 141, - ObjectLiteralExpression = 142, - PropertyAccessExpression = 143, - ElementAccessExpression = 144, - CallExpression = 145, - NewExpression = 146, - TaggedTemplateExpression = 147, - TypeAssertionExpression = 148, - ParenthesizedExpression = 149, - FunctionExpression = 150, - ArrowFunction = 151, - DeleteExpression = 152, - TypeOfExpression = 153, - VoidExpression = 154, - PrefixUnaryExpression = 155, - PostfixUnaryExpression = 156, - BinaryExpression = 157, - ConditionalExpression = 158, - TemplateExpression = 159, - YieldExpression = 160, - OmittedExpression = 161, - TemplateSpan = 162, - Block = 163, - VariableStatement = 164, - EmptyStatement = 165, - ExpressionStatement = 166, - IfStatement = 167, - DoStatement = 168, - WhileStatement = 169, - ForStatement = 170, - ForInStatement = 171, - ContinueStatement = 172, - BreakStatement = 173, - ReturnStatement = 174, - WithStatement = 175, - SwitchStatement = 176, - LabeledStatement = 177, - ThrowStatement = 178, - TryStatement = 179, - TryBlock = 180, - FinallyBlock = 181, - DebuggerStatement = 182, - VariableDeclaration = 183, - FunctionDeclaration = 184, - ClassDeclaration = 185, - InterfaceDeclaration = 186, - TypeAliasDeclaration = 187, - EnumDeclaration = 188, - ModuleDeclaration = 189, - ModuleBlock = 190, - ImportDeclaration = 191, - ExportAssignment = 192, - ExternalModuleReference = 193, - CaseClause = 194, - DefaultClause = 195, - HeritageClause = 196, - CatchClause = 197, - PropertyAssignment = 198, - ShorthandPropertyAssignment = 199, - EnumMember = 200, - SourceFile = 201, - Program = 202, - SyntaxList = 203, - Count = 204, - FirstAssignment = 51, - LastAssignment = 62, - FirstReservedWord = 64, - LastReservedWord = 99, - FirstKeyword = 64, - LastKeyword = 119, - FirstFutureReservedWord = 100, - LastFutureReservedWord = 108, - FirstTypeNode = 132, - LastTypeNode = 140, - FirstPunctuation = 13, - LastPunctuation = 62, - FirstToken = 0, - LastToken = 119, - FirstTriviaToken = 2, - LastTriviaToken = 5, - FirstLiteralToken = 6, - LastLiteralToken = 9, - FirstTemplateToken = 9, - LastTemplateToken = 12, - FirstOperator = 21, - LastOperator = 62, - FirstBinaryOperator = 23, - LastBinaryOperator = 62, - FirstNode = 120, - } - const enum NodeFlags { - Export = 1, - Ambient = 2, - Public = 16, - Private = 32, - Protected = 64, - Static = 128, - MultiLine = 256, - Synthetic = 512, - DeclarationFile = 1024, - Let = 2048, - Const = 4096, - OctalLiteral = 8192, - Modifier = 243, - AccessibilityModifier = 112, - BlockScoped = 6144, - } - const enum ParserContextFlags { - StrictMode = 1, - DisallowIn = 2, - Yield = 4, - GeneratorParameter = 8, - ContainsError = 16, - HasPropagatedChildContainsErrorFlag = 32, - } - interface Node extends TextRange { - kind: SyntaxKind; - flags: NodeFlags; - parserContextFlags?: ParserContextFlags; - id?: number; - parent?: Node; - symbol?: Symbol; - locals?: SymbolTable; - nextContainer?: Node; - localSymbol?: Symbol; - modifiers?: ModifiersArray; - } - interface NodeArray extends Array, TextRange { - hasTrailingComma?: boolean; - } - interface ModifiersArray extends NodeArray { - flags: number; - } - interface Identifier extends PrimaryExpression { - text: string; - } - interface QualifiedName extends Node { - left: EntityName; - right: Identifier; - } - type EntityName = Identifier | QualifiedName; - type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; - interface Declaration extends Node { - _declarationBrand: any; - name?: DeclarationName; - } - interface ComputedPropertyName extends Node { - expression: Expression; - } - interface TypeParameterDeclaration extends Declaration { - name: Identifier; - constraint?: TypeNode; - expression?: Expression; - } - interface SignatureDeclaration extends Declaration { - typeParameters?: NodeArray; - parameters: NodeArray; - type?: TypeNode; - } - interface VariableDeclaration extends Declaration { - name: Identifier; - type?: TypeNode; - initializer?: Expression; - } - interface ParameterDeclaration extends Declaration { - dotDotDotToken?: Node; - name: Identifier; - questionToken?: Node; - type?: TypeNode | StringLiteralExpression; - initializer?: Expression; - } - interface PropertyDeclaration extends Declaration, ClassElement { - _propertyDeclarationBrand: any; - questionToken?: Node; - type?: TypeNode; - initializer?: Expression; - } - type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; - type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; - interface ObjectLiteralElement extends Declaration { - _objectLiteralBrandBrand: any; - } - interface ShorthandPropertyAssignment extends ObjectLiteralElement { - name: Identifier; - questionToken?: Node; - } - interface PropertyAssignment extends ObjectLiteralElement { - _propertyAssignmentBrand: any; - name: DeclarationName; - questionToken?: Node; - initializer: Expression; - } - /** - * Several node kinds share function-like features such as a signature, - * a name, and a body. These nodes should extend FunctionLikeDeclaration. - * Examples: - * FunctionDeclaration - * MethodDeclaration - * AccessorDeclaration - */ - interface FunctionLikeDeclaration extends SignatureDeclaration { - _functionLikeDeclarationBrand: any; - asteriskToken?: Node; - questionToken?: Node; - body?: Block | Expression; - } - interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { - name: Identifier; - body?: Block; - } - interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { - body?: Block; - } - interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { - body?: Block; - } - interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { - _accessorDeclarationBrand: any; - body: Block; - } - interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { - _indexSignatureDeclarationBrand: any; - } - interface TypeNode extends Node { - _typeNodeBrand: any; - } - interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { - _functionOrConstructorTypeNodeBrand: any; - } - interface TypeReferenceNode extends TypeNode { - typeName: EntityName; - typeArguments?: NodeArray; - } - interface TypeQueryNode extends TypeNode { - exprName: EntityName; - } - interface TypeLiteralNode extends TypeNode, Declaration { - members: NodeArray; - } - interface ArrayTypeNode extends TypeNode { - elementType: TypeNode; - } - interface TupleTypeNode extends TypeNode { - elementTypes: NodeArray; - } - interface UnionTypeNode extends TypeNode { - types: NodeArray; - } - interface ParenthesizedTypeNode extends TypeNode { - type: TypeNode; - } - interface Expression extends Node { - _expressionBrand: any; - contextualType?: Type; - } - interface UnaryExpression extends Expression { - _unaryExpressionBrand: any; - } - interface PrefixUnaryExpression extends UnaryExpression { - operator: SyntaxKind; - operand: UnaryExpression; - } - interface PostfixUnaryExpression extends PostfixExpression { - operand: LeftHandSideExpression; - operator: SyntaxKind; - } - interface PostfixExpression extends UnaryExpression { - _postfixExpressionBrand: any; - } - interface LeftHandSideExpression extends PostfixExpression { - _leftHandSideExpressionBrand: any; - } - interface MemberExpression extends LeftHandSideExpression { - _memberExpressionBrand: any; - } - interface PrimaryExpression extends MemberExpression { - _primaryExpressionBrand: any; - } - interface DeleteExpression extends UnaryExpression { - expression: UnaryExpression; - } - interface TypeOfExpression extends UnaryExpression { - expression: UnaryExpression; - } - interface VoidExpression extends UnaryExpression { - expression: UnaryExpression; - } - interface YieldExpression extends Expression { - asteriskToken?: Node; - expression: Expression; - } - interface BinaryExpression extends Expression { - left: Expression; - operator: SyntaxKind; - right: Expression; - } - interface ConditionalExpression extends Expression { - condition: Expression; - whenTrue: Expression; - whenFalse: Expression; - } - interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { - name?: Identifier; - body: Block | Expression; - } - interface LiteralExpression extends PrimaryExpression { - text: string; - isUnterminated?: boolean; - } - interface StringLiteralExpression extends LiteralExpression { - _stringLiteralExpressionBrand: any; - } - interface TemplateExpression extends PrimaryExpression { - head: LiteralExpression; - templateSpans: NodeArray; - } - interface TemplateSpan extends Node { - expression: Expression; - literal: LiteralExpression; - } - interface ParenthesizedExpression extends PrimaryExpression { - expression: Expression; - } - interface ArrayLiteralExpression extends PrimaryExpression { - elements: NodeArray; - } - interface ObjectLiteralExpression extends PrimaryExpression, Declaration { - properties: NodeArray; - } - interface PropertyAccessExpression extends MemberExpression { - expression: LeftHandSideExpression; - name: Identifier; - } - interface ElementAccessExpression extends MemberExpression { - expression: LeftHandSideExpression; - argumentExpression?: Expression; - } - interface CallExpression extends LeftHandSideExpression { - expression: LeftHandSideExpression; - typeArguments?: NodeArray; - arguments: NodeArray; - } - interface NewExpression extends CallExpression, PrimaryExpression { - } - interface TaggedTemplateExpression extends MemberExpression { - tag: LeftHandSideExpression; - template: LiteralExpression | TemplateExpression; - } - type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression; - interface TypeAssertion extends UnaryExpression { - type: TypeNode; - expression: UnaryExpression; - } - interface Statement extends Node, ModuleElement { - _statementBrand: any; - } - interface Block extends Statement { - statements: NodeArray; - } - interface VariableStatement extends Statement { - declarations: NodeArray; - } - interface ExpressionStatement extends Statement { - expression: Expression; - } - interface IfStatement extends Statement { - expression: Expression; - thenStatement: Statement; - elseStatement?: Statement; - } - interface IterationStatement extends Statement { - statement: Statement; - } - interface DoStatement extends IterationStatement { - expression: Expression; - } - interface WhileStatement extends IterationStatement { - expression: Expression; - } - interface ForStatement extends IterationStatement { - declarations?: NodeArray; - initializer?: Expression; - condition?: Expression; - iterator?: Expression; - } - interface ForInStatement extends IterationStatement { - declarations?: NodeArray; - variable?: Expression; - expression: Expression; - } - interface BreakOrContinueStatement extends Statement { - label?: Identifier; - } - interface ReturnStatement extends Statement { - expression?: Expression; - } - interface WithStatement extends Statement { - expression: Expression; - statement: Statement; - } - interface SwitchStatement extends Statement { - expression: Expression; - clauses: NodeArray; - } - interface CaseClause extends Node { - expression?: Expression; - statements: NodeArray; - } - interface DefaultClause extends Node { - statements: NodeArray; - } - type CaseOrDefaultClause = CaseClause | DefaultClause; - interface LabeledStatement extends Statement { - label: Identifier; - statement: Statement; - } - interface ThrowStatement extends Statement { - expression: Expression; - } - interface TryStatement extends Statement { - tryBlock: Block; - catchClause?: CatchClause; - finallyBlock?: Block; - } - interface CatchClause extends Declaration { - name: Identifier; - type?: TypeNode; - block: Block; - } - interface ModuleElement extends Node { - _moduleElementBrand: any; - } - interface ClassDeclaration extends Declaration, ModuleElement { - name: Identifier; - typeParameters?: NodeArray; - heritageClauses?: NodeArray; - members: NodeArray; - } - interface ClassElement extends Declaration { - _classElementBrand: any; - } - interface InterfaceDeclaration extends Declaration, ModuleElement { - name: Identifier; - typeParameters?: NodeArray; - heritageClauses?: NodeArray; - members: NodeArray; - } - interface HeritageClause extends Node { - token: SyntaxKind; - types?: NodeArray; - } - interface TypeAliasDeclaration extends Declaration, ModuleElement { - name: Identifier; - type: TypeNode; - } - interface EnumMember extends Declaration { - name: DeclarationName; - initializer?: Expression; - } - interface EnumDeclaration extends Declaration, ModuleElement { - name: Identifier; - members: NodeArray; - } - interface ModuleDeclaration extends Declaration, ModuleElement { - name: Identifier | LiteralExpression; - body: ModuleBlock | ModuleDeclaration; - } - interface ModuleBlock extends Node, ModuleElement { - statements: NodeArray; - } - interface ImportDeclaration extends Declaration, ModuleElement { - name: Identifier; - moduleReference: EntityName | ExternalModuleReference; - } - interface ExternalModuleReference extends Node { - expression?: Expression; - } - interface ExportAssignment extends Statement, ModuleElement { - exportName: Identifier; - } - interface FileReference extends TextRange { - filename: string; - } - interface CommentRange extends TextRange { - hasTrailingNewLine?: boolean; - } - interface SourceFile extends Declaration { - statements: NodeArray; - endOfFileToken: Node; - filename: string; - text: string; - getLineAndCharacterFromPosition(position: number): LineAndCharacter; - getPositionFromLineAndCharacter(line: number, character: number): number; - getLineStarts(): number[]; - amdDependencies: string[]; - amdModuleName: string; - referencedFiles: FileReference[]; - referenceDiagnostics: Diagnostic[]; - parseDiagnostics: Diagnostic[]; - grammarDiagnostics: Diagnostic[]; - getSyntacticDiagnostics(): Diagnostic[]; - semanticDiagnostics: Diagnostic[]; - hasNoDefaultLib: boolean; - externalModuleIndicator: Node; - nodeCount: number; - identifierCount: number; - symbolCount: number; - isOpen: boolean; - version: string; - languageVersion: ScriptTarget; - identifiers: Map; - } - interface Program { - getSourceFile(filename: string): SourceFile; - getSourceFiles(): SourceFile[]; - getCompilerOptions(): CompilerOptions; - getCompilerHost(): CompilerHost; - getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; - getGlobalDiagnostics(): Diagnostic[]; - getTypeChecker(fullTypeCheckMode: boolean): TypeChecker; - getCommonSourceDirectory(): string; - } - interface SourceMapSpan { - emittedLine: number; - emittedColumn: number; - sourceLine: number; - sourceColumn: number; - nameIndex?: number; - sourceIndex: number; - } - interface SourceMapData { - sourceMapFilePath: string; - jsSourceMappingURL: string; - sourceMapFile: string; - sourceMapSourceRoot: string; - sourceMapSources: string[]; - inputSourceFileNames: string[]; - sourceMapNames?: string[]; - sourceMapMappings: string; - sourceMapDecodedMappings: SourceMapSpan[]; - } - enum EmitReturnStatus { - Succeeded = 0, - AllOutputGenerationSkipped = 1, - JSGeneratedWithSemanticErrors = 2, - DeclarationGenerationSkipped = 3, - EmitErrorsEncountered = 4, - CompilerOptionsErrors = 5, - } - interface EmitResult { - emitResultStatus: EmitReturnStatus; - diagnostics: Diagnostic[]; - sourceMaps: SourceMapData[]; - } - interface TypeChecker { - getProgram(): Program; - getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; - getDeclarationDiagnostics(sourceFile: SourceFile): Diagnostic[]; - getGlobalDiagnostics(): Diagnostic[]; - getNodeCount(): number; - getIdentifierCount(): number; - getSymbolCount(): number; - getTypeCount(): number; - emitFiles(targetSourceFile?: SourceFile): EmitResult; - getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; - getDeclaredTypeOfSymbol(symbol: Symbol): Type; - getPropertiesOfType(type: Type): Symbol[]; - getPropertyOfType(type: Type, propertyName: string): Symbol; - getSignaturesOfType(type: Type, kind: SignatureKind): Signature[]; - getIndexTypeOfType(type: Type, kind: IndexKind): Type; - getReturnTypeOfSignature(signature: Signature): Type; - getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; - getSymbolAtLocation(node: Node): Symbol; - getShorthandAssignmentValueSymbol(location: Node): Symbol; - getTypeAtLocation(node: Node): Type; - typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; - symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; - getSymbolDisplayBuilder(): SymbolDisplayBuilder; - getFullyQualifiedName(symbol: Symbol): string; - getAugmentedPropertiesOfType(type: Type): Symbol[]; - getRootSymbols(symbol: Symbol): Symbol[]; - getContextualType(node: Expression): Type; - getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; - getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; - isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; - isUndefinedSymbol(symbol: Symbol): boolean; - isArgumentsSymbol(symbol: Symbol): boolean; - isEmitBlocked(sourceFile?: SourceFile): boolean; - getEnumMemberValue(node: EnumMember): number; - isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; - getAliasedSymbol(symbol: Symbol): Symbol; - } - interface SymbolDisplayBuilder { - buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void; - buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void; - buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - } - interface SymbolWriter { - writeKeyword(text: string): void; - writeOperator(text: string): void; - writePunctuation(text: string): void; - writeSpace(text: string): void; - writeStringLiteral(text: string): void; - writeParameter(text: string): void; - writeSymbol(text: string, symbol: Symbol): void; - writeLine(): void; - increaseIndent(): void; - decreaseIndent(): void; - clear(): void; - trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void; - } - const enum TypeFormatFlags { - None = 0, - WriteArrayAsGenericType = 1, - UseTypeOfFunction = 2, - NoTruncation = 4, - WriteArrowStyleSignature = 8, - WriteOwnNameForAnyLike = 16, - WriteTypeArgumentsOfSignature = 32, - InElementType = 64, - } - const enum SymbolFormatFlags { - None = 0, - WriteTypeParametersOrArguments = 1, - UseOnlyExternalAliasing = 2, - } - const enum SymbolAccessibility { - Accessible = 0, - NotAccessible = 1, - CannotBeNamed = 2, - } - interface SymbolVisibilityResult { - accessibility: SymbolAccessibility; - aliasesToMakeVisible?: ImportDeclaration[]; - errorSymbolName?: string; - errorNode?: Node; - } - interface SymbolAccessiblityResult extends SymbolVisibilityResult { - errorModuleName?: string; - } - interface EmitResolver { - getProgram(): Program; - getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; - getExpressionNamePrefix(node: Identifier): string; - getExportAssignmentName(node: SourceFile): string; - isReferencedImportDeclaration(node: ImportDeclaration): boolean; - isTopLevelValueImportWithEntityName(node: ImportDeclaration): boolean; - getNodeCheckFlags(node: Node): NodeCheckFlags; - getEnumMemberValue(node: EnumMember): number; - hasSemanticErrors(sourceFile?: SourceFile): boolean; - isDeclarationVisible(node: Declaration): boolean; - isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; - writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; - writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; - isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; - isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; - getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number; - isEmitBlocked(sourceFile?: SourceFile): boolean; - } - const enum SymbolFlags { - FunctionScopedVariable = 1, - BlockScopedVariable = 2, - Property = 4, - EnumMember = 8, - Function = 16, - Class = 32, - Interface = 64, - ConstEnum = 128, - RegularEnum = 256, - ValueModule = 512, - NamespaceModule = 1024, - TypeLiteral = 2048, - ObjectLiteral = 4096, - Method = 8192, - Constructor = 16384, - GetAccessor = 32768, - SetAccessor = 65536, - CallSignature = 131072, - ConstructSignature = 262144, - IndexSignature = 524288, - TypeParameter = 1048576, - TypeAlias = 2097152, - ExportValue = 4194304, - ExportType = 8388608, - ExportNamespace = 16777216, - Import = 33554432, - Instantiated = 67108864, - Merged = 134217728, - Transient = 268435456, - Prototype = 536870912, - UnionProperty = 1073741824, - Enum = 384, - Variable = 3, - Value = 107455, - Type = 3152352, - Namespace = 1536, - Module = 1536, - Accessor = 98304, - Signature = 917504, - FunctionScopedVariableExcludes = 107454, - BlockScopedVariableExcludes = 107455, - ParameterExcludes = 107455, - PropertyExcludes = 107455, - EnumMemberExcludes = 107455, - FunctionExcludes = 106927, - ClassExcludes = 3258879, - InterfaceExcludes = 3152288, - RegularEnumExcludes = 3258623, - ConstEnumExcludes = 3259263, - ValueModuleExcludes = 106639, - NamespaceModuleExcludes = 0, - MethodExcludes = 99263, - GetAccessorExcludes = 41919, - SetAccessorExcludes = 74687, - TypeParameterExcludes = 2103776, - TypeAliasExcludes = 3152352, - ImportExcludes = 33554432, - ModuleMember = 35653619, - ExportHasLocal = 944, - HasLocals = 1041936, - HasExports = 1952, - HasMembers = 6240, - IsContainer = 1048560, - PropertyOrAccessor = 98308, - Export = 29360128, - } - interface Symbol { - flags: SymbolFlags; - name: string; - id?: number; - mergeId?: number; - declarations?: Declaration[]; - parent?: Symbol; - members?: SymbolTable; - exports?: SymbolTable; - exportSymbol?: Symbol; - valueDeclaration?: Declaration; - constEnumOnlyModule?: boolean; - } - interface SymbolLinks { - target?: Symbol; - type?: Type; - declaredType?: Type; - mapper?: TypeMapper; - referenced?: boolean; - exportAssignSymbol?: Symbol; - unionType?: UnionType; - } - interface TransientSymbol extends Symbol, SymbolLinks { - } - interface SymbolTable { - [index: string]: Symbol; - } - const enum NodeCheckFlags { - TypeChecked = 1, - LexicalThis = 2, - CaptureThis = 4, - EmitExtends = 8, - SuperInstance = 16, - SuperStatic = 32, - ContextChecked = 64, - EnumValuesComputed = 128, - } - interface NodeLinks { - resolvedType?: Type; - resolvedSignature?: Signature; - resolvedSymbol?: Symbol; - flags?: NodeCheckFlags; - enumMemberValue?: number; - isIllegalTypeReferenceInConstraint?: boolean; - isVisible?: boolean; - localModuleName?: string; - assignmentChecks?: Map; - } - const enum TypeFlags { - Any = 1, - String = 2, - Number = 4, - Boolean = 8, - Void = 16, - Undefined = 32, - Null = 64, - Enum = 128, - StringLiteral = 256, - TypeParameter = 512, - Class = 1024, - Interface = 2048, - Reference = 4096, - Tuple = 8192, - Union = 16384, - Anonymous = 32768, - FromSignature = 65536, - Intrinsic = 127, - StringLike = 258, - NumberLike = 132, - ObjectType = 48128, - } - interface Type { - flags: TypeFlags; - id: number; - symbol?: Symbol; - } - interface IntrinsicType extends Type { - intrinsicName: string; - } - interface StringLiteralType extends Type { - text: string; - } - interface ObjectType extends Type { - } - interface InterfaceType extends ObjectType { - typeParameters: TypeParameter[]; - baseTypes: ObjectType[]; - declaredProperties: Symbol[]; - declaredCallSignatures: Signature[]; - declaredConstructSignatures: Signature[]; - declaredStringIndexType: Type; - declaredNumberIndexType: Type; - } - interface TypeReference extends ObjectType { - target: GenericType; - typeArguments: Type[]; - } - interface GenericType extends InterfaceType, TypeReference { - instantiations: Map; - openReferenceTargets: GenericType[]; - openReferenceChecks: Map; - } - interface TupleType extends ObjectType { - elementTypes: Type[]; - baseArrayType: TypeReference; - } - interface UnionType extends Type { - types: Type[]; - resolvedProperties: SymbolTable; - } - interface ResolvedType extends ObjectType, UnionType { - members: SymbolTable; - properties: Symbol[]; - callSignatures: Signature[]; - constructSignatures: Signature[]; - stringIndexType: Type; - numberIndexType: Type; - } - interface TypeParameter extends Type { - constraint: Type; - target?: TypeParameter; - mapper?: TypeMapper; - } - const enum SignatureKind { - Call = 0, - Construct = 1, - } - interface Signature { - declaration: SignatureDeclaration; - typeParameters: TypeParameter[]; - parameters: Symbol[]; - resolvedReturnType: Type; - minArgumentCount: number; - hasRestParameter: boolean; - hasStringLiterals: boolean; - target?: Signature; - mapper?: TypeMapper; - unionSignatures?: Signature[]; - erasedSignatureCache?: Signature; - isolatedSignatureType?: ObjectType; - } - const enum IndexKind { - String = 0, - Number = 1, - } - interface TypeMapper { - (t: Type): Type; - } - interface TypeInferences { - primary: Type[]; - secondary: Type[]; - } - interface InferenceContext { - typeParameters: TypeParameter[]; - inferUnionTypes: boolean; - inferences: TypeInferences[]; - inferredTypes: Type[]; - failedTypeParameterIndex?: number; - } - interface DiagnosticMessage { - key: string; - category: DiagnosticCategory; - code: number; - isEarly?: boolean; - } - interface DiagnosticMessageChain { - messageText: string; - category: DiagnosticCategory; - code: number; - next?: DiagnosticMessageChain; - } - interface Diagnostic { - file: SourceFile; - start: number; - length: number; - messageText: string; - category: DiagnosticCategory; - code: number; - /** - * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit - */ - isEarly?: boolean; - } - enum DiagnosticCategory { - Warning = 0, - Error = 1, - Message = 2, - } - interface CompilerOptions { - allowNonTsExtensions?: boolean; - charset?: string; - codepage?: number; - declaration?: boolean; - diagnostics?: boolean; - emitBOM?: boolean; - help?: boolean; - locale?: string; - mapRoot?: string; - module?: ModuleKind; - noEmitOnError?: boolean; - noErrorTruncation?: boolean; - noImplicitAny?: boolean; - noLib?: boolean; - noLibCheck?: boolean; - noResolve?: boolean; - out?: string; - outDir?: string; - preserveConstEnums?: boolean; - removeComments?: boolean; - sourceMap?: boolean; - sourceRoot?: string; - suppressImplicitAnyIndexErrors?: boolean; - target?: ScriptTarget; - version?: boolean; - watch?: boolean; - [option: string]: string | number | boolean; - } - const enum ModuleKind { - None = 0, - CommonJS = 1, - AMD = 2, - } - interface LineAndCharacter { - line: number; - character: number; - } - const enum ScriptTarget { - ES3 = 0, - ES5 = 1, - ES6 = 2, - Latest = 2, - } - interface ParsedCommandLine { - options: CompilerOptions; - filenames: string[]; - errors: Diagnostic[]; - } - interface CommandLineOption { - name: string; - type: string | Map; - shortName?: string; - description?: DiagnosticMessage; - paramType?: DiagnosticMessage; - error?: DiagnosticMessage; - } - const enum CharacterCodes { - nullCharacter = 0, - maxAsciiCharacter = 127, - lineFeed = 10, - carriageReturn = 13, - lineSeparator = 8232, - paragraphSeparator = 8233, - nextLine = 133, - space = 32, - nonBreakingSpace = 160, - enQuad = 8192, - emQuad = 8193, - enSpace = 8194, - emSpace = 8195, - threePerEmSpace = 8196, - fourPerEmSpace = 8197, - sixPerEmSpace = 8198, - figureSpace = 8199, - punctuationSpace = 8200, - thinSpace = 8201, - hairSpace = 8202, - zeroWidthSpace = 8203, - narrowNoBreakSpace = 8239, - ideographicSpace = 12288, - mathematicalSpace = 8287, - ogham = 5760, - _ = 95, - $ = 36, - _0 = 48, - _1 = 49, - _2 = 50, - _3 = 51, - _4 = 52, - _5 = 53, - _6 = 54, - _7 = 55, - _8 = 56, - _9 = 57, - a = 97, - b = 98, - c = 99, - d = 100, - e = 101, - f = 102, - g = 103, - h = 104, - i = 105, - j = 106, - k = 107, - l = 108, - m = 109, - n = 110, - o = 111, - p = 112, - q = 113, - r = 114, - s = 115, - t = 116, - u = 117, - v = 118, - w = 119, - x = 120, - y = 121, - z = 122, - A = 65, - B = 66, - C = 67, - D = 68, - E = 69, - F = 70, - G = 71, - H = 72, - I = 73, - J = 74, - K = 75, - L = 76, - M = 77, - N = 78, - O = 79, - P = 80, - Q = 81, - R = 82, - S = 83, - T = 84, - U = 85, - V = 86, - W = 87, - X = 88, - Y = 89, - Z = 90, - ampersand = 38, - asterisk = 42, - at = 64, - backslash = 92, - backtick = 96, - bar = 124, - caret = 94, - closeBrace = 125, - closeBracket = 93, - closeParen = 41, - colon = 58, - comma = 44, - dot = 46, - doubleQuote = 34, - equals = 61, - exclamation = 33, - greaterThan = 62, - lessThan = 60, - minus = 45, - openBrace = 123, - openBracket = 91, - openParen = 40, - percent = 37, - plus = 43, - question = 63, - semicolon = 59, - singleQuote = 39, - slash = 47, - tilde = 126, - backspace = 8, - formFeed = 12, - byteOrderMark = 65279, - tab = 9, - verticalTab = 11, - } - interface CancellationToken { - isCancellationRequested(): boolean; - } - interface CompilerHost { - getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; - getDefaultLibFilename(options: CompilerOptions): string; - getCancellationToken?(): CancellationToken; - writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; - getCurrentDirectory(): string; - getCanonicalFileName(fileName: string): string; - useCaseSensitiveFileNames(): boolean; - getNewLine(): string; - } -} -declare module ts { - interface ErrorCallback { - (message: DiagnosticMessage): void; - } - interface CommentCallback { - (pos: number, end: number): void; - } - interface Scanner { - getStartPos(): number; - getToken(): SyntaxKind; - getTextPos(): number; - getTokenPos(): number; - getTokenText(): string; - getTokenValue(): string; - hasPrecedingLineBreak(): boolean; - isIdentifier(): boolean; - isReservedWord(): boolean; - isUnterminated(): boolean; - reScanGreaterToken(): SyntaxKind; - reScanSlashToken(): SyntaxKind; - reScanTemplateToken(): SyntaxKind; - scan(): SyntaxKind; - setText(text: string): void; - setTextPos(textPos: number): void; - lookAhead(callback: () => T): T; - tryScan(callback: () => T): T; - } - function tokenToString(t: SyntaxKind): string; - function computeLineStarts(text: string): number[]; - function getPositionFromLineAndCharacter(lineStarts: number[], line: number, character: number): number; - function getLineAndCharacterOfPosition(lineStarts: number[], position: number): { - line: number; - character: number; - }; - function positionToLineAndCharacter(text: string, pos: number): { - line: number; - character: number; - }; - function isWhiteSpace(ch: number): boolean; - function isLineBreak(ch: number): boolean; - function isOctalDigit(ch: number): boolean; - function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean): number; - function getLeadingCommentRanges(text: string, pos: number): CommentRange[]; - function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; - function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; - function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; - function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner; -} -declare module ts { - function getNodeConstructor(kind: SyntaxKind): new () => Node; - function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; - function createCompilerHost(options: CompilerOptions): CompilerHost; - function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; - function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; -} -declare module ts { - function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; -} -declare module ts { - var servicesVersion: string; - interface Node { - getSourceFile(): SourceFile; - getChildCount(sourceFile?: SourceFile): number; - getChildAt(index: number, sourceFile?: SourceFile): Node; - getChildren(sourceFile?: SourceFile): Node[]; - getStart(sourceFile?: SourceFile): number; - getFullStart(): number; - getEnd(): number; - getWidth(sourceFile?: SourceFile): number; - getFullWidth(): number; - getLeadingTriviaWidth(sourceFile?: SourceFile): number; - getFullText(sourceFile?: SourceFile): string; - getText(sourceFile?: SourceFile): string; - getFirstToken(sourceFile?: SourceFile): Node; - getLastToken(sourceFile?: SourceFile): Node; - } - interface Symbol { - getFlags(): SymbolFlags; - getName(): string; - getDeclarations(): Declaration[]; - getDocumentationComment(): SymbolDisplayPart[]; - } - interface Type { - getFlags(): TypeFlags; - getSymbol(): Symbol; - getProperties(): Symbol[]; - getProperty(propertyName: string): Symbol; - getApparentProperties(): Symbol[]; - getCallSignatures(): Signature[]; - getConstructSignatures(): Signature[]; - getStringIndexType(): Type; - getNumberIndexType(): Type; - } - interface Signature { - getDeclaration(): SignatureDeclaration; - getTypeParameters(): Type[]; - getParameters(): Symbol[]; - getReturnType(): Type; - getDocumentationComment(): SymbolDisplayPart[]; - } - interface SourceFile { - getScriptSnapshot(): IScriptSnapshot; - getNamedDeclarations(): Declaration[]; - update(scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; - } - /** - * Represents an immutable snapshot of a script at a specified time.Once acquired, the - * snapshot is observably immutable. i.e. the same calls with the same parameters will return - * the same values. - */ - interface IScriptSnapshot { - /** Gets a portion of the script snapshot specified by [start, end). */ - getText(start: number, end: number): string; - /** Gets the length of this script snapshot. */ - getLength(): number; - /** - * This call returns the array containing the start position of every line. - * i.e."[0, 10, 55]". TODO: consider making this optional. The language service could - * always determine this (albeit in a more expensive manner). - */ - getLineStartPositions(): number[]; - /** - * Gets the TextChangeRange that describe how the text changed between this text and - * an older version. This information is used by the incremental parser to determine - * what sections of the script need to be re-parsed. 'undefined' can be returned if the - * change range cannot be determined. However, in that case, incremental parsing will - * not happen and the entire document will be re - parsed. - */ - getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; - } - module ScriptSnapshot { - function fromString(text: string): IScriptSnapshot; - } - interface PreProcessedFileInfo { - referencedFiles: FileReference[]; - importedFiles: FileReference[]; - isLibFile: boolean; - } - interface Logger { - log(s: string): void; - } - interface LanguageServiceHost extends Logger { - getCompilationSettings(): CompilerOptions; - getScriptFileNames(): string[]; - getScriptVersion(fileName: string): string; - getScriptIsOpen(fileName: string): boolean; - getScriptSnapshot(fileName: string): IScriptSnapshot; - getLocalizedDiagnosticMessages?(): any; - getCancellationToken?(): CancellationToken; - getCurrentDirectory(): string; - getDefaultLibFilename(options: CompilerOptions): string; - } - interface LanguageService { - cleanupSemanticCache(): void; - getSyntacticDiagnostics(fileName: string): Diagnostic[]; - getSemanticDiagnostics(fileName: string): Diagnostic[]; - getCompilerOptionsDiagnostics(): Diagnostic[]; - getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; - getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; - getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; - getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; - getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; - getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; - getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan; - getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems; - getRenameInfo(fileName: string, position: number): RenameInfo; - findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[]; - getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; - getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; - getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; - getNavigateToItems(searchValue: string): NavigateToItem[]; - getNavigationBarItems(fileName: string): NavigationBarItem[]; - getOutliningSpans(fileName: string): OutliningSpan[]; - getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; - getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; - getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number; - getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[]; - getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; - getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[]; - getEmitOutput(fileName: string): EmitOutput; - getSourceFile(filename: string): SourceFile; - dispose(): void; - } - class TextSpan { - private _start; - private _length; - /** - * Creates a TextSpan instance beginning with the position Start and having the Length - * specified with length. - */ - constructor(start: number, length: number); - toJSON(key: any): any; - start(): number; - length(): number; - end(): number; - isEmpty(): boolean; - /** - * Determines whether the position lies within the span. Returns true if the position is greater than or equal to Start and strictly less - * than End, otherwise false. - * @param position The position to check. - */ - containsPosition(position: number): boolean; - /** - * Determines whether span falls completely within this span. Returns true if the specified span falls completely within this span, otherwise false. - * @param span The span to check. - */ - containsTextSpan(span: TextSpan): boolean; - /** - * Determines whether the given span overlaps this span. Two spans are considered to overlap - * if they have positions in common and neither is empty. Empty spans do not overlap with any - * other span. Returns true if the spans overlap, false otherwise. - * @param span The span to check. - */ - overlapsWith(span: TextSpan): boolean; - /** - * Returns the overlap with the given span, or undefined if there is no overlap. - * @param span The span to check. - */ - overlap(span: TextSpan): TextSpan; - /** - * Determines whether span intersects this span. Two spans are considered to - * intersect if they have positions in common or the end of one span - * coincides with the start of the other span. Returns true if the spans intersect, false otherwise. - * @param The span to check. - */ - intersectsWithTextSpan(span: TextSpan): boolean; - intersectsWith(start: number, length: number): boolean; - /** - * Determines whether the given position intersects this span. - * A position is considered to intersect if it is between the start and - * end positions (inclusive) of this span. Returns true if the position intersects, false otherwise. - * @param position The position to check. - */ - intersectsWithPosition(position: number): boolean; - /** - * Returns the intersection with the given span, or undefined if there is no intersection. - * @param span The span to check. - */ - intersection(span: TextSpan): TextSpan; - /** - * Creates a new TextSpan from the given start and end positions - * as opposed to a position and length. - */ - static fromBounds(start: number, end: number): TextSpan; - } - class TextChangeRange { - static unchanged: TextChangeRange; - private _span; - private _newLength; - /** - * Initializes a new instance of TextChangeRange. - */ - constructor(span: TextSpan, newLength: number); - /** - * The span of text before the edit which is being changed - */ - span(): TextSpan; - /** - * Width of the span after the edit. A 0 here would represent a delete - */ - newLength(): number; - newSpan(): TextSpan; - isUnchanged(): boolean; - /** - * Called to merge all the changes that occurred across several versions of a script snapshot - * into a single change. i.e. if a user keeps making successive edits to a script we will - * have a text change from V1 to V2, V2 to V3, ..., Vn. - * - * This function will then merge those changes into a single change range valid between V1 and - * Vn. - */ - static collapseChangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; - } - interface ClassifiedSpan { - textSpan: TextSpan; - classificationType: string; - } - interface NavigationBarItem { - text: string; - kind: string; - kindModifiers: string; - spans: TextSpan[]; - childItems: NavigationBarItem[]; - indent: number; - bolded: boolean; - grayed: boolean; - } - interface TodoCommentDescriptor { - text: string; - priority: number; - } - interface TodoComment { - descriptor: TodoCommentDescriptor; - message: string; - position: number; - } - class TextChange { - span: TextSpan; - newText: string; - } - interface RenameLocation { - textSpan: TextSpan; - fileName: string; - } - interface ReferenceEntry { - textSpan: TextSpan; - fileName: string; - isWriteAccess: boolean; - } - interface NavigateToItem { - name: string; - kind: string; - kindModifiers: string; - matchKind: string; - fileName: string; - textSpan: TextSpan; - containerName: string; - containerKind: string; - } - interface EditorOptions { - IndentSize: number; - TabSize: number; - NewLineCharacter: string; - ConvertTabsToSpaces: boolean; - } - interface FormatCodeOptions extends EditorOptions { - InsertSpaceAfterCommaDelimiter: boolean; - InsertSpaceAfterSemicolonInForStatements: boolean; - InsertSpaceBeforeAndAfterBinaryOperators: boolean; - InsertSpaceAfterKeywordsInControlFlowStatements: boolean; - InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; - InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; - PlaceOpenBraceOnNewLineForFunctions: boolean; - PlaceOpenBraceOnNewLineForControlBlocks: boolean; - } - interface DefinitionInfo { - fileName: string; - textSpan: TextSpan; - kind: string; - name: string; - containerKind: string; - containerName: string; - } - enum SymbolDisplayPartKind { - aliasName = 0, - className = 1, - enumName = 2, - fieldName = 3, - interfaceName = 4, - keyword = 5, - lineBreak = 6, - numericLiteral = 7, - stringLiteral = 8, - localName = 9, - methodName = 10, - moduleName = 11, - operator = 12, - parameterName = 13, - propertyName = 14, - punctuation = 15, - space = 16, - text = 17, - typeParameterName = 18, - enumMemberName = 19, - functionName = 20, - regularExpressionLiteral = 21, - } - interface SymbolDisplayPart { - text: string; - kind: string; - } - interface QuickInfo { - kind: string; - kindModifiers: string; - textSpan: TextSpan; - displayParts: SymbolDisplayPart[]; - documentation: SymbolDisplayPart[]; - } - interface RenameInfo { - canRename: boolean; - localizedErrorMessage: string; - displayName: string; - fullDisplayName: string; - kind: string; - kindModifiers: string; - triggerSpan: TextSpan; - } - interface SignatureHelpParameter { - name: string; - documentation: SymbolDisplayPart[]; - displayParts: SymbolDisplayPart[]; - isOptional: boolean; - } - /** - * Represents a single signature to show in signature help. - * The id is used for subsequent calls into the language service to ask questions about the - * signature help item in the context of any documents that have been updated. i.e. after - * an edit has happened, while signature help is still active, the host can ask important - * questions like 'what parameter is the user currently contained within?'. - */ - interface SignatureHelpItem { - isVariadic: boolean; - prefixDisplayParts: SymbolDisplayPart[]; - suffixDisplayParts: SymbolDisplayPart[]; - separatorDisplayParts: SymbolDisplayPart[]; - parameters: SignatureHelpParameter[]; - documentation: SymbolDisplayPart[]; - } - /** - * Represents a set of signature help items, and the preferred item that should be selected. - */ - interface SignatureHelpItems { - items: SignatureHelpItem[]; - applicableSpan: TextSpan; - selectedItemIndex: number; - argumentIndex: number; - argumentCount: number; - } - interface CompletionInfo { - isMemberCompletion: boolean; - entries: CompletionEntry[]; - } - interface CompletionEntry { - name: string; - kind: string; - kindModifiers: string; - } - interface CompletionEntryDetails { - name: string; - kind: string; - kindModifiers: string; - displayParts: SymbolDisplayPart[]; - documentation: SymbolDisplayPart[]; - } - interface OutliningSpan { - /** The span of the document to actually collapse. */ - textSpan: TextSpan; - /** The span of the document to display when the user hovers over the collapsed span. */ - hintSpan: TextSpan; - /** The text to display in the editor for the collapsed region. */ - bannerText: string; - /** - * Whether or not this region should be automatically collapsed when - * the 'Collapse to Definitions' command is invoked. - */ - autoCollapse: boolean; - } - interface EmitOutput { - outputFiles: OutputFile[]; - emitOutputStatus: EmitReturnStatus; - } - const enum OutputFileType { - JavaScript = 0, - SourceMap = 1, - Declaration = 2, - } - interface OutputFile { - name: string; - writeByteOrderMark: boolean; - text: string; - } - const enum EndOfLineState { - Start = 0, - InMultiLineCommentTrivia = 1, - InSingleQuoteStringLiteral = 2, - InDoubleQuoteStringLiteral = 3, - } - enum TokenClass { - Punctuation = 0, - Keyword = 1, - Operator = 2, - Comment = 3, - Whitespace = 4, - Identifier = 5, - NumberLiteral = 6, - StringLiteral = 7, - RegExpLiteral = 8, - } - interface ClassificationResult { - finalLexState: EndOfLineState; - entries: ClassificationInfo[]; - } - interface ClassificationInfo { - length: number; - classification: TokenClass; - } - interface Classifier { - getClassificationsForLine(text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean): ClassificationResult; - } - interface DocumentRegistry { - acquireDocument(filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean): SourceFile; - updateDocument(sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; - releaseDocument(filename: string, compilationSettings: CompilerOptions): void; - } - class ScriptElementKind { - static unknown: string; - static keyword: string; - static scriptElement: string; - static moduleElement: string; - static classElement: string; - static interfaceElement: string; - static typeElement: string; - static enumElement: string; - static variableElement: string; - static localVariableElement: string; - static functionElement: string; - static localFunctionElement: string; - static memberFunctionElement: string; - static memberGetAccessorElement: string; - static memberSetAccessorElement: string; - static memberVariableElement: string; - static constructorImplementationElement: string; - static callSignatureElement: string; - static indexSignatureElement: string; - static constructSignatureElement: string; - static parameterElement: string; - static typeParameterElement: string; - static primitiveType: string; - static label: string; - static alias: string; - static constElement: string; - static letElement: string; - } - class ScriptElementKindModifier { - static none: string; - static publicMemberModifier: string; - static privateMemberModifier: string; - static protectedMemberModifier: string; - static exportedModifier: string; - static ambientModifier: string; - static staticModifier: string; - } - class ClassificationTypeNames { - static comment: string; - static identifier: string; - static keyword: string; - static numericLiteral: string; - static operator: string; - static stringLiteral: string; - static whiteSpace: string; - static text: string; - static punctuation: string; - static className: string; - static enumName: string; - static interfaceName: string; - static moduleName: string; - static typeParameterName: string; - static typeAlias: string; - } - interface DisplayPartsSymbolWriter extends SymbolWriter { - displayParts(): SymbolDisplayPart[]; - } - function displayPartsToString(displayParts: SymbolDisplayPart[]): string; - function getDefaultCompilerOptions(): CompilerOptions; - class OperationCanceledException { - } - class CancellationTokenObject { - private cancellationToken; - static None: CancellationTokenObject; - constructor(cancellationToken: CancellationToken); - isCancellationRequested(): boolean; - throwIfCancellationRequested(): void; - } - function createDocumentRegistry(): DocumentRegistry; - function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; - function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry): LanguageService; - function createClassifier(host: Logger): Classifier; -} - - -//// [APISample_standalone_compile.js] -var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", 2 /* Latest */, "0.0"); -var program = ts.createProgram(["file1.ts"], {}, undefined); diff --git a/tests/baselines/reference/APISample_standalone_compile.types b/tests/baselines/reference/APISample_standalone_compile.types deleted file mode 100644 index 465a89b8f97..00000000000 --- a/tests/baselines/reference/APISample_standalone_compile.types +++ /dev/null @@ -1,5756 +0,0 @@ -=== tests/cases/compiler/APISample_standalone_compile.ts === - -var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); ->sourceFile : ts.SourceFile ->ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0") : ts.SourceFile ->ts.createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, version: string, isOpen?: boolean) => ts.SourceFile ->ts : typeof ts ->createSourceFile : (filename: string, sourceText: string, languageVersion: ts.ScriptTarget, version: string, isOpen?: boolean) => ts.SourceFile ->ts.ScriptTarget.Latest : ts.ScriptTarget ->ts.ScriptTarget : typeof ts.ScriptTarget ->ts : typeof ts ->ScriptTarget : typeof ts.ScriptTarget ->Latest : ts.ScriptTarget - -var program = ts.createProgram(["file1.ts"], {}, undefined); ->program : ts.Program ->ts.createProgram(["file1.ts"], {}, undefined) : ts.Program ->ts.createProgram : (rootNames: string[], options: ts.CompilerOptions, host: ts.CompilerHost) => ts.Program ->ts : typeof ts ->createProgram : (rootNames: string[], options: ts.CompilerOptions, host: ts.CompilerHost) => ts.Program ->["file1.ts"] : string[] ->{} : { [x: string]: undefined; } ->undefined : undefined - -=== typescriptServices.d.ts === -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ - -declare module ts { ->ts : typeof ts - - interface Map { ->Map : Map ->T : T - - [index: string]: T; ->index : string ->T : T - } - interface TextRange { ->TextRange : TextRange - - pos: number; ->pos : number - - end: number; ->end : number - } - const enum SyntaxKind { ->SyntaxKind : SyntaxKind - - Unknown = 0, ->Unknown : SyntaxKind - - EndOfFileToken = 1, ->EndOfFileToken : SyntaxKind - - SingleLineCommentTrivia = 2, ->SingleLineCommentTrivia : SyntaxKind - - MultiLineCommentTrivia = 3, ->MultiLineCommentTrivia : SyntaxKind - - NewLineTrivia = 4, ->NewLineTrivia : SyntaxKind - - WhitespaceTrivia = 5, ->WhitespaceTrivia : SyntaxKind - - NumericLiteral = 6, ->NumericLiteral : SyntaxKind - - StringLiteral = 7, ->StringLiteral : SyntaxKind - - RegularExpressionLiteral = 8, ->RegularExpressionLiteral : SyntaxKind - - NoSubstitutionTemplateLiteral = 9, ->NoSubstitutionTemplateLiteral : SyntaxKind - - TemplateHead = 10, ->TemplateHead : SyntaxKind - - TemplateMiddle = 11, ->TemplateMiddle : SyntaxKind - - TemplateTail = 12, ->TemplateTail : SyntaxKind - - OpenBraceToken = 13, ->OpenBraceToken : SyntaxKind - - CloseBraceToken = 14, ->CloseBraceToken : SyntaxKind - - OpenParenToken = 15, ->OpenParenToken : SyntaxKind - - CloseParenToken = 16, ->CloseParenToken : SyntaxKind - - OpenBracketToken = 17, ->OpenBracketToken : SyntaxKind - - CloseBracketToken = 18, ->CloseBracketToken : SyntaxKind - - DotToken = 19, ->DotToken : SyntaxKind - - DotDotDotToken = 20, ->DotDotDotToken : SyntaxKind - - SemicolonToken = 21, ->SemicolonToken : SyntaxKind - - CommaToken = 22, ->CommaToken : SyntaxKind - - LessThanToken = 23, ->LessThanToken : SyntaxKind - - GreaterThanToken = 24, ->GreaterThanToken : SyntaxKind - - LessThanEqualsToken = 25, ->LessThanEqualsToken : SyntaxKind - - GreaterThanEqualsToken = 26, ->GreaterThanEqualsToken : SyntaxKind - - EqualsEqualsToken = 27, ->EqualsEqualsToken : SyntaxKind - - ExclamationEqualsToken = 28, ->ExclamationEqualsToken : SyntaxKind - - EqualsEqualsEqualsToken = 29, ->EqualsEqualsEqualsToken : SyntaxKind - - ExclamationEqualsEqualsToken = 30, ->ExclamationEqualsEqualsToken : SyntaxKind - - EqualsGreaterThanToken = 31, ->EqualsGreaterThanToken : SyntaxKind - - PlusToken = 32, ->PlusToken : SyntaxKind - - MinusToken = 33, ->MinusToken : SyntaxKind - - AsteriskToken = 34, ->AsteriskToken : SyntaxKind - - SlashToken = 35, ->SlashToken : SyntaxKind - - PercentToken = 36, ->PercentToken : SyntaxKind - - PlusPlusToken = 37, ->PlusPlusToken : SyntaxKind - - MinusMinusToken = 38, ->MinusMinusToken : SyntaxKind - - LessThanLessThanToken = 39, ->LessThanLessThanToken : SyntaxKind - - GreaterThanGreaterThanToken = 40, ->GreaterThanGreaterThanToken : SyntaxKind - - GreaterThanGreaterThanGreaterThanToken = 41, ->GreaterThanGreaterThanGreaterThanToken : SyntaxKind - - AmpersandToken = 42, ->AmpersandToken : SyntaxKind - - BarToken = 43, ->BarToken : SyntaxKind - - CaretToken = 44, ->CaretToken : SyntaxKind - - ExclamationToken = 45, ->ExclamationToken : SyntaxKind - - TildeToken = 46, ->TildeToken : SyntaxKind - - AmpersandAmpersandToken = 47, ->AmpersandAmpersandToken : SyntaxKind - - BarBarToken = 48, ->BarBarToken : SyntaxKind - - QuestionToken = 49, ->QuestionToken : SyntaxKind - - ColonToken = 50, ->ColonToken : SyntaxKind - - EqualsToken = 51, ->EqualsToken : SyntaxKind - - PlusEqualsToken = 52, ->PlusEqualsToken : SyntaxKind - - MinusEqualsToken = 53, ->MinusEqualsToken : SyntaxKind - - AsteriskEqualsToken = 54, ->AsteriskEqualsToken : SyntaxKind - - SlashEqualsToken = 55, ->SlashEqualsToken : SyntaxKind - - PercentEqualsToken = 56, ->PercentEqualsToken : SyntaxKind - - LessThanLessThanEqualsToken = 57, ->LessThanLessThanEqualsToken : SyntaxKind - - GreaterThanGreaterThanEqualsToken = 58, ->GreaterThanGreaterThanEqualsToken : SyntaxKind - - GreaterThanGreaterThanGreaterThanEqualsToken = 59, ->GreaterThanGreaterThanGreaterThanEqualsToken : SyntaxKind - - AmpersandEqualsToken = 60, ->AmpersandEqualsToken : SyntaxKind - - BarEqualsToken = 61, ->BarEqualsToken : SyntaxKind - - CaretEqualsToken = 62, ->CaretEqualsToken : SyntaxKind - - Identifier = 63, ->Identifier : SyntaxKind - - BreakKeyword = 64, ->BreakKeyword : SyntaxKind - - CaseKeyword = 65, ->CaseKeyword : SyntaxKind - - CatchKeyword = 66, ->CatchKeyword : SyntaxKind - - ClassKeyword = 67, ->ClassKeyword : SyntaxKind - - ConstKeyword = 68, ->ConstKeyword : SyntaxKind - - ContinueKeyword = 69, ->ContinueKeyword : SyntaxKind - - DebuggerKeyword = 70, ->DebuggerKeyword : SyntaxKind - - DefaultKeyword = 71, ->DefaultKeyword : SyntaxKind - - DeleteKeyword = 72, ->DeleteKeyword : SyntaxKind - - DoKeyword = 73, ->DoKeyword : SyntaxKind - - ElseKeyword = 74, ->ElseKeyword : SyntaxKind - - EnumKeyword = 75, ->EnumKeyword : SyntaxKind - - ExportKeyword = 76, ->ExportKeyword : SyntaxKind - - ExtendsKeyword = 77, ->ExtendsKeyword : SyntaxKind - - FalseKeyword = 78, ->FalseKeyword : SyntaxKind - - FinallyKeyword = 79, ->FinallyKeyword : SyntaxKind - - ForKeyword = 80, ->ForKeyword : SyntaxKind - - FunctionKeyword = 81, ->FunctionKeyword : SyntaxKind - - IfKeyword = 82, ->IfKeyword : SyntaxKind - - ImportKeyword = 83, ->ImportKeyword : SyntaxKind - - InKeyword = 84, ->InKeyword : SyntaxKind - - InstanceOfKeyword = 85, ->InstanceOfKeyword : SyntaxKind - - NewKeyword = 86, ->NewKeyword : SyntaxKind - - NullKeyword = 87, ->NullKeyword : SyntaxKind - - ReturnKeyword = 88, ->ReturnKeyword : SyntaxKind - - SuperKeyword = 89, ->SuperKeyword : SyntaxKind - - SwitchKeyword = 90, ->SwitchKeyword : SyntaxKind - - ThisKeyword = 91, ->ThisKeyword : SyntaxKind - - ThrowKeyword = 92, ->ThrowKeyword : SyntaxKind - - TrueKeyword = 93, ->TrueKeyword : SyntaxKind - - TryKeyword = 94, ->TryKeyword : SyntaxKind - - TypeOfKeyword = 95, ->TypeOfKeyword : SyntaxKind - - VarKeyword = 96, ->VarKeyword : SyntaxKind - - VoidKeyword = 97, ->VoidKeyword : SyntaxKind - - WhileKeyword = 98, ->WhileKeyword : SyntaxKind - - WithKeyword = 99, ->WithKeyword : SyntaxKind - - ImplementsKeyword = 100, ->ImplementsKeyword : SyntaxKind - - InterfaceKeyword = 101, ->InterfaceKeyword : SyntaxKind - - LetKeyword = 102, ->LetKeyword : SyntaxKind - - PackageKeyword = 103, ->PackageKeyword : SyntaxKind - - PrivateKeyword = 104, ->PrivateKeyword : SyntaxKind - - ProtectedKeyword = 105, ->ProtectedKeyword : SyntaxKind - - PublicKeyword = 106, ->PublicKeyword : SyntaxKind - - StaticKeyword = 107, ->StaticKeyword : SyntaxKind - - YieldKeyword = 108, ->YieldKeyword : SyntaxKind - - AnyKeyword = 109, ->AnyKeyword : SyntaxKind - - BooleanKeyword = 110, ->BooleanKeyword : SyntaxKind - - ConstructorKeyword = 111, ->ConstructorKeyword : SyntaxKind - - DeclareKeyword = 112, ->DeclareKeyword : SyntaxKind - - GetKeyword = 113, ->GetKeyword : SyntaxKind - - ModuleKeyword = 114, ->ModuleKeyword : SyntaxKind - - RequireKeyword = 115, ->RequireKeyword : SyntaxKind - - NumberKeyword = 116, ->NumberKeyword : SyntaxKind - - SetKeyword = 117, ->SetKeyword : SyntaxKind - - StringKeyword = 118, ->StringKeyword : SyntaxKind - - TypeKeyword = 119, ->TypeKeyword : SyntaxKind - - QualifiedName = 120, ->QualifiedName : SyntaxKind - - ComputedPropertyName = 121, ->ComputedPropertyName : SyntaxKind - - TypeParameter = 122, ->TypeParameter : SyntaxKind - - Parameter = 123, ->Parameter : SyntaxKind - - Property = 124, ->Property : SyntaxKind - - Method = 125, ->Method : SyntaxKind - - Constructor = 126, ->Constructor : SyntaxKind - - GetAccessor = 127, ->GetAccessor : SyntaxKind - - SetAccessor = 128, ->SetAccessor : SyntaxKind - - CallSignature = 129, ->CallSignature : SyntaxKind - - ConstructSignature = 130, ->ConstructSignature : SyntaxKind - - IndexSignature = 131, ->IndexSignature : SyntaxKind - - TypeReference = 132, ->TypeReference : SyntaxKind - - FunctionType = 133, ->FunctionType : SyntaxKind - - ConstructorType = 134, ->ConstructorType : SyntaxKind - - TypeQuery = 135, ->TypeQuery : SyntaxKind - - TypeLiteral = 136, ->TypeLiteral : SyntaxKind - - ArrayType = 137, ->ArrayType : SyntaxKind - - TupleType = 138, ->TupleType : SyntaxKind - - UnionType = 139, ->UnionType : SyntaxKind - - ParenthesizedType = 140, ->ParenthesizedType : SyntaxKind - - ArrayLiteralExpression = 141, ->ArrayLiteralExpression : SyntaxKind - - ObjectLiteralExpression = 142, ->ObjectLiteralExpression : SyntaxKind - - PropertyAccessExpression = 143, ->PropertyAccessExpression : SyntaxKind - - ElementAccessExpression = 144, ->ElementAccessExpression : SyntaxKind - - CallExpression = 145, ->CallExpression : SyntaxKind - - NewExpression = 146, ->NewExpression : SyntaxKind - - TaggedTemplateExpression = 147, ->TaggedTemplateExpression : SyntaxKind - - TypeAssertionExpression = 148, ->TypeAssertionExpression : SyntaxKind - - ParenthesizedExpression = 149, ->ParenthesizedExpression : SyntaxKind - - FunctionExpression = 150, ->FunctionExpression : SyntaxKind - - ArrowFunction = 151, ->ArrowFunction : SyntaxKind - - DeleteExpression = 152, ->DeleteExpression : SyntaxKind - - TypeOfExpression = 153, ->TypeOfExpression : SyntaxKind - - VoidExpression = 154, ->VoidExpression : SyntaxKind - - PrefixUnaryExpression = 155, ->PrefixUnaryExpression : SyntaxKind - - PostfixUnaryExpression = 156, ->PostfixUnaryExpression : SyntaxKind - - BinaryExpression = 157, ->BinaryExpression : SyntaxKind - - ConditionalExpression = 158, ->ConditionalExpression : SyntaxKind - - TemplateExpression = 159, ->TemplateExpression : SyntaxKind - - YieldExpression = 160, ->YieldExpression : SyntaxKind - - OmittedExpression = 161, ->OmittedExpression : SyntaxKind - - TemplateSpan = 162, ->TemplateSpan : SyntaxKind - - Block = 163, ->Block : SyntaxKind - - VariableStatement = 164, ->VariableStatement : SyntaxKind - - EmptyStatement = 165, ->EmptyStatement : SyntaxKind - - ExpressionStatement = 166, ->ExpressionStatement : SyntaxKind - - IfStatement = 167, ->IfStatement : SyntaxKind - - DoStatement = 168, ->DoStatement : SyntaxKind - - WhileStatement = 169, ->WhileStatement : SyntaxKind - - ForStatement = 170, ->ForStatement : SyntaxKind - - ForInStatement = 171, ->ForInStatement : SyntaxKind - - ContinueStatement = 172, ->ContinueStatement : SyntaxKind - - BreakStatement = 173, ->BreakStatement : SyntaxKind - - ReturnStatement = 174, ->ReturnStatement : SyntaxKind - - WithStatement = 175, ->WithStatement : SyntaxKind - - SwitchStatement = 176, ->SwitchStatement : SyntaxKind - - LabeledStatement = 177, ->LabeledStatement : SyntaxKind - - ThrowStatement = 178, ->ThrowStatement : SyntaxKind - - TryStatement = 179, ->TryStatement : SyntaxKind - - TryBlock = 180, ->TryBlock : SyntaxKind - - FinallyBlock = 181, ->FinallyBlock : SyntaxKind - - DebuggerStatement = 182, ->DebuggerStatement : SyntaxKind - - VariableDeclaration = 183, ->VariableDeclaration : SyntaxKind - - FunctionDeclaration = 184, ->FunctionDeclaration : SyntaxKind - - ClassDeclaration = 185, ->ClassDeclaration : SyntaxKind - - InterfaceDeclaration = 186, ->InterfaceDeclaration : SyntaxKind - - TypeAliasDeclaration = 187, ->TypeAliasDeclaration : SyntaxKind - - EnumDeclaration = 188, ->EnumDeclaration : SyntaxKind - - ModuleDeclaration = 189, ->ModuleDeclaration : SyntaxKind - - ModuleBlock = 190, ->ModuleBlock : SyntaxKind - - ImportDeclaration = 191, ->ImportDeclaration : SyntaxKind - - ExportAssignment = 192, ->ExportAssignment : SyntaxKind - - ExternalModuleReference = 193, ->ExternalModuleReference : SyntaxKind - - CaseClause = 194, ->CaseClause : SyntaxKind - - DefaultClause = 195, ->DefaultClause : SyntaxKind - - HeritageClause = 196, ->HeritageClause : SyntaxKind - - CatchClause = 197, ->CatchClause : SyntaxKind - - PropertyAssignment = 198, ->PropertyAssignment : SyntaxKind - - ShorthandPropertyAssignment = 199, ->ShorthandPropertyAssignment : SyntaxKind - - EnumMember = 200, ->EnumMember : SyntaxKind - - SourceFile = 201, ->SourceFile : SyntaxKind - - Program = 202, ->Program : SyntaxKind - - SyntaxList = 203, ->SyntaxList : SyntaxKind - - Count = 204, ->Count : SyntaxKind - - FirstAssignment = 51, ->FirstAssignment : SyntaxKind - - LastAssignment = 62, ->LastAssignment : SyntaxKind - - FirstReservedWord = 64, ->FirstReservedWord : SyntaxKind - - LastReservedWord = 99, ->LastReservedWord : SyntaxKind - - FirstKeyword = 64, ->FirstKeyword : SyntaxKind - - LastKeyword = 119, ->LastKeyword : SyntaxKind - - FirstFutureReservedWord = 100, ->FirstFutureReservedWord : SyntaxKind - - LastFutureReservedWord = 108, ->LastFutureReservedWord : SyntaxKind - - FirstTypeNode = 132, ->FirstTypeNode : SyntaxKind - - LastTypeNode = 140, ->LastTypeNode : SyntaxKind - - FirstPunctuation = 13, ->FirstPunctuation : SyntaxKind - - LastPunctuation = 62, ->LastPunctuation : SyntaxKind - - FirstToken = 0, ->FirstToken : SyntaxKind - - LastToken = 119, ->LastToken : SyntaxKind - - FirstTriviaToken = 2, ->FirstTriviaToken : SyntaxKind - - LastTriviaToken = 5, ->LastTriviaToken : SyntaxKind - - FirstLiteralToken = 6, ->FirstLiteralToken : SyntaxKind - - LastLiteralToken = 9, ->LastLiteralToken : SyntaxKind - - FirstTemplateToken = 9, ->FirstTemplateToken : SyntaxKind - - LastTemplateToken = 12, ->LastTemplateToken : SyntaxKind - - FirstOperator = 21, ->FirstOperator : SyntaxKind - - LastOperator = 62, ->LastOperator : SyntaxKind - - FirstBinaryOperator = 23, ->FirstBinaryOperator : SyntaxKind - - LastBinaryOperator = 62, ->LastBinaryOperator : SyntaxKind - - FirstNode = 120, ->FirstNode : SyntaxKind - } - const enum NodeFlags { ->NodeFlags : NodeFlags - - Export = 1, ->Export : NodeFlags - - Ambient = 2, ->Ambient : NodeFlags - - Public = 16, ->Public : NodeFlags - - Private = 32, ->Private : NodeFlags - - Protected = 64, ->Protected : NodeFlags - - Static = 128, ->Static : NodeFlags - - MultiLine = 256, ->MultiLine : NodeFlags - - Synthetic = 512, ->Synthetic : NodeFlags - - DeclarationFile = 1024, ->DeclarationFile : NodeFlags - - Let = 2048, ->Let : NodeFlags - - Const = 4096, ->Const : NodeFlags - - OctalLiteral = 8192, ->OctalLiteral : NodeFlags - - Modifier = 243, ->Modifier : NodeFlags - - AccessibilityModifier = 112, ->AccessibilityModifier : NodeFlags - - BlockScoped = 6144, ->BlockScoped : NodeFlags - } - const enum ParserContextFlags { ->ParserContextFlags : ParserContextFlags - - StrictMode = 1, ->StrictMode : ParserContextFlags - - DisallowIn = 2, ->DisallowIn : ParserContextFlags - - Yield = 4, ->Yield : ParserContextFlags - - GeneratorParameter = 8, ->GeneratorParameter : ParserContextFlags - - ContainsError = 16, ->ContainsError : ParserContextFlags - - HasPropagatedChildContainsErrorFlag = 32, ->HasPropagatedChildContainsErrorFlag : ParserContextFlags - } - interface Node extends TextRange { ->Node : Node ->TextRange : TextRange - - kind: SyntaxKind; ->kind : SyntaxKind ->SyntaxKind : SyntaxKind - - flags: NodeFlags; ->flags : NodeFlags ->NodeFlags : NodeFlags - - parserContextFlags?: ParserContextFlags; ->parserContextFlags : ParserContextFlags ->ParserContextFlags : ParserContextFlags - - id?: number; ->id : number - - parent?: Node; ->parent : Node ->Node : Node - - symbol?: Symbol; ->symbol : Symbol ->Symbol : Symbol - - locals?: SymbolTable; ->locals : SymbolTable ->SymbolTable : SymbolTable - - nextContainer?: Node; ->nextContainer : Node ->Node : Node - - localSymbol?: Symbol; ->localSymbol : Symbol ->Symbol : Symbol - - modifiers?: ModifiersArray; ->modifiers : ModifiersArray ->ModifiersArray : ModifiersArray - } - interface NodeArray extends Array, TextRange { ->NodeArray : NodeArray ->T : T ->Array : T[] ->T : T ->TextRange : TextRange - - hasTrailingComma?: boolean; ->hasTrailingComma : boolean - } - interface ModifiersArray extends NodeArray { ->ModifiersArray : ModifiersArray ->NodeArray : NodeArray ->Node : Node - - flags: number; ->flags : number - } - interface Identifier extends PrimaryExpression { ->Identifier : Identifier ->PrimaryExpression : PrimaryExpression - - text: string; ->text : string - } - interface QualifiedName extends Node { ->QualifiedName : QualifiedName ->Node : Node - - left: EntityName; ->left : Identifier | QualifiedName ->EntityName : Identifier | QualifiedName - - right: Identifier; ->right : Identifier ->Identifier : Identifier - } - type EntityName = Identifier | QualifiedName; ->EntityName : Identifier | QualifiedName ->Identifier : Identifier ->QualifiedName : QualifiedName - - type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName ->Identifier : Identifier ->LiteralExpression : LiteralExpression ->ComputedPropertyName : ComputedPropertyName - - interface Declaration extends Node { ->Declaration : Declaration ->Node : Node - - _declarationBrand: any; ->_declarationBrand : any - - name?: DeclarationName; ->name : Identifier | LiteralExpression | ComputedPropertyName ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName - } - interface ComputedPropertyName extends Node { ->ComputedPropertyName : ComputedPropertyName ->Node : Node - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface TypeParameterDeclaration extends Declaration { ->TypeParameterDeclaration : TypeParameterDeclaration ->Declaration : Declaration - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - constraint?: TypeNode; ->constraint : TypeNode ->TypeNode : TypeNode - - expression?: Expression; ->expression : Expression ->Expression : Expression - } - interface SignatureDeclaration extends Declaration { ->SignatureDeclaration : SignatureDeclaration ->Declaration : Declaration - - typeParameters?: NodeArray; ->typeParameters : NodeArray ->NodeArray : NodeArray ->TypeParameterDeclaration : TypeParameterDeclaration - - parameters: NodeArray; ->parameters : NodeArray ->NodeArray : NodeArray ->ParameterDeclaration : ParameterDeclaration - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - } - interface VariableDeclaration extends Declaration { ->VariableDeclaration : VariableDeclaration ->Declaration : Declaration - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - } - interface ParameterDeclaration extends Declaration { ->ParameterDeclaration : ParameterDeclaration ->Declaration : Declaration - - dotDotDotToken?: Node; ->dotDotDotToken : Node ->Node : Node - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - questionToken?: Node; ->questionToken : Node ->Node : Node - - type?: TypeNode | StringLiteralExpression; ->type : TypeNode | StringLiteralExpression ->TypeNode : TypeNode ->StringLiteralExpression : StringLiteralExpression - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - } - interface PropertyDeclaration extends Declaration, ClassElement { ->PropertyDeclaration : PropertyDeclaration ->Declaration : Declaration ->ClassElement : ClassElement - - _propertyDeclarationBrand: any; ->_propertyDeclarationBrand : any - - questionToken?: Node; ->questionToken : Node ->Node : Node - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - } - type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; ->VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration ->VariableDeclaration : VariableDeclaration ->ParameterDeclaration : ParameterDeclaration - - type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; ->VariableOrParameterOrPropertyDeclaration : ParameterDeclaration | VariableDeclaration | PropertyDeclaration ->VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration ->PropertyDeclaration : PropertyDeclaration - - interface ObjectLiteralElement extends Declaration { ->ObjectLiteralElement : ObjectLiteralElement ->Declaration : Declaration - - _objectLiteralBrandBrand: any; ->_objectLiteralBrandBrand : any - } - interface ShorthandPropertyAssignment extends ObjectLiteralElement { ->ShorthandPropertyAssignment : ShorthandPropertyAssignment ->ObjectLiteralElement : ObjectLiteralElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - questionToken?: Node; ->questionToken : Node ->Node : Node - } - interface PropertyAssignment extends ObjectLiteralElement { ->PropertyAssignment : PropertyAssignment ->ObjectLiteralElement : ObjectLiteralElement - - _propertyAssignmentBrand: any; ->_propertyAssignmentBrand : any - - name: DeclarationName; ->name : Identifier | LiteralExpression | ComputedPropertyName ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName - - questionToken?: Node; ->questionToken : Node ->Node : Node - - initializer: Expression; ->initializer : Expression ->Expression : Expression - } - /** - * Several node kinds share function-like features such as a signature, - * a name, and a body. These nodes should extend FunctionLikeDeclaration. - * Examples: - * FunctionDeclaration - * MethodDeclaration - * AccessorDeclaration - */ - interface FunctionLikeDeclaration extends SignatureDeclaration { ->FunctionLikeDeclaration : FunctionLikeDeclaration ->SignatureDeclaration : SignatureDeclaration - - _functionLikeDeclarationBrand: any; ->_functionLikeDeclarationBrand : any - - asteriskToken?: Node; ->asteriskToken : Node ->Node : Node - - questionToken?: Node; ->questionToken : Node ->Node : Node - - body?: Block | Expression; ->body : Expression | Block ->Block : Block ->Expression : Expression - } - interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { ->FunctionDeclaration : FunctionDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration ->Statement : Statement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - body?: Block; ->body : Block ->Block : Block - } - interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { ->MethodDeclaration : MethodDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration ->ClassElement : ClassElement ->ObjectLiteralElement : ObjectLiteralElement - - body?: Block; ->body : Block ->Block : Block - } - interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { ->ConstructorDeclaration : ConstructorDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration ->ClassElement : ClassElement - - body?: Block; ->body : Block ->Block : Block - } - interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { ->AccessorDeclaration : AccessorDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration ->ClassElement : ClassElement ->ObjectLiteralElement : ObjectLiteralElement - - _accessorDeclarationBrand: any; ->_accessorDeclarationBrand : any - - body: Block; ->body : Block ->Block : Block - } - interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { ->IndexSignatureDeclaration : IndexSignatureDeclaration ->SignatureDeclaration : SignatureDeclaration ->ClassElement : ClassElement - - _indexSignatureDeclarationBrand: any; ->_indexSignatureDeclarationBrand : any - } - interface TypeNode extends Node { ->TypeNode : TypeNode ->Node : Node - - _typeNodeBrand: any; ->_typeNodeBrand : any - } - interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { ->FunctionOrConstructorTypeNode : FunctionOrConstructorTypeNode ->TypeNode : TypeNode ->SignatureDeclaration : SignatureDeclaration - - _functionOrConstructorTypeNodeBrand: any; ->_functionOrConstructorTypeNodeBrand : any - } - interface TypeReferenceNode extends TypeNode { ->TypeReferenceNode : TypeReferenceNode ->TypeNode : TypeNode - - typeName: EntityName; ->typeName : Identifier | QualifiedName ->EntityName : Identifier | QualifiedName - - typeArguments?: NodeArray; ->typeArguments : NodeArray ->NodeArray : NodeArray ->TypeNode : TypeNode - } - interface TypeQueryNode extends TypeNode { ->TypeQueryNode : TypeQueryNode ->TypeNode : TypeNode - - exprName: EntityName; ->exprName : Identifier | QualifiedName ->EntityName : Identifier | QualifiedName - } - interface TypeLiteralNode extends TypeNode, Declaration { ->TypeLiteralNode : TypeLiteralNode ->TypeNode : TypeNode ->Declaration : Declaration - - members: NodeArray; ->members : NodeArray ->NodeArray : NodeArray ->Node : Node - } - interface ArrayTypeNode extends TypeNode { ->ArrayTypeNode : ArrayTypeNode ->TypeNode : TypeNode - - elementType: TypeNode; ->elementType : TypeNode ->TypeNode : TypeNode - } - interface TupleTypeNode extends TypeNode { ->TupleTypeNode : TupleTypeNode ->TypeNode : TypeNode - - elementTypes: NodeArray; ->elementTypes : NodeArray ->NodeArray : NodeArray ->TypeNode : TypeNode - } - interface UnionTypeNode extends TypeNode { ->UnionTypeNode : UnionTypeNode ->TypeNode : TypeNode - - types: NodeArray; ->types : NodeArray ->NodeArray : NodeArray ->TypeNode : TypeNode - } - interface ParenthesizedTypeNode extends TypeNode { ->ParenthesizedTypeNode : ParenthesizedTypeNode ->TypeNode : TypeNode - - type: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - } - interface Expression extends Node { ->Expression : Expression ->Node : Node - - _expressionBrand: any; ->_expressionBrand : any - - contextualType?: Type; ->contextualType : Type ->Type : Type - } - interface UnaryExpression extends Expression { ->UnaryExpression : UnaryExpression ->Expression : Expression - - _unaryExpressionBrand: any; ->_unaryExpressionBrand : any - } - interface PrefixUnaryExpression extends UnaryExpression { ->PrefixUnaryExpression : PrefixUnaryExpression ->UnaryExpression : UnaryExpression - - operator: SyntaxKind; ->operator : SyntaxKind ->SyntaxKind : SyntaxKind - - operand: UnaryExpression; ->operand : UnaryExpression ->UnaryExpression : UnaryExpression - } - interface PostfixUnaryExpression extends PostfixExpression { ->PostfixUnaryExpression : PostfixUnaryExpression ->PostfixExpression : PostfixExpression - - operand: LeftHandSideExpression; ->operand : LeftHandSideExpression ->LeftHandSideExpression : LeftHandSideExpression - - operator: SyntaxKind; ->operator : SyntaxKind ->SyntaxKind : SyntaxKind - } - interface PostfixExpression extends UnaryExpression { ->PostfixExpression : PostfixExpression ->UnaryExpression : UnaryExpression - - _postfixExpressionBrand: any; ->_postfixExpressionBrand : any - } - interface LeftHandSideExpression extends PostfixExpression { ->LeftHandSideExpression : LeftHandSideExpression ->PostfixExpression : PostfixExpression - - _leftHandSideExpressionBrand: any; ->_leftHandSideExpressionBrand : any - } - interface MemberExpression extends LeftHandSideExpression { ->MemberExpression : MemberExpression ->LeftHandSideExpression : LeftHandSideExpression - - _memberExpressionBrand: any; ->_memberExpressionBrand : any - } - interface PrimaryExpression extends MemberExpression { ->PrimaryExpression : PrimaryExpression ->MemberExpression : MemberExpression - - _primaryExpressionBrand: any; ->_primaryExpressionBrand : any - } - interface DeleteExpression extends UnaryExpression { ->DeleteExpression : DeleteExpression ->UnaryExpression : UnaryExpression - - expression: UnaryExpression; ->expression : UnaryExpression ->UnaryExpression : UnaryExpression - } - interface TypeOfExpression extends UnaryExpression { ->TypeOfExpression : TypeOfExpression ->UnaryExpression : UnaryExpression - - expression: UnaryExpression; ->expression : UnaryExpression ->UnaryExpression : UnaryExpression - } - interface VoidExpression extends UnaryExpression { ->VoidExpression : VoidExpression ->UnaryExpression : UnaryExpression - - expression: UnaryExpression; ->expression : UnaryExpression ->UnaryExpression : UnaryExpression - } - interface YieldExpression extends Expression { ->YieldExpression : YieldExpression ->Expression : Expression - - asteriskToken?: Node; ->asteriskToken : Node ->Node : Node - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface BinaryExpression extends Expression { ->BinaryExpression : BinaryExpression ->Expression : Expression - - left: Expression; ->left : Expression ->Expression : Expression - - operator: SyntaxKind; ->operator : SyntaxKind ->SyntaxKind : SyntaxKind - - right: Expression; ->right : Expression ->Expression : Expression - } - interface ConditionalExpression extends Expression { ->ConditionalExpression : ConditionalExpression ->Expression : Expression - - condition: Expression; ->condition : Expression ->Expression : Expression - - whenTrue: Expression; ->whenTrue : Expression ->Expression : Expression - - whenFalse: Expression; ->whenFalse : Expression ->Expression : Expression - } - interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { ->FunctionExpression : FunctionExpression ->PrimaryExpression : PrimaryExpression ->FunctionLikeDeclaration : FunctionLikeDeclaration - - name?: Identifier; ->name : Identifier ->Identifier : Identifier - - body: Block | Expression; ->body : Expression | Block ->Block : Block ->Expression : Expression - } - interface LiteralExpression extends PrimaryExpression { ->LiteralExpression : LiteralExpression ->PrimaryExpression : PrimaryExpression - - text: string; ->text : string - - isUnterminated?: boolean; ->isUnterminated : boolean - } - interface StringLiteralExpression extends LiteralExpression { ->StringLiteralExpression : StringLiteralExpression ->LiteralExpression : LiteralExpression - - _stringLiteralExpressionBrand: any; ->_stringLiteralExpressionBrand : any - } - interface TemplateExpression extends PrimaryExpression { ->TemplateExpression : TemplateExpression ->PrimaryExpression : PrimaryExpression - - head: LiteralExpression; ->head : LiteralExpression ->LiteralExpression : LiteralExpression - - templateSpans: NodeArray; ->templateSpans : NodeArray ->NodeArray : NodeArray ->TemplateSpan : TemplateSpan - } - interface TemplateSpan extends Node { ->TemplateSpan : TemplateSpan ->Node : Node - - expression: Expression; ->expression : Expression ->Expression : Expression - - literal: LiteralExpression; ->literal : LiteralExpression ->LiteralExpression : LiteralExpression - } - interface ParenthesizedExpression extends PrimaryExpression { ->ParenthesizedExpression : ParenthesizedExpression ->PrimaryExpression : PrimaryExpression - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface ArrayLiteralExpression extends PrimaryExpression { ->ArrayLiteralExpression : ArrayLiteralExpression ->PrimaryExpression : PrimaryExpression - - elements: NodeArray; ->elements : NodeArray ->NodeArray : NodeArray ->Expression : Expression - } - interface ObjectLiteralExpression extends PrimaryExpression, Declaration { ->ObjectLiteralExpression : ObjectLiteralExpression ->PrimaryExpression : PrimaryExpression ->Declaration : Declaration - - properties: NodeArray; ->properties : NodeArray ->NodeArray : NodeArray ->ObjectLiteralElement : ObjectLiteralElement - } - interface PropertyAccessExpression extends MemberExpression { ->PropertyAccessExpression : PropertyAccessExpression ->MemberExpression : MemberExpression - - expression: LeftHandSideExpression; ->expression : LeftHandSideExpression ->LeftHandSideExpression : LeftHandSideExpression - - name: Identifier; ->name : Identifier ->Identifier : Identifier - } - interface ElementAccessExpression extends MemberExpression { ->ElementAccessExpression : ElementAccessExpression ->MemberExpression : MemberExpression - - expression: LeftHandSideExpression; ->expression : LeftHandSideExpression ->LeftHandSideExpression : LeftHandSideExpression - - argumentExpression?: Expression; ->argumentExpression : Expression ->Expression : Expression - } - interface CallExpression extends LeftHandSideExpression { ->CallExpression : CallExpression ->LeftHandSideExpression : LeftHandSideExpression - - expression: LeftHandSideExpression; ->expression : LeftHandSideExpression ->LeftHandSideExpression : LeftHandSideExpression - - typeArguments?: NodeArray; ->typeArguments : NodeArray ->NodeArray : NodeArray ->TypeNode : TypeNode - - arguments: NodeArray; ->arguments : NodeArray ->NodeArray : NodeArray ->Expression : Expression - } - interface NewExpression extends CallExpression, PrimaryExpression { ->NewExpression : NewExpression ->CallExpression : CallExpression ->PrimaryExpression : PrimaryExpression - } - interface TaggedTemplateExpression extends MemberExpression { ->TaggedTemplateExpression : TaggedTemplateExpression ->MemberExpression : MemberExpression - - tag: LeftHandSideExpression; ->tag : LeftHandSideExpression ->LeftHandSideExpression : LeftHandSideExpression - - template: LiteralExpression | TemplateExpression; ->template : LiteralExpression | TemplateExpression ->LiteralExpression : LiteralExpression ->TemplateExpression : TemplateExpression - } - type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression; ->CallLikeExpression : CallExpression | NewExpression | TaggedTemplateExpression ->CallExpression : CallExpression ->NewExpression : NewExpression ->TaggedTemplateExpression : TaggedTemplateExpression - - interface TypeAssertion extends UnaryExpression { ->TypeAssertion : TypeAssertion ->UnaryExpression : UnaryExpression - - type: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - - expression: UnaryExpression; ->expression : UnaryExpression ->UnaryExpression : UnaryExpression - } - interface Statement extends Node, ModuleElement { ->Statement : Statement ->Node : Node ->ModuleElement : ModuleElement - - _statementBrand: any; ->_statementBrand : any - } - interface Block extends Statement { ->Block : Block ->Statement : Statement - - statements: NodeArray; ->statements : NodeArray ->NodeArray : NodeArray ->Statement : Statement - } - interface VariableStatement extends Statement { ->VariableStatement : VariableStatement ->Statement : Statement - - declarations: NodeArray; ->declarations : NodeArray ->NodeArray : NodeArray ->VariableDeclaration : VariableDeclaration - } - interface ExpressionStatement extends Statement { ->ExpressionStatement : ExpressionStatement ->Statement : Statement - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface IfStatement extends Statement { ->IfStatement : IfStatement ->Statement : Statement - - expression: Expression; ->expression : Expression ->Expression : Expression - - thenStatement: Statement; ->thenStatement : Statement ->Statement : Statement - - elseStatement?: Statement; ->elseStatement : Statement ->Statement : Statement - } - interface IterationStatement extends Statement { ->IterationStatement : IterationStatement ->Statement : Statement - - statement: Statement; ->statement : Statement ->Statement : Statement - } - interface DoStatement extends IterationStatement { ->DoStatement : DoStatement ->IterationStatement : IterationStatement - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface WhileStatement extends IterationStatement { ->WhileStatement : WhileStatement ->IterationStatement : IterationStatement - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface ForStatement extends IterationStatement { ->ForStatement : ForStatement ->IterationStatement : IterationStatement - - declarations?: NodeArray; ->declarations : NodeArray ->NodeArray : NodeArray ->VariableDeclaration : VariableDeclaration - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - - condition?: Expression; ->condition : Expression ->Expression : Expression - - iterator?: Expression; ->iterator : Expression ->Expression : Expression - } - interface ForInStatement extends IterationStatement { ->ForInStatement : ForInStatement ->IterationStatement : IterationStatement - - declarations?: NodeArray; ->declarations : NodeArray ->NodeArray : NodeArray ->VariableDeclaration : VariableDeclaration - - variable?: Expression; ->variable : Expression ->Expression : Expression - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface BreakOrContinueStatement extends Statement { ->BreakOrContinueStatement : BreakOrContinueStatement ->Statement : Statement - - label?: Identifier; ->label : Identifier ->Identifier : Identifier - } - interface ReturnStatement extends Statement { ->ReturnStatement : ReturnStatement ->Statement : Statement - - expression?: Expression; ->expression : Expression ->Expression : Expression - } - interface WithStatement extends Statement { ->WithStatement : WithStatement ->Statement : Statement - - expression: Expression; ->expression : Expression ->Expression : Expression - - statement: Statement; ->statement : Statement ->Statement : Statement - } - interface SwitchStatement extends Statement { ->SwitchStatement : SwitchStatement ->Statement : Statement - - expression: Expression; ->expression : Expression ->Expression : Expression - - clauses: NodeArray; ->clauses : NodeArray ->NodeArray : NodeArray ->CaseOrDefaultClause : CaseClause | DefaultClause - } - interface CaseClause extends Node { ->CaseClause : CaseClause ->Node : Node - - expression?: Expression; ->expression : Expression ->Expression : Expression - - statements: NodeArray; ->statements : NodeArray ->NodeArray : NodeArray ->Statement : Statement - } - interface DefaultClause extends Node { ->DefaultClause : DefaultClause ->Node : Node - - statements: NodeArray; ->statements : NodeArray ->NodeArray : NodeArray ->Statement : Statement - } - type CaseOrDefaultClause = CaseClause | DefaultClause; ->CaseOrDefaultClause : CaseClause | DefaultClause ->CaseClause : CaseClause ->DefaultClause : DefaultClause - - interface LabeledStatement extends Statement { ->LabeledStatement : LabeledStatement ->Statement : Statement - - label: Identifier; ->label : Identifier ->Identifier : Identifier - - statement: Statement; ->statement : Statement ->Statement : Statement - } - interface ThrowStatement extends Statement { ->ThrowStatement : ThrowStatement ->Statement : Statement - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface TryStatement extends Statement { ->TryStatement : TryStatement ->Statement : Statement - - tryBlock: Block; ->tryBlock : Block ->Block : Block - - catchClause?: CatchClause; ->catchClause : CatchClause ->CatchClause : CatchClause - - finallyBlock?: Block; ->finallyBlock : Block ->Block : Block - } - interface CatchClause extends Declaration { ->CatchClause : CatchClause ->Declaration : Declaration - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - - block: Block; ->block : Block ->Block : Block - } - interface ModuleElement extends Node { ->ModuleElement : ModuleElement ->Node : Node - - _moduleElementBrand: any; ->_moduleElementBrand : any - } - interface ClassDeclaration extends Declaration, ModuleElement { ->ClassDeclaration : ClassDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - typeParameters?: NodeArray; ->typeParameters : NodeArray ->NodeArray : NodeArray ->TypeParameterDeclaration : TypeParameterDeclaration - - heritageClauses?: NodeArray; ->heritageClauses : NodeArray ->NodeArray : NodeArray ->HeritageClause : HeritageClause - - members: NodeArray; ->members : NodeArray ->NodeArray : NodeArray ->ClassElement : ClassElement - } - interface ClassElement extends Declaration { ->ClassElement : ClassElement ->Declaration : Declaration - - _classElementBrand: any; ->_classElementBrand : any - } - interface InterfaceDeclaration extends Declaration, ModuleElement { ->InterfaceDeclaration : InterfaceDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - typeParameters?: NodeArray; ->typeParameters : NodeArray ->NodeArray : NodeArray ->TypeParameterDeclaration : TypeParameterDeclaration - - heritageClauses?: NodeArray; ->heritageClauses : NodeArray ->NodeArray : NodeArray ->HeritageClause : HeritageClause - - members: NodeArray; ->members : NodeArray ->NodeArray : NodeArray ->Declaration : Declaration - } - interface HeritageClause extends Node { ->HeritageClause : HeritageClause ->Node : Node - - token: SyntaxKind; ->token : SyntaxKind ->SyntaxKind : SyntaxKind - - types?: NodeArray; ->types : NodeArray ->NodeArray : NodeArray ->TypeReferenceNode : TypeReferenceNode - } - interface TypeAliasDeclaration extends Declaration, ModuleElement { ->TypeAliasDeclaration : TypeAliasDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - type: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - } - interface EnumMember extends Declaration { ->EnumMember : EnumMember ->Declaration : Declaration - - name: DeclarationName; ->name : Identifier | LiteralExpression | ComputedPropertyName ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - } - interface EnumDeclaration extends Declaration, ModuleElement { ->EnumDeclaration : EnumDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - members: NodeArray; ->members : NodeArray ->NodeArray : NodeArray ->EnumMember : EnumMember - } - interface ModuleDeclaration extends Declaration, ModuleElement { ->ModuleDeclaration : ModuleDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier | LiteralExpression; ->name : Identifier | LiteralExpression ->Identifier : Identifier ->LiteralExpression : LiteralExpression - - body: ModuleBlock | ModuleDeclaration; ->body : ModuleDeclaration | ModuleBlock ->ModuleBlock : ModuleBlock ->ModuleDeclaration : ModuleDeclaration - } - interface ModuleBlock extends Node, ModuleElement { ->ModuleBlock : ModuleBlock ->Node : Node ->ModuleElement : ModuleElement - - statements: NodeArray; ->statements : NodeArray ->NodeArray : NodeArray ->ModuleElement : ModuleElement - } - interface ImportDeclaration extends Declaration, ModuleElement { ->ImportDeclaration : ImportDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - moduleReference: EntityName | ExternalModuleReference; ->moduleReference : Identifier | QualifiedName | ExternalModuleReference ->EntityName : Identifier | QualifiedName ->ExternalModuleReference : ExternalModuleReference - } - interface ExternalModuleReference extends Node { ->ExternalModuleReference : ExternalModuleReference ->Node : Node - - expression?: Expression; ->expression : Expression ->Expression : Expression - } - interface ExportAssignment extends Statement, ModuleElement { ->ExportAssignment : ExportAssignment ->Statement : Statement ->ModuleElement : ModuleElement - - exportName: Identifier; ->exportName : Identifier ->Identifier : Identifier - } - interface FileReference extends TextRange { ->FileReference : FileReference ->TextRange : TextRange - - filename: string; ->filename : string - } - interface CommentRange extends TextRange { ->CommentRange : CommentRange ->TextRange : TextRange - - hasTrailingNewLine?: boolean; ->hasTrailingNewLine : boolean - } - interface SourceFile extends Declaration { ->SourceFile : SourceFile ->Declaration : Declaration - - statements: NodeArray; ->statements : NodeArray ->NodeArray : NodeArray ->ModuleElement : ModuleElement - - endOfFileToken: Node; ->endOfFileToken : Node ->Node : Node - - filename: string; ->filename : string - - text: string; ->text : string - - getLineAndCharacterFromPosition(position: number): LineAndCharacter; ->getLineAndCharacterFromPosition : (position: number) => LineAndCharacter ->position : number ->LineAndCharacter : LineAndCharacter - - getPositionFromLineAndCharacter(line: number, character: number): number; ->getPositionFromLineAndCharacter : (line: number, character: number) => number ->line : number ->character : number - - getLineStarts(): number[]; ->getLineStarts : () => number[] - - amdDependencies: string[]; ->amdDependencies : string[] - - amdModuleName: string; ->amdModuleName : string - - referencedFiles: FileReference[]; ->referencedFiles : FileReference[] ->FileReference : FileReference - - referenceDiagnostics: Diagnostic[]; ->referenceDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - parseDiagnostics: Diagnostic[]; ->parseDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - grammarDiagnostics: Diagnostic[]; ->grammarDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - getSyntacticDiagnostics(): Diagnostic[]; ->getSyntacticDiagnostics : () => Diagnostic[] ->Diagnostic : Diagnostic - - semanticDiagnostics: Diagnostic[]; ->semanticDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - hasNoDefaultLib: boolean; ->hasNoDefaultLib : boolean - - externalModuleIndicator: Node; ->externalModuleIndicator : Node ->Node : Node - - nodeCount: number; ->nodeCount : number - - identifierCount: number; ->identifierCount : number - - symbolCount: number; ->symbolCount : number - - isOpen: boolean; ->isOpen : boolean - - version: string; ->version : string - - languageVersion: ScriptTarget; ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget - - identifiers: Map; ->identifiers : Map ->Map : Map - } - interface Program { ->Program : Program - - getSourceFile(filename: string): SourceFile; ->getSourceFile : (filename: string) => SourceFile ->filename : string ->SourceFile : SourceFile - - getSourceFiles(): SourceFile[]; ->getSourceFiles : () => SourceFile[] ->SourceFile : SourceFile - - getCompilerOptions(): CompilerOptions; ->getCompilerOptions : () => CompilerOptions ->CompilerOptions : CompilerOptions - - getCompilerHost(): CompilerHost; ->getCompilerHost : () => CompilerHost ->CompilerHost : CompilerHost - - getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; ->getDiagnostics : (sourceFile?: SourceFile) => Diagnostic[] ->sourceFile : SourceFile ->SourceFile : SourceFile ->Diagnostic : Diagnostic - - getGlobalDiagnostics(): Diagnostic[]; ->getGlobalDiagnostics : () => Diagnostic[] ->Diagnostic : Diagnostic - - getTypeChecker(fullTypeCheckMode: boolean): TypeChecker; ->getTypeChecker : (fullTypeCheckMode: boolean) => TypeChecker ->fullTypeCheckMode : boolean ->TypeChecker : TypeChecker - - getCommonSourceDirectory(): string; ->getCommonSourceDirectory : () => string - } - interface SourceMapSpan { ->SourceMapSpan : SourceMapSpan - - emittedLine: number; ->emittedLine : number - - emittedColumn: number; ->emittedColumn : number - - sourceLine: number; ->sourceLine : number - - sourceColumn: number; ->sourceColumn : number - - nameIndex?: number; ->nameIndex : number - - sourceIndex: number; ->sourceIndex : number - } - interface SourceMapData { ->SourceMapData : SourceMapData - - sourceMapFilePath: string; ->sourceMapFilePath : string - - jsSourceMappingURL: string; ->jsSourceMappingURL : string - - sourceMapFile: string; ->sourceMapFile : string - - sourceMapSourceRoot: string; ->sourceMapSourceRoot : string - - sourceMapSources: string[]; ->sourceMapSources : string[] - - inputSourceFileNames: string[]; ->inputSourceFileNames : string[] - - sourceMapNames?: string[]; ->sourceMapNames : string[] - - sourceMapMappings: string; ->sourceMapMappings : string - - sourceMapDecodedMappings: SourceMapSpan[]; ->sourceMapDecodedMappings : SourceMapSpan[] ->SourceMapSpan : SourceMapSpan - } - enum EmitReturnStatus { ->EmitReturnStatus : EmitReturnStatus - - Succeeded = 0, ->Succeeded : EmitReturnStatus - - AllOutputGenerationSkipped = 1, ->AllOutputGenerationSkipped : EmitReturnStatus - - JSGeneratedWithSemanticErrors = 2, ->JSGeneratedWithSemanticErrors : EmitReturnStatus - - DeclarationGenerationSkipped = 3, ->DeclarationGenerationSkipped : EmitReturnStatus - - EmitErrorsEncountered = 4, ->EmitErrorsEncountered : EmitReturnStatus - - CompilerOptionsErrors = 5, ->CompilerOptionsErrors : EmitReturnStatus - } - interface EmitResult { ->EmitResult : EmitResult - - emitResultStatus: EmitReturnStatus; ->emitResultStatus : EmitReturnStatus ->EmitReturnStatus : EmitReturnStatus - - diagnostics: Diagnostic[]; ->diagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - sourceMaps: SourceMapData[]; ->sourceMaps : SourceMapData[] ->SourceMapData : SourceMapData - } - interface TypeChecker { ->TypeChecker : TypeChecker - - getProgram(): Program; ->getProgram : () => Program ->Program : Program - - getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; ->getDiagnostics : (sourceFile?: SourceFile) => Diagnostic[] ->sourceFile : SourceFile ->SourceFile : SourceFile ->Diagnostic : Diagnostic - - getDeclarationDiagnostics(sourceFile: SourceFile): Diagnostic[]; ->getDeclarationDiagnostics : (sourceFile: SourceFile) => Diagnostic[] ->sourceFile : SourceFile ->SourceFile : SourceFile ->Diagnostic : Diagnostic - - getGlobalDiagnostics(): Diagnostic[]; ->getGlobalDiagnostics : () => Diagnostic[] ->Diagnostic : Diagnostic - - getNodeCount(): number; ->getNodeCount : () => number - - getIdentifierCount(): number; ->getIdentifierCount : () => number - - getSymbolCount(): number; ->getSymbolCount : () => number - - getTypeCount(): number; ->getTypeCount : () => number - - emitFiles(targetSourceFile?: SourceFile): EmitResult; ->emitFiles : (targetSourceFile?: SourceFile) => EmitResult ->targetSourceFile : SourceFile ->SourceFile : SourceFile ->EmitResult : EmitResult - - getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; ->getTypeOfSymbolAtLocation : (symbol: Symbol, node: Node) => Type ->symbol : Symbol ->Symbol : Symbol ->node : Node ->Node : Node ->Type : Type - - getDeclaredTypeOfSymbol(symbol: Symbol): Type; ->getDeclaredTypeOfSymbol : (symbol: Symbol) => Type ->symbol : Symbol ->Symbol : Symbol ->Type : Type - - getPropertiesOfType(type: Type): Symbol[]; ->getPropertiesOfType : (type: Type) => Symbol[] ->type : Type ->Type : Type ->Symbol : Symbol - - getPropertyOfType(type: Type, propertyName: string): Symbol; ->getPropertyOfType : (type: Type, propertyName: string) => Symbol ->type : Type ->Type : Type ->propertyName : string ->Symbol : Symbol - - getSignaturesOfType(type: Type, kind: SignatureKind): Signature[]; ->getSignaturesOfType : (type: Type, kind: SignatureKind) => Signature[] ->type : Type ->Type : Type ->kind : SignatureKind ->SignatureKind : SignatureKind ->Signature : Signature - - getIndexTypeOfType(type: Type, kind: IndexKind): Type; ->getIndexTypeOfType : (type: Type, kind: IndexKind) => Type ->type : Type ->Type : Type ->kind : IndexKind ->IndexKind : IndexKind ->Type : Type - - getReturnTypeOfSignature(signature: Signature): Type; ->getReturnTypeOfSignature : (signature: Signature) => Type ->signature : Signature ->Signature : Signature ->Type : Type - - getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; ->getSymbolsInScope : (location: Node, meaning: SymbolFlags) => Symbol[] ->location : Node ->Node : Node ->meaning : SymbolFlags ->SymbolFlags : SymbolFlags ->Symbol : Symbol - - getSymbolAtLocation(node: Node): Symbol; ->getSymbolAtLocation : (node: Node) => Symbol ->node : Node ->Node : Node ->Symbol : Symbol - - getShorthandAssignmentValueSymbol(location: Node): Symbol; ->getShorthandAssignmentValueSymbol : (location: Node) => Symbol ->location : Node ->Node : Node ->Symbol : Symbol - - getTypeAtLocation(node: Node): Type; ->getTypeAtLocation : (node: Node) => Type ->node : Node ->Node : Node ->Type : Type - - typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; ->typeToString : (type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => string ->type : Type ->Type : Type ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; ->symbolToString : (symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) => string ->symbol : Symbol ->Symbol : Symbol ->enclosingDeclaration : Node ->Node : Node ->meaning : SymbolFlags ->SymbolFlags : SymbolFlags - - getSymbolDisplayBuilder(): SymbolDisplayBuilder; ->getSymbolDisplayBuilder : () => SymbolDisplayBuilder ->SymbolDisplayBuilder : SymbolDisplayBuilder - - getFullyQualifiedName(symbol: Symbol): string; ->getFullyQualifiedName : (symbol: Symbol) => string ->symbol : Symbol ->Symbol : Symbol - - getAugmentedPropertiesOfType(type: Type): Symbol[]; ->getAugmentedPropertiesOfType : (type: Type) => Symbol[] ->type : Type ->Type : Type ->Symbol : Symbol - - getRootSymbols(symbol: Symbol): Symbol[]; ->getRootSymbols : (symbol: Symbol) => Symbol[] ->symbol : Symbol ->Symbol : Symbol ->Symbol : Symbol - - getContextualType(node: Expression): Type; ->getContextualType : (node: Expression) => Type ->node : Expression ->Expression : Expression ->Type : Type - - getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; ->getResolvedSignature : (node: CallExpression | NewExpression | TaggedTemplateExpression, candidatesOutArray?: Signature[]) => Signature ->node : CallExpression | NewExpression | TaggedTemplateExpression ->CallLikeExpression : CallExpression | NewExpression | TaggedTemplateExpression ->candidatesOutArray : Signature[] ->Signature : Signature ->Signature : Signature - - getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; ->getSignatureFromDeclaration : (declaration: SignatureDeclaration) => Signature ->declaration : SignatureDeclaration ->SignatureDeclaration : SignatureDeclaration ->Signature : Signature - - isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; ->isImplementationOfOverload : (node: FunctionLikeDeclaration) => boolean ->node : FunctionLikeDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration - - isUndefinedSymbol(symbol: Symbol): boolean; ->isUndefinedSymbol : (symbol: Symbol) => boolean ->symbol : Symbol ->Symbol : Symbol - - isArgumentsSymbol(symbol: Symbol): boolean; ->isArgumentsSymbol : (symbol: Symbol) => boolean ->symbol : Symbol ->Symbol : Symbol - - isEmitBlocked(sourceFile?: SourceFile): boolean; ->isEmitBlocked : (sourceFile?: SourceFile) => boolean ->sourceFile : SourceFile ->SourceFile : SourceFile - - getEnumMemberValue(node: EnumMember): number; ->getEnumMemberValue : (node: EnumMember) => number ->node : EnumMember ->EnumMember : EnumMember - - isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; ->isValidPropertyAccess : (node: QualifiedName | PropertyAccessExpression, propertyName: string) => boolean ->node : QualifiedName | PropertyAccessExpression ->PropertyAccessExpression : PropertyAccessExpression ->QualifiedName : QualifiedName ->propertyName : string - - getAliasedSymbol(symbol: Symbol): Symbol; ->getAliasedSymbol : (symbol: Symbol) => Symbol ->symbol : Symbol ->Symbol : Symbol ->Symbol : Symbol - } - interface SymbolDisplayBuilder { ->SymbolDisplayBuilder : SymbolDisplayBuilder - - buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildTypeDisplay : (type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->type : Type ->Type : Type ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void; ->buildSymbolDisplay : (symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags) => void ->symbol : Symbol ->Symbol : Symbol ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->meaning : SymbolFlags ->SymbolFlags : SymbolFlags ->flags : SymbolFormatFlags ->SymbolFormatFlags : SymbolFormatFlags - - buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildSignatureDisplay : (signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->signatures : Signature ->Signature : Signature ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildParameterDisplay : (parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->parameter : Symbol ->Symbol : Symbol ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildTypeParameterDisplay : (tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->tp : TypeParameter ->TypeParameter : TypeParameter ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void; ->buildTypeParameterDisplayFromSymbol : (symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags) => void ->symbol : Symbol ->Symbol : Symbol ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaraiton : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildDisplayForParametersAndDelimiters : (parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->parameters : Symbol[] ->Symbol : Symbol ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildDisplayForTypeParametersAndDelimiters : (typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->typeParameters : TypeParameter[] ->TypeParameter : TypeParameter ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildReturnTypeDisplay : (signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->signature : Signature ->Signature : Signature ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - } - interface SymbolWriter { ->SymbolWriter : SymbolWriter - - writeKeyword(text: string): void; ->writeKeyword : (text: string) => void ->text : string - - writeOperator(text: string): void; ->writeOperator : (text: string) => void ->text : string - - writePunctuation(text: string): void; ->writePunctuation : (text: string) => void ->text : string - - writeSpace(text: string): void; ->writeSpace : (text: string) => void ->text : string - - writeStringLiteral(text: string): void; ->writeStringLiteral : (text: string) => void ->text : string - - writeParameter(text: string): void; ->writeParameter : (text: string) => void ->text : string - - writeSymbol(text: string, symbol: Symbol): void; ->writeSymbol : (text: string, symbol: Symbol) => void ->text : string ->symbol : Symbol ->Symbol : Symbol - - writeLine(): void; ->writeLine : () => void - - increaseIndent(): void; ->increaseIndent : () => void - - decreaseIndent(): void; ->decreaseIndent : () => void - - clear(): void; ->clear : () => void - - trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void; ->trackSymbol : (symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) => void ->symbol : Symbol ->Symbol : Symbol ->enclosingDeclaration : Node ->Node : Node ->meaning : SymbolFlags ->SymbolFlags : SymbolFlags - } - const enum TypeFormatFlags { ->TypeFormatFlags : TypeFormatFlags - - None = 0, ->None : TypeFormatFlags - - WriteArrayAsGenericType = 1, ->WriteArrayAsGenericType : TypeFormatFlags - - UseTypeOfFunction = 2, ->UseTypeOfFunction : TypeFormatFlags - - NoTruncation = 4, ->NoTruncation : TypeFormatFlags - - WriteArrowStyleSignature = 8, ->WriteArrowStyleSignature : TypeFormatFlags - - WriteOwnNameForAnyLike = 16, ->WriteOwnNameForAnyLike : TypeFormatFlags - - WriteTypeArgumentsOfSignature = 32, ->WriteTypeArgumentsOfSignature : TypeFormatFlags - - InElementType = 64, ->InElementType : TypeFormatFlags - } - const enum SymbolFormatFlags { ->SymbolFormatFlags : SymbolFormatFlags - - None = 0, ->None : SymbolFormatFlags - - WriteTypeParametersOrArguments = 1, ->WriteTypeParametersOrArguments : SymbolFormatFlags - - UseOnlyExternalAliasing = 2, ->UseOnlyExternalAliasing : SymbolFormatFlags - } - const enum SymbolAccessibility { ->SymbolAccessibility : SymbolAccessibility - - Accessible = 0, ->Accessible : SymbolAccessibility - - NotAccessible = 1, ->NotAccessible : SymbolAccessibility - - CannotBeNamed = 2, ->CannotBeNamed : SymbolAccessibility - } - interface SymbolVisibilityResult { ->SymbolVisibilityResult : SymbolVisibilityResult - - accessibility: SymbolAccessibility; ->accessibility : SymbolAccessibility ->SymbolAccessibility : SymbolAccessibility - - aliasesToMakeVisible?: ImportDeclaration[]; ->aliasesToMakeVisible : ImportDeclaration[] ->ImportDeclaration : ImportDeclaration - - errorSymbolName?: string; ->errorSymbolName : string - - errorNode?: Node; ->errorNode : Node ->Node : Node - } - interface SymbolAccessiblityResult extends SymbolVisibilityResult { ->SymbolAccessiblityResult : SymbolAccessiblityResult ->SymbolVisibilityResult : SymbolVisibilityResult - - errorModuleName?: string; ->errorModuleName : string - } - interface EmitResolver { ->EmitResolver : EmitResolver - - getProgram(): Program; ->getProgram : () => Program ->Program : Program - - getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; ->getLocalNameOfContainer : (container: EnumDeclaration | ModuleDeclaration) => string ->container : EnumDeclaration | ModuleDeclaration ->ModuleDeclaration : ModuleDeclaration ->EnumDeclaration : EnumDeclaration - - getExpressionNamePrefix(node: Identifier): string; ->getExpressionNamePrefix : (node: Identifier) => string ->node : Identifier ->Identifier : Identifier - - getExportAssignmentName(node: SourceFile): string; ->getExportAssignmentName : (node: SourceFile) => string ->node : SourceFile ->SourceFile : SourceFile - - isReferencedImportDeclaration(node: ImportDeclaration): boolean; ->isReferencedImportDeclaration : (node: ImportDeclaration) => boolean ->node : ImportDeclaration ->ImportDeclaration : ImportDeclaration - - isTopLevelValueImportWithEntityName(node: ImportDeclaration): boolean; ->isTopLevelValueImportWithEntityName : (node: ImportDeclaration) => boolean ->node : ImportDeclaration ->ImportDeclaration : ImportDeclaration - - getNodeCheckFlags(node: Node): NodeCheckFlags; ->getNodeCheckFlags : (node: Node) => NodeCheckFlags ->node : Node ->Node : Node ->NodeCheckFlags : NodeCheckFlags - - getEnumMemberValue(node: EnumMember): number; ->getEnumMemberValue : (node: EnumMember) => number ->node : EnumMember ->EnumMember : EnumMember - - hasSemanticErrors(sourceFile?: SourceFile): boolean; ->hasSemanticErrors : (sourceFile?: SourceFile) => boolean ->sourceFile : SourceFile ->SourceFile : SourceFile - - isDeclarationVisible(node: Declaration): boolean; ->isDeclarationVisible : (node: Declaration) => boolean ->node : Declaration ->Declaration : Declaration - - isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; ->isImplementationOfOverload : (node: FunctionLikeDeclaration) => boolean ->node : FunctionLikeDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration - - writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; ->writeTypeOfDeclaration : (declaration: ParameterDeclaration | VariableDeclaration | AccessorDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void ->declaration : ParameterDeclaration | VariableDeclaration | AccessorDeclaration ->AccessorDeclaration : AccessorDeclaration ->VariableOrParameterDeclaration : ParameterDeclaration | VariableDeclaration ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags ->writer : SymbolWriter ->SymbolWriter : SymbolWriter - - writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; ->writeReturnTypeOfSignatureDeclaration : (signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void ->signatureDeclaration : SignatureDeclaration ->SignatureDeclaration : SignatureDeclaration ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags ->writer : SymbolWriter ->SymbolWriter : SymbolWriter - - isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; ->isSymbolAccessible : (symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags) => SymbolAccessiblityResult ->symbol : Symbol ->Symbol : Symbol ->enclosingDeclaration : Node ->Node : Node ->meaning : SymbolFlags ->SymbolFlags : SymbolFlags ->SymbolAccessiblityResult : SymbolAccessiblityResult - - isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; ->isEntityNameVisible : (entityName: Identifier | QualifiedName, enclosingDeclaration: Node) => SymbolVisibilityResult ->entityName : Identifier | QualifiedName ->EntityName : Identifier | QualifiedName ->enclosingDeclaration : Node ->Node : Node ->SymbolVisibilityResult : SymbolVisibilityResult - - getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number; ->getConstantValue : (node: PropertyAccessExpression | ElementAccessExpression) => number ->node : PropertyAccessExpression | ElementAccessExpression ->PropertyAccessExpression : PropertyAccessExpression ->ElementAccessExpression : ElementAccessExpression - - isEmitBlocked(sourceFile?: SourceFile): boolean; ->isEmitBlocked : (sourceFile?: SourceFile) => boolean ->sourceFile : SourceFile ->SourceFile : SourceFile - } - const enum SymbolFlags { ->SymbolFlags : SymbolFlags - - FunctionScopedVariable = 1, ->FunctionScopedVariable : SymbolFlags - - BlockScopedVariable = 2, ->BlockScopedVariable : SymbolFlags - - Property = 4, ->Property : SymbolFlags - - EnumMember = 8, ->EnumMember : SymbolFlags - - Function = 16, ->Function : SymbolFlags - - Class = 32, ->Class : SymbolFlags - - Interface = 64, ->Interface : SymbolFlags - - ConstEnum = 128, ->ConstEnum : SymbolFlags - - RegularEnum = 256, ->RegularEnum : SymbolFlags - - ValueModule = 512, ->ValueModule : SymbolFlags - - NamespaceModule = 1024, ->NamespaceModule : SymbolFlags - - TypeLiteral = 2048, ->TypeLiteral : SymbolFlags - - ObjectLiteral = 4096, ->ObjectLiteral : SymbolFlags - - Method = 8192, ->Method : SymbolFlags - - Constructor = 16384, ->Constructor : SymbolFlags - - GetAccessor = 32768, ->GetAccessor : SymbolFlags - - SetAccessor = 65536, ->SetAccessor : SymbolFlags - - CallSignature = 131072, ->CallSignature : SymbolFlags - - ConstructSignature = 262144, ->ConstructSignature : SymbolFlags - - IndexSignature = 524288, ->IndexSignature : SymbolFlags - - TypeParameter = 1048576, ->TypeParameter : SymbolFlags - - TypeAlias = 2097152, ->TypeAlias : SymbolFlags - - ExportValue = 4194304, ->ExportValue : SymbolFlags - - ExportType = 8388608, ->ExportType : SymbolFlags - - ExportNamespace = 16777216, ->ExportNamespace : SymbolFlags - - Import = 33554432, ->Import : SymbolFlags - - Instantiated = 67108864, ->Instantiated : SymbolFlags - - Merged = 134217728, ->Merged : SymbolFlags - - Transient = 268435456, ->Transient : SymbolFlags - - Prototype = 536870912, ->Prototype : SymbolFlags - - UnionProperty = 1073741824, ->UnionProperty : SymbolFlags - - Enum = 384, ->Enum : SymbolFlags - - Variable = 3, ->Variable : SymbolFlags - - Value = 107455, ->Value : SymbolFlags - - Type = 3152352, ->Type : SymbolFlags - - Namespace = 1536, ->Namespace : SymbolFlags - - Module = 1536, ->Module : SymbolFlags - - Accessor = 98304, ->Accessor : SymbolFlags - - Signature = 917504, ->Signature : SymbolFlags - - FunctionScopedVariableExcludes = 107454, ->FunctionScopedVariableExcludes : SymbolFlags - - BlockScopedVariableExcludes = 107455, ->BlockScopedVariableExcludes : SymbolFlags - - ParameterExcludes = 107455, ->ParameterExcludes : SymbolFlags - - PropertyExcludes = 107455, ->PropertyExcludes : SymbolFlags - - EnumMemberExcludes = 107455, ->EnumMemberExcludes : SymbolFlags - - FunctionExcludes = 106927, ->FunctionExcludes : SymbolFlags - - ClassExcludes = 3258879, ->ClassExcludes : SymbolFlags - - InterfaceExcludes = 3152288, ->InterfaceExcludes : SymbolFlags - - RegularEnumExcludes = 3258623, ->RegularEnumExcludes : SymbolFlags - - ConstEnumExcludes = 3259263, ->ConstEnumExcludes : SymbolFlags - - ValueModuleExcludes = 106639, ->ValueModuleExcludes : SymbolFlags - - NamespaceModuleExcludes = 0, ->NamespaceModuleExcludes : SymbolFlags - - MethodExcludes = 99263, ->MethodExcludes : SymbolFlags - - GetAccessorExcludes = 41919, ->GetAccessorExcludes : SymbolFlags - - SetAccessorExcludes = 74687, ->SetAccessorExcludes : SymbolFlags - - TypeParameterExcludes = 2103776, ->TypeParameterExcludes : SymbolFlags - - TypeAliasExcludes = 3152352, ->TypeAliasExcludes : SymbolFlags - - ImportExcludes = 33554432, ->ImportExcludes : SymbolFlags - - ModuleMember = 35653619, ->ModuleMember : SymbolFlags - - ExportHasLocal = 944, ->ExportHasLocal : SymbolFlags - - HasLocals = 1041936, ->HasLocals : SymbolFlags - - HasExports = 1952, ->HasExports : SymbolFlags - - HasMembers = 6240, ->HasMembers : SymbolFlags - - IsContainer = 1048560, ->IsContainer : SymbolFlags - - PropertyOrAccessor = 98308, ->PropertyOrAccessor : SymbolFlags - - Export = 29360128, ->Export : SymbolFlags - } - interface Symbol { ->Symbol : Symbol - - flags: SymbolFlags; ->flags : SymbolFlags ->SymbolFlags : SymbolFlags - - name: string; ->name : string - - id?: number; ->id : number - - mergeId?: number; ->mergeId : number - - declarations?: Declaration[]; ->declarations : Declaration[] ->Declaration : Declaration - - parent?: Symbol; ->parent : Symbol ->Symbol : Symbol - - members?: SymbolTable; ->members : SymbolTable ->SymbolTable : SymbolTable - - exports?: SymbolTable; ->exports : SymbolTable ->SymbolTable : SymbolTable - - exportSymbol?: Symbol; ->exportSymbol : Symbol ->Symbol : Symbol - - valueDeclaration?: Declaration; ->valueDeclaration : Declaration ->Declaration : Declaration - - constEnumOnlyModule?: boolean; ->constEnumOnlyModule : boolean - } - interface SymbolLinks { ->SymbolLinks : SymbolLinks - - target?: Symbol; ->target : Symbol ->Symbol : Symbol - - type?: Type; ->type : Type ->Type : Type - - declaredType?: Type; ->declaredType : Type ->Type : Type - - mapper?: TypeMapper; ->mapper : TypeMapper ->TypeMapper : TypeMapper - - referenced?: boolean; ->referenced : boolean - - exportAssignSymbol?: Symbol; ->exportAssignSymbol : Symbol ->Symbol : Symbol - - unionType?: UnionType; ->unionType : UnionType ->UnionType : UnionType - } - interface TransientSymbol extends Symbol, SymbolLinks { ->TransientSymbol : TransientSymbol ->Symbol : Symbol ->SymbolLinks : SymbolLinks - } - interface SymbolTable { ->SymbolTable : SymbolTable - - [index: string]: Symbol; ->index : string ->Symbol : Symbol - } - const enum NodeCheckFlags { ->NodeCheckFlags : NodeCheckFlags - - TypeChecked = 1, ->TypeChecked : NodeCheckFlags - - LexicalThis = 2, ->LexicalThis : NodeCheckFlags - - CaptureThis = 4, ->CaptureThis : NodeCheckFlags - - EmitExtends = 8, ->EmitExtends : NodeCheckFlags - - SuperInstance = 16, ->SuperInstance : NodeCheckFlags - - SuperStatic = 32, ->SuperStatic : NodeCheckFlags - - ContextChecked = 64, ->ContextChecked : NodeCheckFlags - - EnumValuesComputed = 128, ->EnumValuesComputed : NodeCheckFlags - } - interface NodeLinks { ->NodeLinks : NodeLinks - - resolvedType?: Type; ->resolvedType : Type ->Type : Type - - resolvedSignature?: Signature; ->resolvedSignature : Signature ->Signature : Signature - - resolvedSymbol?: Symbol; ->resolvedSymbol : Symbol ->Symbol : Symbol - - flags?: NodeCheckFlags; ->flags : NodeCheckFlags ->NodeCheckFlags : NodeCheckFlags - - enumMemberValue?: number; ->enumMemberValue : number - - isIllegalTypeReferenceInConstraint?: boolean; ->isIllegalTypeReferenceInConstraint : boolean - - isVisible?: boolean; ->isVisible : boolean - - localModuleName?: string; ->localModuleName : string - - assignmentChecks?: Map; ->assignmentChecks : Map ->Map : Map - } - const enum TypeFlags { ->TypeFlags : TypeFlags - - Any = 1, ->Any : TypeFlags - - String = 2, ->String : TypeFlags - - Number = 4, ->Number : TypeFlags - - Boolean = 8, ->Boolean : TypeFlags - - Void = 16, ->Void : TypeFlags - - Undefined = 32, ->Undefined : TypeFlags - - Null = 64, ->Null : TypeFlags - - Enum = 128, ->Enum : TypeFlags - - StringLiteral = 256, ->StringLiteral : TypeFlags - - TypeParameter = 512, ->TypeParameter : TypeFlags - - Class = 1024, ->Class : TypeFlags - - Interface = 2048, ->Interface : TypeFlags - - Reference = 4096, ->Reference : TypeFlags - - Tuple = 8192, ->Tuple : TypeFlags - - Union = 16384, ->Union : TypeFlags - - Anonymous = 32768, ->Anonymous : TypeFlags - - FromSignature = 65536, ->FromSignature : TypeFlags - - Intrinsic = 127, ->Intrinsic : TypeFlags - - StringLike = 258, ->StringLike : TypeFlags - - NumberLike = 132, ->NumberLike : TypeFlags - - ObjectType = 48128, ->ObjectType : TypeFlags - } - interface Type { ->Type : Type - - flags: TypeFlags; ->flags : TypeFlags ->TypeFlags : TypeFlags - - id: number; ->id : number - - symbol?: Symbol; ->symbol : Symbol ->Symbol : Symbol - } - interface IntrinsicType extends Type { ->IntrinsicType : IntrinsicType ->Type : Type - - intrinsicName: string; ->intrinsicName : string - } - interface StringLiteralType extends Type { ->StringLiteralType : StringLiteralType ->Type : Type - - text: string; ->text : string - } - interface ObjectType extends Type { ->ObjectType : ObjectType ->Type : Type - } - interface InterfaceType extends ObjectType { ->InterfaceType : InterfaceType ->ObjectType : ObjectType - - typeParameters: TypeParameter[]; ->typeParameters : TypeParameter[] ->TypeParameter : TypeParameter - - baseTypes: ObjectType[]; ->baseTypes : ObjectType[] ->ObjectType : ObjectType - - declaredProperties: Symbol[]; ->declaredProperties : Symbol[] ->Symbol : Symbol - - declaredCallSignatures: Signature[]; ->declaredCallSignatures : Signature[] ->Signature : Signature - - declaredConstructSignatures: Signature[]; ->declaredConstructSignatures : Signature[] ->Signature : Signature - - declaredStringIndexType: Type; ->declaredStringIndexType : Type ->Type : Type - - declaredNumberIndexType: Type; ->declaredNumberIndexType : Type ->Type : Type - } - interface TypeReference extends ObjectType { ->TypeReference : TypeReference ->ObjectType : ObjectType - - target: GenericType; ->target : GenericType ->GenericType : GenericType - - typeArguments: Type[]; ->typeArguments : Type[] ->Type : Type - } - interface GenericType extends InterfaceType, TypeReference { ->GenericType : GenericType ->InterfaceType : InterfaceType ->TypeReference : TypeReference - - instantiations: Map; ->instantiations : Map ->Map : Map ->TypeReference : TypeReference - - openReferenceTargets: GenericType[]; ->openReferenceTargets : GenericType[] ->GenericType : GenericType - - openReferenceChecks: Map; ->openReferenceChecks : Map ->Map : Map - } - interface TupleType extends ObjectType { ->TupleType : TupleType ->ObjectType : ObjectType - - elementTypes: Type[]; ->elementTypes : Type[] ->Type : Type - - baseArrayType: TypeReference; ->baseArrayType : TypeReference ->TypeReference : TypeReference - } - interface UnionType extends Type { ->UnionType : UnionType ->Type : Type - - types: Type[]; ->types : Type[] ->Type : Type - - resolvedProperties: SymbolTable; ->resolvedProperties : SymbolTable ->SymbolTable : SymbolTable - } - interface ResolvedType extends ObjectType, UnionType { ->ResolvedType : ResolvedType ->ObjectType : ObjectType ->UnionType : UnionType - - members: SymbolTable; ->members : SymbolTable ->SymbolTable : SymbolTable - - properties: Symbol[]; ->properties : Symbol[] ->Symbol : Symbol - - callSignatures: Signature[]; ->callSignatures : Signature[] ->Signature : Signature - - constructSignatures: Signature[]; ->constructSignatures : Signature[] ->Signature : Signature - - stringIndexType: Type; ->stringIndexType : Type ->Type : Type - - numberIndexType: Type; ->numberIndexType : Type ->Type : Type - } - interface TypeParameter extends Type { ->TypeParameter : TypeParameter ->Type : Type - - constraint: Type; ->constraint : Type ->Type : Type - - target?: TypeParameter; ->target : TypeParameter ->TypeParameter : TypeParameter - - mapper?: TypeMapper; ->mapper : TypeMapper ->TypeMapper : TypeMapper - } - const enum SignatureKind { ->SignatureKind : SignatureKind - - Call = 0, ->Call : SignatureKind - - Construct = 1, ->Construct : SignatureKind - } - interface Signature { ->Signature : Signature - - declaration: SignatureDeclaration; ->declaration : SignatureDeclaration ->SignatureDeclaration : SignatureDeclaration - - typeParameters: TypeParameter[]; ->typeParameters : TypeParameter[] ->TypeParameter : TypeParameter - - parameters: Symbol[]; ->parameters : Symbol[] ->Symbol : Symbol - - resolvedReturnType: Type; ->resolvedReturnType : Type ->Type : Type - - minArgumentCount: number; ->minArgumentCount : number - - hasRestParameter: boolean; ->hasRestParameter : boolean - - hasStringLiterals: boolean; ->hasStringLiterals : boolean - - target?: Signature; ->target : Signature ->Signature : Signature - - mapper?: TypeMapper; ->mapper : TypeMapper ->TypeMapper : TypeMapper - - unionSignatures?: Signature[]; ->unionSignatures : Signature[] ->Signature : Signature - - erasedSignatureCache?: Signature; ->erasedSignatureCache : Signature ->Signature : Signature - - isolatedSignatureType?: ObjectType; ->isolatedSignatureType : ObjectType ->ObjectType : ObjectType - } - const enum IndexKind { ->IndexKind : IndexKind - - String = 0, ->String : IndexKind - - Number = 1, ->Number : IndexKind - } - interface TypeMapper { ->TypeMapper : TypeMapper - - (t: Type): Type; ->t : Type ->Type : Type ->Type : Type - } - interface TypeInferences { ->TypeInferences : TypeInferences - - primary: Type[]; ->primary : Type[] ->Type : Type - - secondary: Type[]; ->secondary : Type[] ->Type : Type - } - interface InferenceContext { ->InferenceContext : InferenceContext - - typeParameters: TypeParameter[]; ->typeParameters : TypeParameter[] ->TypeParameter : TypeParameter - - inferUnionTypes: boolean; ->inferUnionTypes : boolean - - inferences: TypeInferences[]; ->inferences : TypeInferences[] ->TypeInferences : TypeInferences - - inferredTypes: Type[]; ->inferredTypes : Type[] ->Type : Type - - failedTypeParameterIndex?: number; ->failedTypeParameterIndex : number - } - interface DiagnosticMessage { ->DiagnosticMessage : DiagnosticMessage - - key: string; ->key : string - - category: DiagnosticCategory; ->category : DiagnosticCategory ->DiagnosticCategory : DiagnosticCategory - - code: number; ->code : number - - isEarly?: boolean; ->isEarly : boolean - } - interface DiagnosticMessageChain { ->DiagnosticMessageChain : DiagnosticMessageChain - - messageText: string; ->messageText : string - - category: DiagnosticCategory; ->category : DiagnosticCategory ->DiagnosticCategory : DiagnosticCategory - - code: number; ->code : number - - next?: DiagnosticMessageChain; ->next : DiagnosticMessageChain ->DiagnosticMessageChain : DiagnosticMessageChain - } - interface Diagnostic { ->Diagnostic : Diagnostic - - file: SourceFile; ->file : SourceFile ->SourceFile : SourceFile - - start: number; ->start : number - - length: number; ->length : number - - messageText: string; ->messageText : string - - category: DiagnosticCategory; ->category : DiagnosticCategory ->DiagnosticCategory : DiagnosticCategory - - code: number; ->code : number - - /** - * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit - */ - isEarly?: boolean; ->isEarly : boolean - } - enum DiagnosticCategory { ->DiagnosticCategory : DiagnosticCategory - - Warning = 0, ->Warning : DiagnosticCategory - - Error = 1, ->Error : DiagnosticCategory - - Message = 2, ->Message : DiagnosticCategory - } - interface CompilerOptions { ->CompilerOptions : CompilerOptions - - allowNonTsExtensions?: boolean; ->allowNonTsExtensions : boolean - - charset?: string; ->charset : string - - codepage?: number; ->codepage : number - - declaration?: boolean; ->declaration : boolean - - diagnostics?: boolean; ->diagnostics : boolean - - emitBOM?: boolean; ->emitBOM : boolean - - help?: boolean; ->help : boolean - - locale?: string; ->locale : string - - mapRoot?: string; ->mapRoot : string - - module?: ModuleKind; ->module : ModuleKind ->ModuleKind : ModuleKind - - noEmitOnError?: boolean; ->noEmitOnError : boolean - - noErrorTruncation?: boolean; ->noErrorTruncation : boolean - - noImplicitAny?: boolean; ->noImplicitAny : boolean - - noLib?: boolean; ->noLib : boolean - - noLibCheck?: boolean; ->noLibCheck : boolean - - noResolve?: boolean; ->noResolve : boolean - - out?: string; ->out : string - - outDir?: string; ->outDir : string - - preserveConstEnums?: boolean; ->preserveConstEnums : boolean - - removeComments?: boolean; ->removeComments : boolean - - sourceMap?: boolean; ->sourceMap : boolean - - sourceRoot?: string; ->sourceRoot : string - - suppressImplicitAnyIndexErrors?: boolean; ->suppressImplicitAnyIndexErrors : boolean - - target?: ScriptTarget; ->target : ScriptTarget ->ScriptTarget : ScriptTarget - - version?: boolean; ->version : boolean - - watch?: boolean; ->watch : boolean - - [option: string]: string | number | boolean; ->option : string - } - const enum ModuleKind { ->ModuleKind : ModuleKind - - None = 0, ->None : ModuleKind - - CommonJS = 1, ->CommonJS : ModuleKind - - AMD = 2, ->AMD : ModuleKind - } - interface LineAndCharacter { ->LineAndCharacter : LineAndCharacter - - line: number; ->line : number - - character: number; ->character : number - } - const enum ScriptTarget { ->ScriptTarget : ScriptTarget - - ES3 = 0, ->ES3 : ScriptTarget - - ES5 = 1, ->ES5 : ScriptTarget - - ES6 = 2, ->ES6 : ScriptTarget - - Latest = 2, ->Latest : ScriptTarget - } - interface ParsedCommandLine { ->ParsedCommandLine : ParsedCommandLine - - options: CompilerOptions; ->options : CompilerOptions ->CompilerOptions : CompilerOptions - - filenames: string[]; ->filenames : string[] - - errors: Diagnostic[]; ->errors : Diagnostic[] ->Diagnostic : Diagnostic - } - interface CommandLineOption { ->CommandLineOption : CommandLineOption - - name: string; ->name : string - - type: string | Map; ->type : string | Map ->Map : Map - - shortName?: string; ->shortName : string - - description?: DiagnosticMessage; ->description : DiagnosticMessage ->DiagnosticMessage : DiagnosticMessage - - paramType?: DiagnosticMessage; ->paramType : DiagnosticMessage ->DiagnosticMessage : DiagnosticMessage - - error?: DiagnosticMessage; ->error : DiagnosticMessage ->DiagnosticMessage : DiagnosticMessage - } - const enum CharacterCodes { ->CharacterCodes : CharacterCodes - - nullCharacter = 0, ->nullCharacter : CharacterCodes - - maxAsciiCharacter = 127, ->maxAsciiCharacter : CharacterCodes - - lineFeed = 10, ->lineFeed : CharacterCodes - - carriageReturn = 13, ->carriageReturn : CharacterCodes - - lineSeparator = 8232, ->lineSeparator : CharacterCodes - - paragraphSeparator = 8233, ->paragraphSeparator : CharacterCodes - - nextLine = 133, ->nextLine : CharacterCodes - - space = 32, ->space : CharacterCodes - - nonBreakingSpace = 160, ->nonBreakingSpace : CharacterCodes - - enQuad = 8192, ->enQuad : CharacterCodes - - emQuad = 8193, ->emQuad : CharacterCodes - - enSpace = 8194, ->enSpace : CharacterCodes - - emSpace = 8195, ->emSpace : CharacterCodes - - threePerEmSpace = 8196, ->threePerEmSpace : CharacterCodes - - fourPerEmSpace = 8197, ->fourPerEmSpace : CharacterCodes - - sixPerEmSpace = 8198, ->sixPerEmSpace : CharacterCodes - - figureSpace = 8199, ->figureSpace : CharacterCodes - - punctuationSpace = 8200, ->punctuationSpace : CharacterCodes - - thinSpace = 8201, ->thinSpace : CharacterCodes - - hairSpace = 8202, ->hairSpace : CharacterCodes - - zeroWidthSpace = 8203, ->zeroWidthSpace : CharacterCodes - - narrowNoBreakSpace = 8239, ->narrowNoBreakSpace : CharacterCodes - - ideographicSpace = 12288, ->ideographicSpace : CharacterCodes - - mathematicalSpace = 8287, ->mathematicalSpace : CharacterCodes - - ogham = 5760, ->ogham : CharacterCodes - - _ = 95, ->_ : CharacterCodes - - $ = 36, ->$ : CharacterCodes - - _0 = 48, ->_0 : CharacterCodes - - _1 = 49, ->_1 : CharacterCodes - - _2 = 50, ->_2 : CharacterCodes - - _3 = 51, ->_3 : CharacterCodes - - _4 = 52, ->_4 : CharacterCodes - - _5 = 53, ->_5 : CharacterCodes - - _6 = 54, ->_6 : CharacterCodes - - _7 = 55, ->_7 : CharacterCodes - - _8 = 56, ->_8 : CharacterCodes - - _9 = 57, ->_9 : CharacterCodes - - a = 97, ->a : CharacterCodes - - b = 98, ->b : CharacterCodes - - c = 99, ->c : CharacterCodes - - d = 100, ->d : CharacterCodes - - e = 101, ->e : CharacterCodes - - f = 102, ->f : CharacterCodes - - g = 103, ->g : CharacterCodes - - h = 104, ->h : CharacterCodes - - i = 105, ->i : CharacterCodes - - j = 106, ->j : CharacterCodes - - k = 107, ->k : CharacterCodes - - l = 108, ->l : CharacterCodes - - m = 109, ->m : CharacterCodes - - n = 110, ->n : CharacterCodes - - o = 111, ->o : CharacterCodes - - p = 112, ->p : CharacterCodes - - q = 113, ->q : CharacterCodes - - r = 114, ->r : CharacterCodes - - s = 115, ->s : CharacterCodes - - t = 116, ->t : CharacterCodes - - u = 117, ->u : CharacterCodes - - v = 118, ->v : CharacterCodes - - w = 119, ->w : CharacterCodes - - x = 120, ->x : CharacterCodes - - y = 121, ->y : CharacterCodes - - z = 122, ->z : CharacterCodes - - A = 65, ->A : CharacterCodes - - B = 66, ->B : CharacterCodes - - C = 67, ->C : CharacterCodes - - D = 68, ->D : CharacterCodes - - E = 69, ->E : CharacterCodes - - F = 70, ->F : CharacterCodes - - G = 71, ->G : CharacterCodes - - H = 72, ->H : CharacterCodes - - I = 73, ->I : CharacterCodes - - J = 74, ->J : CharacterCodes - - K = 75, ->K : CharacterCodes - - L = 76, ->L : CharacterCodes - - M = 77, ->M : CharacterCodes - - N = 78, ->N : CharacterCodes - - O = 79, ->O : CharacterCodes - - P = 80, ->P : CharacterCodes - - Q = 81, ->Q : CharacterCodes - - R = 82, ->R : CharacterCodes - - S = 83, ->S : CharacterCodes - - T = 84, ->T : CharacterCodes - - U = 85, ->U : CharacterCodes - - V = 86, ->V : CharacterCodes - - W = 87, ->W : CharacterCodes - - X = 88, ->X : CharacterCodes - - Y = 89, ->Y : CharacterCodes - - Z = 90, ->Z : CharacterCodes - - ampersand = 38, ->ampersand : CharacterCodes - - asterisk = 42, ->asterisk : CharacterCodes - - at = 64, ->at : CharacterCodes - - backslash = 92, ->backslash : CharacterCodes - - backtick = 96, ->backtick : CharacterCodes - - bar = 124, ->bar : CharacterCodes - - caret = 94, ->caret : CharacterCodes - - closeBrace = 125, ->closeBrace : CharacterCodes - - closeBracket = 93, ->closeBracket : CharacterCodes - - closeParen = 41, ->closeParen : CharacterCodes - - colon = 58, ->colon : CharacterCodes - - comma = 44, ->comma : CharacterCodes - - dot = 46, ->dot : CharacterCodes - - doubleQuote = 34, ->doubleQuote : CharacterCodes - - equals = 61, ->equals : CharacterCodes - - exclamation = 33, ->exclamation : CharacterCodes - - greaterThan = 62, ->greaterThan : CharacterCodes - - lessThan = 60, ->lessThan : CharacterCodes - - minus = 45, ->minus : CharacterCodes - - openBrace = 123, ->openBrace : CharacterCodes - - openBracket = 91, ->openBracket : CharacterCodes - - openParen = 40, ->openParen : CharacterCodes - - percent = 37, ->percent : CharacterCodes - - plus = 43, ->plus : CharacterCodes - - question = 63, ->question : CharacterCodes - - semicolon = 59, ->semicolon : CharacterCodes - - singleQuote = 39, ->singleQuote : CharacterCodes - - slash = 47, ->slash : CharacterCodes - - tilde = 126, ->tilde : CharacterCodes - - backspace = 8, ->backspace : CharacterCodes - - formFeed = 12, ->formFeed : CharacterCodes - - byteOrderMark = 65279, ->byteOrderMark : CharacterCodes - - tab = 9, ->tab : CharacterCodes - - verticalTab = 11, ->verticalTab : CharacterCodes - } - interface CancellationToken { ->CancellationToken : CancellationToken - - isCancellationRequested(): boolean; ->isCancellationRequested : () => boolean - } - interface CompilerHost { ->CompilerHost : CompilerHost - - getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; ->getSourceFile : (filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void) => SourceFile ->filename : string ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget ->onError : (message: string) => void ->message : string ->SourceFile : SourceFile - - getDefaultLibFilename(options: CompilerOptions): string; ->getDefaultLibFilename : (options: CompilerOptions) => string ->options : CompilerOptions ->CompilerOptions : CompilerOptions - - getCancellationToken?(): CancellationToken; ->getCancellationToken : () => CancellationToken ->CancellationToken : CancellationToken - - writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; ->writeFile : (filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void) => void ->filename : string ->data : string ->writeByteOrderMark : boolean ->onError : (message: string) => void ->message : string - - getCurrentDirectory(): string; ->getCurrentDirectory : () => string - - getCanonicalFileName(fileName: string): string; ->getCanonicalFileName : (fileName: string) => string ->fileName : string - - useCaseSensitiveFileNames(): boolean; ->useCaseSensitiveFileNames : () => boolean - - getNewLine(): string; ->getNewLine : () => string - } -} -declare module ts { ->ts : typeof ts - - interface ErrorCallback { ->ErrorCallback : ErrorCallback - - (message: DiagnosticMessage): void; ->message : DiagnosticMessage ->DiagnosticMessage : DiagnosticMessage - } - interface CommentCallback { ->CommentCallback : CommentCallback - - (pos: number, end: number): void; ->pos : number ->end : number - } - interface Scanner { ->Scanner : Scanner - - getStartPos(): number; ->getStartPos : () => number - - getToken(): SyntaxKind; ->getToken : () => SyntaxKind ->SyntaxKind : SyntaxKind - - getTextPos(): number; ->getTextPos : () => number - - getTokenPos(): number; ->getTokenPos : () => number - - getTokenText(): string; ->getTokenText : () => string - - getTokenValue(): string; ->getTokenValue : () => string - - hasPrecedingLineBreak(): boolean; ->hasPrecedingLineBreak : () => boolean - - isIdentifier(): boolean; ->isIdentifier : () => boolean - - isReservedWord(): boolean; ->isReservedWord : () => boolean - - isUnterminated(): boolean; ->isUnterminated : () => boolean - - reScanGreaterToken(): SyntaxKind; ->reScanGreaterToken : () => SyntaxKind ->SyntaxKind : SyntaxKind - - reScanSlashToken(): SyntaxKind; ->reScanSlashToken : () => SyntaxKind ->SyntaxKind : SyntaxKind - - reScanTemplateToken(): SyntaxKind; ->reScanTemplateToken : () => SyntaxKind ->SyntaxKind : SyntaxKind - - scan(): SyntaxKind; ->scan : () => SyntaxKind ->SyntaxKind : SyntaxKind - - setText(text: string): void; ->setText : (text: string) => void ->text : string - - setTextPos(textPos: number): void; ->setTextPos : (textPos: number) => void ->textPos : number - - lookAhead(callback: () => T): T; ->lookAhead : (callback: () => T) => T ->T : T ->callback : () => T ->T : T ->T : T - - tryScan(callback: () => T): T; ->tryScan : (callback: () => T) => T ->T : T ->callback : () => T ->T : T ->T : T - } - function tokenToString(t: SyntaxKind): string; ->tokenToString : (t: SyntaxKind) => string ->t : SyntaxKind ->SyntaxKind : SyntaxKind - - function computeLineStarts(text: string): number[]; ->computeLineStarts : (text: string) => number[] ->text : string - - function getPositionFromLineAndCharacter(lineStarts: number[], line: number, character: number): number; ->getPositionFromLineAndCharacter : (lineStarts: number[], line: number, character: number) => number ->lineStarts : number[] ->line : number ->character : number - - function getLineAndCharacterOfPosition(lineStarts: number[], position: number): { ->getLineAndCharacterOfPosition : (lineStarts: number[], position: number) => { line: number; character: number; } ->lineStarts : number[] ->position : number - - line: number; ->line : number - - character: number; ->character : number - - }; - function positionToLineAndCharacter(text: string, pos: number): { ->positionToLineAndCharacter : (text: string, pos: number) => { line: number; character: number; } ->text : string ->pos : number - - line: number; ->line : number - - character: number; ->character : number - - }; - function isWhiteSpace(ch: number): boolean; ->isWhiteSpace : (ch: number) => boolean ->ch : number - - function isLineBreak(ch: number): boolean; ->isLineBreak : (ch: number) => boolean ->ch : number - - function isOctalDigit(ch: number): boolean; ->isOctalDigit : (ch: number) => boolean ->ch : number - - function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean): number; ->skipTrivia : (text: string, pos: number, stopAfterLineBreak?: boolean) => number ->text : string ->pos : number ->stopAfterLineBreak : boolean - - function getLeadingCommentRanges(text: string, pos: number): CommentRange[]; ->getLeadingCommentRanges : (text: string, pos: number) => CommentRange[] ->text : string ->pos : number ->CommentRange : CommentRange - - function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; ->getTrailingCommentRanges : (text: string, pos: number) => CommentRange[] ->text : string ->pos : number ->CommentRange : CommentRange - - function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; ->isIdentifierStart : (ch: number, languageVersion: ScriptTarget) => boolean ->ch : number ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget - - function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; ->isIdentifierPart : (ch: number, languageVersion: ScriptTarget) => boolean ->ch : number ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget - - function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner; ->createScanner : (languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback) => Scanner ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget ->skipTrivia : boolean ->text : string ->onError : ErrorCallback ->ErrorCallback : ErrorCallback ->Scanner : Scanner -} -declare module ts { ->ts : typeof ts - - function getNodeConstructor(kind: SyntaxKind): new () => Node; ->getNodeConstructor : (kind: SyntaxKind) => new () => Node ->kind : SyntaxKind ->SyntaxKind : SyntaxKind ->Node : Node - - function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; ->forEachChild : (node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T) => T ->T : T ->node : Node ->Node : Node ->cbNode : (node: Node) => T ->node : Node ->Node : Node ->T : T ->cbNodes : (nodes: Node[]) => T ->nodes : Node[] ->Node : Node ->T : T ->T : T - - function createCompilerHost(options: CompilerOptions): CompilerHost; ->createCompilerHost : (options: CompilerOptions) => CompilerHost ->options : CompilerOptions ->CompilerOptions : CompilerOptions ->CompilerHost : CompilerHost - - function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; ->createSourceFile : (filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean) => SourceFile ->filename : string ->sourceText : string ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget ->version : string ->isOpen : boolean ->SourceFile : SourceFile - - function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; ->createProgram : (rootNames: string[], options: CompilerOptions, host: CompilerHost) => Program ->rootNames : string[] ->options : CompilerOptions ->CompilerOptions : CompilerOptions ->host : CompilerHost ->CompilerHost : CompilerHost ->Program : Program -} -declare module ts { ->ts : typeof ts - - function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; ->createTypeChecker : (program: Program, fullTypeCheck: boolean) => TypeChecker ->program : Program ->Program : Program ->fullTypeCheck : boolean ->TypeChecker : TypeChecker -} -declare module ts { ->ts : typeof ts - - var servicesVersion: string; ->servicesVersion : string - - interface Node { ->Node : Node - - getSourceFile(): SourceFile; ->getSourceFile : () => SourceFile ->SourceFile : SourceFile - - getChildCount(sourceFile?: SourceFile): number; ->getChildCount : (sourceFile?: SourceFile) => number ->sourceFile : SourceFile ->SourceFile : SourceFile - - getChildAt(index: number, sourceFile?: SourceFile): Node; ->getChildAt : (index: number, sourceFile?: SourceFile) => Node ->index : number ->sourceFile : SourceFile ->SourceFile : SourceFile ->Node : Node - - getChildren(sourceFile?: SourceFile): Node[]; ->getChildren : (sourceFile?: SourceFile) => Node[] ->sourceFile : SourceFile ->SourceFile : SourceFile ->Node : Node - - getStart(sourceFile?: SourceFile): number; ->getStart : (sourceFile?: SourceFile) => number ->sourceFile : SourceFile ->SourceFile : SourceFile - - getFullStart(): number; ->getFullStart : () => number - - getEnd(): number; ->getEnd : () => number - - getWidth(sourceFile?: SourceFile): number; ->getWidth : (sourceFile?: SourceFile) => number ->sourceFile : SourceFile ->SourceFile : SourceFile - - getFullWidth(): number; ->getFullWidth : () => number - - getLeadingTriviaWidth(sourceFile?: SourceFile): number; ->getLeadingTriviaWidth : (sourceFile?: SourceFile) => number ->sourceFile : SourceFile ->SourceFile : SourceFile - - getFullText(sourceFile?: SourceFile): string; ->getFullText : (sourceFile?: SourceFile) => string ->sourceFile : SourceFile ->SourceFile : SourceFile - - getText(sourceFile?: SourceFile): string; ->getText : (sourceFile?: SourceFile) => string ->sourceFile : SourceFile ->SourceFile : SourceFile - - getFirstToken(sourceFile?: SourceFile): Node; ->getFirstToken : (sourceFile?: SourceFile) => Node ->sourceFile : SourceFile ->SourceFile : SourceFile ->Node : Node - - getLastToken(sourceFile?: SourceFile): Node; ->getLastToken : (sourceFile?: SourceFile) => Node ->sourceFile : SourceFile ->SourceFile : SourceFile ->Node : Node - } - interface Symbol { ->Symbol : Symbol - - getFlags(): SymbolFlags; ->getFlags : () => SymbolFlags ->SymbolFlags : SymbolFlags - - getName(): string; ->getName : () => string - - getDeclarations(): Declaration[]; ->getDeclarations : () => Declaration[] ->Declaration : Declaration - - getDocumentationComment(): SymbolDisplayPart[]; ->getDocumentationComment : () => SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - interface Type { ->Type : Type - - getFlags(): TypeFlags; ->getFlags : () => TypeFlags ->TypeFlags : TypeFlags - - getSymbol(): Symbol; ->getSymbol : () => Symbol ->Symbol : Symbol - - getProperties(): Symbol[]; ->getProperties : () => Symbol[] ->Symbol : Symbol - - getProperty(propertyName: string): Symbol; ->getProperty : (propertyName: string) => Symbol ->propertyName : string ->Symbol : Symbol - - getApparentProperties(): Symbol[]; ->getApparentProperties : () => Symbol[] ->Symbol : Symbol - - getCallSignatures(): Signature[]; ->getCallSignatures : () => Signature[] ->Signature : Signature - - getConstructSignatures(): Signature[]; ->getConstructSignatures : () => Signature[] ->Signature : Signature - - getStringIndexType(): Type; ->getStringIndexType : () => Type ->Type : Type - - getNumberIndexType(): Type; ->getNumberIndexType : () => Type ->Type : Type - } - interface Signature { ->Signature : Signature - - getDeclaration(): SignatureDeclaration; ->getDeclaration : () => SignatureDeclaration ->SignatureDeclaration : SignatureDeclaration - - getTypeParameters(): Type[]; ->getTypeParameters : () => Type[] ->Type : Type - - getParameters(): Symbol[]; ->getParameters : () => Symbol[] ->Symbol : Symbol - - getReturnType(): Type; ->getReturnType : () => Type ->Type : Type - - getDocumentationComment(): SymbolDisplayPart[]; ->getDocumentationComment : () => SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - interface SourceFile { ->SourceFile : SourceFile - - getScriptSnapshot(): IScriptSnapshot; ->getScriptSnapshot : () => IScriptSnapshot ->IScriptSnapshot : IScriptSnapshot - - getNamedDeclarations(): Declaration[]; ->getNamedDeclarations : () => Declaration[] ->Declaration : Declaration - - update(scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; ->update : (scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange) => SourceFile ->scriptSnapshot : IScriptSnapshot ->IScriptSnapshot : IScriptSnapshot ->version : string ->isOpen : boolean ->textChangeRange : TextChangeRange ->TextChangeRange : TextChangeRange ->SourceFile : SourceFile - } - /** - * Represents an immutable snapshot of a script at a specified time.Once acquired, the - * snapshot is observably immutable. i.e. the same calls with the same parameters will return - * the same values. - */ - interface IScriptSnapshot { ->IScriptSnapshot : IScriptSnapshot - - /** Gets a portion of the script snapshot specified by [start, end). */ - getText(start: number, end: number): string; ->getText : (start: number, end: number) => string ->start : number ->end : number - - /** Gets the length of this script snapshot. */ - getLength(): number; ->getLength : () => number - - /** - * This call returns the array containing the start position of every line. - * i.e."[0, 10, 55]". TODO: consider making this optional. The language service could - * always determine this (albeit in a more expensive manner). - */ - getLineStartPositions(): number[]; ->getLineStartPositions : () => number[] - - /** - * Gets the TextChangeRange that describe how the text changed between this text and - * an older version. This information is used by the incremental parser to determine - * what sections of the script need to be re-parsed. 'undefined' can be returned if the - * change range cannot be determined. However, in that case, incremental parsing will - * not happen and the entire document will be re - parsed. - */ - getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; ->getChangeRange : (oldSnapshot: IScriptSnapshot) => TextChangeRange ->oldSnapshot : IScriptSnapshot ->IScriptSnapshot : IScriptSnapshot ->TextChangeRange : TextChangeRange - } - module ScriptSnapshot { ->ScriptSnapshot : typeof ScriptSnapshot - - function fromString(text: string): IScriptSnapshot; ->fromString : (text: string) => IScriptSnapshot ->text : string ->IScriptSnapshot : IScriptSnapshot - } - interface PreProcessedFileInfo { ->PreProcessedFileInfo : PreProcessedFileInfo - - referencedFiles: FileReference[]; ->referencedFiles : FileReference[] ->FileReference : FileReference - - importedFiles: FileReference[]; ->importedFiles : FileReference[] ->FileReference : FileReference - - isLibFile: boolean; ->isLibFile : boolean - } - interface Logger { ->Logger : Logger - - log(s: string): void; ->log : (s: string) => void ->s : string - } - interface LanguageServiceHost extends Logger { ->LanguageServiceHost : LanguageServiceHost ->Logger : Logger - - getCompilationSettings(): CompilerOptions; ->getCompilationSettings : () => CompilerOptions ->CompilerOptions : CompilerOptions - - getScriptFileNames(): string[]; ->getScriptFileNames : () => string[] - - getScriptVersion(fileName: string): string; ->getScriptVersion : (fileName: string) => string ->fileName : string - - getScriptIsOpen(fileName: string): boolean; ->getScriptIsOpen : (fileName: string) => boolean ->fileName : string - - getScriptSnapshot(fileName: string): IScriptSnapshot; ->getScriptSnapshot : (fileName: string) => IScriptSnapshot ->fileName : string ->IScriptSnapshot : IScriptSnapshot - - getLocalizedDiagnosticMessages?(): any; ->getLocalizedDiagnosticMessages : () => any - - getCancellationToken?(): CancellationToken; ->getCancellationToken : () => CancellationToken ->CancellationToken : CancellationToken - - getCurrentDirectory(): string; ->getCurrentDirectory : () => string - - getDefaultLibFilename(options: CompilerOptions): string; ->getDefaultLibFilename : (options: CompilerOptions) => string ->options : CompilerOptions ->CompilerOptions : CompilerOptions - } - interface LanguageService { ->LanguageService : LanguageService - - cleanupSemanticCache(): void; ->cleanupSemanticCache : () => void - - getSyntacticDiagnostics(fileName: string): Diagnostic[]; ->getSyntacticDiagnostics : (fileName: string) => Diagnostic[] ->fileName : string ->Diagnostic : Diagnostic - - getSemanticDiagnostics(fileName: string): Diagnostic[]; ->getSemanticDiagnostics : (fileName: string) => Diagnostic[] ->fileName : string ->Diagnostic : Diagnostic - - getCompilerOptionsDiagnostics(): Diagnostic[]; ->getCompilerOptionsDiagnostics : () => Diagnostic[] ->Diagnostic : Diagnostic - - getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; ->getSyntacticClassifications : (fileName: string, span: TextSpan) => ClassifiedSpan[] ->fileName : string ->span : TextSpan ->TextSpan : TextSpan ->ClassifiedSpan : ClassifiedSpan - - getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; ->getSemanticClassifications : (fileName: string, span: TextSpan) => ClassifiedSpan[] ->fileName : string ->span : TextSpan ->TextSpan : TextSpan ->ClassifiedSpan : ClassifiedSpan - - getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; ->getCompletionsAtPosition : (fileName: string, position: number) => CompletionInfo ->fileName : string ->position : number ->CompletionInfo : CompletionInfo - - getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; ->getCompletionEntryDetails : (fileName: string, position: number, entryName: string) => CompletionEntryDetails ->fileName : string ->position : number ->entryName : string ->CompletionEntryDetails : CompletionEntryDetails - - getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; ->getQuickInfoAtPosition : (fileName: string, position: number) => QuickInfo ->fileName : string ->position : number ->QuickInfo : QuickInfo - - getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; ->getNameOrDottedNameSpan : (fileName: string, startPos: number, endPos: number) => TextSpan ->fileName : string ->startPos : number ->endPos : number ->TextSpan : TextSpan - - getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan; ->getBreakpointStatementAtPosition : (fileName: string, position: number) => TextSpan ->fileName : string ->position : number ->TextSpan : TextSpan - - getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems; ->getSignatureHelpItems : (fileName: string, position: number) => SignatureHelpItems ->fileName : string ->position : number ->SignatureHelpItems : SignatureHelpItems - - getRenameInfo(fileName: string, position: number): RenameInfo; ->getRenameInfo : (fileName: string, position: number) => RenameInfo ->fileName : string ->position : number ->RenameInfo : RenameInfo - - findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[]; ->findRenameLocations : (fileName: string, position: number, findInStrings: boolean, findInComments: boolean) => RenameLocation[] ->fileName : string ->position : number ->findInStrings : boolean ->findInComments : boolean ->RenameLocation : RenameLocation - - getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; ->getDefinitionAtPosition : (fileName: string, position: number) => DefinitionInfo[] ->fileName : string ->position : number ->DefinitionInfo : DefinitionInfo - - getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; ->getReferencesAtPosition : (fileName: string, position: number) => ReferenceEntry[] ->fileName : string ->position : number ->ReferenceEntry : ReferenceEntry - - getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; ->getOccurrencesAtPosition : (fileName: string, position: number) => ReferenceEntry[] ->fileName : string ->position : number ->ReferenceEntry : ReferenceEntry - - getNavigateToItems(searchValue: string): NavigateToItem[]; ->getNavigateToItems : (searchValue: string) => NavigateToItem[] ->searchValue : string ->NavigateToItem : NavigateToItem - - getNavigationBarItems(fileName: string): NavigationBarItem[]; ->getNavigationBarItems : (fileName: string) => NavigationBarItem[] ->fileName : string ->NavigationBarItem : NavigationBarItem - - getOutliningSpans(fileName: string): OutliningSpan[]; ->getOutliningSpans : (fileName: string) => OutliningSpan[] ->fileName : string ->OutliningSpan : OutliningSpan - - getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; ->getTodoComments : (fileName: string, descriptors: TodoCommentDescriptor[]) => TodoComment[] ->fileName : string ->descriptors : TodoCommentDescriptor[] ->TodoCommentDescriptor : TodoCommentDescriptor ->TodoComment : TodoComment - - getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; ->getBraceMatchingAtPosition : (fileName: string, position: number) => TextSpan[] ->fileName : string ->position : number ->TextSpan : TextSpan - - getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number; ->getIndentationAtPosition : (fileName: string, position: number, options: EditorOptions) => number ->fileName : string ->position : number ->options : EditorOptions ->EditorOptions : EditorOptions - - getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[]; ->getFormattingEditsForRange : (fileName: string, start: number, end: number, options: FormatCodeOptions) => TextChange[] ->fileName : string ->start : number ->end : number ->options : FormatCodeOptions ->FormatCodeOptions : FormatCodeOptions ->TextChange : TextChange - - getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; ->getFormattingEditsForDocument : (fileName: string, options: FormatCodeOptions) => TextChange[] ->fileName : string ->options : FormatCodeOptions ->FormatCodeOptions : FormatCodeOptions ->TextChange : TextChange - - getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[]; ->getFormattingEditsAfterKeystroke : (fileName: string, position: number, key: string, options: FormatCodeOptions) => TextChange[] ->fileName : string ->position : number ->key : string ->options : FormatCodeOptions ->FormatCodeOptions : FormatCodeOptions ->TextChange : TextChange - - getEmitOutput(fileName: string): EmitOutput; ->getEmitOutput : (fileName: string) => EmitOutput ->fileName : string ->EmitOutput : EmitOutput - - getSourceFile(filename: string): SourceFile; ->getSourceFile : (filename: string) => SourceFile ->filename : string ->SourceFile : SourceFile - - dispose(): void; ->dispose : () => void - } - class TextSpan { ->TextSpan : TextSpan - - private _start; ->_start : any - - private _length; ->_length : any - - /** - * Creates a TextSpan instance beginning with the position Start and having the Length - * specified with length. - */ - constructor(start: number, length: number); ->start : number ->length : number - - toJSON(key: any): any; ->toJSON : (key: any) => any ->key : any - - start(): number; ->start : () => number - - length(): number; ->length : () => number - - end(): number; ->end : () => number - - isEmpty(): boolean; ->isEmpty : () => boolean - - /** - * Determines whether the position lies within the span. Returns true if the position is greater than or equal to Start and strictly less - * than End, otherwise false. - * @param position The position to check. - */ - containsPosition(position: number): boolean; ->containsPosition : (position: number) => boolean ->position : number - - /** - * Determines whether span falls completely within this span. Returns true if the specified span falls completely within this span, otherwise false. - * @param span The span to check. - */ - containsTextSpan(span: TextSpan): boolean; ->containsTextSpan : (span: TextSpan) => boolean ->span : TextSpan ->TextSpan : TextSpan - - /** - * Determines whether the given span overlaps this span. Two spans are considered to overlap - * if they have positions in common and neither is empty. Empty spans do not overlap with any - * other span. Returns true if the spans overlap, false otherwise. - * @param span The span to check. - */ - overlapsWith(span: TextSpan): boolean; ->overlapsWith : (span: TextSpan) => boolean ->span : TextSpan ->TextSpan : TextSpan - - /** - * Returns the overlap with the given span, or undefined if there is no overlap. - * @param span The span to check. - */ - overlap(span: TextSpan): TextSpan; ->overlap : (span: TextSpan) => TextSpan ->span : TextSpan ->TextSpan : TextSpan ->TextSpan : TextSpan - - /** - * Determines whether span intersects this span. Two spans are considered to - * intersect if they have positions in common or the end of one span - * coincides with the start of the other span. Returns true if the spans intersect, false otherwise. - * @param The span to check. - */ - intersectsWithTextSpan(span: TextSpan): boolean; ->intersectsWithTextSpan : (span: TextSpan) => boolean ->span : TextSpan ->TextSpan : TextSpan - - intersectsWith(start: number, length: number): boolean; ->intersectsWith : (start: number, length: number) => boolean ->start : number ->length : number - - /** - * Determines whether the given position intersects this span. - * A position is considered to intersect if it is between the start and - * end positions (inclusive) of this span. Returns true if the position intersects, false otherwise. - * @param position The position to check. - */ - intersectsWithPosition(position: number): boolean; ->intersectsWithPosition : (position: number) => boolean ->position : number - - /** - * Returns the intersection with the given span, or undefined if there is no intersection. - * @param span The span to check. - */ - intersection(span: TextSpan): TextSpan; ->intersection : (span: TextSpan) => TextSpan ->span : TextSpan ->TextSpan : TextSpan ->TextSpan : TextSpan - - /** - * Creates a new TextSpan from the given start and end positions - * as opposed to a position and length. - */ - static fromBounds(start: number, end: number): TextSpan; ->fromBounds : (start: number, end: number) => TextSpan ->start : number ->end : number ->TextSpan : TextSpan - } - class TextChangeRange { ->TextChangeRange : TextChangeRange - - static unchanged: TextChangeRange; ->unchanged : TextChangeRange ->TextChangeRange : TextChangeRange - - private _span; ->_span : any - - private _newLength; ->_newLength : any - - /** - * Initializes a new instance of TextChangeRange. - */ - constructor(span: TextSpan, newLength: number); ->span : TextSpan ->TextSpan : TextSpan ->newLength : number - - /** - * The span of text before the edit which is being changed - */ - span(): TextSpan; ->span : () => TextSpan ->TextSpan : TextSpan - - /** - * Width of the span after the edit. A 0 here would represent a delete - */ - newLength(): number; ->newLength : () => number - - newSpan(): TextSpan; ->newSpan : () => TextSpan ->TextSpan : TextSpan - - isUnchanged(): boolean; ->isUnchanged : () => boolean - - /** - * Called to merge all the changes that occurred across several versions of a script snapshot - * into a single change. i.e. if a user keeps making successive edits to a script we will - * have a text change from V1 to V2, V2 to V3, ..., Vn. - * - * This function will then merge those changes into a single change range valid between V1 and - * Vn. - */ - static collapseChangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; ->collapseChangesAcrossMultipleVersions : (changes: TextChangeRange[]) => TextChangeRange ->changes : TextChangeRange[] ->TextChangeRange : TextChangeRange ->TextChangeRange : TextChangeRange - } - interface ClassifiedSpan { ->ClassifiedSpan : ClassifiedSpan - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - classificationType: string; ->classificationType : string - } - interface NavigationBarItem { ->NavigationBarItem : NavigationBarItem - - text: string; ->text : string - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - - spans: TextSpan[]; ->spans : TextSpan[] ->TextSpan : TextSpan - - childItems: NavigationBarItem[]; ->childItems : NavigationBarItem[] ->NavigationBarItem : NavigationBarItem - - indent: number; ->indent : number - - bolded: boolean; ->bolded : boolean - - grayed: boolean; ->grayed : boolean - } - interface TodoCommentDescriptor { ->TodoCommentDescriptor : TodoCommentDescriptor - - text: string; ->text : string - - priority: number; ->priority : number - } - interface TodoComment { ->TodoComment : TodoComment - - descriptor: TodoCommentDescriptor; ->descriptor : TodoCommentDescriptor ->TodoCommentDescriptor : TodoCommentDescriptor - - message: string; ->message : string - - position: number; ->position : number - } - class TextChange { ->TextChange : TextChange - - span: TextSpan; ->span : TextSpan ->TextSpan : TextSpan - - newText: string; ->newText : string - } - interface RenameLocation { ->RenameLocation : RenameLocation - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - fileName: string; ->fileName : string - } - interface ReferenceEntry { ->ReferenceEntry : ReferenceEntry - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - fileName: string; ->fileName : string - - isWriteAccess: boolean; ->isWriteAccess : boolean - } - interface NavigateToItem { ->NavigateToItem : NavigateToItem - - name: string; ->name : string - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - - matchKind: string; ->matchKind : string - - fileName: string; ->fileName : string - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - containerName: string; ->containerName : string - - containerKind: string; ->containerKind : string - } - interface EditorOptions { ->EditorOptions : EditorOptions - - IndentSize: number; ->IndentSize : number - - TabSize: number; ->TabSize : number - - NewLineCharacter: string; ->NewLineCharacter : string - - ConvertTabsToSpaces: boolean; ->ConvertTabsToSpaces : boolean - } - interface FormatCodeOptions extends EditorOptions { ->FormatCodeOptions : FormatCodeOptions ->EditorOptions : EditorOptions - - InsertSpaceAfterCommaDelimiter: boolean; ->InsertSpaceAfterCommaDelimiter : boolean - - InsertSpaceAfterSemicolonInForStatements: boolean; ->InsertSpaceAfterSemicolonInForStatements : boolean - - InsertSpaceBeforeAndAfterBinaryOperators: boolean; ->InsertSpaceBeforeAndAfterBinaryOperators : boolean - - InsertSpaceAfterKeywordsInControlFlowStatements: boolean; ->InsertSpaceAfterKeywordsInControlFlowStatements : boolean - - InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; ->InsertSpaceAfterFunctionKeywordForAnonymousFunctions : boolean - - InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; ->InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis : boolean - - PlaceOpenBraceOnNewLineForFunctions: boolean; ->PlaceOpenBraceOnNewLineForFunctions : boolean - - PlaceOpenBraceOnNewLineForControlBlocks: boolean; ->PlaceOpenBraceOnNewLineForControlBlocks : boolean - } - interface DefinitionInfo { ->DefinitionInfo : DefinitionInfo - - fileName: string; ->fileName : string - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - kind: string; ->kind : string - - name: string; ->name : string - - containerKind: string; ->containerKind : string - - containerName: string; ->containerName : string - } - enum SymbolDisplayPartKind { ->SymbolDisplayPartKind : SymbolDisplayPartKind - - aliasName = 0, ->aliasName : SymbolDisplayPartKind - - className = 1, ->className : SymbolDisplayPartKind - - enumName = 2, ->enumName : SymbolDisplayPartKind - - fieldName = 3, ->fieldName : SymbolDisplayPartKind - - interfaceName = 4, ->interfaceName : SymbolDisplayPartKind - - keyword = 5, ->keyword : SymbolDisplayPartKind - - lineBreak = 6, ->lineBreak : SymbolDisplayPartKind - - numericLiteral = 7, ->numericLiteral : SymbolDisplayPartKind - - stringLiteral = 8, ->stringLiteral : SymbolDisplayPartKind - - localName = 9, ->localName : SymbolDisplayPartKind - - methodName = 10, ->methodName : SymbolDisplayPartKind - - moduleName = 11, ->moduleName : SymbolDisplayPartKind - - operator = 12, ->operator : SymbolDisplayPartKind - - parameterName = 13, ->parameterName : SymbolDisplayPartKind - - propertyName = 14, ->propertyName : SymbolDisplayPartKind - - punctuation = 15, ->punctuation : SymbolDisplayPartKind - - space = 16, ->space : SymbolDisplayPartKind - - text = 17, ->text : SymbolDisplayPartKind - - typeParameterName = 18, ->typeParameterName : SymbolDisplayPartKind - - enumMemberName = 19, ->enumMemberName : SymbolDisplayPartKind - - functionName = 20, ->functionName : SymbolDisplayPartKind - - regularExpressionLiteral = 21, ->regularExpressionLiteral : SymbolDisplayPartKind - } - interface SymbolDisplayPart { ->SymbolDisplayPart : SymbolDisplayPart - - text: string; ->text : string - - kind: string; ->kind : string - } - interface QuickInfo { ->QuickInfo : QuickInfo - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - displayParts: SymbolDisplayPart[]; ->displayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - documentation: SymbolDisplayPart[]; ->documentation : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - interface RenameInfo { ->RenameInfo : RenameInfo - - canRename: boolean; ->canRename : boolean - - localizedErrorMessage: string; ->localizedErrorMessage : string - - displayName: string; ->displayName : string - - fullDisplayName: string; ->fullDisplayName : string - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - - triggerSpan: TextSpan; ->triggerSpan : TextSpan ->TextSpan : TextSpan - } - interface SignatureHelpParameter { ->SignatureHelpParameter : SignatureHelpParameter - - name: string; ->name : string - - documentation: SymbolDisplayPart[]; ->documentation : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - displayParts: SymbolDisplayPart[]; ->displayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - isOptional: boolean; ->isOptional : boolean - } - /** - * Represents a single signature to show in signature help. - * The id is used for subsequent calls into the language service to ask questions about the - * signature help item in the context of any documents that have been updated. i.e. after - * an edit has happened, while signature help is still active, the host can ask important - * questions like 'what parameter is the user currently contained within?'. - */ - interface SignatureHelpItem { ->SignatureHelpItem : SignatureHelpItem - - isVariadic: boolean; ->isVariadic : boolean - - prefixDisplayParts: SymbolDisplayPart[]; ->prefixDisplayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - suffixDisplayParts: SymbolDisplayPart[]; ->suffixDisplayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - separatorDisplayParts: SymbolDisplayPart[]; ->separatorDisplayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - parameters: SignatureHelpParameter[]; ->parameters : SignatureHelpParameter[] ->SignatureHelpParameter : SignatureHelpParameter - - documentation: SymbolDisplayPart[]; ->documentation : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - /** - * Represents a set of signature help items, and the preferred item that should be selected. - */ - interface SignatureHelpItems { ->SignatureHelpItems : SignatureHelpItems - - items: SignatureHelpItem[]; ->items : SignatureHelpItem[] ->SignatureHelpItem : SignatureHelpItem - - applicableSpan: TextSpan; ->applicableSpan : TextSpan ->TextSpan : TextSpan - - selectedItemIndex: number; ->selectedItemIndex : number - - argumentIndex: number; ->argumentIndex : number - - argumentCount: number; ->argumentCount : number - } - interface CompletionInfo { ->CompletionInfo : CompletionInfo - - isMemberCompletion: boolean; ->isMemberCompletion : boolean - - entries: CompletionEntry[]; ->entries : CompletionEntry[] ->CompletionEntry : CompletionEntry - } - interface CompletionEntry { ->CompletionEntry : CompletionEntry - - name: string; ->name : string - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - } - interface CompletionEntryDetails { ->CompletionEntryDetails : CompletionEntryDetails - - name: string; ->name : string - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - - displayParts: SymbolDisplayPart[]; ->displayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - documentation: SymbolDisplayPart[]; ->documentation : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - interface OutliningSpan { ->OutliningSpan : OutliningSpan - - /** The span of the document to actually collapse. */ - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - /** The span of the document to display when the user hovers over the collapsed span. */ - hintSpan: TextSpan; ->hintSpan : TextSpan ->TextSpan : TextSpan - - /** The text to display in the editor for the collapsed region. */ - bannerText: string; ->bannerText : string - - /** - * Whether or not this region should be automatically collapsed when - * the 'Collapse to Definitions' command is invoked. - */ - autoCollapse: boolean; ->autoCollapse : boolean - } - interface EmitOutput { ->EmitOutput : EmitOutput - - outputFiles: OutputFile[]; ->outputFiles : OutputFile[] ->OutputFile : OutputFile - - emitOutputStatus: EmitReturnStatus; ->emitOutputStatus : EmitReturnStatus ->EmitReturnStatus : EmitReturnStatus - } - const enum OutputFileType { ->OutputFileType : OutputFileType - - JavaScript = 0, ->JavaScript : OutputFileType - - SourceMap = 1, ->SourceMap : OutputFileType - - Declaration = 2, ->Declaration : OutputFileType - } - interface OutputFile { ->OutputFile : OutputFile - - name: string; ->name : string - - writeByteOrderMark: boolean; ->writeByteOrderMark : boolean - - text: string; ->text : string - } - const enum EndOfLineState { ->EndOfLineState : EndOfLineState - - Start = 0, ->Start : EndOfLineState - - InMultiLineCommentTrivia = 1, ->InMultiLineCommentTrivia : EndOfLineState - - InSingleQuoteStringLiteral = 2, ->InSingleQuoteStringLiteral : EndOfLineState - - InDoubleQuoteStringLiteral = 3, ->InDoubleQuoteStringLiteral : EndOfLineState - } - enum TokenClass { ->TokenClass : TokenClass - - Punctuation = 0, ->Punctuation : TokenClass - - Keyword = 1, ->Keyword : TokenClass - - Operator = 2, ->Operator : TokenClass - - Comment = 3, ->Comment : TokenClass - - Whitespace = 4, ->Whitespace : TokenClass - - Identifier = 5, ->Identifier : TokenClass - - NumberLiteral = 6, ->NumberLiteral : TokenClass - - StringLiteral = 7, ->StringLiteral : TokenClass - - RegExpLiteral = 8, ->RegExpLiteral : TokenClass - } - interface ClassificationResult { ->ClassificationResult : ClassificationResult - - finalLexState: EndOfLineState; ->finalLexState : EndOfLineState ->EndOfLineState : EndOfLineState - - entries: ClassificationInfo[]; ->entries : ClassificationInfo[] ->ClassificationInfo : ClassificationInfo - } - interface ClassificationInfo { ->ClassificationInfo : ClassificationInfo - - length: number; ->length : number - - classification: TokenClass; ->classification : TokenClass ->TokenClass : TokenClass - } - interface Classifier { ->Classifier : Classifier - - getClassificationsForLine(text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean): ClassificationResult; ->getClassificationsForLine : (text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean) => ClassificationResult ->text : string ->lexState : EndOfLineState ->EndOfLineState : EndOfLineState ->classifyKeywordsInGenerics : boolean ->ClassificationResult : ClassificationResult - } - interface DocumentRegistry { ->DocumentRegistry : DocumentRegistry - - acquireDocument(filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean): SourceFile; ->acquireDocument : (filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean) => SourceFile ->filename : string ->compilationSettings : CompilerOptions ->CompilerOptions : CompilerOptions ->scriptSnapshot : IScriptSnapshot ->IScriptSnapshot : IScriptSnapshot ->version : string ->isOpen : boolean ->SourceFile : SourceFile - - updateDocument(sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; ->updateDocument : (sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange) => SourceFile ->sourceFile : SourceFile ->SourceFile : SourceFile ->filename : string ->compilationSettings : CompilerOptions ->CompilerOptions : CompilerOptions ->scriptSnapshot : IScriptSnapshot ->IScriptSnapshot : IScriptSnapshot ->version : string ->isOpen : boolean ->textChangeRange : TextChangeRange ->TextChangeRange : TextChangeRange ->SourceFile : SourceFile - - releaseDocument(filename: string, compilationSettings: CompilerOptions): void; ->releaseDocument : (filename: string, compilationSettings: CompilerOptions) => void ->filename : string ->compilationSettings : CompilerOptions ->CompilerOptions : CompilerOptions - } - class ScriptElementKind { ->ScriptElementKind : ScriptElementKind - - static unknown: string; ->unknown : string - - static keyword: string; ->keyword : string - - static scriptElement: string; ->scriptElement : string - - static moduleElement: string; ->moduleElement : string - - static classElement: string; ->classElement : string - - static interfaceElement: string; ->interfaceElement : string - - static typeElement: string; ->typeElement : string - - static enumElement: string; ->enumElement : string - - static variableElement: string; ->variableElement : string - - static localVariableElement: string; ->localVariableElement : string - - static functionElement: string; ->functionElement : string - - static localFunctionElement: string; ->localFunctionElement : string - - static memberFunctionElement: string; ->memberFunctionElement : string - - static memberGetAccessorElement: string; ->memberGetAccessorElement : string - - static memberSetAccessorElement: string; ->memberSetAccessorElement : string - - static memberVariableElement: string; ->memberVariableElement : string - - static constructorImplementationElement: string; ->constructorImplementationElement : string - - static callSignatureElement: string; ->callSignatureElement : string - - static indexSignatureElement: string; ->indexSignatureElement : string - - static constructSignatureElement: string; ->constructSignatureElement : string - - static parameterElement: string; ->parameterElement : string - - static typeParameterElement: string; ->typeParameterElement : string - - static primitiveType: string; ->primitiveType : string - - static label: string; ->label : string - - static alias: string; ->alias : string - - static constElement: string; ->constElement : string - - static letElement: string; ->letElement : string - } - class ScriptElementKindModifier { ->ScriptElementKindModifier : ScriptElementKindModifier - - static none: string; ->none : string - - static publicMemberModifier: string; ->publicMemberModifier : string - - static privateMemberModifier: string; ->privateMemberModifier : string - - static protectedMemberModifier: string; ->protectedMemberModifier : string - - static exportedModifier: string; ->exportedModifier : string - - static ambientModifier: string; ->ambientModifier : string - - static staticModifier: string; ->staticModifier : string - } - class ClassificationTypeNames { ->ClassificationTypeNames : ClassificationTypeNames - - static comment: string; ->comment : string - - static identifier: string; ->identifier : string - - static keyword: string; ->keyword : string - - static numericLiteral: string; ->numericLiteral : string - - static operator: string; ->operator : string - - static stringLiteral: string; ->stringLiteral : string - - static whiteSpace: string; ->whiteSpace : string - - static text: string; ->text : string - - static punctuation: string; ->punctuation : string - - static className: string; ->className : string - - static enumName: string; ->enumName : string - - static interfaceName: string; ->interfaceName : string - - static moduleName: string; ->moduleName : string - - static typeParameterName: string; ->typeParameterName : string - - static typeAlias: string; ->typeAlias : string - } - interface DisplayPartsSymbolWriter extends SymbolWriter { ->DisplayPartsSymbolWriter : DisplayPartsSymbolWriter ->SymbolWriter : SymbolWriter - - displayParts(): SymbolDisplayPart[]; ->displayParts : () => SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - function displayPartsToString(displayParts: SymbolDisplayPart[]): string; ->displayPartsToString : (displayParts: SymbolDisplayPart[]) => string ->displayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - function getDefaultCompilerOptions(): CompilerOptions; ->getDefaultCompilerOptions : () => CompilerOptions ->CompilerOptions : CompilerOptions - - class OperationCanceledException { ->OperationCanceledException : OperationCanceledException - } - class CancellationTokenObject { ->CancellationTokenObject : CancellationTokenObject - - private cancellationToken; ->cancellationToken : any - - static None: CancellationTokenObject; ->None : CancellationTokenObject ->CancellationTokenObject : CancellationTokenObject - - constructor(cancellationToken: CancellationToken); ->cancellationToken : CancellationToken ->CancellationToken : CancellationToken - - isCancellationRequested(): boolean; ->isCancellationRequested : () => boolean - - throwIfCancellationRequested(): void; ->throwIfCancellationRequested : () => void - } - function createDocumentRegistry(): DocumentRegistry; ->createDocumentRegistry : () => DocumentRegistry ->DocumentRegistry : DocumentRegistry - - function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; ->preProcessFile : (sourceText: string, readImportFiles?: boolean) => PreProcessedFileInfo ->sourceText : string ->readImportFiles : boolean ->PreProcessedFileInfo : PreProcessedFileInfo - - function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry): LanguageService; ->createLanguageService : (host: LanguageServiceHost, documentRegistry: DocumentRegistry) => LanguageService ->host : LanguageServiceHost ->LanguageServiceHost : LanguageServiceHost ->documentRegistry : DocumentRegistry ->DocumentRegistry : DocumentRegistry ->LanguageService : LanguageService - - function createClassifier(host: Logger): Classifier; ->createClassifier : (host: Logger) => Classifier ->host : Logger ->Logger : Logger ->Classifier : Classifier -} - diff --git a/tests/cases/compiler/APISample_node_compile.ts b/tests/cases/compiler/APISample_node_compile.ts deleted file mode 100644 index b138ce2b44c..00000000000 --- a/tests/cases/compiler/APISample_node_compile.ts +++ /dev/null @@ -1,11 +0,0 @@ -// @includeBuiltFile: typescript.d.ts -// @noImplicitAny: true -// @target: ES3 -// @module: CommonJs -// @noresolve: true - -import ts = require("typescript"); - -var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); - -var program = ts.createProgram(["file1.ts"], {}, undefined); \ No newline at end of file diff --git a/tests/cases/compiler/APISample_standalone_compile.ts b/tests/cases/compiler/APISample_standalone_compile.ts deleted file mode 100644 index 049aae5523f..00000000000 --- a/tests/cases/compiler/APISample_standalone_compile.ts +++ /dev/null @@ -1,7 +0,0 @@ -// @includeBuiltFile: typescriptServices.d.ts -// @noImplicitAny: true -// @target: ES3 - -var sourceFile = ts.createSourceFile("file1.ts", "var x = 0;", ts.ScriptTarget.Latest, "0.0"); - -var program = ts.createProgram(["file1.ts"], {}, undefined); \ No newline at end of file From f6fd263cbda7437f77be26c677ab59649c2f9aa5 Mon Sep 17 00:00:00 2001 From: Arnavion Date: Fri, 12 Dec 2014 08:49:21 -0800 Subject: [PATCH 139/141] Actually fail the surrounding jake task on errors in compileFile() --- Jakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jakefile b/Jakefile index 89586e8ca62..11dd7c048df 100644 --- a/Jakefile +++ b/Jakefile @@ -242,7 +242,7 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOu }); ex.addListener("error", function() { fs.unlinkSync(outFile); - console.log("Compilation of " + outFile + " unsuccessful"); + fail("Compilation of " + outFile + " unsuccessful"); }); ex.run(); }, {async: true}); From 83f0c9199918ae34d5123e365ac68ed503f6e557 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Fri, 12 Dec 2014 11:28:05 -0800 Subject: [PATCH 140/141] Properly emit 'void 0' when emitting destructuring assignments. --- src/compiler/emitter.ts | 5 ++--- .../reference/declarationsAndAssignments.js | 14 +++++++------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 9428f94bb52..0f3e9606815 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -2819,9 +2819,8 @@ module ts { function createVoidZero(): Expression { var zero = createNode(SyntaxKind.NumericLiteral); zero.text = "0"; - var result = createNode(SyntaxKind.PrefixUnaryExpression); - result.operator = SyntaxKind.VoidKeyword; - result.operand = zero; + var result = createNode(SyntaxKind.VoidExpression); + result.expression = zero; return result; } diff --git a/tests/baselines/reference/declarationsAndAssignments.js b/tests/baselines/reference/declarationsAndAssignments.js index 82272a55559..ba2e74dc420 100644 --- a/tests/baselines/reference/declarationsAndAssignments.js +++ b/tests/baselines/reference/declarationsAndAssignments.js @@ -195,12 +195,12 @@ function f4() { var z; } function f6() { - var _a = [1, "hello"], _b = _a[0], x = _b === void0 ? 0 : _b, _c = _a[1], y = _c === void0 ? "" : _c; + var _a = [1, "hello"], _b = _a[0], x = _b === void 0 ? 0 : _b, _c = _a[1], y = _c === void 0 ? "" : _c; var x; var y; } function f7() { - var _a = [1, "hello"], _b = _a[0], x = _b === void0 ? 0 : _b, _c = _a[1], y = _c === void0 ? 1 : _c; // Error, initializer for y must be string + var _a = [1, "hello"], _b = _a[0], x = _b === void 0 ? 0 : _b, _c = _a[1], y = _c === void 0 ? 1 : _c; // Error, initializer for y must be string var x; var y; } @@ -226,7 +226,7 @@ function f11() { var b; } function f12() { - var _a = [1, ["hello", { x: 5, y: true }]], a = _a[0], _b = _a[1], _c = _b === void0 ? ["abc", { x: 10, y: false }] : _b, b = _c[0], _d = _c[1], x = _d.x, c = _d.y; + var _a = [1, ["hello", { x: 5, y: true }]], a = _a[0], _b = _a[1], _c = _b === void 0 ? ["abc", { x: 10, y: false }] : _b, b = _c[0], _d = _c[1], x = _d.x, c = _d.y; var a; var b; var x; @@ -237,7 +237,7 @@ function f13() { var _b = [[x, y], { x: x, y: y }], a = _b[0], b = _b[1]; } function f14(_a) { - var _b = _a[0], a = _b === void0 ? 1 : _b, _c = _a[1], _d = _c[0], b = _d === void0 ? "hello" : _d, _e = _c[1], x = _e.x, _f = _e.y, c = _f === void0 ? false : _f; + var _b = _a[0], a = _b === void 0 ? 1 : _b, _c = _a[1], _d = _c[0], b = _d === void 0 ? "hello" : _d, _e = _c[1], x = _e.x, _f = _e.y, c = _f === void 0 ? false : _f; var a; var b; var c; @@ -260,7 +260,7 @@ function f16() { var _a = f15(), a = _a.a, b = _a.b, c = _a.c; } function f17(_a) { - var _b = _a.a, a = _b === void0 ? "" : _b, _c = _a.b, b = _c === void0 ? 0 : _c, _d = _a.c, c = _d === void0 ? false : _d; + var _b = _a.a, a = _b === void 0 ? "" : _b, _c = _a.b, b = _c === void 0 ? 0 : _c, _d = _a.c, c = _d === void 0 ? false : _d; } f17({}); f17({ a: "hello" }); @@ -274,7 +274,7 @@ function g4() { (_b = { b: b, a: a }, a = _b.a, b = _b.b, _b); _c = [a, b], aa[0] = _c[0], b = _c[1]; _d = [b, a], a = _d[0], b = _d[1]; // Error - _e = [2, "def"], _f = _e[0], a = _f === void0 ? 1 : _f, _g = _e[1], b = _g === void0 ? "abc" : _g; + _e = [2, "def"], _f = _e[0], a = _f === void 0 ? 1 : _f, _g = _e[1], b = _g === void 0 ? "abc" : _g; var _a, _b, _c, _d, _e, _f, _g; } function g5() { @@ -282,7 +282,7 @@ function g5() { _a = [1, 2], a = _a[0], b = _a[1]; _b = [b, a], a = _b[0], b = _b[1]; (_c = { b: b, a: a }, a = _c.a, b = _c.b, _c); - _d = ([[2, 3]])[0], _e = _d === void0 ? [1, 2] : _d, a = _e[0], b = _e[1]; + _d = ([[2, 3]])[0], _e = _d === void 0 ? [1, 2] : _d, a = _e[0], b = _e[1]; var x = (_f = [1, 2], a = _f[0], b = _f[1], _f); var _a, _b, _c, _d, _e, _f; } From 6ff58e302875e1b25d1245209ce70a5b5d388ec8 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Fri, 12 Dec 2014 12:41:59 -0800 Subject: [PATCH 141/141] Don't emit error flags in the 262 baselines unless the node actually had an error. This helps reduce clutter. --- src/compiler/parser.ts | 2 +- src/compiler/types.ts | 14 +++++++++++--- src/compiler/utilities.ts | 10 +++++----- src/harness/test262Runner.ts | 11 +++++++++-- 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index e75b195d776..c7d05fc41c5 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -856,7 +856,7 @@ module ts { // flag so that we don't mark any subsequent nodes. if (parseErrorBeforeNextFinishedNode) { parseErrorBeforeNextFinishedNode = false; - node.parserContextFlags |= ParserContextFlags.ContainsError; + node.parserContextFlags |= ParserContextFlags.ThisNodeHasError; } return node; diff --git a/src/compiler/types.ts b/src/compiler/types.ts index a77961da586..2c5376e744f 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -317,14 +317,22 @@ module ts { // If the parser encountered an error when parsing the code that created this node. Note // the parser only sets this directly on the node it creates right after encountering the - // error. We then propagate that flag upwards to parent nodes during incremental parsing. - ContainsError = 1 << 4, + // error. + ThisNodeHasError = 1 << 4, + + // Context flags set directly by the parser. + ParserGeneratedFlags = StrictMode | DisallowIn | Yield | GeneratorParameter | ThisNodeHasError, + + // Context flags computed by aggregating child flags upwards. + + // If this node, or any of it's children (transitively) contain an error. + ThisNodeOrAnySubNodesHasError = 1 << 5, // Used during incremental parsing to determine if we need to visit this node to see if // any of its children had an error. Once we compute that once, we can set this bit on the // node to know that we never have to do it again. From that point on, we can just check // the node directly for 'ContainsError'. - HasPropagatedChildContainsErrorFlag = 1 << 5 + HasComputedThisNodeOrAnySubNodesHasError = 1 << 6 } export interface Node extends TextRange { diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 35e61a3a48e..d35364009b6 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -68,25 +68,25 @@ module ts { // Returns true if this node contains a parse error anywhere underneath it. export function containsParseError(node: Node): boolean { - if (!hasFlag(node.parserContextFlags, ParserContextFlags.HasPropagatedChildContainsErrorFlag)) { + if (!hasFlag(node.parserContextFlags, ParserContextFlags.HasComputedThisNodeOrAnySubNodesHasError)) { // A node is considered to contain a parse error if: // a) the parser explicitly marked that it had an error // b) any of it's children reported that it had an error. - var val = hasFlag(node.parserContextFlags, ParserContextFlags.ContainsError) || + var val = hasFlag(node.parserContextFlags, ParserContextFlags.ThisNodeHasError) || forEachChild(node, containsParseError); // If so, mark ourselves accordingly. if (val) { - node.parserContextFlags |= ParserContextFlags.ContainsError; + node.parserContextFlags |= ParserContextFlags.ThisNodeOrAnySubNodesHasError; } // Also mark that we've propogated the child information to this node. This way we can // always consult the bit directly on this node without needing to check its children // again. - node.parserContextFlags |= ParserContextFlags.HasPropagatedChildContainsErrorFlag; + node.parserContextFlags |= ParserContextFlags.HasComputedThisNodeOrAnySubNodesHasError; } - return hasFlag(node.parserContextFlags, ParserContextFlags.ContainsError); + return hasFlag(node.parserContextFlags, ParserContextFlags.ThisNodeOrAnySubNodesHasError); } export function getSourceFileOfNode(node: Node): SourceFile { diff --git a/src/harness/test262Runner.ts b/src/harness/test262Runner.ts index 8c39880a81c..2b5c2353095 100644 --- a/src/harness/test262Runner.ts +++ b/src/harness/test262Runner.ts @@ -51,7 +51,12 @@ class Test262BaselineRunner extends RunnerBase { } function getNodeFlagName(f: number) { return getFlagName((ts).NodeFlags, f); } - function getParserContextFlagName(f: number) { return getFlagName((ts).ParserContextFlags, f); } + function getParserContextFlagName(f: number) { + // Clear the flag that are produced by aggregating child values.. That is ephemeral + // data we don't care about in the dump. We only care what the parser set directly + // on the ast. + return getFlagName((ts).ParserContextFlags, f & ts.ParserContextFlags.ParserGeneratedFlags); + } function convertDiagnostics(diagnostics: ts.Diagnostic[]) { return diagnostics.map(convertDiagnostic); } @@ -68,7 +73,9 @@ class Test262BaselineRunner extends RunnerBase { function serializeNode(n: ts.Node): any { var o: any = { kind: getKindName(n.kind) }; - o.containsParseError = ts.containsParseError(n); + if (ts.containsParseError(n)) { + o.containsParseError = true; + } ts.forEach(Object.getOwnPropertyNames(n), propertyName => { switch (propertyName) {