diff --git a/bin/lib.d.ts b/bin/lib.d.ts index a3081f2c8d7..ebf92241aff 100644 --- a/bin/lib.d.ts +++ b/bin/lib.d.ts @@ -3807,30 +3807,42 @@ declare var Window: { new(): Window; } -interface FormData { - append(name: any, value: any, blobName?: string): void; +interface HTMLCollection extends MSHTMLCollectionExtensions { + /** + * Sets or retrieves the number of objects in a collection. + */ + length: number; + /** + * Retrieves an object from various collections. + */ + item(nameOrIndex?: any, optionalIndex?: any): Element; + /** + * Retrieves a select object or an object from an options collection. + */ + namedItem(name: string): Element; + // [name: string]: Element; + [index: number]: Element; } -declare var FormData: { - prototype: FormData; - new (form?: HTMLFormElement): FormData; +declare var HTMLCollection: { + prototype: HTMLCollection; + new(): HTMLCollection; } -interface SourceBuffer extends EventTarget { - updating: boolean; - appendWindowStart: number; - appendWindowEnd: number; - buffered: TimeRanges; - timestampOffset: number; - audioTracks: AudioTrackList; - appendBuffer(data: ArrayBufferView): void; - appendBuffer(data: ArrayBuffer): void; - remove(start: number, end: number): void; - abort(): void; - appendStream(stream: MSStream, maxSize?: number): void; +interface BlobPropertyBag { + type?: string; + endings?: string; } -declare var SourceBuffer: { - prototype: SourceBuffer; - new(): SourceBuffer; + +interface Blob { + type: string; + size: number; + msDetachStream(): any; + slice(start?: number, end?: number, contentType?: string): Blob; + msClose(): void; +} +declare var Blob: { + prototype: Blob; + new (blobParts?: any[], options?: BlobPropertyBag): Blob; } interface NavigatorID { @@ -5739,26 +5751,6 @@ declare var MSCSSProperties: { new(): MSCSSProperties; } -interface HTMLCollection extends MSHTMLCollectionExtensions { - /** - * Sets or retrieves the number of objects in a collection. - */ - length: number; - /** - * Retrieves an object from various collections. - */ - item(nameOrIndex?: any, optionalIndex?: any): Element; - /** - * Retrieves a select object or an object from an options collection. - */ - namedItem(name: string): Element; - // [name: string]: Element; -} -declare var HTMLCollection: { - prototype: HTMLCollection; - new(): HTMLCollection; -} - interface SVGExternalResourcesRequired { externalResourcesRequired: SVGAnimatedBoolean; } @@ -11994,18 +11986,6 @@ declare var FileReader: { new(): FileReader; } -interface Blob { - type: string; - size: number; - msDetachStream(): any; - slice(start?: number, end?: number, contentType?: string): Blob; - msClose(): void; -} -declare var Blob: { - prototype: Blob; - new(): Blob; -} - interface ApplicationCache extends EventTarget { status: number; ondownloading: (ev: Event) => any; @@ -12164,6 +12144,14 @@ declare var MSManipulationEvent: { MS_MANIPULATION_STATE_CANCELLED: number; } +interface FormData { + append(name: any, value: any, blobName?: string): void; +} +declare var FormData: { + prototype: FormData; + new(): FormData; +} + interface HTMLDataListElement extends HTMLElement { options: HTMLCollection; } @@ -12582,6 +12570,23 @@ interface RandomSource { getRandomValues(array: ArrayBufferView): ArrayBufferView; } +interface SourceBuffer extends EventTarget { + updating: boolean; + appendWindowStart: number; + appendWindowEnd: number; + buffered: TimeRanges; + timestampOffset: number; + audioTracks: AudioTrackList; + appendBuffer(data: ArrayBuffer): void; + remove(start: number, end: number): void; + abort(): void; + appendStream(stream: MSStream, maxSize?: number): void; +} +declare var SourceBuffer: { + prototype: SourceBuffer; + new(): SourceBuffer; +} + interface MSInputMethodContext extends EventTarget { oncandidatewindowshow: (ev: any) => any; target: HTMLElement; diff --git a/bin/lib.dom.d.ts b/bin/lib.dom.d.ts index c0aceb3fc11..0fe2922830a 100644 --- a/bin/lib.dom.d.ts +++ b/bin/lib.dom.d.ts @@ -2704,30 +2704,42 @@ declare var Window: { new(): Window; } -interface FormData { - append(name: any, value: any, blobName?: string): void; +interface HTMLCollection extends MSHTMLCollectionExtensions { + /** + * Sets or retrieves the number of objects in a collection. + */ + length: number; + /** + * Retrieves an object from various collections. + */ + item(nameOrIndex?: any, optionalIndex?: any): Element; + /** + * Retrieves a select object or an object from an options collection. + */ + namedItem(name: string): Element; + // [name: string]: Element; + [index: number]: Element; } -declare var FormData: { - prototype: FormData; - new (form?: HTMLFormElement): FormData; +declare var HTMLCollection: { + prototype: HTMLCollection; + new(): HTMLCollection; } -interface SourceBuffer extends EventTarget { - updating: boolean; - appendWindowStart: number; - appendWindowEnd: number; - buffered: TimeRanges; - timestampOffset: number; - audioTracks: AudioTrackList; - appendBuffer(data: ArrayBufferView): void; - appendBuffer(data: ArrayBuffer): void; - remove(start: number, end: number): void; - abort(): void; - appendStream(stream: MSStream, maxSize?: number): void; +interface BlobPropertyBag { + type?: string; + endings?: string; } -declare var SourceBuffer: { - prototype: SourceBuffer; - new(): SourceBuffer; + +interface Blob { + type: string; + size: number; + msDetachStream(): any; + slice(start?: number, end?: number, contentType?: string): Blob; + msClose(): void; +} +declare var Blob: { + prototype: Blob; + new (blobParts?: any[], options?: BlobPropertyBag): Blob; } interface NavigatorID { @@ -4636,26 +4648,6 @@ declare var MSCSSProperties: { new(): MSCSSProperties; } -interface HTMLCollection extends MSHTMLCollectionExtensions { - /** - * Sets or retrieves the number of objects in a collection. - */ - length: number; - /** - * Retrieves an object from various collections. - */ - item(nameOrIndex?: any, optionalIndex?: any): Element; - /** - * Retrieves a select object or an object from an options collection. - */ - namedItem(name: string): Element; - // [name: string]: Element; -} -declare var HTMLCollection: { - prototype: HTMLCollection; - new(): HTMLCollection; -} - interface SVGExternalResourcesRequired { externalResourcesRequired: SVGAnimatedBoolean; } @@ -10891,18 +10883,6 @@ declare var FileReader: { new(): FileReader; } -interface Blob { - type: string; - size: number; - msDetachStream(): any; - slice(start?: number, end?: number, contentType?: string): Blob; - msClose(): void; -} -declare var Blob: { - prototype: Blob; - new(): Blob; -} - interface ApplicationCache extends EventTarget { status: number; ondownloading: (ev: Event) => any; @@ -11061,6 +11041,14 @@ declare var MSManipulationEvent: { MS_MANIPULATION_STATE_CANCELLED: number; } +interface FormData { + append(name: any, value: any, blobName?: string): void; +} +declare var FormData: { + prototype: FormData; + new(): FormData; +} + interface HTMLDataListElement extends HTMLElement { options: HTMLCollection; } @@ -11479,6 +11467,23 @@ interface RandomSource { getRandomValues(array: ArrayBufferView): ArrayBufferView; } +interface SourceBuffer extends EventTarget { + updating: boolean; + appendWindowStart: number; + appendWindowEnd: number; + buffered: TimeRanges; + timestampOffset: number; + audioTracks: AudioTrackList; + appendBuffer(data: ArrayBuffer): void; + remove(start: number, end: number): void; + abort(): void; + appendStream(stream: MSStream, maxSize?: number): void; +} +declare var SourceBuffer: { + prototype: SourceBuffer; + new(): SourceBuffer; +} + interface MSInputMethodContext extends EventTarget { oncandidatewindowshow: (ev: any) => any; target: HTMLElement; diff --git a/bin/lib.webworker.d.ts b/bin/lib.webworker.d.ts index 654d75b0aa9..02485d2602a 100644 --- a/bin/lib.webworker.d.ts +++ b/bin/lib.webworker.d.ts @@ -1453,6 +1453,11 @@ declare var FileReader: { new(): FileReader; } +interface BlobPropertyBag { + type?: string; + endings?: string; +} + interface Blob { type: string; size: number; @@ -1462,7 +1467,7 @@ interface Blob { } declare var Blob: { prototype: Blob; - new(): Blob; + new (blobParts?: any[], options?: BlobPropertyBag): Blob; } interface MSStream { diff --git a/bin/tsc.js b/bin/tsc.js index 5efd7065d8e..af5f939a80d 100644 --- a/bin/tsc.js +++ b/bin/tsc.js @@ -267,6 +267,7 @@ var ts; Import_name_cannot_be_0: { code: 2438, category: 1 /* Error */, key: "Import name cannot be '{0}'" }, Import_declaration_in_an_ambient_external_module_declaration_cannot_reference_external_module_through_relative_external_module_name: { code: 2439, category: 1 /* Error */, key: "Import declaration in an ambient external module declaration cannot reference external module through relative external module name." }, Import_declaration_conflicts_with_local_declaration_of_0: { code: 2440, category: 1 /* Error */, key: "Import declaration conflicts with local declaration of '{0}'" }, + Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_an_external_module: { code: 2441, category: 1 /* Error */, key: "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of an external module." }, Import_declaration_0_is_using_private_name_1: { code: 4000, category: 1 /* Error */, key: "Import declaration '{0}' is using private name '{1}'." }, Type_parameter_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4001, category: 1 /* Error */, key: "Type parameter '{0}' of exported class has or is using name '{1}' from private module '{2}'." }, Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: 1 /* Error */, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, @@ -566,7 +567,8 @@ var ts; var pos = 0; var lineStart = 0; while (pos < text.length) { - switch (text.charCodeAt(pos++)) { + var ch = text.charCodeAt(pos++); + switch (ch) { case 13 /* carriageReturn */: if (text.charCodeAt(pos) === 10 /* lineFeed */) { pos++; @@ -575,6 +577,12 @@ var ts; result.push(lineStart); lineStart = pos; break; + default: + if (ch > 127 /* maxAsciiCharacter */ && isLineBreak(ch)) { + result.push(lineStart); + lineStart = pos; + } + break; } } result.push(lineStart); @@ -608,7 +616,7 @@ var ts; } ts.isWhiteSpace = isWhiteSpace; function isLineBreak(ch) { - return ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */ || ch === 8232 /* lineSeparator */ || ch === 8233 /* paragraphSeparator */; + return ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */ || ch === 8232 /* lineSeparator */ || ch === 8233 /* paragraphSeparator */ || ch === 133 /* nextLine */; } ts.isLineBreak = isLineBreak; function isDigit(ch) { @@ -748,6 +756,14 @@ var ts; return getCommentRanges(text, pos, true); } ts.getTrailingComments = getTrailingComments; + function isIdentifierStart(ch, languageVersion) { + return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch === 36 /* $ */ || ch === 95 /* _ */ || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierStart(ch, languageVersion); + } + ts.isIdentifierStart = isIdentifierStart; + function isIdentifierPart(ch, languageVersion) { + return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch >= 48 /* _0 */ && ch <= 57 /* _9 */ || ch === 36 /* $ */ || ch === 95 /* _ */ || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierPart(ch, languageVersion); + } + ts.isIdentifierPart = isIdentifierPart; function createScanner(languageVersion, text, onError, onComment) { var pos; var len; @@ -1516,6 +1532,7 @@ var ts; TypeFormatFlags[TypeFormatFlags["None"] = 0x00000000] = "None"; TypeFormatFlags[TypeFormatFlags["WriteArrayAsGenericType"] = 0x00000001] = "WriteArrayAsGenericType"; TypeFormatFlags[TypeFormatFlags["UseTypeOfFunction"] = 0x00000002] = "UseTypeOfFunction"; + TypeFormatFlags[TypeFormatFlags["NoTruncation"] = 0x00000004] = "NoTruncation"; })(ts.TypeFormatFlags || (ts.TypeFormatFlags = {})); var TypeFormatFlags = ts.TypeFormatFlags; (function (SymbolAccessibility) { @@ -1943,6 +1960,8 @@ var ts; } ts.getLocaleSpecificMessage = getLocaleSpecificMessage; function createFileDiagnostic(file, start, length, message) { + Debug.assert(start >= 0, "start must be non-negative, is " + start); + Debug.assert(length >= 0, "length must be non-negative, is " + length); var text = getLocaleSpecificMessage(message.key); if (arguments.length > 4) { text = formatStringFromArgs(text, arguments, 4); @@ -1986,6 +2005,8 @@ var ts; } ts.chainDiagnosticMessages = chainDiagnosticMessages; function flattenDiagnosticChain(file, start, length, diagnosticChain, newLine) { + Debug.assert(start >= 0, "start must be non-negative, is " + start); + Debug.assert(length >= 0, "length must be non-negative, is " + length); var code = diagnosticChain.code; var category = diagnosticChain.category; var messageText = ""; @@ -2241,6 +2262,7 @@ var ts; AssertionLevel[AssertionLevel["VeryAggressive"] = 3] = "VeryAggressive"; })(ts.AssertionLevel || (ts.AssertionLevel = {})); var AssertionLevel = ts.AssertionLevel; + var Debug; (function (Debug) { var currentAssertionLevel = 0 /* None */; function shouldAssert(level) { @@ -2261,8 +2283,7 @@ var ts; Debug.assert(false, message); } Debug.fail = fail; - })(ts.Debug || (ts.Debug = {})); - var Debug = ts.Debug; + })(Debug = ts.Debug || (ts.Debug = {})); })(ts || (ts = {})); var sys = (function () { function getWScriptSystem() { @@ -2528,7 +2549,7 @@ var ts; function createDiagnosticForNode(node, message, arg0, arg1, arg2) { node = getErrorSpanForNode(node); var file = getSourceFileOfNode(node); - var start = ts.skipTrivia(file.text, node.pos); + var start = node.kind === 111 /* Missing */ ? node.pos : ts.skipTrivia(file.text, node.pos); var length = node.end - start; return ts.createFileDiagnostic(file, start, length, message, arg0, arg1, arg2); } @@ -2732,6 +2753,42 @@ var ts; return false; } ts.isInAmbientContext = isInAmbientContext; + function isDeclaration(node) { + switch (node.kind) { + case 113 /* TypeParameter */: + case 114 /* Parameter */: + case 166 /* VariableDeclaration */: + case 115 /* Property */: + case 129 /* PropertyAssignment */: + case 176 /* EnumMember */: + case 116 /* Method */: + case 167 /* FunctionDeclaration */: + case 118 /* GetAccessor */: + case 119 /* SetAccessor */: + case 169 /* ClassDeclaration */: + case 170 /* InterfaceDeclaration */: + case 171 /* EnumDeclaration */: + case 172 /* ModuleDeclaration */: + case 174 /* ImportDeclaration */: + return true; + } + return false; + } + ts.isDeclaration = isDeclaration; + function isDeclarationOrFunctionExpressionOrCatchVariableName(name) { + if (name.kind !== 55 /* Identifier */ && name.kind !== 3 /* StringLiteral */ && name.kind !== 2 /* NumericLiteral */) { + return false; + } + var parent = name.parent; + if (isDeclaration(parent) || parent.kind === 136 /* FunctionExpression */) { + return parent.name === name; + } + if (parent.kind === 163 /* CatchBlock */) { + return parent.variable === name; + } + return false; + } + ts.isDeclarationOrFunctionExpressionOrCatchVariableName = isDeclarationOrFunctionExpressionOrCatchVariableName; var ParsingContext; (function (ParsingContext) { ParsingContext[ParsingContext["SourceElements"] = 0] = "SourceElements"; @@ -2820,6 +2877,22 @@ var ts; ControlBlockContext[ControlBlockContext["Nested"] = 1] = "Nested"; ControlBlockContext[ControlBlockContext["CrossingFunctionBoundary"] = 2] = "CrossingFunctionBoundary"; })(ControlBlockContext || (ControlBlockContext = {})); + function isKeyword(token) { + return ts.SyntaxKind.FirstKeyword <= token && token <= ts.SyntaxKind.LastKeyword; + } + ts.isKeyword = isKeyword; + function isModifier(token) { + switch (token) { + case 98 /* PublicKeyword */: + case 96 /* PrivateKeyword */: + case 99 /* StaticKeyword */: + case 68 /* ExportKeyword */: + case 104 /* DeclareKeyword */: + return true; + } + return false; + } + ts.isModifier = isModifier; function createSourceFile(filename, sourceText, languageVersion, version, isOpen) { if (isOpen === void 0) { isOpen = false; } var file; @@ -3054,12 +3127,15 @@ var ts; function createMissingNode() { return createNode(111 /* Missing */); } + function internIdentifier(text) { + return ts.hasProperty(identifiers, text) ? identifiers[text] : (identifiers[text] = text); + } function createIdentifier(isIdentifier) { identifierCount++; if (isIdentifier) { var node = createNode(55 /* Identifier */); var text = escapeIdentifier(scanner.getTokenValue()); - node.text = ts.hasProperty(identifiers, text) ? identifiers[text] : (identifiers[text] = text); + node.text = internIdentifier(text); nextToken(); return finishNode(node); } @@ -3077,24 +3153,10 @@ var ts; } function parsePropertyName() { if (token === 3 /* StringLiteral */ || token === 2 /* NumericLiteral */) { - return parsePrimaryExpression(); + return parseLiteralNode(true); } return parseIdentifierName(); } - function isKeyword(token) { - return ts.SyntaxKind.FirstKeyword <= token && token <= ts.SyntaxKind.LastKeyword; - } - function isModifier(token) { - switch (token) { - case 98 /* PublicKeyword */: - case 96 /* PrivateKeyword */: - case 99 /* StaticKeyword */: - case 68 /* ExportKeyword */: - case 104 /* DeclareKeyword */: - return true; - } - return false; - } function parseContextualModifier(t) { return token === t && tryParse(function () { nextToken(); @@ -3309,9 +3371,10 @@ var ts; nextToken(); return finishNode(node); } - function parseLiteralNode() { + function parseLiteralNode(internName) { var node = createNode(token); - node.text = scanner.getTokenValue(); + var text = scanner.getTokenValue(); + node.text = internName ? internIdentifier(text) : text; var tokenPos = scanner.getTokenPos(); nextToken(); finishNode(node); @@ -3327,7 +3390,7 @@ var ts; } function parseStringLiteral() { if (token === 3 /* StringLiteral */) - return parseLiteralNode(); + return parseLiteralNode(true); error(ts.Diagnostics.String_literal_expected); return createMissingNode(); } @@ -3999,6 +4062,10 @@ var ts; } else { indexedAccess.index = parseExpression(); + if (indexedAccess.index.kind === 3 /* StringLiteral */ || indexedAccess.index.kind === 2 /* NumericLiteral */) { + var literal = indexedAccess.index; + literal.text = internIdentifier(literal.text); + } parseExpected(10 /* CloseBracketToken */); } expr = finishNode(indexedAccess); @@ -4673,10 +4740,11 @@ var ts; parseExpected(88 /* VarKeyword */); node.declarations = parseVariableDeclarationList(flags, false); parseSemicolon(); + finishNode(node); if (!node.declarations.length && file.syntacticErrors.length === errorCountBeforeVarStatement) { grammarErrorOnNode(node, ts.Diagnostics.Variable_declaration_list_cannot_be_empty); } - return finishNode(node); + return node; } function parseFunctionDeclaration(pos, flags) { var node = createNode(167 /* FunctionDeclaration */, pos); @@ -5304,6 +5372,7 @@ var ts; file.version = version; file.isOpen = isOpen; file.languageVersion = languageVersion; + file.identifiers = identifiers; return file; } ts.createSourceFile = createSourceFile; @@ -5368,18 +5437,17 @@ var ts; } function findSourceFile(filename, isDefaultLib, refFile, refStart, refLength) { var canonicalName = host.getCanonicalFileName(filename); - var file = getSourceFile(filename); - if (file) { - if (host.useCaseSensitiveFileNames() && canonicalName !== file.filename) { + if (ts.hasProperty(filesByName, canonicalName)) { + var file = filesByName[canonicalName]; + if (file && host.useCaseSensitiveFileNames() && canonicalName !== file.filename) { errors.push(ts.createFileDiagnostic(refFile, refStart, refLength, ts.Diagnostics.Filename_0_differs_from_already_included_filename_1_only_in_casing, filename, file.filename)); } } else { - file = host.getSourceFile(filename, options.target, function (hostErrorMessage) { + var file = filesByName[canonicalName] = host.getSourceFile(filename, options.target, function (hostErrorMessage) { errors.push(ts.createFileDiagnostic(refFile, refStart, refLength, ts.Diagnostics.Cannot_read_file_0_Colon_1, filename, hostErrorMessage)); }); if (file) { - filesByName[host.getCanonicalFileName(filename)] = file; seenNoDefaultLib = seenNoDefaultLib || file.hasNoDefaultLib; if (!options.noResolve) { var basePath = ts.getDirectoryPath(filename); @@ -5904,18 +5972,10 @@ var ts; function writeLiteral(s) { if (s && s.length) { write(s); - var pos = 0; - while (pos < s.length) { - switch (s.charCodeAt(pos++)) { - case 13 /* carriageReturn */: - if (pos < s.length && s.charCodeAt(pos) === 10 /* lineFeed */) { - pos++; - } - case 10 /* lineFeed */: - lineCount++; - linePos = output.length - s.length + pos; - break; - } + var lineStartsOfS = ts.getLineStarts(s); + if (lineStartsOfS.length > 1) { + lineCount = lineCount + lineStartsOfS.length - 1; + linePos = output.length - s.length + lineStartsOfS[lineStartsOfS.length - 1]; } } } @@ -6026,10 +6086,9 @@ var ts; } function calculateIndent(pos, end) { var currentLineIndent = 0; - while (pos < end && ts.isWhiteSpace(currentSourceFile.text.charCodeAt(pos))) { - pos++; + for (; pos < end && ts.isWhiteSpace(currentSourceFile.text.charCodeAt(pos)); pos++) { if (currentSourceFile.text.charCodeAt(pos) === 9 /* tab */) { - currentLineIndent += getIndentSize(); + currentLineIndent += getIndentSize() - (currentLineIndent % getIndentSize()); } else { currentLineIndent++; @@ -7275,14 +7334,12 @@ var ts; return emitPinnedOrTripleSlashComments(node); } emitLeadingComments(node); - if (!(node.flags & 1 /* Export */)) { - emitStart(node); - write("var "); - emit(node.name); - write(";"); - emitEnd(node); - writeLine(); - } + emitStart(node); + write("var "); + emit(node.name); + write(";"); + emitEnd(node); + writeLine(); emitStart(node); write("(function ("); emitStart(node.name); @@ -7306,21 +7363,15 @@ var ts; scopeEmitEnd(); } write(")("); + if (node.flags & 1 /* Export */) { + emit(node.name); + write(" = "); + } emitModuleMemberName(node); write(" || ("); emitModuleMemberName(node); write(" = {}));"); emitEnd(node); - if (node.flags & 1 /* Export */) { - writeLine(); - emitStart(node); - write("var "); - emit(node.name); - write(" = "); - emitModuleMemberName(node); - emitEnd(node); - write(";"); - } emitTrailingComments(node); } function emitImportDeclaration(node) { @@ -8327,39 +8378,43 @@ var ts; } } function resolveScriptReference(sourceFile, reference) { - var referenceFileName = compilerOptions.noResolve ? reference.filename : ts.normalizePath(ts.combinePaths(ts.getDirectoryPath(sourceFile.filename), reference.filename)); + var referenceFileName = ts.normalizePath(ts.combinePaths(ts.getDirectoryPath(sourceFile.filename), reference.filename)); return program.getSourceFile(referenceFileName); } var referencePathsOutput = ""; function writeReferencePath(referencedFile) { var declFileName = referencedFile.flags & 512 /* DeclarationFile */ ? referencedFile.filename : shouldEmitToOwnFile(referencedFile) ? getOwnEmitOutputFilePath(referencedFile, ".d.ts") : ts.getModuleNameFromFilename(compilerOptions.out) + ".d.ts"; declFileName = ts.getRelativePathToDirectoryOrUrl(ts.getDirectoryPath(ts.normalizeSlashes(jsFilePath)), declFileName, compilerHost.getCurrentDirectory(), false); - referencePathsOutput += "/// " + newLine; + referencePathsOutput += "/// " + newLine; } if (root) { - var addedGlobalFileReference = false; - ts.forEach(root.referencedFiles, function (fileReference) { - var referencedFile = resolveScriptReference(root, fileReference); - if ((referencedFile.flags & 512 /* DeclarationFile */) || shouldEmitToOwnFile(referencedFile) || !addedGlobalFileReference) { - writeReferencePath(referencedFile); - if (!isExternalModuleOrDeclarationFile(referencedFile)) { - addedGlobalFileReference = true; + if (!compilerOptions.noResolve) { + var addedGlobalFileReference = false; + ts.forEach(root.referencedFiles, function (fileReference) { + var referencedFile = resolveScriptReference(root, fileReference); + if ((referencedFile.flags & 512 /* DeclarationFile */) || shouldEmitToOwnFile(referencedFile) || !addedGlobalFileReference) { + writeReferencePath(referencedFile); + if (!isExternalModuleOrDeclarationFile(referencedFile)) { + addedGlobalFileReference = true; + } } - } - }); + }); + } emitNode(root); } else { var emittedReferencedFiles = []; ts.forEach(program.getSourceFiles(), function (sourceFile) { if (!isExternalModuleOrDeclarationFile(sourceFile)) { - ts.forEach(sourceFile.referencedFiles, function (fileReference) { - var referencedFile = resolveScriptReference(sourceFile, fileReference); - if (isExternalModuleOrDeclarationFile(referencedFile) && !ts.contains(emittedReferencedFiles, referencedFile)) { - writeReferencePath(referencedFile); - emittedReferencedFiles.push(referencedFile); - } - }); + if (!compilerOptions.noResolve) { + ts.forEach(sourceFile.referencedFiles, function (fileReference) { + var referencedFile = resolveScriptReference(sourceFile, fileReference); + if (isExternalModuleOrDeclarationFile(referencedFile) && !ts.contains(emittedReferencedFiles, referencedFile)) { + writeReferencePath(referencedFile); + emittedReferencedFiles.push(referencedFile); + } + }); + } emitNode(sourceFile); } }); @@ -8409,6 +8464,17 @@ var ts; var nextSymbolId = 1; var nextNodeId = 1; var nextMergeId = 1; + function getDeclarationOfKind(symbol, kind) { + var declarations = symbol.declarations; + for (var i = 0; i < declarations.length; i++) { + var declaration = declarations[i]; + if (declaration.kind === kind) { + return declaration; + } + } + return undefined; + } + ts.getDeclarationOfKind = getDeclarationOfKind; function createTypeChecker(program, fullTypeCheck) { var Symbol = ts.objectAllocator.getSymbolConstructor(); var Type = ts.objectAllocator.getTypeConstructor(); @@ -8416,6 +8482,7 @@ var ts; var typeCount = 0; var emptyArray = []; var emptySymbols = {}; + var compilerOptions = program.getCompilerOptions(); var checker = { getProgram: function () { return program; }, getDiagnostics: getDiagnostics, @@ -8439,7 +8506,9 @@ var ts; getApparentType: getApparentType, typeToString: typeToString, symbolToString: symbolToString, - getAugmentedPropertiesOfApparentType: getAugmentedPropertiesOfApparentType + getAugmentedPropertiesOfApparentType: getAugmentedPropertiesOfApparentType, + getRootSymbol: getRootSymbol, + getContextualType: getContextualType }; var undefinedSymbol = createSymbol(2 /* Property */ | 33554432 /* Transient */, "undefined"); var argumentsSymbol = createSymbol(2 /* Property */ | 33554432 /* Transient */, "arguments"); @@ -8887,16 +8956,6 @@ var ts; } return false; } - function getDeclarationOfKind(symbol, kind) { - var declarations = symbol.declarations; - for (var i = 0; i < declarations.length; i++) { - var declaration = declarations[i]; - if (declaration.kind === kind) { - return declaration; - } - } - return undefined; - } function findConstructorDeclaration(node) { var members = node.members; for (var i = 0; i < members.length; i++) { @@ -9134,7 +9193,7 @@ var ts; } return symbol.name; } - if (enclosingDeclaration && !(symbol.flags & (ts.SymbolFlags.PropertyOrAccessor | ts.SymbolFlags.Signature | 4096 /* Constructor */ | 2048 /* Method */ | 262144 /* TypeParameter */))) { + if (enclosingDeclaration && !(symbol.flags & 262144 /* TypeParameter */)) { var symbolName; while (symbol) { var isFirstName = !symbolName; @@ -9163,17 +9222,25 @@ var ts; function writeSymbolToTextWriter(symbol, enclosingDeclaration, meaning, writer) { writer.write(symbolToString(symbol, enclosingDeclaration, meaning)); } - function createSingleLineTextWriter() { + function createSingleLineTextWriter(maxLength) { var result = ""; - return { - write: function (s) { + var overflow = false; + function write(s) { + if (!overflow) { result += s; - }, + if (result.length > maxLength) { + result = result.substr(0, maxLength - 3) + "..."; + overflow = true; + } + } + } + return { + write: write, writeSymbol: function (symbol, enclosingDeclaration, meaning) { writeSymbolToTextWriter(symbol, enclosingDeclaration, meaning, this); }, writeLine: function () { - result += " "; + write(" "); }, increaseIndent: function () { }, @@ -9185,7 +9252,8 @@ var ts; }; } function typeToString(type, enclosingDeclaration, flags) { - var stringWriter = createSingleLineTextWriter(); + var maxLength = compilerOptions.noErrorTruncation || flags & 4 /* NoTruncation */ ? undefined : 100; + var stringWriter = createSingleLineTextWriter(maxLength); writeTypeToTextWriter(type, enclosingDeclaration, flags, stringWriter); return stringWriter.getText(); } @@ -9515,7 +9583,7 @@ var ts; checkImplicitAny(type); return type; function checkImplicitAny(type) { - if (!fullTypeCheck || !program.getCompilerOptions().noImplicitAny) { + if (!fullTypeCheck || !compilerOptions.noImplicitAny) { return; } if (getInnermostTypeOfNestedArrayTypes(type) !== anyType) { @@ -9599,7 +9667,7 @@ var ts; type = getReturnTypeFromBody(getter); } else { - if (program.getCompilerOptions().noImplicitAny) { + if (compilerOptions.noImplicitAny) { error(setter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation, symbol.name); } type = anyType; @@ -9917,27 +9985,38 @@ var ts; } function resolveAnonymousTypeMembers(type) { var symbol = type.symbol; - var members = emptySymbols; - var callSignatures = emptyArray; - var constructSignatures = emptyArray; - if (symbol.flags & ts.SymbolFlags.HasExports) { - members = symbol.exports; + if (symbol.flags & 512 /* TypeLiteral */) { + var members = symbol.members; + var callSignatures = getSignaturesOfSymbol(members["__call"]); + var constructSignatures = getSignaturesOfSymbol(members["__new"]); + var stringIndexType = getIndexTypeOfSymbol(symbol, 0 /* String */); + var numberIndexType = getIndexTypeOfSymbol(symbol, 1 /* Number */); } - if (symbol.flags & (8 /* Function */ | 2048 /* Method */)) { - callSignatures = getSignaturesOfSymbol(symbol); - } - if (symbol.flags & 16 /* Class */) { - var classType = getDeclaredTypeOfClass(symbol); - constructSignatures = getSignaturesOfSymbol(symbol.members["__constructor"]); - if (!constructSignatures.length) - constructSignatures = getDefaultConstructSignatures(classType); - if (classType.baseTypes.length) { - var members = createSymbolTable(getNamedMembers(members)); - addInheritedMembers(members, getPropertiesOfType(getTypeOfSymbol(classType.baseTypes[0].symbol))); + else { + var members = emptySymbols; + var callSignatures = emptyArray; + var constructSignatures = emptyArray; + if (symbol.flags & ts.SymbolFlags.HasExports) { + members = symbol.exports; } + if (symbol.flags & (8 /* Function */ | 2048 /* Method */)) { + callSignatures = getSignaturesOfSymbol(symbol); + } + if (symbol.flags & 16 /* Class */) { + var classType = getDeclaredTypeOfClass(symbol); + constructSignatures = getSignaturesOfSymbol(symbol.members["__constructor"]); + if (!constructSignatures.length) { + constructSignatures = getDefaultConstructSignatures(classType); + } + if (classType.baseTypes.length) { + members = createSymbolTable(getNamedMembers(members)); + addInheritedMembers(members, getPropertiesOfType(getTypeOfSymbol(classType.baseTypes[0].symbol))); + } + } + var stringIndexType = undefined; + var numberIndexType = (symbol.flags & 64 /* Enum */) ? stringType : undefined; } - var numberIndexType = (symbol.flags & 64 /* Enum */) ? stringType : undefined; - setObjectTypeMembers(type, members, callSignatures, constructSignatures, undefined, numberIndexType); + setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexType, numberIndexType); } function resolveObjectTypeMembers(type) { if (!type.members) { @@ -10319,13 +10398,7 @@ var ts; function getTypeFromTypeLiteralNode(node) { var links = getNodeLinks(node); if (!links.resolvedType) { - var symbol = node.symbol; - var members = symbol.members; - var callSignatures = getSignaturesOfSymbol(members["__call"]); - var constructSignatures = getSignaturesOfSymbol(members["__new"]); - var stringIndexType = getIndexTypeOfSymbol(symbol, 0 /* String */); - var numberIndexType = getIndexTypeOfSymbol(symbol, 1 /* Number */); - links.resolvedType = createAnonymousType(symbol, members, callSignatures, constructSignatures, stringIndexType, numberIndexType); + links.resolvedType = createObjectType(8192 /* Anonymous */, node.symbol); } return links.resolvedType; } @@ -11054,45 +11127,6 @@ var ts; function isTypeOfObjectLiteral(type) { return (type.flags & 8192 /* Anonymous */) && type.symbol && (type.symbol.flags & 1024 /* ObjectLiteral */) ? true : false; } - function getWidenedTypeOfObjectLiteral(type) { - var properties = getPropertiesOfType(type); - if (properties.length) { - var widenedTypes = []; - var propTypeWasWidened = false; - ts.forEach(properties, function (p) { - var propType = getTypeOfSymbol(p); - var widenedType = getWidenedType(propType); - if (propType !== widenedType) { - propTypeWasWidened = true; - if (program.getCompilerOptions().noImplicitAny && getInnermostTypeOfNestedArrayTypes(widenedType) === anyType) { - error(p.valueDeclaration, ts.Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, p.name, typeToString(widenedType)); - } - } - widenedTypes.push(widenedType); - }); - if (propTypeWasWidened) { - var members = {}; - var index = 0; - ts.forEach(properties, function (p) { - var symbol = createSymbol(2 /* Property */ | 33554432 /* Transient */, p.name); - symbol.declarations = p.declarations; - symbol.parent = p.parent; - symbol.type = widenedTypes[index++]; - if (p.valueDeclaration) - symbol.valueDeclaration = p.valueDeclaration; - members[symbol.name] = symbol; - }); - var stringIndexType = getIndexTypeOfType(type, 0 /* String */); - var numberIndexType = getIndexTypeOfType(type, 1 /* Number */); - if (stringIndexType) - stringIndexType = getWidenedType(stringIndexType); - if (numberIndexType) - numberIndexType = getWidenedType(numberIndexType); - type = createAnonymousType(type.symbol, members, emptyArray, emptyArray, stringIndexType, numberIndexType); - } - } - return type; - } function isArrayType(type) { return type.flags & 4096 /* Reference */ && type.target === globalArrayType; } @@ -11102,13 +11136,7 @@ var ts; } return type; } - function getWidenedTypeOfArrayLiteral(type) { - var elementType = type.typeArguments[0]; - var widenedType = getWidenedType(elementType); - type = elementType !== widenedType ? createArrayType(widenedType) : type; - return type; - } - function getWidenedType(type) { + function getWidenedType(type, supressNoImplicitAnyErrors) { if (type.flags & (32 /* Undefined */ | 64 /* Null */)) { return anyType; } @@ -11119,6 +11147,52 @@ var ts; return getWidenedTypeOfArrayLiteral(type); } return type; + function getWidenedTypeOfObjectLiteral(type) { + var properties = getPropertiesOfType(type); + if (properties.length) { + var widenedTypes = []; + var propTypeWasWidened = false; + ts.forEach(properties, function (p) { + var propType = getTypeOfSymbol(p); + var widenedType = getWidenedType(propType); + if (propType !== widenedType) { + propTypeWasWidened = true; + if (!supressNoImplicitAnyErrors && program.getCompilerOptions().noImplicitAny && getInnermostTypeOfNestedArrayTypes(widenedType) === anyType) { + error(p.valueDeclaration, ts.Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, p.name, typeToString(widenedType)); + } + } + widenedTypes.push(widenedType); + }); + if (propTypeWasWidened) { + var members = {}; + var index = 0; + ts.forEach(properties, function (p) { + var symbol = createSymbol(2 /* Property */ | 33554432 /* Transient */, p.name); + symbol.declarations = p.declarations; + symbol.parent = p.parent; + symbol.type = widenedTypes[index++]; + symbol.target = p; + if (p.valueDeclaration) + symbol.valueDeclaration = p.valueDeclaration; + members[symbol.name] = symbol; + }); + var stringIndexType = getIndexTypeOfType(type, 0 /* String */); + var numberIndexType = getIndexTypeOfType(type, 1 /* Number */); + if (stringIndexType) + stringIndexType = getWidenedType(stringIndexType); + if (numberIndexType) + numberIndexType = getWidenedType(numberIndexType); + type = createAnonymousType(type.symbol, members, emptyArray, emptyArray, stringIndexType, numberIndexType); + } + } + return type; + } + function getWidenedTypeOfArrayLiteral(type) { + var elementType = type.typeArguments[0]; + var widenedType = getWidenedType(elementType, supressNoImplicitAnyErrors); + type = elementType !== widenedType ? createArrayType(widenedType) : type; + return type; + } } function forEachMatchingParameterType(source, target, callback) { var sourceMax = source.parameters.length; @@ -11652,6 +11726,7 @@ var ts; if (member.valueDeclaration) prop.valueDeclaration = member.valueDeclaration; prop.type = type; + prop.target = member; member = prop; } else { @@ -11754,7 +11829,7 @@ var ts; if (stringIndexType) { return stringIndexType; } - if (program.getCompilerOptions().noImplicitAny && objectType !== anyType) { + if (compilerOptions.noImplicitAny && objectType !== anyType) { error(node, ts.Diagnostics.Index_signature_of_object_type_implicitly_has_an_any_type); } return anyType; @@ -11825,17 +11900,6 @@ var ts; }); return getSignatureInstantiation(signature, getInferredTypes(context)); } - function inferentiallyTypeExpession(expr, contextualType, contextualMapper) { - var type = checkExpressionWithContextualType(expr, contextualType, contextualMapper); - var signature = getSingleCallSignature(type); - if (signature && signature.typeParameters) { - var contextualSignature = getSingleCallSignature(contextualType); - if (contextualSignature && !contextualSignature.typeParameters) { - type = getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, contextualMapper)); - } - } - return type; - } function inferTypeArguments(signature, args, excludeArgument) { var typeParameters = signature.typeParameters; var context = createInferenceContext(typeParameters); @@ -11843,14 +11907,14 @@ var ts; for (var i = 0; i < args.length; i++) { if (!excludeArgument || excludeArgument[i] === undefined) { var parameterType = getTypeAtPosition(signature, i); - inferTypes(context, inferentiallyTypeExpession(args[i], parameterType, mapper), parameterType); + inferTypes(context, checkExpressionWithContextualType(args[i], parameterType, mapper), parameterType); } } if (excludeArgument) { for (var i = 0; i < args.length; i++) { if (excludeArgument[i] === false) { var parameterType = getTypeAtPosition(signature, i); - inferTypes(context, inferentiallyTypeExpession(args[i], parameterType, mapper), parameterType); + inferTypes(context, checkExpressionWithContextualType(args[i], parameterType, mapper), parameterType); } } } @@ -12008,7 +12072,7 @@ var ts; if (node.kind === 133 /* NewExpression */) { var declaration = signature.declaration; if (declaration && (declaration.kind !== 117 /* Constructor */ && declaration.kind !== 121 /* ConstructSignature */)) { - if (program.getCompilerOptions().noImplicitAny) { + if (compilerOptions.noImplicitAny) { error(node, ts.Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type); } return anyType; @@ -12020,9 +12084,9 @@ var ts; var exprType = checkExpression(node.operand); var targetType = getTypeFromTypeNode(node.type); if (fullTypeCheck && targetType !== unknownType) { - var widenedType = getWidenedType(exprType); - if (!(isTypeAssignableTo(exprType, targetType) || isTypeAssignableTo(targetType, widenedType))) { - checkTypeAssignableTo(targetType, widenedType, node, ts.Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other_Colon, ts.Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other); + var widenedType = getWidenedType(exprType, true); + if (!(isTypeAssignableTo(targetType, widenedType))) { + checkTypeAssignableTo(exprType, targetType, node, ts.Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other_Colon, ts.Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other); } } return targetType; @@ -12047,7 +12111,7 @@ var ts; if (func.body.kind !== 168 /* FunctionBlock */) { var unwidenedType = checkAndMarkExpression(func.body, contextualMapper); var widenedType = getWidenedType(unwidenedType); - if (fullTypeCheck && program.getCompilerOptions().noImplicitAny && widenedType !== unwidenedType && getInnermostTypeOfNestedArrayTypes(widenedType) === anyType) { + if (fullTypeCheck && compilerOptions.noImplicitAny && widenedType !== unwidenedType && getInnermostTypeOfNestedArrayTypes(widenedType) === anyType) { error(func, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeToString(widenedType)); } return widenedType; @@ -12060,7 +12124,7 @@ var ts; return unknownType; } var widenedType = getWidenedType(commonType); - if (fullTypeCheck && program.getCompilerOptions().noImplicitAny && widenedType !== commonType && getInnermostTypeOfNestedArrayTypes(widenedType) === anyType) { + if (fullTypeCheck && compilerOptions.noImplicitAny && widenedType !== commonType && getInnermostTypeOfNestedArrayTypes(widenedType) === anyType) { var typeName = typeToString(widenedType); if (func.name) { error(func, ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type, ts.identifierToString(func.name), typeName); @@ -12162,26 +12226,26 @@ var ts; } } } + checkSignatureDeclaration(node); } } - if (fullTypeCheck && !(links.flags & 1 /* TypeChecked */)) { - checkSignatureDeclaration(node); - if (node.type) { - checkIfNonVoidFunctionHasReturnExpressionsOrSingleThrowStatment(node, getTypeFromTypeNode(node.type)); - } - if (node.body.kind === 168 /* FunctionBlock */) { - checkSourceElement(node.body); - } - else { - var exprType = checkExpression(node.body); - if (node.type) { - checkTypeAssignableTo(exprType, getTypeFromTypeNode(node.type), node.body, undefined, undefined); - } - } - links.flags |= 1 /* TypeChecked */; - } return type; } + function checkFunctionExpressionBody(node) { + if (node.type) { + checkIfNonVoidFunctionHasReturnExpressionsOrSingleThrowStatment(node, getTypeFromTypeNode(node.type)); + } + if (node.body.kind === 168 /* FunctionBlock */) { + checkSourceElement(node.body); + } + else { + var exprType = checkExpression(node.body); + if (node.type) { + checkTypeAssignableTo(exprType, getTypeFromTypeNode(node.type), node.body, undefined, undefined); + } + checkFunctionExpressionBodies(node.body); + } + } function checkArithmeticOperandType(operand, type, diagnostic) { if (!(type.flags & (1 /* Any */ | ts.TypeFlags.NumberLike))) { error(operand, diagnostic); @@ -12396,6 +12460,22 @@ var ts; return result; } function checkExpression(node, contextualMapper) { + var type = checkExpressionNode(node, contextualMapper); + if (contextualMapper && contextualMapper !== identityMapper) { + var signature = getSingleCallSignature(type); + if (signature && signature.typeParameters) { + var contextualType = getContextualType(node); + if (contextualType) { + var contextualSignature = getSingleCallSignature(contextualType); + if (contextualSignature && !contextualSignature.typeParameters) { + type = getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, contextualMapper)); + } + } + } + } + return type; + } + function checkExpressionNode(node, contextualMapper) { switch (node.kind) { case 55 /* Identifier */: return checkIdentifier(node); @@ -12504,8 +12584,9 @@ var ts; if (fullTypeCheck) { checkCollisionWithCapturedSuperVariable(node, node.name); checkCollisionWithCapturedThisVariable(node, node.name); + checkCollistionWithRequireExportsInGeneratedCode(node, node.name); checkCollisionWithArgumentsInGeneratedCode(node); - if (program.getCompilerOptions().noImplicitAny && !node.type) { + if (compilerOptions.noImplicitAny && !node.type) { switch (node.kind) { case 121 /* ConstructSignature */: error(node, ts.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); @@ -12916,7 +12997,7 @@ var ts; if (node.type && !isAccessor(node.kind)) { checkIfNonVoidFunctionHasReturnExpressionsOrSingleThrowStatment(node, getTypeFromTypeNode(node.type)); } - if (fullTypeCheck && program.getCompilerOptions().noImplicitAny && !node.body && !node.type) { + if (fullTypeCheck && compilerOptions.noImplicitAny && !node.body && !node.type) { if (!isPrivateWithinAmbient(node)) { var typeName = typeToString(anyType); if (node.name) { @@ -13031,6 +13112,18 @@ var ts; } } } + function checkCollistionWithRequireExportsInGeneratedCode(node, name) { + if (!needCollisionCheckForIdentifier(node, name, "require") && !needCollisionCheckForIdentifier(node, name, "exports")) { + return; + } + if (node.kind === 172 /* ModuleDeclaration */ && !ts.isInstantiated(node)) { + return; + } + var parent = node.kind === 166 /* VariableDeclaration */ ? node.parent.parent : node.parent; + if (parent.kind === 177 /* SourceFile */ && ts.isExternalModule(parent)) { + error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_an_external_module, name.text, name.text); + } + } function checkVariableDeclaration(node) { checkSourceElement(node.type); checkExportsOnMergedDeclarations(node); @@ -13052,6 +13145,7 @@ var ts; } checkCollisionWithCapturedSuperVariable(node, node.name); checkCollisionWithCapturedThisVariable(node, node.name); + checkCollistionWithRequireExportsInGeneratedCode(node, node.name); if (!useTypeFromValueDeclaration) { if (typeOfValueDeclaration !== unknownType && type !== unknownType && !isTypeIdenticalTo(typeOfValueDeclaration, type)) { error(node.name, ts.Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2, ts.identifierToString(node.name), typeToString(typeOfValueDeclaration), typeToString(type)); @@ -13250,6 +13344,7 @@ var ts; checkTypeNameIsReserved(node.name, ts.Diagnostics.Class_name_cannot_be_0); checkTypeParameters(node.typeParameters); checkCollisionWithCapturedThisVariable(node, node.name); + checkCollistionWithRequireExportsInGeneratedCode(node, node.name); checkExportsOnMergedDeclarations(node); var symbol = getSymbolOfNode(node); var type = getDeclaredTypeOfSymbol(symbol); @@ -13417,6 +13512,7 @@ var ts; } checkTypeNameIsReserved(node.name, ts.Diagnostics.Enum_name_cannot_be_0); checkCollisionWithCapturedThisVariable(node, node.name); + checkCollistionWithRequireExportsInGeneratedCode(node, node.name); checkExportsOnMergedDeclarations(node); var enumSymbol = getSymbolOfNode(node); var enumType = getDeclaredTypeOfSymbol(enumSymbol); @@ -13473,6 +13569,7 @@ var ts; function checkModuleDeclaration(node) { if (fullTypeCheck) { checkCollisionWithCapturedThisVariable(node, node.name); + checkCollistionWithRequireExportsInGeneratedCode(node, node.name); checkExportsOnMergedDeclarations(node); var symbol = getSymbolOfNode(node); if (symbol.flags & 128 /* ValueModule */ && symbol.declarations.length > 1 && !ts.isInAmbientContext(node)) { @@ -13505,6 +13602,7 @@ var ts; } function checkImportDeclaration(node) { checkCollisionWithCapturedThisVariable(node, node.name); + checkCollistionWithRequireExportsInGeneratedCode(node, node.name); var symbol = getSymbolOfNode(node); var target; if (node.entityName) { @@ -13587,9 +13685,10 @@ var ts; case 167 /* FunctionDeclaration */: return checkFunctionDeclaration(node); case 143 /* Block */: + return checkBlock(node); case 168 /* FunctionBlock */: case 173 /* ModuleBlock */: - return checkBlock(node); + return checkBody(node); case 144 /* VariableStatement */: return checkVariableStatement(node); case 146 /* ExpressionStatement */: @@ -13635,12 +13734,79 @@ var ts; return checkExportAssignment(node); } } + function checkFunctionExpressionBodies(node) { + switch (node.kind) { + case 136 /* FunctionExpression */: + case 137 /* ArrowFunction */: + ts.forEach(node.parameters, checkFunctionExpressionBodies); + checkFunctionExpressionBody(node); + break; + case 116 /* Method */: + case 117 /* Constructor */: + case 118 /* GetAccessor */: + case 119 /* SetAccessor */: + case 167 /* FunctionDeclaration */: + ts.forEach(node.parameters, checkFunctionExpressionBodies); + break; + case 155 /* WithStatement */: + checkFunctionExpressionBodies(node.expression); + break; + case 114 /* Parameter */: + case 115 /* Property */: + case 127 /* ArrayLiteral */: + case 128 /* ObjectLiteral */: + case 129 /* PropertyAssignment */: + case 130 /* PropertyAccess */: + case 131 /* IndexedAccess */: + case 132 /* CallExpression */: + case 133 /* NewExpression */: + case 134 /* TypeAssertion */: + case 135 /* ParenExpression */: + case 138 /* PrefixOperator */: + case 139 /* PostfixOperator */: + case 140 /* BinaryExpression */: + case 141 /* ConditionalExpression */: + case 143 /* Block */: + case 168 /* FunctionBlock */: + case 173 /* ModuleBlock */: + case 144 /* VariableStatement */: + case 146 /* ExpressionStatement */: + case 147 /* IfStatement */: + case 148 /* DoStatement */: + case 149 /* WhileStatement */: + case 150 /* ForStatement */: + case 151 /* ForInStatement */: + case 152 /* ContinueStatement */: + case 153 /* BreakStatement */: + case 154 /* ReturnStatement */: + case 156 /* SwitchStatement */: + case 157 /* CaseClause */: + case 158 /* DefaultClause */: + case 159 /* LabelledStatement */: + case 160 /* ThrowStatement */: + case 161 /* TryStatement */: + case 162 /* TryBlock */: + case 163 /* CatchBlock */: + case 164 /* FinallyBlock */: + case 166 /* VariableDeclaration */: + case 169 /* ClassDeclaration */: + case 171 /* EnumDeclaration */: + case 176 /* EnumMember */: + case 177 /* SourceFile */: + ts.forEachChild(node, checkFunctionExpressionBodies); + break; + } + } + function checkBody(node) { + checkBlock(node); + checkFunctionExpressionBodies(node); + } function checkSourceFile(node) { var links = getNodeLinks(node); if (!(links.flags & 1 /* TypeChecked */)) { emitExtends = false; potentialThisCollisions.length = 0; - ts.forEach(node.statements, checkSourceElement); + checkBody(node); if (ts.isExternalModule(node)) { var symbol = getExportAssignmentSymbol(node.symbol); if (symbol && symbol.flags & 4194304 /* Import */) { @@ -13754,19 +13920,6 @@ var ts; function isTypeDeclarationName(name) { return name.kind == 55 /* Identifier */ && isTypeDeclaration(name.parent) && name.parent.name === name; } - function isDeclarationOrFunctionExpressionOrCatchVariableName(name) { - if (name.kind !== 55 /* Identifier */ && name.kind !== 3 /* StringLiteral */ && name.kind !== 2 /* NumericLiteral */) { - return false; - } - var parent = name.parent; - if (isDeclaration(parent) || parent.kind === 136 /* FunctionExpression */) { - return parent.name === name; - } - if (parent.kind === 163 /* CatchBlock */) { - return parent.variable === name; - } - return false; - } function isTypeDeclaration(node) { switch (node.kind) { case 113 /* TypeParameter */: @@ -13776,27 +13929,6 @@ var ts; return true; } } - function isDeclaration(node) { - switch (node.kind) { - case 113 /* TypeParameter */: - case 114 /* Parameter */: - case 166 /* VariableDeclaration */: - case 115 /* Property */: - case 129 /* PropertyAssignment */: - case 176 /* EnumMember */: - case 116 /* Method */: - case 167 /* FunctionDeclaration */: - case 118 /* GetAccessor */: - case 119 /* SetAccessor */: - case 169 /* ClassDeclaration */: - case 170 /* InterfaceDeclaration */: - case 171 /* EnumDeclaration */: - case 172 /* ModuleDeclaration */: - case 174 /* ImportDeclaration */: - return true; - } - return false; - } function isTypeReferenceIdentifier(entityName) { var node = entityName; while (node.parent && node.parent.kind === 112 /* QualifiedName */) @@ -13940,7 +14072,7 @@ var ts; return (node.parent.kind === 112 /* QualifiedName */ || node.parent.kind === 130 /* PropertyAccess */) && node.parent.right === node; } function getSymbolOfEntityName(entityName) { - if (isDeclarationOrFunctionExpressionOrCatchVariableName(entityName)) { + if (ts.isDeclarationOrFunctionExpressionOrCatchVariableName(entityName)) { return getSymbolOfNode(entityName.parent); } if (entityName.parent.kind === 175 /* ExportAssignment */) { @@ -13976,6 +14108,12 @@ var ts; return undefined; } function getSymbolInfo(node) { + if (ts.isDeclarationOrFunctionExpressionOrCatchVariableName(node)) { + return getSymbolOfNode(node.parent); + } + if (node.kind === 55 /* Identifier */ && isInRightSideOfImportOrExportAssignment(node)) { + return node.parent.kind === 175 /* ExportAssignment */ ? getSymbolOfEntityName(node) : getSymbolOfPartOfRightHandSideOfImport(node); + } switch (node.kind) { case 55 /* Identifier */: case 130 /* PropertyAccess */: @@ -13992,7 +14130,13 @@ var ts; } return undefined; case 3 /* StringLiteral */: - if (node.parent.kind === 131 /* IndexedAccess */ && node.parent.index === node) { + if (node.parent.kind === 174 /* ImportDeclaration */ && node.parent.externalModuleName === node) { + var importSymbol = getSymbolOfNode(node.parent); + var moduleType = getTypeOfSymbol(importSymbol); + return moduleType ? moduleType.symbol : undefined; + } + case 2 /* NumericLiteral */: + if (node.parent.kind == 131 /* IndexedAccess */ && node.parent.index === node) { var objectType = checkExpression(node.parent.object); if (objectType === unknownType) return undefined; @@ -14001,14 +14145,6 @@ var ts; return undefined; return getPropertyOfApparentType(apparentType, node.text); } - else if (node.parent.kind === 174 /* ImportDeclaration */ && node.parent.externalModuleName === node) { - var importSymbol = getSymbolOfNode(node.parent); - var moduleType = getTypeOfSymbol(importSymbol); - return moduleType ? moduleType.symbol : undefined; - } - else if (node.parent.kind === 172 /* ModuleDeclaration */) { - return getSymbolOfNode(node.parent); - } break; } return undefined; @@ -14028,11 +14164,11 @@ var ts; var symbol = getSymbolInfo(node); return getDeclaredTypeOfSymbol(symbol); } - if (isDeclaration(node)) { + if (ts.isDeclaration(node)) { var symbol = getSymbolOfNode(node); return getTypeOfSymbol(symbol); } - if (isDeclarationOrFunctionExpressionOrCatchVariableName(node)) { + if (ts.isDeclarationOrFunctionExpressionOrCatchVariableName(node)) { var symbol = getSymbolInfo(node); return getTypeOfSymbol(symbol); } @@ -14079,6 +14215,9 @@ var ts; return getPropertiesOfType(apparentType); } } + function getRootSymbol(symbol) { + return (symbol.flags & 33554432 /* Transient */) ? getSymbolLinks(symbol).target : symbol; + } function isExternalModuleSymbol(symbol) { return symbol.flags & 128 /* ValueModule */ && symbol.declarations.length === 1 && symbol.declarations[0].kind === 177 /* SourceFile */; } @@ -14155,7 +14294,7 @@ var ts; return target !== unknownSymbol && ((target.flags & ts.SymbolFlags.Value) !== 0); } function shouldEmitDeclarations() { - return program.getCompilerOptions().declaration && !program.getDiagnostics().length && !getDiagnostics().length; + return compilerOptions.declaration && !program.getDiagnostics().length && !getDiagnostics().length; } function isReferencedImportDeclaration(node) { var symbol = getSymbolOfNode(node); diff --git a/bin/typescriptServices.js b/bin/typescriptServices.js index d9b53be63cf..1efb6d232e3 100644 --- a/bin/typescriptServices.js +++ b/bin/typescriptServices.js @@ -267,6 +267,7 @@ var ts; Import_name_cannot_be_0: { code: 2438, category: 1 /* Error */, key: "Import name cannot be '{0}'" }, Import_declaration_in_an_ambient_external_module_declaration_cannot_reference_external_module_through_relative_external_module_name: { code: 2439, category: 1 /* Error */, key: "Import declaration in an ambient external module declaration cannot reference external module through relative external module name." }, Import_declaration_conflicts_with_local_declaration_of_0: { code: 2440, category: 1 /* Error */, key: "Import declaration conflicts with local declaration of '{0}'" }, + Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_an_external_module: { code: 2441, category: 1 /* Error */, key: "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of an external module." }, Import_declaration_0_is_using_private_name_1: { code: 4000, category: 1 /* Error */, key: "Import declaration '{0}' is using private name '{1}'." }, Type_parameter_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4001, category: 1 /* Error */, key: "Type parameter '{0}' of exported class has or is using name '{1}' from private module '{2}'." }, Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: 1 /* Error */, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, @@ -566,7 +567,8 @@ var ts; var pos = 0; var lineStart = 0; while (pos < text.length) { - switch (text.charCodeAt(pos++)) { + var ch = text.charCodeAt(pos++); + switch (ch) { case 13 /* carriageReturn */: if (text.charCodeAt(pos) === 10 /* lineFeed */) { pos++; @@ -575,6 +577,12 @@ var ts; result.push(lineStart); lineStart = pos; break; + default: + if (ch > 127 /* maxAsciiCharacter */ && isLineBreak(ch)) { + result.push(lineStart); + lineStart = pos; + } + break; } } result.push(lineStart); @@ -608,7 +616,7 @@ var ts; } ts.isWhiteSpace = isWhiteSpace; function isLineBreak(ch) { - return ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */ || ch === 8232 /* lineSeparator */ || ch === 8233 /* paragraphSeparator */; + return ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */ || ch === 8232 /* lineSeparator */ || ch === 8233 /* paragraphSeparator */ || ch === 133 /* nextLine */; } ts.isLineBreak = isLineBreak; function isDigit(ch) { @@ -748,6 +756,14 @@ var ts; return getCommentRanges(text, pos, true); } ts.getTrailingComments = getTrailingComments; + function isIdentifierStart(ch, languageVersion) { + return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch === 36 /* $ */ || ch === 95 /* _ */ || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierStart(ch, languageVersion); + } + ts.isIdentifierStart = isIdentifierStart; + function isIdentifierPart(ch, languageVersion) { + return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch >= 48 /* _0 */ && ch <= 57 /* _9 */ || ch === 36 /* $ */ || ch === 95 /* _ */ || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierPart(ch, languageVersion); + } + ts.isIdentifierPart = isIdentifierPart; function createScanner(languageVersion, text, onError, onComment) { var pos; var len; @@ -1516,6 +1532,7 @@ var ts; TypeFormatFlags[TypeFormatFlags["None"] = 0x00000000] = "None"; TypeFormatFlags[TypeFormatFlags["WriteArrayAsGenericType"] = 0x00000001] = "WriteArrayAsGenericType"; TypeFormatFlags[TypeFormatFlags["UseTypeOfFunction"] = 0x00000002] = "UseTypeOfFunction"; + TypeFormatFlags[TypeFormatFlags["NoTruncation"] = 0x00000004] = "NoTruncation"; })(ts.TypeFormatFlags || (ts.TypeFormatFlags = {})); var TypeFormatFlags = ts.TypeFormatFlags; (function (SymbolAccessibility) { @@ -1943,6 +1960,8 @@ var ts; } ts.getLocaleSpecificMessage = getLocaleSpecificMessage; function createFileDiagnostic(file, start, length, message) { + Debug.assert(start >= 0, "start must be non-negative, is " + start); + Debug.assert(length >= 0, "length must be non-negative, is " + length); var text = getLocaleSpecificMessage(message.key); if (arguments.length > 4) { text = formatStringFromArgs(text, arguments, 4); @@ -1986,6 +2005,8 @@ var ts; } ts.chainDiagnosticMessages = chainDiagnosticMessages; function flattenDiagnosticChain(file, start, length, diagnosticChain, newLine) { + Debug.assert(start >= 0, "start must be non-negative, is " + start); + Debug.assert(length >= 0, "length must be non-negative, is " + length); var code = diagnosticChain.code; var category = diagnosticChain.category; var messageText = ""; @@ -2241,6 +2262,7 @@ var ts; AssertionLevel[AssertionLevel["VeryAggressive"] = 3] = "VeryAggressive"; })(ts.AssertionLevel || (ts.AssertionLevel = {})); var AssertionLevel = ts.AssertionLevel; + var Debug; (function (Debug) { var currentAssertionLevel = 0 /* None */; function shouldAssert(level) { @@ -2261,8 +2283,7 @@ var ts; Debug.assert(false, message); } Debug.fail = fail; - })(ts.Debug || (ts.Debug = {})); - var Debug = ts.Debug; + })(Debug = ts.Debug || (ts.Debug = {})); })(ts || (ts = {})); var ts; (function (ts) { @@ -2333,7 +2354,7 @@ var ts; function createDiagnosticForNode(node, message, arg0, arg1, arg2) { node = getErrorSpanForNode(node); var file = getSourceFileOfNode(node); - var start = ts.skipTrivia(file.text, node.pos); + var start = node.kind === 111 /* Missing */ ? node.pos : ts.skipTrivia(file.text, node.pos); var length = node.end - start; return ts.createFileDiagnostic(file, start, length, message, arg0, arg1, arg2); } @@ -2537,6 +2558,42 @@ var ts; return false; } ts.isInAmbientContext = isInAmbientContext; + function isDeclaration(node) { + switch (node.kind) { + case 113 /* TypeParameter */: + case 114 /* Parameter */: + case 166 /* VariableDeclaration */: + case 115 /* Property */: + case 129 /* PropertyAssignment */: + case 176 /* EnumMember */: + case 116 /* Method */: + case 167 /* FunctionDeclaration */: + case 118 /* GetAccessor */: + case 119 /* SetAccessor */: + case 169 /* ClassDeclaration */: + case 170 /* InterfaceDeclaration */: + case 171 /* EnumDeclaration */: + case 172 /* ModuleDeclaration */: + case 174 /* ImportDeclaration */: + return true; + } + return false; + } + ts.isDeclaration = isDeclaration; + function isDeclarationOrFunctionExpressionOrCatchVariableName(name) { + if (name.kind !== 55 /* Identifier */ && name.kind !== 3 /* StringLiteral */ && name.kind !== 2 /* NumericLiteral */) { + return false; + } + var parent = name.parent; + if (isDeclaration(parent) || parent.kind === 136 /* FunctionExpression */) { + return parent.name === name; + } + if (parent.kind === 163 /* CatchBlock */) { + return parent.variable === name; + } + return false; + } + ts.isDeclarationOrFunctionExpressionOrCatchVariableName = isDeclarationOrFunctionExpressionOrCatchVariableName; var ParsingContext; (function (ParsingContext) { ParsingContext[ParsingContext["SourceElements"] = 0] = "SourceElements"; @@ -2625,6 +2682,22 @@ var ts; ControlBlockContext[ControlBlockContext["Nested"] = 1] = "Nested"; ControlBlockContext[ControlBlockContext["CrossingFunctionBoundary"] = 2] = "CrossingFunctionBoundary"; })(ControlBlockContext || (ControlBlockContext = {})); + function isKeyword(token) { + return ts.SyntaxKind.FirstKeyword <= token && token <= ts.SyntaxKind.LastKeyword; + } + ts.isKeyword = isKeyword; + function isModifier(token) { + switch (token) { + case 98 /* PublicKeyword */: + case 96 /* PrivateKeyword */: + case 99 /* StaticKeyword */: + case 68 /* ExportKeyword */: + case 104 /* DeclareKeyword */: + return true; + } + return false; + } + ts.isModifier = isModifier; function createSourceFile(filename, sourceText, languageVersion, version, isOpen) { if (isOpen === void 0) { isOpen = false; } var file; @@ -2859,12 +2932,15 @@ var ts; function createMissingNode() { return createNode(111 /* Missing */); } + function internIdentifier(text) { + return ts.hasProperty(identifiers, text) ? identifiers[text] : (identifiers[text] = text); + } function createIdentifier(isIdentifier) { identifierCount++; if (isIdentifier) { var node = createNode(55 /* Identifier */); var text = escapeIdentifier(scanner.getTokenValue()); - node.text = ts.hasProperty(identifiers, text) ? identifiers[text] : (identifiers[text] = text); + node.text = internIdentifier(text); nextToken(); return finishNode(node); } @@ -2882,24 +2958,10 @@ var ts; } function parsePropertyName() { if (token === 3 /* StringLiteral */ || token === 2 /* NumericLiteral */) { - return parsePrimaryExpression(); + return parseLiteralNode(true); } return parseIdentifierName(); } - function isKeyword(token) { - return ts.SyntaxKind.FirstKeyword <= token && token <= ts.SyntaxKind.LastKeyword; - } - function isModifier(token) { - switch (token) { - case 98 /* PublicKeyword */: - case 96 /* PrivateKeyword */: - case 99 /* StaticKeyword */: - case 68 /* ExportKeyword */: - case 104 /* DeclareKeyword */: - return true; - } - return false; - } function parseContextualModifier(t) { return token === t && tryParse(function () { nextToken(); @@ -3114,9 +3176,10 @@ var ts; nextToken(); return finishNode(node); } - function parseLiteralNode() { + function parseLiteralNode(internName) { var node = createNode(token); - node.text = scanner.getTokenValue(); + var text = scanner.getTokenValue(); + node.text = internName ? internIdentifier(text) : text; var tokenPos = scanner.getTokenPos(); nextToken(); finishNode(node); @@ -3132,7 +3195,7 @@ var ts; } function parseStringLiteral() { if (token === 3 /* StringLiteral */) - return parseLiteralNode(); + return parseLiteralNode(true); error(ts.Diagnostics.String_literal_expected); return createMissingNode(); } @@ -3804,6 +3867,10 @@ var ts; } else { indexedAccess.index = parseExpression(); + if (indexedAccess.index.kind === 3 /* StringLiteral */ || indexedAccess.index.kind === 2 /* NumericLiteral */) { + var literal = indexedAccess.index; + literal.text = internIdentifier(literal.text); + } parseExpected(10 /* CloseBracketToken */); } expr = finishNode(indexedAccess); @@ -4478,10 +4545,11 @@ var ts; parseExpected(88 /* VarKeyword */); node.declarations = parseVariableDeclarationList(flags, false); parseSemicolon(); + finishNode(node); if (!node.declarations.length && file.syntacticErrors.length === errorCountBeforeVarStatement) { grammarErrorOnNode(node, ts.Diagnostics.Variable_declaration_list_cannot_be_empty); } - return finishNode(node); + return node; } function parseFunctionDeclaration(pos, flags) { var node = createNode(167 /* FunctionDeclaration */, pos); @@ -5109,6 +5177,7 @@ var ts; file.version = version; file.isOpen = isOpen; file.languageVersion = languageVersion; + file.identifiers = identifiers; return file; } ts.createSourceFile = createSourceFile; @@ -5173,18 +5242,17 @@ var ts; } function findSourceFile(filename, isDefaultLib, refFile, refStart, refLength) { var canonicalName = host.getCanonicalFileName(filename); - var file = getSourceFile(filename); - if (file) { - if (host.useCaseSensitiveFileNames() && canonicalName !== file.filename) { + if (ts.hasProperty(filesByName, canonicalName)) { + var file = filesByName[canonicalName]; + if (file && host.useCaseSensitiveFileNames() && canonicalName !== file.filename) { errors.push(ts.createFileDiagnostic(refFile, refStart, refLength, ts.Diagnostics.Filename_0_differs_from_already_included_filename_1_only_in_casing, filename, file.filename)); } } else { - file = host.getSourceFile(filename, options.target, function (hostErrorMessage) { + var file = filesByName[canonicalName] = host.getSourceFile(filename, options.target, function (hostErrorMessage) { errors.push(ts.createFileDiagnostic(refFile, refStart, refLength, ts.Diagnostics.Cannot_read_file_0_Colon_1, filename, hostErrorMessage)); }); if (file) { - filesByName[host.getCanonicalFileName(filename)] = file; seenNoDefaultLib = seenNoDefaultLib || file.hasNoDefaultLib; if (!options.noResolve) { var basePath = ts.getDirectoryPath(filename); @@ -5709,18 +5777,10 @@ var ts; function writeLiteral(s) { if (s && s.length) { write(s); - var pos = 0; - while (pos < s.length) { - switch (s.charCodeAt(pos++)) { - case 13 /* carriageReturn */: - if (pos < s.length && s.charCodeAt(pos) === 10 /* lineFeed */) { - pos++; - } - case 10 /* lineFeed */: - lineCount++; - linePos = output.length - s.length + pos; - break; - } + var lineStartsOfS = ts.getLineStarts(s); + if (lineStartsOfS.length > 1) { + lineCount = lineCount + lineStartsOfS.length - 1; + linePos = output.length - s.length + lineStartsOfS[lineStartsOfS.length - 1]; } } } @@ -5831,10 +5891,9 @@ var ts; } function calculateIndent(pos, end) { var currentLineIndent = 0; - while (pos < end && ts.isWhiteSpace(currentSourceFile.text.charCodeAt(pos))) { - pos++; + for (; pos < end && ts.isWhiteSpace(currentSourceFile.text.charCodeAt(pos)); pos++) { if (currentSourceFile.text.charCodeAt(pos) === 9 /* tab */) { - currentLineIndent += getIndentSize(); + currentLineIndent += getIndentSize() - (currentLineIndent % getIndentSize()); } else { currentLineIndent++; @@ -7080,14 +7139,12 @@ var ts; return emitPinnedOrTripleSlashComments(node); } emitLeadingComments(node); - if (!(node.flags & 1 /* Export */)) { - emitStart(node); - write("var "); - emit(node.name); - write(";"); - emitEnd(node); - writeLine(); - } + emitStart(node); + write("var "); + emit(node.name); + write(";"); + emitEnd(node); + writeLine(); emitStart(node); write("(function ("); emitStart(node.name); @@ -7111,21 +7168,15 @@ var ts; scopeEmitEnd(); } write(")("); + if (node.flags & 1 /* Export */) { + emit(node.name); + write(" = "); + } emitModuleMemberName(node); write(" || ("); emitModuleMemberName(node); write(" = {}));"); emitEnd(node); - if (node.flags & 1 /* Export */) { - writeLine(); - emitStart(node); - write("var "); - emit(node.name); - write(" = "); - emitModuleMemberName(node); - emitEnd(node); - write(";"); - } emitTrailingComments(node); } function emitImportDeclaration(node) { @@ -8132,39 +8183,43 @@ var ts; } } function resolveScriptReference(sourceFile, reference) { - var referenceFileName = compilerOptions.noResolve ? reference.filename : ts.normalizePath(ts.combinePaths(ts.getDirectoryPath(sourceFile.filename), reference.filename)); + var referenceFileName = ts.normalizePath(ts.combinePaths(ts.getDirectoryPath(sourceFile.filename), reference.filename)); return program.getSourceFile(referenceFileName); } var referencePathsOutput = ""; function writeReferencePath(referencedFile) { var declFileName = referencedFile.flags & 512 /* DeclarationFile */ ? referencedFile.filename : shouldEmitToOwnFile(referencedFile) ? getOwnEmitOutputFilePath(referencedFile, ".d.ts") : ts.getModuleNameFromFilename(compilerOptions.out) + ".d.ts"; declFileName = ts.getRelativePathToDirectoryOrUrl(ts.getDirectoryPath(ts.normalizeSlashes(jsFilePath)), declFileName, compilerHost.getCurrentDirectory(), false); - referencePathsOutput += "/// " + newLine; + referencePathsOutput += "/// " + newLine; } if (root) { - var addedGlobalFileReference = false; - ts.forEach(root.referencedFiles, function (fileReference) { - var referencedFile = resolveScriptReference(root, fileReference); - if ((referencedFile.flags & 512 /* DeclarationFile */) || shouldEmitToOwnFile(referencedFile) || !addedGlobalFileReference) { - writeReferencePath(referencedFile); - if (!isExternalModuleOrDeclarationFile(referencedFile)) { - addedGlobalFileReference = true; + if (!compilerOptions.noResolve) { + var addedGlobalFileReference = false; + ts.forEach(root.referencedFiles, function (fileReference) { + var referencedFile = resolveScriptReference(root, fileReference); + if ((referencedFile.flags & 512 /* DeclarationFile */) || shouldEmitToOwnFile(referencedFile) || !addedGlobalFileReference) { + writeReferencePath(referencedFile); + if (!isExternalModuleOrDeclarationFile(referencedFile)) { + addedGlobalFileReference = true; + } } - } - }); + }); + } emitNode(root); } else { var emittedReferencedFiles = []; ts.forEach(program.getSourceFiles(), function (sourceFile) { if (!isExternalModuleOrDeclarationFile(sourceFile)) { - ts.forEach(sourceFile.referencedFiles, function (fileReference) { - var referencedFile = resolveScriptReference(sourceFile, fileReference); - if (isExternalModuleOrDeclarationFile(referencedFile) && !ts.contains(emittedReferencedFiles, referencedFile)) { - writeReferencePath(referencedFile); - emittedReferencedFiles.push(referencedFile); - } - }); + if (!compilerOptions.noResolve) { + ts.forEach(sourceFile.referencedFiles, function (fileReference) { + var referencedFile = resolveScriptReference(sourceFile, fileReference); + if (isExternalModuleOrDeclarationFile(referencedFile) && !ts.contains(emittedReferencedFiles, referencedFile)) { + writeReferencePath(referencedFile); + emittedReferencedFiles.push(referencedFile); + } + }); + } emitNode(sourceFile); } }); @@ -8214,6 +8269,17 @@ var ts; var nextSymbolId = 1; var nextNodeId = 1; var nextMergeId = 1; + function getDeclarationOfKind(symbol, kind) { + var declarations = symbol.declarations; + for (var i = 0; i < declarations.length; i++) { + var declaration = declarations[i]; + if (declaration.kind === kind) { + return declaration; + } + } + return undefined; + } + ts.getDeclarationOfKind = getDeclarationOfKind; function createTypeChecker(program, fullTypeCheck) { var Symbol = ts.objectAllocator.getSymbolConstructor(); var Type = ts.objectAllocator.getTypeConstructor(); @@ -8221,6 +8287,7 @@ var ts; var typeCount = 0; var emptyArray = []; var emptySymbols = {}; + var compilerOptions = program.getCompilerOptions(); var checker = { getProgram: function () { return program; }, getDiagnostics: getDiagnostics, @@ -8244,7 +8311,9 @@ var ts; getApparentType: getApparentType, typeToString: typeToString, symbolToString: symbolToString, - getAugmentedPropertiesOfApparentType: getAugmentedPropertiesOfApparentType + getAugmentedPropertiesOfApparentType: getAugmentedPropertiesOfApparentType, + getRootSymbol: getRootSymbol, + getContextualType: getContextualType }; var undefinedSymbol = createSymbol(2 /* Property */ | 33554432 /* Transient */, "undefined"); var argumentsSymbol = createSymbol(2 /* Property */ | 33554432 /* Transient */, "arguments"); @@ -8692,16 +8761,6 @@ var ts; } return false; } - function getDeclarationOfKind(symbol, kind) { - var declarations = symbol.declarations; - for (var i = 0; i < declarations.length; i++) { - var declaration = declarations[i]; - if (declaration.kind === kind) { - return declaration; - } - } - return undefined; - } function findConstructorDeclaration(node) { var members = node.members; for (var i = 0; i < members.length; i++) { @@ -8939,7 +8998,7 @@ var ts; } return symbol.name; } - if (enclosingDeclaration && !(symbol.flags & (ts.SymbolFlags.PropertyOrAccessor | ts.SymbolFlags.Signature | 4096 /* Constructor */ | 2048 /* Method */ | 262144 /* TypeParameter */))) { + if (enclosingDeclaration && !(symbol.flags & 262144 /* TypeParameter */)) { var symbolName; while (symbol) { var isFirstName = !symbolName; @@ -8968,17 +9027,25 @@ var ts; function writeSymbolToTextWriter(symbol, enclosingDeclaration, meaning, writer) { writer.write(symbolToString(symbol, enclosingDeclaration, meaning)); } - function createSingleLineTextWriter() { + function createSingleLineTextWriter(maxLength) { var result = ""; - return { - write: function (s) { + var overflow = false; + function write(s) { + if (!overflow) { result += s; - }, + if (result.length > maxLength) { + result = result.substr(0, maxLength - 3) + "..."; + overflow = true; + } + } + } + return { + write: write, writeSymbol: function (symbol, enclosingDeclaration, meaning) { writeSymbolToTextWriter(symbol, enclosingDeclaration, meaning, this); }, writeLine: function () { - result += " "; + write(" "); }, increaseIndent: function () { }, @@ -8990,7 +9057,8 @@ var ts; }; } function typeToString(type, enclosingDeclaration, flags) { - var stringWriter = createSingleLineTextWriter(); + var maxLength = compilerOptions.noErrorTruncation || flags & 4 /* NoTruncation */ ? undefined : 100; + var stringWriter = createSingleLineTextWriter(maxLength); writeTypeToTextWriter(type, enclosingDeclaration, flags, stringWriter); return stringWriter.getText(); } @@ -9320,7 +9388,7 @@ var ts; checkImplicitAny(type); return type; function checkImplicitAny(type) { - if (!fullTypeCheck || !program.getCompilerOptions().noImplicitAny) { + if (!fullTypeCheck || !compilerOptions.noImplicitAny) { return; } if (getInnermostTypeOfNestedArrayTypes(type) !== anyType) { @@ -9404,7 +9472,7 @@ var ts; type = getReturnTypeFromBody(getter); } else { - if (program.getCompilerOptions().noImplicitAny) { + if (compilerOptions.noImplicitAny) { error(setter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation, symbol.name); } type = anyType; @@ -9722,27 +9790,38 @@ var ts; } function resolveAnonymousTypeMembers(type) { var symbol = type.symbol; - var members = emptySymbols; - var callSignatures = emptyArray; - var constructSignatures = emptyArray; - if (symbol.flags & ts.SymbolFlags.HasExports) { - members = symbol.exports; + if (symbol.flags & 512 /* TypeLiteral */) { + var members = symbol.members; + var callSignatures = getSignaturesOfSymbol(members["__call"]); + var constructSignatures = getSignaturesOfSymbol(members["__new"]); + var stringIndexType = getIndexTypeOfSymbol(symbol, 0 /* String */); + var numberIndexType = getIndexTypeOfSymbol(symbol, 1 /* Number */); } - if (symbol.flags & (8 /* Function */ | 2048 /* Method */)) { - callSignatures = getSignaturesOfSymbol(symbol); - } - if (symbol.flags & 16 /* Class */) { - var classType = getDeclaredTypeOfClass(symbol); - constructSignatures = getSignaturesOfSymbol(symbol.members["__constructor"]); - if (!constructSignatures.length) - constructSignatures = getDefaultConstructSignatures(classType); - if (classType.baseTypes.length) { - var members = createSymbolTable(getNamedMembers(members)); - addInheritedMembers(members, getPropertiesOfType(getTypeOfSymbol(classType.baseTypes[0].symbol))); + else { + var members = emptySymbols; + var callSignatures = emptyArray; + var constructSignatures = emptyArray; + if (symbol.flags & ts.SymbolFlags.HasExports) { + members = symbol.exports; } + if (symbol.flags & (8 /* Function */ | 2048 /* Method */)) { + callSignatures = getSignaturesOfSymbol(symbol); + } + if (symbol.flags & 16 /* Class */) { + var classType = getDeclaredTypeOfClass(symbol); + constructSignatures = getSignaturesOfSymbol(symbol.members["__constructor"]); + if (!constructSignatures.length) { + constructSignatures = getDefaultConstructSignatures(classType); + } + if (classType.baseTypes.length) { + members = createSymbolTable(getNamedMembers(members)); + addInheritedMembers(members, getPropertiesOfType(getTypeOfSymbol(classType.baseTypes[0].symbol))); + } + } + var stringIndexType = undefined; + var numberIndexType = (symbol.flags & 64 /* Enum */) ? stringType : undefined; } - var numberIndexType = (symbol.flags & 64 /* Enum */) ? stringType : undefined; - setObjectTypeMembers(type, members, callSignatures, constructSignatures, undefined, numberIndexType); + setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexType, numberIndexType); } function resolveObjectTypeMembers(type) { if (!type.members) { @@ -10124,13 +10203,7 @@ var ts; function getTypeFromTypeLiteralNode(node) { var links = getNodeLinks(node); if (!links.resolvedType) { - var symbol = node.symbol; - var members = symbol.members; - var callSignatures = getSignaturesOfSymbol(members["__call"]); - var constructSignatures = getSignaturesOfSymbol(members["__new"]); - var stringIndexType = getIndexTypeOfSymbol(symbol, 0 /* String */); - var numberIndexType = getIndexTypeOfSymbol(symbol, 1 /* Number */); - links.resolvedType = createAnonymousType(symbol, members, callSignatures, constructSignatures, stringIndexType, numberIndexType); + links.resolvedType = createObjectType(8192 /* Anonymous */, node.symbol); } return links.resolvedType; } @@ -10859,45 +10932,6 @@ var ts; function isTypeOfObjectLiteral(type) { return (type.flags & 8192 /* Anonymous */) && type.symbol && (type.symbol.flags & 1024 /* ObjectLiteral */) ? true : false; } - function getWidenedTypeOfObjectLiteral(type) { - var properties = getPropertiesOfType(type); - if (properties.length) { - var widenedTypes = []; - var propTypeWasWidened = false; - ts.forEach(properties, function (p) { - var propType = getTypeOfSymbol(p); - var widenedType = getWidenedType(propType); - if (propType !== widenedType) { - propTypeWasWidened = true; - if (program.getCompilerOptions().noImplicitAny && getInnermostTypeOfNestedArrayTypes(widenedType) === anyType) { - error(p.valueDeclaration, ts.Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, p.name, typeToString(widenedType)); - } - } - widenedTypes.push(widenedType); - }); - if (propTypeWasWidened) { - var members = {}; - var index = 0; - ts.forEach(properties, function (p) { - var symbol = createSymbol(2 /* Property */ | 33554432 /* Transient */, p.name); - symbol.declarations = p.declarations; - symbol.parent = p.parent; - symbol.type = widenedTypes[index++]; - if (p.valueDeclaration) - symbol.valueDeclaration = p.valueDeclaration; - members[symbol.name] = symbol; - }); - var stringIndexType = getIndexTypeOfType(type, 0 /* String */); - var numberIndexType = getIndexTypeOfType(type, 1 /* Number */); - if (stringIndexType) - stringIndexType = getWidenedType(stringIndexType); - if (numberIndexType) - numberIndexType = getWidenedType(numberIndexType); - type = createAnonymousType(type.symbol, members, emptyArray, emptyArray, stringIndexType, numberIndexType); - } - } - return type; - } function isArrayType(type) { return type.flags & 4096 /* Reference */ && type.target === globalArrayType; } @@ -10907,13 +10941,7 @@ var ts; } return type; } - function getWidenedTypeOfArrayLiteral(type) { - var elementType = type.typeArguments[0]; - var widenedType = getWidenedType(elementType); - type = elementType !== widenedType ? createArrayType(widenedType) : type; - return type; - } - function getWidenedType(type) { + function getWidenedType(type, supressNoImplicitAnyErrors) { if (type.flags & (32 /* Undefined */ | 64 /* Null */)) { return anyType; } @@ -10924,6 +10952,52 @@ var ts; return getWidenedTypeOfArrayLiteral(type); } return type; + function getWidenedTypeOfObjectLiteral(type) { + var properties = getPropertiesOfType(type); + if (properties.length) { + var widenedTypes = []; + var propTypeWasWidened = false; + ts.forEach(properties, function (p) { + var propType = getTypeOfSymbol(p); + var widenedType = getWidenedType(propType); + if (propType !== widenedType) { + propTypeWasWidened = true; + if (!supressNoImplicitAnyErrors && program.getCompilerOptions().noImplicitAny && getInnermostTypeOfNestedArrayTypes(widenedType) === anyType) { + error(p.valueDeclaration, ts.Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, p.name, typeToString(widenedType)); + } + } + widenedTypes.push(widenedType); + }); + if (propTypeWasWidened) { + var members = {}; + var index = 0; + ts.forEach(properties, function (p) { + var symbol = createSymbol(2 /* Property */ | 33554432 /* Transient */, p.name); + symbol.declarations = p.declarations; + symbol.parent = p.parent; + symbol.type = widenedTypes[index++]; + symbol.target = p; + if (p.valueDeclaration) + symbol.valueDeclaration = p.valueDeclaration; + members[symbol.name] = symbol; + }); + var stringIndexType = getIndexTypeOfType(type, 0 /* String */); + var numberIndexType = getIndexTypeOfType(type, 1 /* Number */); + if (stringIndexType) + stringIndexType = getWidenedType(stringIndexType); + if (numberIndexType) + numberIndexType = getWidenedType(numberIndexType); + type = createAnonymousType(type.symbol, members, emptyArray, emptyArray, stringIndexType, numberIndexType); + } + } + return type; + } + function getWidenedTypeOfArrayLiteral(type) { + var elementType = type.typeArguments[0]; + var widenedType = getWidenedType(elementType, supressNoImplicitAnyErrors); + type = elementType !== widenedType ? createArrayType(widenedType) : type; + return type; + } } function forEachMatchingParameterType(source, target, callback) { var sourceMax = source.parameters.length; @@ -11457,6 +11531,7 @@ var ts; if (member.valueDeclaration) prop.valueDeclaration = member.valueDeclaration; prop.type = type; + prop.target = member; member = prop; } else { @@ -11559,7 +11634,7 @@ var ts; if (stringIndexType) { return stringIndexType; } - if (program.getCompilerOptions().noImplicitAny && objectType !== anyType) { + if (compilerOptions.noImplicitAny && objectType !== anyType) { error(node, ts.Diagnostics.Index_signature_of_object_type_implicitly_has_an_any_type); } return anyType; @@ -11630,17 +11705,6 @@ var ts; }); return getSignatureInstantiation(signature, getInferredTypes(context)); } - function inferentiallyTypeExpession(expr, contextualType, contextualMapper) { - var type = checkExpressionWithContextualType(expr, contextualType, contextualMapper); - var signature = getSingleCallSignature(type); - if (signature && signature.typeParameters) { - var contextualSignature = getSingleCallSignature(contextualType); - if (contextualSignature && !contextualSignature.typeParameters) { - type = getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, contextualMapper)); - } - } - return type; - } function inferTypeArguments(signature, args, excludeArgument) { var typeParameters = signature.typeParameters; var context = createInferenceContext(typeParameters); @@ -11648,14 +11712,14 @@ var ts; for (var i = 0; i < args.length; i++) { if (!excludeArgument || excludeArgument[i] === undefined) { var parameterType = getTypeAtPosition(signature, i); - inferTypes(context, inferentiallyTypeExpession(args[i], parameterType, mapper), parameterType); + inferTypes(context, checkExpressionWithContextualType(args[i], parameterType, mapper), parameterType); } } if (excludeArgument) { for (var i = 0; i < args.length; i++) { if (excludeArgument[i] === false) { var parameterType = getTypeAtPosition(signature, i); - inferTypes(context, inferentiallyTypeExpession(args[i], parameterType, mapper), parameterType); + inferTypes(context, checkExpressionWithContextualType(args[i], parameterType, mapper), parameterType); } } } @@ -11813,7 +11877,7 @@ var ts; if (node.kind === 133 /* NewExpression */) { var declaration = signature.declaration; if (declaration && (declaration.kind !== 117 /* Constructor */ && declaration.kind !== 121 /* ConstructSignature */)) { - if (program.getCompilerOptions().noImplicitAny) { + if (compilerOptions.noImplicitAny) { error(node, ts.Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type); } return anyType; @@ -11825,9 +11889,9 @@ var ts; var exprType = checkExpression(node.operand); var targetType = getTypeFromTypeNode(node.type); if (fullTypeCheck && targetType !== unknownType) { - var widenedType = getWidenedType(exprType); - if (!(isTypeAssignableTo(exprType, targetType) || isTypeAssignableTo(targetType, widenedType))) { - checkTypeAssignableTo(targetType, widenedType, node, ts.Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other_Colon, ts.Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other); + var widenedType = getWidenedType(exprType, true); + if (!(isTypeAssignableTo(targetType, widenedType))) { + checkTypeAssignableTo(exprType, targetType, node, ts.Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other_Colon, ts.Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other); } } return targetType; @@ -11852,7 +11916,7 @@ var ts; if (func.body.kind !== 168 /* FunctionBlock */) { var unwidenedType = checkAndMarkExpression(func.body, contextualMapper); var widenedType = getWidenedType(unwidenedType); - if (fullTypeCheck && program.getCompilerOptions().noImplicitAny && widenedType !== unwidenedType && getInnermostTypeOfNestedArrayTypes(widenedType) === anyType) { + if (fullTypeCheck && compilerOptions.noImplicitAny && widenedType !== unwidenedType && getInnermostTypeOfNestedArrayTypes(widenedType) === anyType) { error(func, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeToString(widenedType)); } return widenedType; @@ -11865,7 +11929,7 @@ var ts; return unknownType; } var widenedType = getWidenedType(commonType); - if (fullTypeCheck && program.getCompilerOptions().noImplicitAny && widenedType !== commonType && getInnermostTypeOfNestedArrayTypes(widenedType) === anyType) { + if (fullTypeCheck && compilerOptions.noImplicitAny && widenedType !== commonType && getInnermostTypeOfNestedArrayTypes(widenedType) === anyType) { var typeName = typeToString(widenedType); if (func.name) { error(func, ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type, ts.identifierToString(func.name), typeName); @@ -11967,26 +12031,26 @@ var ts; } } } + checkSignatureDeclaration(node); } } - if (fullTypeCheck && !(links.flags & 1 /* TypeChecked */)) { - checkSignatureDeclaration(node); - if (node.type) { - checkIfNonVoidFunctionHasReturnExpressionsOrSingleThrowStatment(node, getTypeFromTypeNode(node.type)); - } - if (node.body.kind === 168 /* FunctionBlock */) { - checkSourceElement(node.body); - } - else { - var exprType = checkExpression(node.body); - if (node.type) { - checkTypeAssignableTo(exprType, getTypeFromTypeNode(node.type), node.body, undefined, undefined); - } - } - links.flags |= 1 /* TypeChecked */; - } return type; } + function checkFunctionExpressionBody(node) { + if (node.type) { + checkIfNonVoidFunctionHasReturnExpressionsOrSingleThrowStatment(node, getTypeFromTypeNode(node.type)); + } + if (node.body.kind === 168 /* FunctionBlock */) { + checkSourceElement(node.body); + } + else { + var exprType = checkExpression(node.body); + if (node.type) { + checkTypeAssignableTo(exprType, getTypeFromTypeNode(node.type), node.body, undefined, undefined); + } + checkFunctionExpressionBodies(node.body); + } + } function checkArithmeticOperandType(operand, type, diagnostic) { if (!(type.flags & (1 /* Any */ | ts.TypeFlags.NumberLike))) { error(operand, diagnostic); @@ -12201,6 +12265,22 @@ var ts; return result; } function checkExpression(node, contextualMapper) { + var type = checkExpressionNode(node, contextualMapper); + if (contextualMapper && contextualMapper !== identityMapper) { + var signature = getSingleCallSignature(type); + if (signature && signature.typeParameters) { + var contextualType = getContextualType(node); + if (contextualType) { + var contextualSignature = getSingleCallSignature(contextualType); + if (contextualSignature && !contextualSignature.typeParameters) { + type = getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, contextualMapper)); + } + } + } + } + return type; + } + function checkExpressionNode(node, contextualMapper) { switch (node.kind) { case 55 /* Identifier */: return checkIdentifier(node); @@ -12309,8 +12389,9 @@ var ts; if (fullTypeCheck) { checkCollisionWithCapturedSuperVariable(node, node.name); checkCollisionWithCapturedThisVariable(node, node.name); + checkCollistionWithRequireExportsInGeneratedCode(node, node.name); checkCollisionWithArgumentsInGeneratedCode(node); - if (program.getCompilerOptions().noImplicitAny && !node.type) { + if (compilerOptions.noImplicitAny && !node.type) { switch (node.kind) { case 121 /* ConstructSignature */: error(node, ts.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); @@ -12721,7 +12802,7 @@ var ts; if (node.type && !isAccessor(node.kind)) { checkIfNonVoidFunctionHasReturnExpressionsOrSingleThrowStatment(node, getTypeFromTypeNode(node.type)); } - if (fullTypeCheck && program.getCompilerOptions().noImplicitAny && !node.body && !node.type) { + if (fullTypeCheck && compilerOptions.noImplicitAny && !node.body && !node.type) { if (!isPrivateWithinAmbient(node)) { var typeName = typeToString(anyType); if (node.name) { @@ -12836,6 +12917,18 @@ var ts; } } } + function checkCollistionWithRequireExportsInGeneratedCode(node, name) { + if (!needCollisionCheckForIdentifier(node, name, "require") && !needCollisionCheckForIdentifier(node, name, "exports")) { + return; + } + if (node.kind === 172 /* ModuleDeclaration */ && !ts.isInstantiated(node)) { + return; + } + var parent = node.kind === 166 /* VariableDeclaration */ ? node.parent.parent : node.parent; + if (parent.kind === 177 /* SourceFile */ && ts.isExternalModule(parent)) { + error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_an_external_module, name.text, name.text); + } + } function checkVariableDeclaration(node) { checkSourceElement(node.type); checkExportsOnMergedDeclarations(node); @@ -12857,6 +12950,7 @@ var ts; } checkCollisionWithCapturedSuperVariable(node, node.name); checkCollisionWithCapturedThisVariable(node, node.name); + checkCollistionWithRequireExportsInGeneratedCode(node, node.name); if (!useTypeFromValueDeclaration) { if (typeOfValueDeclaration !== unknownType && type !== unknownType && !isTypeIdenticalTo(typeOfValueDeclaration, type)) { error(node.name, ts.Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2, ts.identifierToString(node.name), typeToString(typeOfValueDeclaration), typeToString(type)); @@ -13055,6 +13149,7 @@ var ts; checkTypeNameIsReserved(node.name, ts.Diagnostics.Class_name_cannot_be_0); checkTypeParameters(node.typeParameters); checkCollisionWithCapturedThisVariable(node, node.name); + checkCollistionWithRequireExportsInGeneratedCode(node, node.name); checkExportsOnMergedDeclarations(node); var symbol = getSymbolOfNode(node); var type = getDeclaredTypeOfSymbol(symbol); @@ -13222,6 +13317,7 @@ var ts; } checkTypeNameIsReserved(node.name, ts.Diagnostics.Enum_name_cannot_be_0); checkCollisionWithCapturedThisVariable(node, node.name); + checkCollistionWithRequireExportsInGeneratedCode(node, node.name); checkExportsOnMergedDeclarations(node); var enumSymbol = getSymbolOfNode(node); var enumType = getDeclaredTypeOfSymbol(enumSymbol); @@ -13278,6 +13374,7 @@ var ts; function checkModuleDeclaration(node) { if (fullTypeCheck) { checkCollisionWithCapturedThisVariable(node, node.name); + checkCollistionWithRequireExportsInGeneratedCode(node, node.name); checkExportsOnMergedDeclarations(node); var symbol = getSymbolOfNode(node); if (symbol.flags & 128 /* ValueModule */ && symbol.declarations.length > 1 && !ts.isInAmbientContext(node)) { @@ -13310,6 +13407,7 @@ var ts; } function checkImportDeclaration(node) { checkCollisionWithCapturedThisVariable(node, node.name); + checkCollistionWithRequireExportsInGeneratedCode(node, node.name); var symbol = getSymbolOfNode(node); var target; if (node.entityName) { @@ -13392,9 +13490,10 @@ var ts; case 167 /* FunctionDeclaration */: return checkFunctionDeclaration(node); case 143 /* Block */: + return checkBlock(node); case 168 /* FunctionBlock */: case 173 /* ModuleBlock */: - return checkBlock(node); + return checkBody(node); case 144 /* VariableStatement */: return checkVariableStatement(node); case 146 /* ExpressionStatement */: @@ -13440,12 +13539,79 @@ var ts; return checkExportAssignment(node); } } + function checkFunctionExpressionBodies(node) { + switch (node.kind) { + case 136 /* FunctionExpression */: + case 137 /* ArrowFunction */: + ts.forEach(node.parameters, checkFunctionExpressionBodies); + checkFunctionExpressionBody(node); + break; + case 116 /* Method */: + case 117 /* Constructor */: + case 118 /* GetAccessor */: + case 119 /* SetAccessor */: + case 167 /* FunctionDeclaration */: + ts.forEach(node.parameters, checkFunctionExpressionBodies); + break; + case 155 /* WithStatement */: + checkFunctionExpressionBodies(node.expression); + break; + case 114 /* Parameter */: + case 115 /* Property */: + case 127 /* ArrayLiteral */: + case 128 /* ObjectLiteral */: + case 129 /* PropertyAssignment */: + case 130 /* PropertyAccess */: + case 131 /* IndexedAccess */: + case 132 /* CallExpression */: + case 133 /* NewExpression */: + case 134 /* TypeAssertion */: + case 135 /* ParenExpression */: + case 138 /* PrefixOperator */: + case 139 /* PostfixOperator */: + case 140 /* BinaryExpression */: + case 141 /* ConditionalExpression */: + case 143 /* Block */: + case 168 /* FunctionBlock */: + case 173 /* ModuleBlock */: + case 144 /* VariableStatement */: + case 146 /* ExpressionStatement */: + case 147 /* IfStatement */: + case 148 /* DoStatement */: + case 149 /* WhileStatement */: + case 150 /* ForStatement */: + case 151 /* ForInStatement */: + case 152 /* ContinueStatement */: + case 153 /* BreakStatement */: + case 154 /* ReturnStatement */: + case 156 /* SwitchStatement */: + case 157 /* CaseClause */: + case 158 /* DefaultClause */: + case 159 /* LabelledStatement */: + case 160 /* ThrowStatement */: + case 161 /* TryStatement */: + case 162 /* TryBlock */: + case 163 /* CatchBlock */: + case 164 /* FinallyBlock */: + case 166 /* VariableDeclaration */: + case 169 /* ClassDeclaration */: + case 171 /* EnumDeclaration */: + case 176 /* EnumMember */: + case 177 /* SourceFile */: + ts.forEachChild(node, checkFunctionExpressionBodies); + break; + } + } + function checkBody(node) { + checkBlock(node); + checkFunctionExpressionBodies(node); + } function checkSourceFile(node) { var links = getNodeLinks(node); if (!(links.flags & 1 /* TypeChecked */)) { emitExtends = false; potentialThisCollisions.length = 0; - ts.forEach(node.statements, checkSourceElement); + checkBody(node); if (ts.isExternalModule(node)) { var symbol = getExportAssignmentSymbol(node.symbol); if (symbol && symbol.flags & 4194304 /* Import */) { @@ -13559,19 +13725,6 @@ var ts; function isTypeDeclarationName(name) { return name.kind == 55 /* Identifier */ && isTypeDeclaration(name.parent) && name.parent.name === name; } - function isDeclarationOrFunctionExpressionOrCatchVariableName(name) { - if (name.kind !== 55 /* Identifier */ && name.kind !== 3 /* StringLiteral */ && name.kind !== 2 /* NumericLiteral */) { - return false; - } - var parent = name.parent; - if (isDeclaration(parent) || parent.kind === 136 /* FunctionExpression */) { - return parent.name === name; - } - if (parent.kind === 163 /* CatchBlock */) { - return parent.variable === name; - } - return false; - } function isTypeDeclaration(node) { switch (node.kind) { case 113 /* TypeParameter */: @@ -13581,27 +13734,6 @@ var ts; return true; } } - function isDeclaration(node) { - switch (node.kind) { - case 113 /* TypeParameter */: - case 114 /* Parameter */: - case 166 /* VariableDeclaration */: - case 115 /* Property */: - case 129 /* PropertyAssignment */: - case 176 /* EnumMember */: - case 116 /* Method */: - case 167 /* FunctionDeclaration */: - case 118 /* GetAccessor */: - case 119 /* SetAccessor */: - case 169 /* ClassDeclaration */: - case 170 /* InterfaceDeclaration */: - case 171 /* EnumDeclaration */: - case 172 /* ModuleDeclaration */: - case 174 /* ImportDeclaration */: - return true; - } - return false; - } function isTypeReferenceIdentifier(entityName) { var node = entityName; while (node.parent && node.parent.kind === 112 /* QualifiedName */) @@ -13745,7 +13877,7 @@ var ts; return (node.parent.kind === 112 /* QualifiedName */ || node.parent.kind === 130 /* PropertyAccess */) && node.parent.right === node; } function getSymbolOfEntityName(entityName) { - if (isDeclarationOrFunctionExpressionOrCatchVariableName(entityName)) { + if (ts.isDeclarationOrFunctionExpressionOrCatchVariableName(entityName)) { return getSymbolOfNode(entityName.parent); } if (entityName.parent.kind === 175 /* ExportAssignment */) { @@ -13781,6 +13913,12 @@ var ts; return undefined; } function getSymbolInfo(node) { + if (ts.isDeclarationOrFunctionExpressionOrCatchVariableName(node)) { + return getSymbolOfNode(node.parent); + } + if (node.kind === 55 /* Identifier */ && isInRightSideOfImportOrExportAssignment(node)) { + return node.parent.kind === 175 /* ExportAssignment */ ? getSymbolOfEntityName(node) : getSymbolOfPartOfRightHandSideOfImport(node); + } switch (node.kind) { case 55 /* Identifier */: case 130 /* PropertyAccess */: @@ -13797,7 +13935,13 @@ var ts; } return undefined; case 3 /* StringLiteral */: - if (node.parent.kind === 131 /* IndexedAccess */ && node.parent.index === node) { + if (node.parent.kind === 174 /* ImportDeclaration */ && node.parent.externalModuleName === node) { + var importSymbol = getSymbolOfNode(node.parent); + var moduleType = getTypeOfSymbol(importSymbol); + return moduleType ? moduleType.symbol : undefined; + } + case 2 /* NumericLiteral */: + if (node.parent.kind == 131 /* IndexedAccess */ && node.parent.index === node) { var objectType = checkExpression(node.parent.object); if (objectType === unknownType) return undefined; @@ -13806,14 +13950,6 @@ var ts; return undefined; return getPropertyOfApparentType(apparentType, node.text); } - else if (node.parent.kind === 174 /* ImportDeclaration */ && node.parent.externalModuleName === node) { - var importSymbol = getSymbolOfNode(node.parent); - var moduleType = getTypeOfSymbol(importSymbol); - return moduleType ? moduleType.symbol : undefined; - } - else if (node.parent.kind === 172 /* ModuleDeclaration */) { - return getSymbolOfNode(node.parent); - } break; } return undefined; @@ -13833,11 +13969,11 @@ var ts; var symbol = getSymbolInfo(node); return getDeclaredTypeOfSymbol(symbol); } - if (isDeclaration(node)) { + if (ts.isDeclaration(node)) { var symbol = getSymbolOfNode(node); return getTypeOfSymbol(symbol); } - if (isDeclarationOrFunctionExpressionOrCatchVariableName(node)) { + if (ts.isDeclarationOrFunctionExpressionOrCatchVariableName(node)) { var symbol = getSymbolInfo(node); return getTypeOfSymbol(symbol); } @@ -13884,6 +14020,9 @@ var ts; return getPropertiesOfType(apparentType); } } + function getRootSymbol(symbol) { + return (symbol.flags & 33554432 /* Transient */) ? getSymbolLinks(symbol).target : symbol; + } function isExternalModuleSymbol(symbol) { return symbol.flags & 128 /* ValueModule */ && symbol.declarations.length === 1 && symbol.declarations[0].kind === 177 /* SourceFile */; } @@ -13960,7 +14099,7 @@ var ts; return target !== unknownSymbol && ((target.flags & ts.SymbolFlags.Value) !== 0); } function shouldEmitDeclarations() { - return program.getCompilerOptions().declaration && !program.getDiagnostics().length && !getDiagnostics().length; + return compilerOptions.declaration && !program.getDiagnostics().length && !getDiagnostics().length; } function isReferencedImportDeclaration(node) { var symbol = getSymbolOfNode(node); @@ -15321,73 +15460,7 @@ var TypeScript; })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { - var Hash = (function () { - function Hash() { - } - Hash.computeFnv1aCharArrayHashCode = function (text, start, len) { - var hashCode = Hash.FNV_BASE; - var end = start + len; - for (var i = start; i < end; i++) { - hashCode = TypeScript.IntegerUtilities.integerMultiplyLow32Bits(hashCode ^ text[i], Hash.FNV_PRIME); - } - return hashCode; - }; - Hash.computeSimple31BitCharArrayHashCode = function (key, start, len) { - var hash = 0; - for (var i = 0; i < len; i++) { - var ch = key[start + i]; - hash = ((((hash << 5) - hash) | 0) + ch) | 0; - } - return hash & 0x7FFFFFFF; - }; - Hash.computeSimple31BitStringHashCode = function (key) { - var hash = 0; - var start = 0; - var len = key.length; - for (var i = 0; i < len; i++) { - var ch = key.charCodeAt(start + i); - hash = ((((hash << 5) - hash) | 0) + ch) | 0; - } - return hash & 0x7FFFFFFF; - }; - Hash.computeMurmur2StringHashCode = function (key, seed) { - var m = 0x5bd1e995; - var r = 24; - var numberOfCharsLeft = key.length; - var h = Math.abs(seed ^ numberOfCharsLeft); - var index = 0; - while (numberOfCharsLeft >= 2) { - var c1 = key.charCodeAt(index); - var c2 = key.charCodeAt(index + 1); - var k = Math.abs(c1 | (c2 << 16)); - k = TypeScript.IntegerUtilities.integerMultiplyLow32Bits(k, m); - k ^= k >> r; - k = TypeScript.IntegerUtilities.integerMultiplyLow32Bits(k, m); - h = TypeScript.IntegerUtilities.integerMultiplyLow32Bits(h, m); - h ^= k; - index += 2; - numberOfCharsLeft -= 2; - } - if (numberOfCharsLeft === 1) { - h ^= key.charCodeAt(index); - h = TypeScript.IntegerUtilities.integerMultiplyLow32Bits(h, m); - } - h ^= h >> 13; - h = TypeScript.IntegerUtilities.integerMultiplyLow32Bits(h, m); - h ^= h >> 15; - return h; - }; - Hash.combine = function (value, currentHash) { - return (((currentHash << 5) + currentHash) + value) & 0x7FFFFFFF; - }; - Hash.FNV_BASE = 2166136261; - Hash.FNV_PRIME = 16777619; - return Hash; - })(); - TypeScript.Hash = Hash; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { + var IntegerUtilities; (function (IntegerUtilities) { function integerDivide(numerator, denominator) { return (numerator / denominator) >> 0; @@ -15410,8 +15483,7 @@ var TypeScript; return /^0(x|X)[0-9a-fA-F]+$/.test(text); } IntegerUtilities.isHexInteger = isHexInteger; - })(TypeScript.IntegerUtilities || (TypeScript.IntegerUtilities = {})); - var IntegerUtilities = TypeScript.IntegerUtilities; + })(IntegerUtilities = TypeScript.IntegerUtilities || (TypeScript.IntegerUtilities = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { @@ -15649,6 +15721,7 @@ var TypeScript; })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var ScriptSnapshot; (function (ScriptSnapshot) { var StringScriptSnapshot = (function () { function StringScriptSnapshot(text) { @@ -15676,11 +15749,11 @@ var TypeScript; return new StringScriptSnapshot(text); } ScriptSnapshot.fromString = fromString; - })(TypeScript.ScriptSnapshot || (TypeScript.ScriptSnapshot = {})); - var ScriptSnapshot = TypeScript.ScriptSnapshot; + })(ScriptSnapshot = TypeScript.ScriptSnapshot || (TypeScript.ScriptSnapshot = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var LineMap1; (function (LineMap1) { function fromSimpleText(text) { return new TypeScript.LineMap(function () { return TypeScript.TextUtilities.parseLineStarts({ charCodeAt: function (index) { return text.charCodeAt(index); }, length: text.length() }); }, text.length()); @@ -15694,11 +15767,11 @@ var TypeScript; return new TypeScript.LineMap(function () { return TypeScript.TextUtilities.parseLineStarts(text); }, text.length); } LineMap1.fromString = fromString; - })(TypeScript.LineMap1 || (TypeScript.LineMap1 = {})); - var LineMap1 = TypeScript.LineMap1; + })(LineMap1 = TypeScript.LineMap1 || (TypeScript.LineMap1 = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var SimpleText; (function (SimpleText) { var SimpleStringText = (function () { function SimpleStringText(value) { @@ -15753,11 +15826,11 @@ var TypeScript; return new SimpleScriptSnapshotText(scriptSnapshot); } SimpleText.fromScriptSnapshot = fromScriptSnapshot; - })(TypeScript.SimpleText || (TypeScript.SimpleText = {})); - var SimpleText = TypeScript.SimpleText; + })(SimpleText = TypeScript.SimpleText || (TypeScript.SimpleText = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var TextUtilities; (function (TextUtilities) { function parseLineStarts(text) { var length = text.length; @@ -15825,8 +15898,7 @@ var TypeScript; return c === 10 /* lineFeed */ || c === 13 /* carriageReturn */ || c === 133 /* nextLine */ || c === 8232 /* lineSeparator */ || c === 8233 /* paragraphSeparator */; } TextUtilities.isAnyLineBreakCharacter = isAnyLineBreakCharacter; - })(TypeScript.TextUtilities || (TypeScript.TextUtilities = {})); - var TextUtilities = TypeScript.TextUtilities; + })(TextUtilities = TypeScript.TextUtilities || (TypeScript.TextUtilities = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { @@ -15956,6 +16028,7 @@ var TypeScript; })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var CharacterInfo; (function (CharacterInfo) { function isDecimalDigit(c) { return c >= 48 /* _0 */ && c <= 57 /* _9 */; @@ -16011,8 +16084,7 @@ var TypeScript; return false; } CharacterInfo.isLineTerminator = isLineTerminator; - })(TypeScript.CharacterInfo || (TypeScript.CharacterInfo = {})); - var CharacterInfo = TypeScript.CharacterInfo; + })(CharacterInfo = TypeScript.CharacterInfo || (TypeScript.CharacterInfo = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { @@ -16314,6 +16386,7 @@ var TypeScript; })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var SyntaxFacts; (function (SyntaxFacts) { var textToKeywordKind = { "any": 60 /* AnyKeyword */, @@ -16685,11 +16758,11 @@ var TypeScript; return false; } SyntaxFacts.isType = isType; - })(TypeScript.SyntaxFacts || (TypeScript.SyntaxFacts = {})); - var SyntaxFacts = TypeScript.SyntaxFacts; + })(SyntaxFacts = TypeScript.SyntaxFacts || (TypeScript.SyntaxFacts = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Scanner; (function (Scanner) { TypeScript.Debug.assert(TypeScript.SyntaxKind.LastToken <= 127); var ScannerConstants; @@ -17919,8 +17992,7 @@ var TypeScript; }; } Scanner.createParserSource = createParserSource; - })(TypeScript.Scanner || (TypeScript.Scanner = {})); - var Scanner = TypeScript.Scanner; + })(Scanner = TypeScript.Scanner || (TypeScript.Scanner = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { @@ -18239,6 +18311,7 @@ var TypeScript; })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Syntax; (function (Syntax) { Syntax._nextSyntaxID = 1; function childIndex(parent, child) { @@ -18462,8 +18535,7 @@ var TypeScript; } return lineMap.getLineNumberFromPosition(TypeScript.end(_previousToken)) !== lineMap.getLineNumberFromPosition(TypeScript.start(token)); } - })(TypeScript.Syntax || (TypeScript.Syntax = {})); - var Syntax = TypeScript.Syntax; + })(Syntax = TypeScript.Syntax || (TypeScript.Syntax = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { @@ -18864,6 +18936,7 @@ var TypeScript; })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var SyntaxFacts; (function (SyntaxFacts) { function isDirectivePrologueElement(node) { if (node.kind() === 149 /* ExpressionStatement */) { @@ -18888,11 +18961,11 @@ var TypeScript; return tokenKind === 11 /* IdentifierName */ || SyntaxFacts.isAnyKeyword(tokenKind); } SyntaxFacts.isIdentifierNameOrAnyKeyword = isIdentifierNameOrAnyKeyword; - })(TypeScript.SyntaxFacts || (TypeScript.SyntaxFacts = {})); - var SyntaxFacts = TypeScript.SyntaxFacts; + })(SyntaxFacts = TypeScript.SyntaxFacts || (TypeScript.SyntaxFacts = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Syntax; (function (Syntax) { var _emptyList = []; var _emptySeparatedList = []; @@ -18952,8 +19025,7 @@ var TypeScript; return -1; } Syntax.nonSeparatorIndexOf = nonSeparatorIndexOf; - })(TypeScript.Syntax || (TypeScript.Syntax = {})); - var Syntax = TypeScript.Syntax; + })(Syntax = TypeScript.Syntax || (TypeScript.Syntax = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { @@ -19123,6 +19195,7 @@ var TypeScript; })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Syntax; (function (Syntax) { function realizeToken(token, text) { return new RealizedToken(token.fullStart(), token.kind(), token.isKeywordConvertedToIdentifier(), token.leadingTrivia(text), token.text(), token.trailingTrivia(text)); @@ -19370,11 +19443,11 @@ var TypeScript; }; return ConvertedKeywordToken; })(); - })(TypeScript.Syntax || (TypeScript.Syntax = {})); - var Syntax = TypeScript.Syntax; + })(Syntax = TypeScript.Syntax || (TypeScript.Syntax = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Syntax; (function (Syntax) { var AbstractTrivia = (function () { function AbstractTrivia(_kind) { @@ -19497,11 +19570,11 @@ var TypeScript; return result; } Syntax.splitMultiLineCommentTriviaIntoMultipleLines = splitMultiLineCommentTriviaIntoMultipleLines; - })(TypeScript.Syntax || (TypeScript.Syntax = {})); - var Syntax = TypeScript.Syntax; + })(Syntax = TypeScript.Syntax || (TypeScript.Syntax = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Syntax; (function (Syntax) { var EmptyTriviaList = (function () { function EmptyTriviaList() { @@ -19674,8 +19747,7 @@ var TypeScript; return new NormalSyntaxTriviaList(trivia); } Syntax.triviaList = triviaList; - })(TypeScript.Syntax || (TypeScript.Syntax = {})); - var Syntax = TypeScript.Syntax; + })(Syntax = TypeScript.Syntax || (TypeScript.Syntax = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { @@ -20758,6 +20830,7 @@ var TypeScript; })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Parser; (function (Parser) { Parser.syntaxFactory; var arrayPool = []; @@ -21014,14 +21087,20 @@ var TypeScript; throw TypeScript.Errors.invalidOperation(); } } - function replaceTokenInParent(oldToken, newToken) { + function replaceTokenInParent(node, oldToken, newToken) { replaceTokenInParentWorker(oldToken, newToken); var parent = oldToken.parent; newToken.parent = parent; - TypeScript.Debug.assert(TypeScript.isNode(parent) || TypeScript.isList(parent) || TypeScript.isSeparatedList(parent)); - var dataElement = parent; - if (dataElement.data) { - dataElement.data &= 4 /* NodeParsedInStrictModeMask */; + while (true) { + TypeScript.Debug.assert(TypeScript.isNode(parent) || TypeScript.isList(parent) || TypeScript.isSeparatedList(parent)); + var dataElement = parent; + if (dataElement.data) { + dataElement.data &= 4 /* NodeParsedInStrictModeMask */; + } + if (parent === node) { + break; + } + parent = parent.parent; } } function replaceTokenInParentWorker(oldToken, newToken) { @@ -21063,14 +21142,14 @@ var TypeScript; function addSkippedTokenAfterNode(node, skippedToken) { var oldToken = TypeScript.lastToken(node); var newToken = addSkippedTokenAfterToken(oldToken, skippedToken); - replaceTokenInParent(oldToken, newToken); + replaceTokenInParent(node, oldToken, newToken); return node; } function addSkippedTokensBeforeNode(node, skippedTokens) { if (skippedTokens.length > 0) { var oldToken = TypeScript.firstToken(node); var newToken = addSkippedTokensBeforeToken(oldToken, skippedTokens); - replaceTokenInParent(oldToken, newToken); + replaceTokenInParent(node, oldToken, newToken); } return node; } @@ -23406,12 +23485,13 @@ var TypeScript; return parseSyntaxTree(source, isDeclaration); } Parser.parseSource = parseSource; - })(TypeScript.Parser || (TypeScript.Parser = {})); - var Parser = TypeScript.Parser; + })(Parser = TypeScript.Parser || (TypeScript.Parser = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Syntax; (function (Syntax) { + var Concrete; (function (Concrete) { TypeScript.Parser.syntaxFactory = Concrete; Concrete.isConcrete = true; @@ -24193,10 +24273,8 @@ var TypeScript; })(TypeScript.SyntaxNode); Concrete.ModuleNameModuleReferenceSyntax = ModuleNameModuleReferenceSyntax; SourceUnitSyntax.prototype.__kind = 120 /* SourceUnit */, QualifiedNameSyntax.prototype.__kind = 121 /* QualifiedName */, ObjectTypeSyntax.prototype.__kind = 122 /* ObjectType */, FunctionTypeSyntax.prototype.__kind = 123 /* FunctionType */, ArrayTypeSyntax.prototype.__kind = 124 /* ArrayType */, ConstructorTypeSyntax.prototype.__kind = 125 /* ConstructorType */, GenericTypeSyntax.prototype.__kind = 126 /* GenericType */, TypeQuerySyntax.prototype.__kind = 127 /* TypeQuery */, InterfaceDeclarationSyntax.prototype.__kind = 128 /* InterfaceDeclaration */, FunctionDeclarationSyntax.prototype.__kind = 129 /* FunctionDeclaration */, ModuleDeclarationSyntax.prototype.__kind = 130 /* ModuleDeclaration */, ClassDeclarationSyntax.prototype.__kind = 131 /* ClassDeclaration */, EnumDeclarationSyntax.prototype.__kind = 132 /* EnumDeclaration */, ImportDeclarationSyntax.prototype.__kind = 133 /* ImportDeclaration */, ExportAssignmentSyntax.prototype.__kind = 134 /* ExportAssignment */, MemberFunctionDeclarationSyntax.prototype.__kind = 135 /* MemberFunctionDeclaration */, MemberVariableDeclarationSyntax.prototype.__kind = 136 /* MemberVariableDeclaration */, ConstructorDeclarationSyntax.prototype.__kind = 137 /* ConstructorDeclaration */, IndexMemberDeclarationSyntax.prototype.__kind = 138 /* IndexMemberDeclaration */, GetAccessorSyntax.prototype.__kind = 139 /* GetAccessor */, SetAccessorSyntax.prototype.__kind = 140 /* SetAccessor */, PropertySignatureSyntax.prototype.__kind = 141 /* PropertySignature */, CallSignatureSyntax.prototype.__kind = 142 /* CallSignature */, ConstructSignatureSyntax.prototype.__kind = 143 /* ConstructSignature */, IndexSignatureSyntax.prototype.__kind = 144 /* IndexSignature */, MethodSignatureSyntax.prototype.__kind = 145 /* MethodSignature */, BlockSyntax.prototype.__kind = 146 /* Block */, IfStatementSyntax.prototype.__kind = 147 /* IfStatement */, VariableStatementSyntax.prototype.__kind = 148 /* VariableStatement */, ExpressionStatementSyntax.prototype.__kind = 149 /* ExpressionStatement */, ReturnStatementSyntax.prototype.__kind = 150 /* ReturnStatement */, SwitchStatementSyntax.prototype.__kind = 151 /* SwitchStatement */, BreakStatementSyntax.prototype.__kind = 152 /* BreakStatement */, ContinueStatementSyntax.prototype.__kind = 153 /* ContinueStatement */, ForStatementSyntax.prototype.__kind = 154 /* ForStatement */, ForInStatementSyntax.prototype.__kind = 155 /* ForInStatement */, EmptyStatementSyntax.prototype.__kind = 156 /* EmptyStatement */, ThrowStatementSyntax.prototype.__kind = 157 /* ThrowStatement */, WhileStatementSyntax.prototype.__kind = 158 /* WhileStatement */, TryStatementSyntax.prototype.__kind = 159 /* TryStatement */, LabeledStatementSyntax.prototype.__kind = 160 /* LabeledStatement */, DoStatementSyntax.prototype.__kind = 161 /* DoStatement */, DebuggerStatementSyntax.prototype.__kind = 162 /* DebuggerStatement */, WithStatementSyntax.prototype.__kind = 163 /* WithStatement */, DeleteExpressionSyntax.prototype.__kind = 170 /* DeleteExpression */, TypeOfExpressionSyntax.prototype.__kind = 171 /* TypeOfExpression */, VoidExpressionSyntax.prototype.__kind = 172 /* VoidExpression */, ConditionalExpressionSyntax.prototype.__kind = 186 /* ConditionalExpression */, MemberAccessExpressionSyntax.prototype.__kind = 212 /* MemberAccessExpression */, InvocationExpressionSyntax.prototype.__kind = 213 /* InvocationExpression */, ArrayLiteralExpressionSyntax.prototype.__kind = 214 /* ArrayLiteralExpression */, ObjectLiteralExpressionSyntax.prototype.__kind = 215 /* ObjectLiteralExpression */, ObjectCreationExpressionSyntax.prototype.__kind = 216 /* ObjectCreationExpression */, ParenthesizedExpressionSyntax.prototype.__kind = 217 /* ParenthesizedExpression */, ParenthesizedArrowFunctionExpressionSyntax.prototype.__kind = 218 /* ParenthesizedArrowFunctionExpression */, SimpleArrowFunctionExpressionSyntax.prototype.__kind = 219 /* SimpleArrowFunctionExpression */, CastExpressionSyntax.prototype.__kind = 220 /* CastExpression */, ElementAccessExpressionSyntax.prototype.__kind = 221 /* ElementAccessExpression */, FunctionExpressionSyntax.prototype.__kind = 222 /* FunctionExpression */, OmittedExpressionSyntax.prototype.__kind = 223 /* OmittedExpression */, VariableDeclarationSyntax.prototype.__kind = 224 /* VariableDeclaration */, VariableDeclaratorSyntax.prototype.__kind = 225 /* VariableDeclarator */, ArgumentListSyntax.prototype.__kind = 226 /* ArgumentList */, ParameterListSyntax.prototype.__kind = 227 /* ParameterList */, TypeArgumentListSyntax.prototype.__kind = 228 /* TypeArgumentList */, TypeParameterListSyntax.prototype.__kind = 229 /* TypeParameterList */, EqualsValueClauseSyntax.prototype.__kind = 232 /* EqualsValueClause */, CaseSwitchClauseSyntax.prototype.__kind = 233 /* CaseSwitchClause */, DefaultSwitchClauseSyntax.prototype.__kind = 234 /* DefaultSwitchClause */, ElseClauseSyntax.prototype.__kind = 235 /* ElseClause */, CatchClauseSyntax.prototype.__kind = 236 /* CatchClause */, FinallyClauseSyntax.prototype.__kind = 237 /* FinallyClause */, TypeParameterSyntax.prototype.__kind = 238 /* TypeParameter */, ConstraintSyntax.prototype.__kind = 239 /* Constraint */, SimplePropertyAssignmentSyntax.prototype.__kind = 240 /* SimplePropertyAssignment */, FunctionPropertyAssignmentSyntax.prototype.__kind = 241 /* FunctionPropertyAssignment */, ParameterSyntax.prototype.__kind = 242 /* Parameter */, EnumElementSyntax.prototype.__kind = 243 /* EnumElement */, TypeAnnotationSyntax.prototype.__kind = 244 /* TypeAnnotation */, ExternalModuleReferenceSyntax.prototype.__kind = 245 /* ExternalModuleReference */, ModuleNameModuleReferenceSyntax.prototype.__kind = 246 /* ModuleNameModuleReference */; - })(Syntax.Concrete || (Syntax.Concrete = {})); - var Concrete = Syntax.Concrete; - })(TypeScript.Syntax || (TypeScript.Syntax = {})); - var Syntax = TypeScript.Syntax; + })(Concrete = Syntax.Concrete || (Syntax.Concrete = {})); + })(Syntax = TypeScript.Syntax || (TypeScript.Syntax = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { @@ -25427,6 +25505,7 @@ var TypeScript; })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var IncrementalParser; (function (IncrementalParser) { function createParserSource(oldSyntaxTree, textChangeRange, text) { var fileName = oldSyntaxTree.fileName(); @@ -25826,11 +25905,11 @@ var TypeScript; return TypeScript.Parser.parseSource(createParserSource(oldSyntaxTree, textChangeRange, newText), oldSyntaxTree.isDeclaration()); } IncrementalParser.parse = parse; - })(TypeScript.IncrementalParser || (TypeScript.IncrementalParser = {})); - var IncrementalParser = TypeScript.IncrementalParser; + })(IncrementalParser = TypeScript.IncrementalParser || (TypeScript.IncrementalParser = {})); })(TypeScript || (TypeScript = {})); var ts; (function (ts) { + var OutliningElementsCollector; (function (OutliningElementsCollector) { function collectElements(sourceFile) { var elements = []; @@ -25880,11 +25959,11 @@ var ts; return elements; } OutliningElementsCollector.collectElements = collectElements; - })(ts.OutliningElementsCollector || (ts.OutliningElementsCollector = {})); - var OutliningElementsCollector = ts.OutliningElementsCollector; + })(OutliningElementsCollector = ts.OutliningElementsCollector || (ts.OutliningElementsCollector = {})); })(ts || (ts = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { var NavigationBarItemGetter = (function () { function NavigationBarItemGetter() { @@ -26131,11 +26210,11 @@ var TypeScript; return NavigationBarItemGetter; })(); Services.NavigationBarItemGetter = NavigationBarItemGetter; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { var BraceMatcher = (function () { function BraceMatcher() { @@ -26191,12 +26270,13 @@ var TypeScript; return BraceMatcher; })(); Services.BraceMatcher = BraceMatcher; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { + var Breakpoints; (function (Breakpoints) { function createBreakpointSpanInfo(parentElement) { var childElements = []; @@ -27078,13 +27158,12 @@ var TypeScript; return breakpointResolver.breakpointSpanOf(positionedToken); } Breakpoints.getBreakpointLocation = getBreakpointLocation; - })(Services.Breakpoints || (Services.Breakpoints = {})); - var Breakpoints = Services.Breakpoints; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; + })(Breakpoints = Services.Breakpoints || (Services.Breakpoints = {})); + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Indentation; (function (Indentation) { function columnForEndOfTokenAtPosition(syntaxTree, position, options) { var token = TypeScript.findToken(syntaxTree.sourceUnit(), position); @@ -27180,12 +27259,13 @@ var TypeScript; return value.length; } Indentation.firstNonWhitespacePosition = firstNonWhitespacePosition; - })(TypeScript.Indentation || (TypeScript.Indentation = {})); - var Indentation = TypeScript.Indentation; + })(Indentation = TypeScript.Indentation || (TypeScript.Indentation = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { + var Formatting; (function (Formatting) { var TextSnapshot = (function () { function TextSnapshot(snapshot) { @@ -27242,14 +27322,14 @@ var TypeScript; return TextSnapshot; })(); Formatting.TextSnapshot = TextSnapshot; - })(Services.Formatting || (Services.Formatting = {})); - var Formatting = Services.Formatting; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; + })(Formatting = Services.Formatting || (Services.Formatting = {})); + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { + var Formatting; (function (Formatting) { var TextSnapshotLine = (function () { function TextSnapshotLine(_snapshot, _lineNumber, _start, _end, _lineBreak) { @@ -27292,14 +27372,14 @@ var TypeScript; return TextSnapshotLine; })(); Formatting.TextSnapshotLine = TextSnapshotLine; - })(Services.Formatting || (Services.Formatting = {})); - var Formatting = Services.Formatting; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; + })(Formatting = Services.Formatting || (Services.Formatting = {})); + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { + var Formatting; (function (Formatting) { var SnapshotPoint = (function () { function SnapshotPoint(snapshot, position) { @@ -27315,14 +27395,14 @@ var TypeScript; return SnapshotPoint; })(); Formatting.SnapshotPoint = SnapshotPoint; - })(Services.Formatting || (Services.Formatting = {})); - var Formatting = Services.Formatting; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; + })(Formatting = Services.Formatting || (Services.Formatting = {})); + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { + var Formatting; (function (Formatting) { var FormattingContext = (function () { function FormattingContext(snapshot, formattingRequestKind) { @@ -27401,14 +27481,14 @@ var TypeScript; return FormattingContext; })(); Formatting.FormattingContext = FormattingContext; - })(Services.Formatting || (Services.Formatting = {})); - var Formatting = Services.Formatting; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; + })(Formatting = Services.Formatting || (Services.Formatting = {})); + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { + var Formatting; (function (Formatting) { var FormattingManager = (function () { function FormattingManager(syntaxTree, snapshot, rulesProvider, editorOptions) { @@ -27475,14 +27555,14 @@ var TypeScript; return FormattingManager; })(); Formatting.FormattingManager = FormattingManager; - })(Services.Formatting || (Services.Formatting = {})); - var Formatting = Services.Formatting; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; + })(Formatting = Services.Formatting || (Services.Formatting = {})); + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { + var Formatting; (function (Formatting) { (function (FormattingRequestKind) { FormattingRequestKind[FormattingRequestKind["FormatDocument"] = 0] = "FormatDocument"; @@ -27493,14 +27573,14 @@ var TypeScript; FormattingRequestKind[FormattingRequestKind["FormatOnPaste"] = 5] = "FormatOnPaste"; })(Formatting.FormattingRequestKind || (Formatting.FormattingRequestKind = {})); var FormattingRequestKind = Formatting.FormattingRequestKind; - })(Services.Formatting || (Services.Formatting = {})); - var Formatting = Services.Formatting; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; + })(Formatting = Services.Formatting || (Services.Formatting = {})); + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { + var Formatting; (function (Formatting) { var Rule = (function () { function Rule(Descriptor, Operation, Flag) { @@ -27515,14 +27595,14 @@ var TypeScript; return Rule; })(); Formatting.Rule = Rule; - })(Services.Formatting || (Services.Formatting = {})); - var Formatting = Services.Formatting; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; + })(Formatting = Services.Formatting || (Services.Formatting = {})); + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { + var Formatting; (function (Formatting) { (function (RuleAction) { RuleAction[RuleAction["Ignore"] = 0] = "Ignore"; @@ -27531,14 +27611,14 @@ var TypeScript; RuleAction[RuleAction["Delete"] = 3] = "Delete"; })(Formatting.RuleAction || (Formatting.RuleAction = {})); var RuleAction = Formatting.RuleAction; - })(Services.Formatting || (Services.Formatting = {})); - var Formatting = Services.Formatting; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; + })(Formatting = Services.Formatting || (Services.Formatting = {})); + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { + var Formatting; (function (Formatting) { var RuleDescriptor = (function () { function RuleDescriptor(LeftTokenRange, RightTokenRange) { @@ -27563,28 +27643,28 @@ var TypeScript; return RuleDescriptor; })(); Formatting.RuleDescriptor = RuleDescriptor; - })(Services.Formatting || (Services.Formatting = {})); - var Formatting = Services.Formatting; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; + })(Formatting = Services.Formatting || (Services.Formatting = {})); + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { + var Formatting; (function (Formatting) { (function (RuleFlags) { RuleFlags[RuleFlags["None"] = 0] = "None"; RuleFlags[RuleFlags["CanDeleteNewLines"] = 1] = "CanDeleteNewLines"; })(Formatting.RuleFlags || (Formatting.RuleFlags = {})); var RuleFlags = Formatting.RuleFlags; - })(Services.Formatting || (Services.Formatting = {})); - var Formatting = Services.Formatting; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; + })(Formatting = Services.Formatting || (Services.Formatting = {})); + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { + var Formatting; (function (Formatting) { var RuleOperation = (function () { function RuleOperation() { @@ -27606,14 +27686,14 @@ var TypeScript; return RuleOperation; })(); Formatting.RuleOperation = RuleOperation; - })(Services.Formatting || (Services.Formatting = {})); - var Formatting = Services.Formatting; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; + })(Formatting = Services.Formatting || (Services.Formatting = {})); + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { + var Formatting; (function (Formatting) { var RuleOperationContext = (function () { function RuleOperationContext() { @@ -27641,14 +27721,14 @@ var TypeScript; return RuleOperationContext; })(); Formatting.RuleOperationContext = RuleOperationContext; - })(Services.Formatting || (Services.Formatting = {})); - var Formatting = Services.Formatting; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; + })(Formatting = Services.Formatting || (Services.Formatting = {})); + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { + var Formatting; (function (Formatting) { var Rules = (function () { function Rules() { @@ -27997,14 +28077,14 @@ var TypeScript; return Rules; })(); Formatting.Rules = Rules; - })(Services.Formatting || (Services.Formatting = {})); - var Formatting = Services.Formatting; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; + })(Formatting = Services.Formatting || (Services.Formatting = {})); + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { + var Formatting; (function (Formatting) { var RulesMap = (function () { function RulesMap() { @@ -28128,14 +28208,14 @@ var TypeScript; return RulesBucket; })(); Formatting.RulesBucket = RulesBucket; - })(Services.Formatting || (Services.Formatting = {})); - var Formatting = Services.Formatting; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; + })(Formatting = Services.Formatting || (Services.Formatting = {})); + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { + var Formatting; (function (Formatting) { var RulesProvider = (function () { function RulesProvider(logger) { @@ -28217,14 +28297,14 @@ var TypeScript; return RulesProvider; })(); Formatting.RulesProvider = RulesProvider; - })(Services.Formatting || (Services.Formatting = {})); - var Formatting = Services.Formatting; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; + })(Formatting = Services.Formatting || (Services.Formatting = {})); + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { + var Formatting; (function (Formatting) { var TextEditInfo = (function () { function TextEditInfo(position, length, replaceWith) { @@ -28238,15 +28318,16 @@ var TypeScript; return TextEditInfo; })(); Formatting.TextEditInfo = TextEditInfo; - })(Services.Formatting || (Services.Formatting = {})); - var Formatting = Services.Formatting; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; + })(Formatting = Services.Formatting || (Services.Formatting = {})); + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { + var Formatting; (function (Formatting) { + var Shared; (function (Shared) { var TokenRangeAccess = (function () { function TokenRangeAccess(from, to, except) { @@ -28361,16 +28442,15 @@ var TypeScript; return TokenRange; })(); Shared.TokenRange = TokenRange; - })(Formatting.Shared || (Formatting.Shared = {})); - var Shared = Formatting.Shared; - })(Services.Formatting || (Services.Formatting = {})); - var Formatting = Services.Formatting; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; + })(Shared = Formatting.Shared || (Formatting.Shared = {})); + })(Formatting = Services.Formatting || (Services.Formatting = {})); + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { + var Formatting; (function (Formatting) { var TokenSpan = (function (_super) { __extends(TokenSpan, _super); @@ -28381,14 +28461,14 @@ var TypeScript; return TokenSpan; })(TypeScript.TextSpan); Formatting.TokenSpan = TokenSpan; - })(Services.Formatting || (Services.Formatting = {})); - var Formatting = Services.Formatting; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; + })(Formatting = Services.Formatting || (Services.Formatting = {})); + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { + var Formatting; (function (Formatting) { var IndentationNodeContext = (function () { function IndentationNodeContext(parent, node, fullStart, indentationAmount, childIndentationAmountDelta) { @@ -28454,14 +28534,14 @@ var TypeScript; return IndentationNodeContext; })(); Formatting.IndentationNodeContext = IndentationNodeContext; - })(Services.Formatting || (Services.Formatting = {})); - var Formatting = Services.Formatting; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; + })(Formatting = Services.Formatting || (Services.Formatting = {})); + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { + var Formatting; (function (Formatting) { var IndentationNodeContextPool = (function () { function IndentationNodeContextPool() { @@ -28488,14 +28568,14 @@ var TypeScript; return IndentationNodeContextPool; })(); Formatting.IndentationNodeContextPool = IndentationNodeContextPool; - })(Services.Formatting || (Services.Formatting = {})); - var Formatting = Services.Formatting; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; + })(Formatting = Services.Formatting || (Services.Formatting = {})); + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { + var Formatting; (function (Formatting) { var IndentationTrackingWalker = (function (_super) { __extends(IndentationTrackingWalker, _super); @@ -28702,14 +28782,14 @@ var TypeScript; return IndentationTrackingWalker; })(TypeScript.SyntaxWalker); Formatting.IndentationTrackingWalker = IndentationTrackingWalker; - })(Services.Formatting || (Services.Formatting = {})); - var Formatting = Services.Formatting; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; + })(Formatting = Services.Formatting || (Services.Formatting = {})); + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { + var Formatting; (function (Formatting) { var MultipleTokenIndenter = (function (_super) { __extends(MultipleTokenIndenter, _super); @@ -28842,14 +28922,14 @@ var TypeScript; return MultipleTokenIndenter; })(Formatting.IndentationTrackingWalker); Formatting.MultipleTokenIndenter = MultipleTokenIndenter; - })(Services.Formatting || (Services.Formatting = {})); - var Formatting = Services.Formatting; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; + })(Formatting = Services.Formatting || (Services.Formatting = {})); + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { + var Formatting; (function (Formatting) { var SingleTokenIndenter = (function (_super) { __extends(SingleTokenIndenter, _super); @@ -28874,14 +28954,14 @@ var TypeScript; return SingleTokenIndenter; })(Formatting.IndentationTrackingWalker); Formatting.SingleTokenIndenter = SingleTokenIndenter; - })(Services.Formatting || (Services.Formatting = {})); - var Formatting = Services.Formatting; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; + })(Formatting = Services.Formatting || (Services.Formatting = {})); + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { + var Formatting; (function (Formatting) { var Formatter = (function (_super) { __extends(Formatter, _super); @@ -29091,83 +29171,8 @@ var TypeScript; return Formatter; })(Formatting.MultipleTokenIndenter); Formatting.Formatter = Formatter; - })(Services.Formatting || (Services.Formatting = {})); - var Formatting = Services.Formatting; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; -})(TypeScript || (TypeScript = {})); -var TypeScript; -(function (TypeScript) { - var BloomFilter = (function () { - function BloomFilter(expectedCount) { - var m = Math.max(1, BloomFilter.computeM(expectedCount)); - var k = Math.max(1, BloomFilter.computeK(expectedCount)); - ; - var sizeInEvenBytes = (m + 7) & ~7; - this.bitArray = []; - for (var i = 0, len = sizeInEvenBytes; i < len; i++) { - this.bitArray[i] = false; - } - this.hashFunctionCount = k; - } - BloomFilter.computeM = function (expectedCount) { - var p = BloomFilter.falsePositiveProbability; - var n = expectedCount; - var numerator = n * Math.log(p); - var denominator = Math.log(1.0 / Math.pow(2.0, Math.log(2.0))); - return Math.ceil(numerator / denominator); - }; - BloomFilter.computeK = function (expectedCount) { - var n = expectedCount; - var m = BloomFilter.computeM(expectedCount); - var temp = Math.log(2.0) * m / n; - return Math.round(temp); - }; - BloomFilter.prototype.computeHash = function (key, seed) { - return TypeScript.Hash.computeMurmur2StringHashCode(key, seed); - }; - BloomFilter.prototype.addKeys = function (keys) { - for (var name in keys) { - if (ts.lookUp(keys, name)) { - this.add(name); - } - } - }; - BloomFilter.prototype.add = function (value) { - for (var i = 0; i < this.hashFunctionCount; i++) { - var hash = this.computeHash(value, i); - hash = hash % this.bitArray.length; - this.bitArray[Math.abs(hash)] = true; - } - }; - BloomFilter.prototype.probablyContains = function (value) { - for (var i = 0; i < this.hashFunctionCount; i++) { - var hash = this.computeHash(value, i); - hash = hash % this.bitArray.length; - if (!this.bitArray[Math.abs(hash)]) { - return false; - } - } - return true; - }; - BloomFilter.prototype.isEquivalent = function (filter) { - return BloomFilter.isEquivalent(this.bitArray, filter.bitArray) && this.hashFunctionCount === filter.hashFunctionCount; - }; - BloomFilter.isEquivalent = function (array1, array2) { - if (array1.length !== array2.length) { - return false; - } - for (var i = 0; i < array1.length; i++) { - if (array1[i] !== array2[i]) { - return false; - } - } - return true; - }; - BloomFilter.falsePositiveProbability = 0.0001; - return BloomFilter; - })(); - TypeScript.BloomFilter = BloomFilter; + })(Formatting = Services.Formatting || (Services.Formatting = {})); + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { @@ -29822,6 +29827,7 @@ var TypeScript; })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var ASTHelpers; (function (ASTHelpers) { var sentinelEmptyArray = []; function isValidAstNode(ast) { @@ -30393,8 +30399,7 @@ var TypeScript; return result; } ASTHelpers.getModuleNames = getModuleNames; - })(TypeScript.ASTHelpers || (TypeScript.ASTHelpers = {})); - var ASTHelpers = TypeScript.ASTHelpers; + })(ASTHelpers = TypeScript.ASTHelpers || (TypeScript.ASTHelpers = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { @@ -30885,29 +30890,6 @@ var ts; SourceFileObject.prototype.isDeclareFile = function () { return TypeScript.isDTSFile(this.filename); }; - SourceFileObject.prototype.getBloomFilter = function () { - if (!this.bloomFilter) { - var identifiers = TypeScript.createIntrinsicsObject(); - var pre = function (cur) { - if (TypeScript.ASTHelpers.isValidAstNode(cur)) { - if (cur.kind() === 11 /* IdentifierName */) { - var nodeText = TypeScript.tokenValueText(cur); - identifiers[nodeText] = true; - } - } - }; - TypeScript.getAstWalkerFactory().simpleWalk(this.getSourceUnit(), pre, null, identifiers); - var identifierCount = 0; - for (var name in identifiers) { - if (identifiers[name]) { - identifierCount++; - } - } - this.bloomFilter = new TypeScript.BloomFilter(identifierCount); - this.bloomFilter.addKeys(identifiers); - } - return this.bloomFilter; - }; SourceFileObject.prototype.update = function (scriptSnapshot, version, isOpen, textChangeRange) { var oldSyntaxTree = this.syntaxTree; if (textChangeRange && ts.Debug.shouldAssert(1 /* Normal */)) { @@ -31466,6 +31448,79 @@ var ts; }; } ts.createDocumentRegistry = createDocumentRegistry; + function getTargetLabel(referenceNode, labelName) { + while (referenceNode) { + if (referenceNode.kind === 159 /* LabelledStatement */ && referenceNode.label.text === labelName) { + return referenceNode.label; + } + referenceNode = referenceNode.parent; + } + return undefined; + } + function isJumpStatementTarget(node) { + return node.kind === 55 /* Identifier */ && (node.parent.kind === 153 /* BreakStatement */ || node.parent.kind === 152 /* ContinueStatement */) && node.parent.label === node; + } + function isLabelOfLabeledStatement(node) { + return node.kind === 55 /* Identifier */ && node.parent.kind === 159 /* LabelledStatement */ && node.parent.label === node; + } + function isLabelName(node) { + return isLabelOfLabeledStatement(node) || isJumpStatementTarget(node); + } + function isCallExpressionTarget(node) { + if (node.parent.kind === 130 /* PropertyAccess */ && node.parent.right === node) + node = node.parent; + return node.parent.kind === 132 /* CallExpression */ && node.parent.func === node; + } + function isNewExpressionTarget(node) { + if (node.parent.kind === 130 /* PropertyAccess */ && node.parent.right === node) + node = node.parent; + return node.parent.kind === 133 /* NewExpression */ && node.parent.func === node; + } + function isAnyFunction(node) { + switch (node.kind) { + case 136 /* FunctionExpression */: + case 167 /* FunctionDeclaration */: + case 137 /* ArrowFunction */: + case 116 /* Method */: + case 118 /* GetAccessor */: + case 119 /* SetAccessor */: + case 117 /* Constructor */: + return true; + } + return false; + } + function isNameOfFunctionDeclaration(node) { + return node.kind === 55 /* Identifier */ && isAnyFunction(node.parent) && node.parent.name === node; + } + function isNameOfPropertyAssignment(node) { + return (node.kind === 55 /* Identifier */ || node.kind === 3 /* StringLiteral */ || node.kind === 2 /* NumericLiteral */) && node.parent.kind === 129 /* PropertyAssignment */ && node.parent.name === node; + } + function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { + if (node.kind === 3 /* StringLiteral */ || node.kind === 2 /* NumericLiteral */) { + switch (node.parent.kind) { + case 115 /* Property */: + case 129 /* PropertyAssignment */: + case 176 /* EnumMember */: + case 116 /* Method */: + case 118 /* GetAccessor */: + case 119 /* SetAccessor */: + case 172 /* ModuleDeclaration */: + return node.parent.name === node; + case 131 /* IndexedAccess */: + return node.parent.index === node; + } + } + return false; + } + function isNameOfExternalModuleImportOrDeclaration(node) { + return node.kind === 3 /* StringLiteral */ && ((node.parent.kind === 172 /* ModuleDeclaration */ && node.parent.name === node) || (node.parent.kind === 174 /* ImportDeclaration */ && node.parent.externalModuleName === node)); + } + var SearchMeaning; + (function (SearchMeaning) { + SearchMeaning[SearchMeaning["Value"] = 0x1] = "Value"; + SearchMeaning[SearchMeaning["Type"] = 0x2] = "Type"; + SearchMeaning[SearchMeaning["Namespace"] = 0x4] = "Namespace"; + })(SearchMeaning || (SearchMeaning = {})); var keywordCompletions = []; for (var i = ts.SyntaxKind.FirstKeyword; i <= ts.SyntaxKind.LastKeyword; i++) { keywordCompletions.push({ @@ -31499,8 +31554,7 @@ var ts; return { getSourceFile: function (filename, languageVersion) { var sourceFile = getSourceFile(filename); - ts.Debug.assert(!!sourceFile, "sourceFile can not be undefined"); - return sourceFile.getSourceFile(); + return sourceFile && sourceFile.getSourceFile(); }, getCancellationToken: function () { return cancellationToken; }, getCanonicalFileName: function (filename) { return useCaseSensitivefilenames ? filename : filename.toLowerCase(); }, @@ -31757,7 +31811,7 @@ var ts; isRightOfDot = true; node = node.parent.left; } - var mappedNode = getNodeAtPosition(sourceFile.getSourceFile(), TypeScript.end(node) - 1); + var mappedNode = getNodeAtPosition(sourceFile, TypeScript.end(node) - 1); ts.Debug.assert(mappedNode, "Could not map a Fidelity node to an AST node"); activeCompletionSession = { filename: filename, @@ -31844,8 +31898,9 @@ var ts; current = child; continue outer; } - if (child.end > position) + if (child.end > position) { break; + } } return current; } @@ -31857,6 +31912,7 @@ var ts; return node; } switch (node.kind) { + case 177 /* SourceFile */: case 116 /* Method */: case 167 /* FunctionDeclaration */: case 136 /* FunctionExpression */: @@ -31941,9 +31997,10 @@ var ts; synchronizeHostData(); fileName = TypeScript.switchToForwardSlashes(fileName); var sourceFile = getSourceFile(fileName); - var node = getNodeAtPosition(sourceFile.getSourceFile(), position); - if (!node) + var node = getNodeAtPosition(sourceFile, position); + if (!node) { return undefined; + } var symbol = typeInfoResolver.getSymbolInfo(node); var type = symbol && typeInfoResolver.getTypeOfSymbol(symbol); if (type) { @@ -31952,43 +32009,6 @@ var ts; return undefined; } function getDefinitionAtPosition(filename, position) { - function getTargetLabel(node, labelName) { - while (node) { - if (node.kind === 159 /* LabelledStatement */ && node.label.text === labelName) { - return node.label; - } - node = node.parent; - } - return undefined; - } - function isJumpStatementTarget(node) { - return node.kind === 55 /* Identifier */ && (node.parent.kind === 153 /* BreakStatement */ || node.parent.kind === 152 /* ContinueStatement */) && node.parent.label === node; - } - function isCallExpressionTarget(node) { - if (node.parent.kind === 130 /* PropertyAccess */ && node.parent.right === node) - node = node.parent; - return node.parent.kind === 132 /* CallExpression */ && node.parent.func === node; - } - function isNewExpressionTarget(node) { - if (node.parent.kind === 130 /* PropertyAccess */ && node.parent.right === node) - node = node.parent; - return node.parent.kind === 133 /* NewExpression */ && node.parent.func === node; - } - function isFunctionDeclaration(node) { - switch (node.kind) { - case 167 /* FunctionDeclaration */: - case 116 /* Method */: - case 136 /* FunctionExpression */: - case 118 /* GetAccessor */: - case 119 /* SetAccessor */: - case 137 /* ArrowFunction */: - return true; - } - return false; - } - function isNameOfFunctionDeclaration(node) { - return node.kind === 55 /* Identifier */ && isFunctionDeclaration(node.parent) && node.parent.name === node; - } function getDefinitionInfo(node, symbolKind, symbolName, containerName) { return new DefinitionInfo(node.getSourceFile().filename, TypeScript.TextSpan.fromBounds(node.getStart(), node.getEnd()), symbolKind, symbolName, undefined, containerName); } @@ -32031,7 +32051,7 @@ var ts; synchronizeHostData(); filename = TypeScript.switchToForwardSlashes(filename); var sourceFile = getSourceFile(filename); - var node = getNodeAtPosition(sourceFile.getSourceFile(), position); + var node = getNodeAtPosition(sourceFile, position); if (!node) { return undefined; } @@ -32040,7 +32060,7 @@ var ts; var label = getTargetLabel(node.parent, node.text); return label ? [getDefinitionInfo(label, ScriptElementKind.label, labelName, undefined)] : undefined; } - var comment = ts.forEach(sourceFile.getSourceFile().referencedFiles, function (r) { return (r.pos <= position && position < r.end) ? r : undefined; }); + var comment = ts.forEach(sourceFile.referencedFiles, function (r) { return (r.pos <= position && position < r.end) ? r : undefined; }); if (comment) { var targetFilename = ts.normalizePath(ts.combinePaths(ts.getDirectoryPath(filename), comment.filename)); if (program.getSourceFile(targetFilename)) { @@ -32066,6 +32086,500 @@ var ts; } return result; } + function getOccurrencesAtPosition(filename, position) { + synchronizeHostData(); + filename = TypeScript.switchToForwardSlashes(filename); + var sourceFile = getSourceFile(filename); + var node = getNodeAtPosition(sourceFile, position); + if (!node) { + return undefined; + } + if (node.kind === 55 /* Identifier */ || isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || isNameOfExternalModuleImportOrDeclaration(node)) { + return getReferencesForNode(node, [sourceFile]); + } + switch (node.kind) { + case 86 /* TryKeyword */: + case 58 /* CatchKeyword */: + case 71 /* FinallyKeyword */: + if (hasKind(parent(parent(node)), 161 /* TryStatement */)) { + return getTryCatchFinallyOccurrences(node.parent.parent); + } + break; + case 82 /* SwitchKeyword */: + if (hasKind(node.parent, 156 /* SwitchStatement */)) { + return getSwitchCaseDefaultOccurrences(node.parent); + } + break; + case 57 /* CaseKeyword */: + case 63 /* DefaultKeyword */: + if (hasKind(parent(parent(node)), 156 /* SwitchStatement */)) { + return getSwitchCaseDefaultOccurrences(node.parent.parent); + } + break; + case 56 /* BreakKeyword */: + if (hasKind(node.parent, 153 /* BreakStatement */)) { + return getBreakStatementOccurences(node.parent); + } + break; + } + return undefined; + function getTryCatchFinallyOccurrences(tryStatement) { + var keywords = []; + pushKeywordIf(keywords, tryStatement.getFirstToken(), 86 /* TryKeyword */); + if (tryStatement.catchBlock) { + pushKeywordIf(keywords, tryStatement.catchBlock.getFirstToken(), 58 /* CatchKeyword */); + } + if (tryStatement.finallyBlock) { + pushKeywordIf(keywords, tryStatement.finallyBlock.getFirstToken(), 71 /* FinallyKeyword */); + } + return keywordsToReferenceEntries(keywords); + } + function getSwitchCaseDefaultOccurrences(switchStatement) { + var keywords = []; + pushKeywordIf(keywords, switchStatement.getFirstToken(), 82 /* SwitchKeyword */); + ts.forEach(switchStatement.clauses, function (clause) { + pushKeywordIf(keywords, clause.getFirstToken(), 57 /* CaseKeyword */, 63 /* DefaultKeyword */); + ts.forEachChild(clause, function aggregateBreakKeywords(node) { + switch (node.kind) { + case 153 /* BreakStatement */: + if (!node.label) { + pushKeywordIf(keywords, node.getFirstToken(), 56 /* BreakKeyword */); + } + case 150 /* ForStatement */: + case 151 /* ForInStatement */: + case 148 /* DoStatement */: + case 149 /* WhileStatement */: + case 156 /* SwitchStatement */: + return; + } + if (!isAnyFunction(node)) { + ts.forEachChild(node, aggregateBreakKeywords); + } + }); + }); + return keywordsToReferenceEntries(keywords); + } + function getBreakStatementOccurences(breakStatement) { + if (breakStatement.label) { + return undefined; + } + for (var owner = node.parent; owner; owner = owner.parent) { + switch (owner.kind) { + case 150 /* ForStatement */: + case 151 /* ForInStatement */: + case 148 /* DoStatement */: + case 149 /* WhileStatement */: + return undefined; + case 156 /* SwitchStatement */: + return getSwitchCaseDefaultOccurrences(owner); + default: + if (isAnyFunction(owner)) { + return undefined; + } + } + } + return undefined; + } + function hasKind(node, kind) { + return !!(node && node.kind === kind); + } + function parent(node) { + return node && node.parent; + } + function pushKeywordIf(keywordList, token) { + var expected = []; + for (var _i = 2; _i < arguments.length; _i++) { + expected[_i - 2] = arguments[_i]; + } + if (!token) { + return; + } + if (ts.contains(expected, token.kind)) { + keywordList.push(token); + } + } + function keywordsToReferenceEntries(keywords) { + return ts.map(keywords, function (keyword) { return new ReferenceEntry(filename, TypeScript.TextSpan.fromBounds(keyword.getStart(), keyword.end), false); }); + } + } + function getReferencesAtPosition(filename, position) { + synchronizeHostData(); + filename = TypeScript.switchToForwardSlashes(filename); + var sourceFile = getSourceFile(filename); + var node = getNodeAtPosition(sourceFile, position); + if (!node) { + return undefined; + } + if (node.kind !== 55 /* Identifier */ && !isLiteralNameOfPropertyDeclarationOrIndexAccess(node) && !isNameOfExternalModuleImportOrDeclaration(node)) { + return undefined; + } + return getReferencesForNode(node, program.getSourceFiles()); + } + function getReferencesForNode(node, sourceFiles) { + if (isLabelName(node)) { + if (isJumpStatementTarget(node)) { + var labelDefinition = getTargetLabel(node.parent, node.text); + return labelDefinition ? getLabelReferencesInNode(labelDefinition.parent, labelDefinition) : [getReferenceEntry(node)]; + } + else { + return getLabelReferencesInNode(node.parent, node); + } + } + var symbol = typeInfoResolver.getSymbolInfo(node); + if (!symbol) { + return [getReferenceEntry(node)]; + } + if (!symbol.getDeclarations()) { + return undefined; + } + var result; + var searchMeaning = getIntersectingMeaningFromDeclarations(getMeaningFromLocation(node), symbol.getDeclarations()); + var symbolName = getNormalizedSymbolName(symbol); + var scope = getSymbolScope(symbol); + if (scope) { + result = []; + getReferencesInNode(scope, symbol, symbolName, node, searchMeaning, result); + } + else { + ts.forEach(sourceFiles, function (sourceFile) { + cancellationToken.throwIfCancellationRequested(); + if (ts.lookUp(sourceFile.identifiers, symbolName)) { + result = result || []; + getReferencesInNode(sourceFile, symbol, symbolName, node, searchMeaning, result); + } + }); + } + return result; + function getNormalizedSymbolName(symbol) { + var functionExpression = ts.getDeclarationOfKind(symbol, 136 /* FunctionExpression */); + if (functionExpression && functionExpression.name) { + var name = functionExpression.name.text; + } + else { + var name = symbol.name; + } + var length = name.length; + if (length >= 2 && name.charCodeAt(0) === 34 /* doubleQuote */ && name.charCodeAt(length - 1) === 34 /* doubleQuote */) { + return name.substring(1, length - 1); + } + ; + return name; + } + function getSymbolScope(symbol) { + if (symbol.getFlags() && (2 /* Property */ | 2048 /* Method */)) { + var privateDeclaration = ts.forEach(symbol.getDeclarations(), function (d) { return (d.flags & 32 /* Private */) ? d : undefined; }); + if (privateDeclaration) { + return privateDeclaration.parent; + } + } + if (symbol.parent) { + return undefined; + } + var scope = undefined; + var declarations = symbol.getDeclarations(); + for (var i = 0, n = declarations.length; i < n; i++) { + var container = getContainerNode(declarations[i]); + if (scope && scope !== container) { + return undefined; + } + if (container.kind === 177 /* SourceFile */ && !ts.isExternalModule(container)) { + return undefined; + } + scope = container; + } + return scope; + } + function getPossibleSymbolReferencePositions(sourceFile, symbolName, start, end) { + var positions = []; + if (!symbolName || !symbolName.length) { + return positions; + } + var text = sourceFile.text; + var sourceLength = text.length; + var symbolNameLength = symbolName.length; + var position = text.indexOf(symbolName, start); + while (position >= 0) { + cancellationToken.throwIfCancellationRequested(); + if (position > end) + break; + var endPosition = position + symbolNameLength; + if ((position === 0 || !ts.isIdentifierPart(text.charCodeAt(position - 1), 1 /* ES5 */)) && (endPosition === sourceLength || !ts.isIdentifierPart(text.charCodeAt(endPosition), 1 /* ES5 */))) { + positions.push(position); + } + position = text.indexOf(symbolName, position + symbolNameLength + 1); + } + return positions; + } + function getLabelReferencesInNode(container, targetLabel) { + var result = []; + var sourceFile = container.getSourceFile(); + var labelName = targetLabel.text; + var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, labelName, container.getStart(), container.getEnd()); + ts.forEach(possiblePositions, function (position) { + cancellationToken.throwIfCancellationRequested(); + var node = getNodeAtPosition(sourceFile, position); + if (!node || node.getWidth() !== labelName.length) { + return; + } + if (node === targetLabel || (isJumpStatementTarget(node) && getTargetLabel(node, labelName) === targetLabel)) { + result.push(getReferenceEntry(node)); + } + }); + return result; + } + function isValidReferencePosition(node, searchSymbolName) { + if (node) { + switch (node.kind) { + case 55 /* Identifier */: + return node.getWidth() === searchSymbolName.length; + case 3 /* StringLiteral */: + if (isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || isNameOfExternalModuleImportOrDeclaration(node)) { + return node.getWidth() === searchSymbolName.length + 2; + } + break; + case 2 /* NumericLiteral */: + if (isLiteralNameOfPropertyDeclarationOrIndexAccess(node)) { + return node.getWidth() === searchSymbolName.length; + } + break; + } + } + return false; + } + function getReferencesInNode(container, searchSymbol, searchText, searchLocation, searchMeaning, result) { + var sourceFile = container.getSourceFile(); + var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, searchText, container.getStart(), container.getEnd()); + if (possiblePositions.length) { + var searchSymbols = populateSearchSymbolSet(searchSymbol, searchLocation); + ts.forEach(possiblePositions, function (position) { + cancellationToken.throwIfCancellationRequested(); + var referenceLocation = getNodeAtPosition(sourceFile, position); + if (!isValidReferencePosition(referenceLocation, searchText)) { + return; + } + if (!(getMeaningFromLocation(referenceLocation) & searchMeaning)) { + return; + } + var referenceSymbol = typeInfoResolver.getSymbolInfo(referenceLocation); + if (!referenceSymbol || !(referenceSymbol.getDeclarations())) { + return; + } + if (isRelatableToSearchSet(searchSymbols, referenceSymbol, referenceLocation)) { + result.push(getReferenceEntry(referenceLocation)); + } + }); + } + } + function populateSearchSymbolSet(symbol, location) { + var result = [symbol]; + var rootSymbol = typeInfoResolver.getRootSymbol(symbol); + if (rootSymbol && rootSymbol !== symbol) { + result.push(rootSymbol); + } + if (isNameOfPropertyAssignment(location)) { + var symbolFromContextualType = getPropertySymbolFromContextualType(location); + if (symbolFromContextualType) + result.push(typeInfoResolver.getRootSymbol(symbolFromContextualType)); + } + if (symbol.parent && symbol.parent.flags & (16 /* Class */ | 32 /* Interface */)) { + getPropertySymbolsFromBaseTypes(symbol.parent, symbol.getName(), result); + } + return result; + } + function getPropertySymbolsFromBaseTypes(symbol, propertyName, result) { + if (symbol.flags & (16 /* Class */ | 32 /* Interface */)) { + ts.forEach(symbol.getDeclarations(), function (declaration) { + if (declaration.kind === 169 /* ClassDeclaration */) { + getPropertySymbolFromTypeReference(declaration.baseType); + ts.forEach(declaration.implementedTypes, getPropertySymbolFromTypeReference); + } + else if (declaration.kind === 170 /* InterfaceDeclaration */) { + ts.forEach(declaration.baseTypes, getPropertySymbolFromTypeReference); + } + }); + } + return; + function getPropertySymbolFromTypeReference(typeReference) { + if (typeReference) { + var typeReferenceSymbol = typeInfoResolver.getSymbolInfo(typeReference.typeName); + if (typeReferenceSymbol) { + var propertySymbol = typeReferenceSymbol.members[propertyName]; + if (propertySymbol) + result.push(typeReferenceSymbol.members[propertyName]); + getPropertySymbolsFromBaseTypes(typeReferenceSymbol, propertyName, result); + } + } + } + } + function isRelatableToSearchSet(searchSymbols, referenceSymbol, referenceLocation) { + var referenceSymbolTarget = typeInfoResolver.getRootSymbol(referenceSymbol); + if (searchSymbols.indexOf(referenceSymbolTarget) >= 0) { + return true; + } + if (isNameOfPropertyAssignment(referenceLocation)) { + var symbolFromContextualType = getPropertySymbolFromContextualType(referenceLocation); + if (symbolFromContextualType && searchSymbols.indexOf(typeInfoResolver.getRootSymbol(symbolFromContextualType)) >= 0) { + return true; + } + } + if (referenceSymbol.parent && referenceSymbol.parent.flags & (16 /* Class */ | 32 /* Interface */)) { + var result = []; + getPropertySymbolsFromBaseTypes(referenceSymbol.parent, referenceSymbol.getName(), result); + return ts.forEach(result, function (s) { return searchSymbols.indexOf(s) >= 0; }); + } + return false; + } + function getPropertySymbolFromContextualType(node) { + if (isNameOfPropertyAssignment(node)) { + var objectLiteral = node.parent.parent; + var contextualType = typeInfoResolver.getContextualType(objectLiteral); + if (contextualType) { + return typeInfoResolver.getPropertyOfType(contextualType, node.text); + } + } + return undefined; + } + function getReferenceEntry(node) { + var start = node.getStart(); + var end = node.getEnd(); + if (node.kind === 3 /* StringLiteral */) { + start += 1; + end -= 1; + } + return new ReferenceEntry(node.getSourceFile().filename, TypeScript.TextSpan.fromBounds(start, end), isWriteAccess(node)); + } + function getMeaningFromDeclaration(node) { + switch (node.kind) { + case 114 /* Parameter */: + case 166 /* VariableDeclaration */: + case 115 /* Property */: + case 129 /* PropertyAssignment */: + case 176 /* EnumMember */: + case 116 /* Method */: + case 117 /* Constructor */: + case 118 /* GetAccessor */: + case 119 /* SetAccessor */: + case 167 /* FunctionDeclaration */: + case 136 /* FunctionExpression */: + case 137 /* ArrowFunction */: + case 163 /* CatchBlock */: + return 1 /* Value */; + case 113 /* TypeParameter */: + case 170 /* InterfaceDeclaration */: + case 125 /* TypeLiteral */: + return 2 /* Type */; + case 169 /* ClassDeclaration */: + case 171 /* EnumDeclaration */: + return 1 /* Value */ | 2 /* Type */; + case 172 /* ModuleDeclaration */: + if (node.name.kind === 3 /* StringLiteral */) { + return 4 /* Namespace */ | 1 /* Value */; + } + else if (ts.isInstantiated(node)) { + return 4 /* Namespace */ | 1 /* Value */; + } + else { + return 4 /* Namespace */; + } + break; + case 174 /* ImportDeclaration */: + return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; + } + ts.Debug.fail("Unkown declaration type"); + } + function isTypeReference(node) { + if (node.parent.kind === 112 /* QualifiedName */ && node.parent.right === node) + node = node.parent; + return node.parent.kind === 123 /* TypeReference */; + } + function isNamespaceReference(node) { + var root = node; + var isLastClause = true; + if (root.parent.kind === 112 /* QualifiedName */) { + while (root.parent && root.parent.kind === 112 /* QualifiedName */) + root = root.parent; + isLastClause = root.right === node; + } + return root.parent.kind === 123 /* TypeReference */ && !isLastClause; + } + function isInRightSideOfImport(node) { + while (node.parent.kind === 112 /* QualifiedName */) { + node = node.parent; + } + return node.parent.kind === 174 /* ImportDeclaration */ && node.parent.entityName === node; + } + function getMeaningFromRightHandSideOfImport(node) { + ts.Debug.assert(node.kind === 55 /* Identifier */); + if (node.parent.kind === 112 /* QualifiedName */ && node.parent.right === node && node.parent.parent.kind === 174 /* ImportDeclaration */) { + return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; + } + return 4 /* Namespace */; + } + function getMeaningFromLocation(node) { + if (node.parent.kind === 175 /* ExportAssignment */) { + return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; + } + else if (isInRightSideOfImport(node)) { + return getMeaningFromRightHandSideOfImport(node); + } + else if (ts.isDeclarationOrFunctionExpressionOrCatchVariableName(node)) { + return getMeaningFromDeclaration(node.parent); + } + else if (isTypeReference(node)) { + return 2 /* Type */; + } + else if (isNamespaceReference(node)) { + return 4 /* Namespace */; + } + else { + return 1 /* Value */; + } + } + function getIntersectingMeaningFromDeclarations(meaning, declarations) { + if (declarations) { + do { + var lastIterationMeaning = meaning; + for (var i = 0, n = declarations.length; i < n; i++) { + var declarationMeaning = getMeaningFromDeclaration(declarations[i]); + if (declarationMeaning & meaning) { + meaning |= declarationMeaning; + } + } + } while (meaning !== lastIterationMeaning); + } + return meaning; + } + function isWriteAccess(node) { + if (node.kind === 55 /* Identifier */ && ts.isDeclarationOrFunctionExpressionOrCatchVariableName(node)) { + return true; + } + var parent = node.parent; + if (parent) { + if (parent.kind === 139 /* PostfixOperator */ || parent.kind === 138 /* PrefixOperator */) { + return true; + } + else if (parent.kind === 140 /* BinaryExpression */ && parent.left === node) { + var operator = parent.operator; + switch (operator) { + case 46 /* AsteriskEqualsToken */: + case 47 /* SlashEqualsToken */: + case 48 /* PercentEqualsToken */: + case 45 /* MinusEqualsToken */: + case 49 /* LessThanLessThanEqualsToken */: + case 50 /* GreaterThanGreaterThanEqualsToken */: + case 51 /* GreaterThanGreaterThanGreaterThanEqualsToken */: + case 53 /* BarEqualsToken */: + case 54 /* CaretEqualsToken */: + case 52 /* AmpersandEqualsToken */: + case 44 /* PlusEqualsToken */: + case 43 /* EqualsToken */: + return true; + } + } + return false; + } + } + } function getSyntaxTree(filename) { filename = TypeScript.switchToForwardSlashes(filename); return syntaxTreeCache.getCurrentFileSyntaxTree(filename); @@ -32269,8 +32783,8 @@ var ts; getSignatureHelpItems: function (filename, position) { return null; }, getSignatureHelpCurrentArgumentState: function (fileName, position, applicableSpanStart) { return null; }, getDefinitionAtPosition: getDefinitionAtPosition, - getReferencesAtPosition: function (filename, position) { return []; }, - getOccurrencesAtPosition: function (filename, position) { return []; }, + getReferencesAtPosition: getReferencesAtPosition, + getOccurrencesAtPosition: getOccurrencesAtPosition, getImplementorsAtPosition: function (filename, position) { return []; }, getNameOrDottedNameSpan: getNameOrDottedNameSpan, getBreakpointStatementAtPosition: getBreakpointStatementAtPosition, @@ -33165,8 +33679,8 @@ var ts; })(ts || (ts = {})); var TypeScript; (function (TypeScript) { + var Services; (function (Services) { Services.TypeScriptServicesFactory = ts.TypeScriptServicesFactory; - })(TypeScript.Services || (TypeScript.Services = {})); - var Services = TypeScript.Services; + })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); diff --git a/doc/TypeScript Language Specification (Change Markup) .pdf b/doc/TypeScript Language Specification (Change Markup) .pdf index 781583de207..2b37fc55f3c 100644 Binary files a/doc/TypeScript Language Specification (Change Markup) .pdf and b/doc/TypeScript Language Specification (Change Markup) .pdf differ diff --git a/doc/TypeScript Language Specification (Change Markup).docx b/doc/TypeScript Language Specification (Change Markup).docx new file mode 100644 index 00000000000..b3a0384f926 Binary files /dev/null and b/doc/TypeScript Language Specification (Change Markup).docx differ diff --git a/doc/TypeScript Language Specification.docx b/doc/TypeScript Language Specification.docx index 48306045896..7fce1932d80 100644 Binary files a/doc/TypeScript Language Specification.docx and b/doc/TypeScript Language Specification.docx differ diff --git a/doc/TypeScript Language Specification.pdf b/doc/TypeScript Language Specification.pdf index 7f0bf29e958..b9223f922d2 100644 Binary files a/doc/TypeScript Language Specification.pdf and b/doc/TypeScript Language Specification.pdf differ diff --git a/package.json b/package.json index dd1c6276a2b..6b1d991cca6 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "typescript", "author": "Microsoft Corp.", "homepage": "http://typescriptlang.org/", - "version": "1.0.1", + "version": "1.1.0", "licenses": [ { "type": "Apache License 2.0", diff --git a/scripts/importDefinitelyTypedTests.ts b/scripts/importDefinitelyTypedTests.ts index caa6be0063a..f33ba1dd525 100644 --- a/scripts/importDefinitelyTypedTests.ts +++ b/scripts/importDefinitelyTypedTests.ts @@ -33,44 +33,44 @@ function importDefinitelyTypedTest(testCaseName: string, testFiles: string[], re fs.mkdirSync(testDirectoryPath); child_process.exec(cmd, { - maxBuffer: 1 * 1024 * 1024, - cwd: testDirectoryPath - }, (error, stdout, stderr) => { - //console.log("importing " + testCaseName + " ..."); - //console.log(cmd); - - if (error) { - console.log("importing " + testCaseName + " ..."); - console.log(cmd); - console.log("==> error " + JSON.stringify(error)); - console.log("==> stdout " + String(stdout)); - console.log("==> stderr " + String(stderr)); - console.log("\r\n"); - return; - } - - // copy generated file to output location - var outputFilePath = path.join(testDirectoryPath, "iocapture0.json"); - var testCasePath = path.join(rwcTestPath, "DefinitelyTyped_" + testCaseName + ".json"); - copyFileSync(outputFilePath, testCasePath); - - //console.log("output generated at: " + outputFilePath); - - if (!fs.existsSync(testCasePath)) { - throw new Error("could not find test case at: " + testCasePath); - } - else { - fs.unlinkSync(outputFilePath); - fs.rmdirSync(testDirectoryPath); - //console.log("testcase generated at: " + testCasePath); - //console.log("Done."); - } - //console.log("\r\n"); - - }) - .on('error', function (error) { - console.log("==> error " + JSON.stringify(error)); - console.log("\r\n"); + maxBuffer: 1 * 1024 * 1024, + cwd: testDirectoryPath + }, (error, stdout, stderr) => { + console.log("importing " + testCaseName + " ..."); + console.log(cmd); + + if (error) { + console.log("importing " + testCaseName + " ..."); + console.log(cmd); + console.log("==> error " + JSON.stringify(error)); + console.log("==> stdout " + String(stdout)); + console.log("==> stderr " + String(stderr)); + console.log("\r\n"); + return; + } + + // copy generated file to output location + var outputFilePath = path.join(testDirectoryPath, "iocapture0.json"); + var testCasePath = path.join(rwcTestPath, "DefinitelyTyped_" + testCaseName + ".json"); + copyFileSync(outputFilePath, testCasePath); + + //console.log("output generated at: " + outputFilePath); + + if (!fs.existsSync(testCasePath)) { + throw new Error("could not find test case at: " + testCasePath); + } + else { + fs.unlinkSync(outputFilePath); + fs.rmdirSync(testDirectoryPath); + //console.log("testcase generated at: " + testCasePath); + //console.log("Done."); + } + //console.log("\r\n"); + + }) + .on('error', function (error) { + console.log("==> error " + JSON.stringify(error)); + console.log("\r\n"); }); } @@ -79,7 +79,8 @@ function importDefinitelyTypedTests(definitelyTypedRoot: string): void { if (err) throw err; subDirectorys - .filter(d => ["_infrastructure", "node_modules", ".git"].indexOf(d) >= 0) + .filter(d => ["_infrastructure", "node_modules", ".git"].indexOf(d) < 0) + .filter(i => i.indexOf("sipml") >=0 ) .filter(i => fs.statSync(path.join(definitelyTypedRoot, i)).isDirectory()) .forEach(d => { var directoryPath = path.join(definitelyTypedRoot, d); diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c8825ed1152..b99d6d27d20 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -24,9 +24,9 @@ module ts { } /// fullTypeCheck denotes if this instance of the typechecker will be used to get semantic diagnostics. - /// If fullTypeCheck === true - then typechecker should do every possible check to produce all errors - /// If fullTypeCheck === false - typechecker can shortcut and skip checks that only produce errors. - /// NOTE: checks that somehow affects decisions being made during typechecking should be executed in both cases. + /// If fullTypeCheck === true, then the typechecker should do every possible check to produce all errors + /// If fullTypeCheck === false, the typechecker can take shortcuts and skip checks that only produce errors. + /// NOTE: checks that somehow affect decisions being made during typechecking should be executed in both cases. export function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker { var Symbol = objectAllocator.getSymbolConstructor(); @@ -37,7 +37,9 @@ module ts { var emptyArray: any[] = []; var emptySymbols: SymbolTable = {}; - + + var compilerOptions = program.getCompilerOptions(); + var checker: TypeChecker = { getProgram: () => program, getDiagnostics: getDiagnostics, @@ -412,7 +414,7 @@ module ts { } } - function getFullyQualifiedName(symbol: Symbol) { + function getFullyQualifiedName(symbol: Symbol): string { return symbol.parent ? getFullyQualifiedName(symbol.parent) + "." + symbolToString(symbol) : symbolToString(symbol); } @@ -574,7 +576,7 @@ module ts { return (resolveImport(symbol).flags & SymbolFlags.Value) !== 0; } - // If it is an instantiated symbol, then it is a value if hte symbol it is an + // If it is an instantiated symbol, then it is a value if the symbol it is an // instantiation of is a value. if (symbol.flags & SymbolFlags.Instantiated) { return (getSymbolLinks(symbol).target.flags & SymbolFlags.Value) !== 0; @@ -697,7 +699,7 @@ module ts { function getAccessibleSymbolChain(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): Symbol[] { function getAccessibleSymbolChainFromSymbolTable(symbols: SymbolTable): Symbol[] { function canQualifySymbol(symbolFromSymbolTable: Symbol, meaning: SymbolFlags) { - // If the symbol is equivalent and doesnt need futher qualification, this symbol is accessible + // If the symbol is equivalent and doesn't need further qualification, this symbol is accessible if (!needsQualification(symbolFromSymbolTable, enclosingDeclaration, meaning)) { return true; } @@ -793,9 +795,9 @@ module ts { return { accessibility: SymbolAccessibility.Accessible, aliasesToMakeVisible: hasAccessibleDeclarations.aliasesToMakeVisible }; } - // If we havent got the accessible symbol doesnt mean the symbol is actually inaccessible. - // It could be qualified symbol and hence verify the path - // eg: + // If we haven't got the accessible symbol, it doesn't mean the symbol is actually inaccessible. + // It could be a qualified symbol and hence verify the path + // e.g.: // module m { // export class c { // } @@ -803,7 +805,7 @@ module ts { // var x: typeof m.c // In the above example when we start with checking if typeof m.c symbol is accessible, // we are going to see if c can be accessed in scope directly. - // But it cant, hence the accessible is going to be undefined, but that doesnt mean m.c is accessible + // But it can't, hence the accessible is going to be undefined, but that doesn't mean m.c is inaccessible // It is accessible if the parent m is accessible because then m.c can be accessed through qualification meaningToLook = getQualifiedLeftMeaning(meaning); symbol = getParentOfSymbol(symbol); @@ -815,7 +817,7 @@ module ts { if (symbolExternalModule) { var enclosingExternalModule = getExternalModuleContainer(enclosingDeclaration); if (symbolExternalModule !== enclosingExternalModule) { - // name from different external module that is not visibile + // name from different external module that is not visible return { accessibility: SymbolAccessibility.CannotBeNamed, errorSymbolName: symbolToString(initialSymbol, enclosingDeclaration, meaning), @@ -892,7 +894,7 @@ module ts { { accessibility: SymbolAccessibility.NotAccessible, errorSymbolName: firstIdentifierName }; } - // Enclosing declaration is optional when we dont want to get qualified name in the enclosing declaration scope + // Enclosing declaration is optional when we don't want to get qualified name in the enclosing declaration scope // Meaning needs to be specified if the enclosing declaration is given function symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) { function getSymbolName(symbol: Symbol) { @@ -907,8 +909,8 @@ module ts { // Get qualified name if (enclosingDeclaration && - // Properties/methods/Signatures/Constructors/TypeParameters do not need qualification - !(symbol.flags & (SymbolFlags.PropertyOrAccessor | SymbolFlags.Signature | SymbolFlags.Constructor | SymbolFlags.Method | SymbolFlags.TypeParameter))) { + // TypeParameters do not need qualification + !(symbol.flags & SymbolFlags.TypeParameter)) { var symbolName: string; while (symbol) { var isFirstName = !symbolName; @@ -919,7 +921,7 @@ module ts { currentSymbolName = ts.map(accessibleSymbolChain, accessibleSymbol => getSymbolName(accessibleSymbol)).join("."); } else { - // If we didnt find accessible symbol chain for this symbol, break if this is external module + // If we didn't find accessible symbol chain for this symbol, break if this is external module if (!isFirstName && ts.forEach(symbol.declarations, declaration => hasExternalModuleSymbol(declaration))) { break; } @@ -943,20 +945,37 @@ module ts { writer.write(symbolToString(symbol, enclosingDeclaration, meaning)); } - function createSingleLineTextWriter() { + function createSingleLineTextWriter(maxLength?: number) { var result = ""; + var overflow = false; + function write(s: string) { + if (!overflow) { + result += s; + if (result.length > maxLength) { + result = result.substr(0, maxLength - 3) + "..."; + overflow = true; + } + } + } return { - write(s: string) { result += s; }, - writeSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) { writeSymbolToTextWriter(symbol, enclosingDeclaration, meaning, this); }, - writeLine() { result += " "; }, + write: write, + writeSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) { + writeSymbolToTextWriter(symbol, enclosingDeclaration, meaning, this); + }, + writeLine() { + write(" "); + }, increaseIndent() { }, decreaseIndent() { }, - getText() { return result; } + getText() { + return result; + } }; } function typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string { - var stringWriter = createSingleLineTextWriter(); + var maxLength = compilerOptions.noErrorTruncation || flags & TypeFormatFlags.NoTruncation ? undefined : 100; + var stringWriter = createSingleLineTextWriter(maxLength); // TODO(shkamat): typeToString should take enclosingDeclaration as input, once we have implemented enclosingDeclaration writeTypeToTextWriter(type, enclosingDeclaration, flags, stringWriter); return stringWriter.getText(); @@ -1003,7 +1022,7 @@ module ts { function writeTypeReference(type: TypeReference) { if (type.target === globalArrayType && !(flags & TypeFormatFlags.WriteArrayAsGenericType)) { // If we are writing array element type the arrow style signatures are not allowed as - // we need to surround it by curlies, eg. { (): T; }[]; as () => T[] would mean something different + // we need to surround it by curlies, e.g. { (): T; }[]; as () => T[] would mean something different writeType(type.typeArguments[0], /*allowFunctionOrConstructorTypeLiteral*/ false); writer.write("[]"); } @@ -1257,7 +1276,7 @@ module ts { !(node.kind !== SyntaxKind.ImportDeclaration && parent.kind !== SyntaxKind.SourceFile && isInAmbientContext(parent))) { return isGlobalSourceFile(parent) || isUsedInExportAssignment(node); } - // Exported members/ambient module elements (exception import declaraiton) are visible if parent is visible + // Exported members/ambient module elements (exception import declaration) are visible if parent is visible return isDeclarationVisible(parent); case SyntaxKind.Property: @@ -1348,10 +1367,14 @@ module ts { } // Use the type of the initializer expression if one is present if (declaration.initializer) { - var unwidenedType = checkAndMarkExpression(declaration.initializer); - var type = getWidenedType(unwidenedType); - if (type !== unwidenedType) { - checkImplicitAny(type); + var type = checkAndMarkExpression(declaration.initializer); + // Widening of property assignments is handled by checkObjectLiteral, exclude them here + if (declaration.kind !== SyntaxKind.PropertyAssignment) { + var unwidenedType = type; + type = getWidenedType(type); + if (type !== unwidenedType) { + checkImplicitAny(type); + } } return type; } @@ -1361,7 +1384,7 @@ module ts { return type; function checkImplicitAny(type: Type) { - if (!fullTypeCheck || !program.getCompilerOptions().noImplicitAny) { + if (!fullTypeCheck || !compilerOptions.noImplicitAny) { return; } // We need to have ended up with 'any', 'any[]', 'any[][]', etc. @@ -1410,6 +1433,12 @@ module ts { } else if (links.type === resolvingType) { links.type = anyType; + if (compilerOptions.noImplicitAny) { + var diagnostic = (symbol.valueDeclaration).type ? + Diagnostics._0_implicitly_has_type_any_because_it_is_referenced_directly_or_indirectly_in_its_own_type_annotation : + Diagnostics._0_implicitly_has_type_any_because_it_is_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer; + error(symbol.valueDeclaration, diagnostic, symbolToString(symbol)); + } } return links.type; } @@ -1464,8 +1493,8 @@ module ts { } // Otherwise, fall back to 'any'. else { - if (program.getCompilerOptions().noImplicitAny) { - error(setter, Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation, symbol.name); + if (compilerOptions.noImplicitAny) { + error(setter, Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation, symbolToString(symbol)); } type = anyType; @@ -1479,6 +1508,10 @@ module ts { } else if (links.type === resolvingType) { links.type = anyType; + if (compilerOptions.noImplicitAny) { + var getter = getDeclarationOfKind(symbol, SyntaxKind.GetAccessor); + error(getter, Diagnostics._0_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, symbolToString(symbol)); + } } } @@ -1542,7 +1575,7 @@ module ts { function hasBaseType(type: InterfaceType, checkBase: InterfaceType) { return check(type); - function check(type: InterfaceType) { + function check(type: InterfaceType): boolean { var target = getTargetType(type); return target === checkBase || forEach(target.baseTypes, check); } @@ -2046,6 +2079,15 @@ module ts { } else if (signature.resolvedReturnType === resolvingType) { signature.resolvedReturnType = anyType; + if (compilerOptions.noImplicitAny) { + var declaration = signature.declaration; + if (declaration.name) { + error(declaration.name, Diagnostics._0_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, identifierToString(declaration.name)); + } + else { + error(declaration, Diagnostics.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); + } + } } return signature.resolvedReturnType; } @@ -3188,45 +3230,6 @@ module ts { return (type.flags & TypeFlags.Anonymous) && type.symbol && (type.symbol.flags & SymbolFlags.ObjectLiteral) ? true : false; } - function getWidenedTypeOfObjectLiteral(type: Type): Type { - var properties = getPropertiesOfType(type); - if (properties.length) { - var widenedTypes: Type[] = []; - var propTypeWasWidened: boolean = false; - forEach(properties, p => { - var propType = getTypeOfSymbol(p); - var widenedType = getWidenedType(propType); - if (propType !== widenedType) { - propTypeWasWidened = true; - - if (program.getCompilerOptions().noImplicitAny && getInnermostTypeOfNestedArrayTypes(widenedType) === anyType) { - error(p.valueDeclaration, Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, p.name, typeToString(widenedType)); - } - } - widenedTypes.push(widenedType); - }); - if (propTypeWasWidened) { - var members: SymbolTable = {}; - var index = 0; - forEach(properties, p => { - var symbol = createSymbol(SymbolFlags.Property | SymbolFlags.Transient, p.name); - symbol.declarations = p.declarations; - symbol.parent = p.parent; - symbol.type = widenedTypes[index++]; - symbol.target = p; - if (p.valueDeclaration) symbol.valueDeclaration = p.valueDeclaration; - members[symbol.name] = symbol; - }); - var stringIndexType = getIndexTypeOfType(type, IndexKind.String); - var numberIndexType = getIndexTypeOfType(type, IndexKind.Number); - if (stringIndexType) stringIndexType = getWidenedType(stringIndexType); - if (numberIndexType) numberIndexType = getWidenedType(numberIndexType); - type = createAnonymousType(type.symbol, members, emptyArray, emptyArray, stringIndexType, numberIndexType); - } - } - return type; - } - function isArrayType(type: Type): boolean { return type.flags & TypeFlags.Reference && (type).target === globalArrayType; } @@ -3238,14 +3241,8 @@ module ts { return type; } - function getWidenedTypeOfArrayLiteral(type: Type): Type { - var elementType = (type).typeArguments[0]; - var widenedType = getWidenedType(elementType); - type = elementType !== widenedType ? createArrayType(widenedType) : type; - return type; - } - - function getWidenedType(type: Type): Type { + /* If we are widening on a literal, then we may need to the 'node' parameter for reporting purposes */ + function getWidenedType(type: Type, supressNoImplicitAnyErrors?: boolean): Type { if (type.flags & (TypeFlags.Undefined | TypeFlags.Null)) { return anyType; } @@ -3256,6 +3253,54 @@ module ts { return getWidenedTypeOfArrayLiteral(type); } return type; + + function getWidenedTypeOfObjectLiteral(type: Type): Type { + var properties = getPropertiesOfType(type); + if (properties.length) { + var widenedTypes: Type[] = []; + var propTypeWasWidened: boolean = false; + forEach(properties, p => { + var propType = getTypeOfSymbol(p); + var widenedType = getWidenedType(propType); + if (propType !== widenedType) { + propTypeWasWidened = true; + + if (!supressNoImplicitAnyErrors && program.getCompilerOptions().noImplicitAny && getInnermostTypeOfNestedArrayTypes(widenedType) === anyType) { + error(p.valueDeclaration, Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, p.name, typeToString(widenedType)); + } + } + widenedTypes.push(widenedType); + }); + if (propTypeWasWidened) { + var members: SymbolTable = {}; + var index = 0; + forEach(properties, p => { + var symbol = createSymbol(SymbolFlags.Property | SymbolFlags.Transient, p.name); + symbol.declarations = p.declarations; + symbol.parent = p.parent; + symbol.type = widenedTypes[index++]; + symbol.target = p; + if (p.valueDeclaration) symbol.valueDeclaration = p.valueDeclaration; + members[symbol.name] = symbol; + }); + var stringIndexType = getIndexTypeOfType(type, IndexKind.String); + var numberIndexType = getIndexTypeOfType(type, IndexKind.Number); + if (stringIndexType) stringIndexType = getWidenedType(stringIndexType); + if (numberIndexType) numberIndexType = getWidenedType(numberIndexType); + type = createAnonymousType(type.symbol, members, emptyArray, emptyArray, stringIndexType, numberIndexType); + } + } + return type; + } + + function getWidenedTypeOfArrayLiteral(type: Type): Type { + var elementType = (type).typeArguments[0]; + var widenedType = getWidenedType(elementType, supressNoImplicitAnyErrors); + + type = elementType !== widenedType ? createArrayType(widenedType) : type; + + return type; + } } function forEachMatchingParameterType(source: Signature, target: Signature, callback: (s: Type, t: Type) => void) { @@ -3501,29 +3546,6 @@ module ts { return getTypeOfSymbol(getExportSymbolOfValueSymbolIfExported(symbol)); } - function getThisContainer(node: Node): Node { - while (true) { - node = node.parent; - if (!node) { - return node; - } - switch (node.kind) { - 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: - case SyntaxKind.ArrowFunction: - return node; - } - } - } - function captureLexicalThis(node: Node, container: Node): void { var classNode = container.parent && container.parent.kind === SyntaxKind.ClassDeclaration ? container.parent : undefined; getNodeLinks(node).flags |= NodeCheckFlags.LexicalThis; @@ -3536,11 +3558,14 @@ module ts { } function checkThisExpression(node: Node): Type { - var container = getThisContainer(node); + // Stop at the first arrow function so that we can + // tell whether 'this' needs to be captured. + var container = getThisContainer(node, /* includeArrowFunctions */ true); var needToCaptureLexicalThis = false; - // skip arrow functions - while (container.kind === SyntaxKind.ArrowFunction) { - container = getThisContainer(container); + + // Now skip arrow functions to get the "real" owner of 'this'. + if (container.kind === SyntaxKind.ArrowFunction) { + container = getThisContainer(container, /* includeArrowFunctions */ false); needToCaptureLexicalThis = true; } @@ -4059,7 +4084,7 @@ module ts { } // Fall back to any. - if (program.getCompilerOptions().noImplicitAny && objectType !== anyType) { + if (compilerOptions.noImplicitAny && objectType !== anyType) { error(node, Diagnostics.Index_signature_of_object_type_implicitly_has_an_any_type); } @@ -4120,7 +4145,7 @@ module ts { } else { // current declaration belongs to a different symbol - // set cutoffPos so reorderings in the future won't change result set from 0 to cutoffPos + // set cutoffPos so re-orderings in the future won't change result set from 0 to cutoffPos pos = cutoffPos = result.length; lastParent = parent; } @@ -4157,19 +4182,6 @@ module ts { return getSignatureInstantiation(signature, getInferredTypes(context)); } - // Inferentially type an expression by a contextual parameter type (section 4.12.2 in TypeScript spec) - function inferentiallyTypeExpession(expr: Expression, contextualType: Type, contextualMapper: TypeMapper): Type { - var type = checkExpressionWithContextualType(expr, contextualType, contextualMapper); - var signature = getSingleCallSignature(type); - if (signature && signature.typeParameters) { - var contextualSignature = getSingleCallSignature(contextualType); - if (contextualSignature && !contextualSignature.typeParameters) { - type = getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, contextualMapper)); - } - } - return type; - } - function inferTypeArguments(signature: Signature, args: Expression[], excludeArgument?: boolean[]): Type[] { var typeParameters = signature.typeParameters; var context = createInferenceContext(typeParameters); @@ -4178,7 +4190,7 @@ module ts { for (var i = 0; i < args.length; i++) { if (!excludeArgument || excludeArgument[i] === undefined) { var parameterType = getTypeAtPosition(signature, i); - inferTypes(context, inferentiallyTypeExpession(args[i], parameterType, mapper), parameterType); + inferTypes(context, checkExpressionWithContextualType(args[i], parameterType, mapper), parameterType); } } // Next, infer from those context sensitive arguments that are no longer excluded @@ -4186,7 +4198,7 @@ module ts { for (var i = 0; i < args.length; i++) { if (excludeArgument[i] === false) { var parameterType = getTypeAtPosition(signature, i); - inferTypes(context, inferentiallyTypeExpession(args[i], parameterType, mapper), parameterType); + inferTypes(context, checkExpressionWithContextualType(args[i], parameterType, mapper), parameterType); } } } @@ -4404,7 +4416,7 @@ module ts { var declaration = signature.declaration; if (declaration && (declaration.kind !== SyntaxKind.Constructor && declaration.kind !== SyntaxKind.ConstructSignature)) { // When resolved signature is a call signature (and not a construct signature) the result type is any - if (program.getCompilerOptions().noImplicitAny) { + if (compilerOptions.noImplicitAny) { error(node, Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type); } return anyType; @@ -4417,9 +4429,9 @@ module ts { var exprType = checkExpression(node.operand); var targetType = getTypeFromTypeNode(node.type); if (fullTypeCheck && targetType !== unknownType) { - var widenedType = getWidenedType(exprType); - if (!(isTypeAssignableTo(exprType, targetType) || isTypeAssignableTo(targetType, widenedType))) { - checkTypeAssignableTo(targetType, widenedType, node, Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other_Colon, Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other); + var widenedType = getWidenedType(exprType, /*supressNoImplicitAnyErrors*/ true); + if (!(isTypeAssignableTo(targetType, widenedType))) { + checkTypeAssignableTo(exprType, targetType, node, Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other_Colon, Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other); } } return targetType; @@ -4450,7 +4462,7 @@ module ts { var unwidenedType = checkAndMarkExpression(func.body, contextualMapper); var widenedType = getWidenedType(unwidenedType); - if (fullTypeCheck && program.getCompilerOptions().noImplicitAny && widenedType !== unwidenedType && getInnermostTypeOfNestedArrayTypes(widenedType) === anyType) { + if (fullTypeCheck && compilerOptions.noImplicitAny && widenedType !== unwidenedType && getInnermostTypeOfNestedArrayTypes(widenedType) === anyType) { error(func, Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeToString(widenedType)); } @@ -4472,7 +4484,7 @@ module ts { var widenedType = getWidenedType(commonType); // Check and report for noImplicitAny if the best common type implicitly gets widened to an 'any'/arrays-of-'any' type. - if (fullTypeCheck && program.getCompilerOptions().noImplicitAny && widenedType !== commonType && getInnermostTypeOfNestedArrayTypes(widenedType) === anyType) { + if (fullTypeCheck && compilerOptions.noImplicitAny && widenedType !== commonType && getInnermostTypeOfNestedArrayTypes(widenedType) === anyType) { var typeName = typeToString(widenedType); if (func.name) { @@ -4489,37 +4501,6 @@ module ts { return voidType; } - // 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. - 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.FunctionBlock: - 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.LabelledStatement: - case SyntaxKind.TryStatement: - case SyntaxKind.TryBlock: - case SyntaxKind.CatchBlock: - case SyntaxKind.FinallyBlock: - return forEachChild(node, traverse); - } - } - } - /// Returns a set of types relating to every return expression relating to a function block. function checkAndAggregateReturnExpressionTypes(body: Block, contextualMapper?: TypeMapper): Type[] { var aggregatedTypes: Type[] = []; @@ -4612,27 +4593,28 @@ module ts { } } } + checkSignatureDeclaration(node); } } - if (fullTypeCheck && !(links.flags & NodeCheckFlags.TypeChecked)) { - checkSignatureDeclaration(node); - if (node.type) { - checkIfNonVoidFunctionHasReturnExpressionsOrSingleThrowStatment(node, getTypeFromTypeNode(node.type)); - } - if (node.body.kind === SyntaxKind.FunctionBlock) { - checkSourceElement(node.body); - } - else { - var exprType = checkExpression(node.body); - if (node.type) { - checkTypeAssignableTo(exprType, getTypeFromTypeNode(node.type), node.body, undefined, undefined); - } - } - links.flags |= NodeCheckFlags.TypeChecked; - } return type; } + function checkFunctionExpressionBody(node: FunctionExpression) { + if (node.type) { + checkIfNonVoidFunctionHasReturnExpressionsOrSingleThrowStatment(node, getTypeFromTypeNode(node.type)); + } + if (node.body.kind === SyntaxKind.FunctionBlock) { + checkSourceElement(node.body); + } + else { + var exprType = checkExpression(node.body); + if (node.type) { + checkTypeAssignableTo(exprType, getTypeFromTypeNode(node.type), node.body, undefined, undefined); + } + checkFunctionExpressionBodies(node.body); + } + } + function checkArithmeticOperandType(operand: Node, type: Type, diagnostic: DiagnosticMessage): boolean { if (!(type.flags & (TypeFlags.Any | TypeFlags.NumberLike))) { error(operand, diagnostic); @@ -4869,7 +4851,7 @@ module ts { var ok = checkReferenceExpression(node.left, Diagnostics.Invalid_left_hand_side_of_assignment_expression); // Use default messages if (ok) { - // to avoid cascading errors check assignability only if 'isReference' check succeded and no errors were reported + // to avoid cascading errors check assignability only if 'isReference' check succeeded and no errors were reported checkTypeAssignableTo(valueType, leftType, node.left, /*chainedMessage*/ undefined, /*terminalMessage*/ undefined); } } @@ -4915,11 +4897,28 @@ module ts { // Checks an expression and returns its type. The contextualMapper parameter serves two purposes: When // contextualMapper is not undefined and not equal to the identityMapper function object it indicates that the // expression is being inferentially typed (section 4.12.2 in spec) and provides the type mapper to use in - // conjuction with the generic contextual type. When contextualMapper is equal to the identityMapper function + // conjunction with the generic contextual type. When contextualMapper is equal to the identityMapper function // object, it serves as an indicator that all contained function and arrow expressions should be considered to // have the wildcard function type; this form of type check is used during overload resolution to exclude // contextually typed function and arrow expressions in the initial phase. function checkExpression(node: Expression, contextualMapper?: TypeMapper): Type { + var type = checkExpressionNode(node, contextualMapper); + if (contextualMapper && contextualMapper !== identityMapper) { + var signature = getSingleCallSignature(type); + if (signature && signature.typeParameters) { + var contextualType = getContextualType(node); + if (contextualType) { + var contextualSignature = getSingleCallSignature(contextualType); + if (contextualSignature && !contextualSignature.typeParameters) { + type = getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, contextualMapper)); + } + } + } + } + return type; + } + + function checkExpressionNode(node: Expression, contextualMapper: TypeMapper): Type { switch (node.kind) { case SyntaxKind.Identifier: return checkIdentifier(node); @@ -5020,7 +5019,7 @@ module ts { // legal case - parameter initializer references some parameter strictly on left of current parameter declaration return; } - // fallthrough to error reporting + // fall through to error reporting } error(n, Diagnostics.Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it, identifierToString(parameterDeclaration.name), identifierToString(n)); @@ -5047,7 +5046,7 @@ module ts { checkCollisionWithCapturedThisVariable(node, node.name); checkCollistionWithRequireExportsInGeneratedCode(node, node.name); checkCollisionWithArgumentsInGeneratedCode(node); - if (program.getCompilerOptions().noImplicitAny && !node.type) { + if (compilerOptions.noImplicitAny && !node.type) { switch (node.kind) { case SyntaxKind.ConstructSignature: error(node, Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); @@ -5416,7 +5415,7 @@ module ts { } // when checking exported function declarations across modules check only duplicate implementations - // names and consistensy of modifiers are verified when we check local symbol + // names and consistency of modifiers are verified when we check local symbol var isExportSymbolInsideModule = symbol.parent && symbol.parent.flags & SymbolFlags.Module; for (var i = 0; i < declarations.length; i++) { var node = declarations[i]; @@ -5512,7 +5511,7 @@ module ts { var symbol: Symbol; // Exports should be checked only if enclosing module contains both exported and non exported declarations. - // In case if all declarations are non-exported check is unnecesary. + // In case if all declarations are non-exported check is unnecessary. // if localSymbol is defined on node then node itself is exported - check is required var symbol = node.localSymbol; @@ -5607,7 +5606,7 @@ module ts { } // If there is no body and no explicit return type, then report an error. - if (fullTypeCheck && program.getCompilerOptions().noImplicitAny && !node.body && !node.type) { + if (fullTypeCheck && compilerOptions.noImplicitAny && !node.body && !node.type) { // Ignore privates within ambient contexts; they exist purely for documentative purposes to avoid name clashing. // (e.g. privates within .d.ts files do not expose type information) if (!isPrivateWithinAmbient(node)) { @@ -5924,17 +5923,6 @@ module ts { // TODO: Check that target label is valid } - function getContainingFunction(node: Node): SignatureDeclaration { - while (true) { - node = node.parent; - if (!node || node.kind === SyntaxKind.FunctionDeclaration || node.kind === SyntaxKind.FunctionExpression || - node.kind === SyntaxKind.ArrowFunction || node.kind === SyntaxKind.Method || node.kind === SyntaxKind.Constructor || - node.kind === SyntaxKind.GetAccessor || node.kind === SyntaxKind.SetAccessor) { - return node; - } - } - } - function checkReturnStatement(node: ReturnStatement) { if (node.expression && !(getNodeLinks(node.expression).flags & NodeCheckFlags.TypeChecked)) { var func = getContainingFunction(node); @@ -5957,7 +5945,7 @@ module ts { checkTypeAssignableTo(checkExpression(node.expression), returnType, node.expression, /*chainedMessage*/ undefined, /*terminalMessage*/ undefined); } else if (func.kind == SyntaxKind.Constructor) { - // constructor doesn't have explicit return type annontation and yet its return type is known - declaring type + // constructor doesn't have explicit return type annotation and yet its return type is known - declaring type // handle constructors and issue specialized error message for them. if (!isTypeAssignableTo(checkExpression(node.expression), returnType)) { error(node.expression, Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); @@ -6204,7 +6192,7 @@ module ts { } if ((base.flags & derived.flags & SymbolFlags.Method) || ((base.flags & SymbolFlags.PropertyOrAccessor) && (derived.flags & SymbolFlags.PropertyOrAccessor))) { - // method is overridden with method or property\accessor is overridden with property\accessor - correct case + // method is overridden with method or property/accessor is overridden with property/accessor - correct case continue; } @@ -6532,9 +6520,10 @@ module ts { case SyntaxKind.FunctionDeclaration: return checkFunctionDeclaration(node); case SyntaxKind.Block: + return checkBlock(node); case SyntaxKind.FunctionBlock: case SyntaxKind.ModuleBlock: - return checkBlock(node); + return checkBody(node); case SyntaxKind.VariableStatement: return checkVariableStatement(node); case SyntaxKind.ExpressionStatement: @@ -6581,13 +6570,91 @@ module ts { } } + // Function expression bodies are checked after all statements in the enclosing body. This is to ensure + // constructs like the following are permitted: + // var foo = function () { + // var s = foo(); + // return "hello"; + // } + // Here, performing a full type check of the body of the function expression whilst in the process of + // determining the type of foo would cause foo to be given type any because of the recursive reference. + // Delaying the type check of the body ensures foo has been assigned a type. + function checkFunctionExpressionBodies(node: Node): void { + switch (node.kind) { + case SyntaxKind.FunctionExpression: + case SyntaxKind.ArrowFunction: + forEach((node).parameters, checkFunctionExpressionBodies); + checkFunctionExpressionBody(node); + break; + case SyntaxKind.Method: + case SyntaxKind.Constructor: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + case SyntaxKind.FunctionDeclaration: + forEach((node).parameters, checkFunctionExpressionBodies); + break; + case SyntaxKind.WithStatement: + checkFunctionExpressionBodies((node).expression); + break; + case SyntaxKind.Parameter: + case SyntaxKind.Property: + case SyntaxKind.ArrayLiteral: + case SyntaxKind.ObjectLiteral: + case SyntaxKind.PropertyAssignment: + case SyntaxKind.PropertyAccess: + case SyntaxKind.IndexedAccess: + case SyntaxKind.CallExpression: + case SyntaxKind.NewExpression: + case SyntaxKind.TypeAssertion: + case SyntaxKind.ParenExpression: + case SyntaxKind.PrefixOperator: + case SyntaxKind.PostfixOperator: + case SyntaxKind.BinaryExpression: + case SyntaxKind.ConditionalExpression: + case SyntaxKind.Block: + case SyntaxKind.FunctionBlock: + case SyntaxKind.ModuleBlock: + case SyntaxKind.VariableStatement: + case SyntaxKind.ExpressionStatement: + case SyntaxKind.IfStatement: + case SyntaxKind.DoStatement: + case SyntaxKind.WhileStatement: + case SyntaxKind.ForStatement: + case SyntaxKind.ForInStatement: + case SyntaxKind.ContinueStatement: + case SyntaxKind.BreakStatement: + case SyntaxKind.ReturnStatement: + case SyntaxKind.SwitchStatement: + case SyntaxKind.CaseClause: + case SyntaxKind.DefaultClause: + case SyntaxKind.LabelledStatement: + case SyntaxKind.ThrowStatement: + case SyntaxKind.TryStatement: + case SyntaxKind.TryBlock: + case SyntaxKind.CatchBlock: + case SyntaxKind.FinallyBlock: + case SyntaxKind.VariableDeclaration: + case SyntaxKind.ClassDeclaration: + case SyntaxKind.EnumDeclaration: + case SyntaxKind.EnumMember: + case SyntaxKind.SourceFile: + forEachChild(node, checkFunctionExpressionBodies); + break; + } + } + + function checkBody(node: Block) { + checkBlock(node); + checkFunctionExpressionBodies(node); + } + // Fully type check a source file and collect the relevant diagnostics. function checkSourceFile(node: SourceFile) { var links = getNodeLinks(node); if (!(links.flags & NodeCheckFlags.TypeChecked)) { emitExtends = false; potentialThisCollisions.length = 0; - forEach(node.statements, checkSourceElement); + checkBody(node); if (isExternalModule(node)) { var symbol = getExportAssignmentSymbol(node.symbol); if (symbol && symbol.flags & SymbolFlags.Import) { @@ -6636,7 +6703,7 @@ module ts { // Language service support function getNodeAtPosition(sourceFile: SourceFile, position: number): Node { - function findChildAtPosition(parent: Node) { + function findChildAtPosition(parent: Node): Node { var child = forEachChild(parent, node => { if (position >= node.pos && position <= node.end && position >= getTokenPosOfNode(node)) { return findChildAtPosition(node); @@ -6979,7 +7046,7 @@ module ts { return moduleType ? moduleType.symbol : undefined; } - // Intentinal fallthrough + // Intentional fall-through case SyntaxKind.NumericLiteral: // index access if (node.parent.kind == SyntaxKind.IndexedAccess && (node.parent).index === node) { @@ -7044,7 +7111,7 @@ module ts { var apparentType = getApparentType(type); if (apparentType.flags & TypeFlags.ObjectType) { - // Augment the apprent type with Function and Object memeber as applicaple + // Augment the apparent type with Function and Object members as applicable var propertiesByName: Map = {}; var results: Symbol[] = []; @@ -7175,7 +7242,7 @@ module ts { function shouldEmitDeclarations() { // If the declaration emit and there are no errors being reported in program or by checker // declarations can be emitted - return program.getCompilerOptions().declaration && + return compilerOptions.declaration && !program.getDiagnostics().length && !getDiagnostics().length; } @@ -7201,17 +7268,17 @@ module ts { var symbol = getSymbolOfNode(node); var signaturesOfSymbol = getSignaturesOfSymbol(symbol); // If this function body corresponds to function with multiple signature, it is implementation of overload - // eg: function foo(a: string): string; - // function foo(a: number): number; - // function foo(a: any) { // This is implementation of the overloads - // return a; - // } + // e.g.: function foo(a: string): string; + // function foo(a: number): number; + // function foo(a: any) { // This is implementation of the overloads + // return a; + // } return signaturesOfSymbol.length > 1 || - // If there is single signature for the symbol, it is overload if that signature isnt coming from the node - // eg: function foo(a: string): string; - // function foo(a: any) { // This is implementation of the overloads - // return a; - // } + // If there is single signature for the symbol, it is overload if that signature isn't coming from the node + // e.g.: function foo(a: string): string; + // function foo(a: any) { // This is implementation of the overloads + // return a; + // } (signaturesOfSymbol.length === 1 && signaturesOfSymbol[0].declaration !== node); } return false; diff --git a/src/compiler/core.ts b/src/compiler/core.ts index cd8a3dc0666..28a0a7bb6a3 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -204,6 +204,9 @@ module ts { export function createFileDiagnostic(file: SourceFile, start: number, length: number, message: DiagnosticMessage, ...args: any[]): Diagnostic; export function createFileDiagnostic(file: SourceFile, start: number, length: number, message: DiagnosticMessage): Diagnostic { + Debug.assert(start >= 0, "start must be non-negative, is " + start); + Debug.assert(length >= 0, "length must be non-negative, is " + length); + var text = getLocaleSpecificMessage(message.key); if (arguments.length > 4) { @@ -258,6 +261,9 @@ module ts { } export function flattenDiagnosticChain(file: SourceFile, start: number, length: number, diagnosticChain: DiagnosticMessageChain, newLine: string): Diagnostic { + Debug.assert(start >= 0, "start must be non-negative, is " + start); + Debug.assert(length >= 0, "length must be non-negative, is " + length); + var code = diagnosticChain.code; var category = diagnosticChain.category; var messageText = ""; diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 80c582fd555..04dbafc254e 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -391,6 +391,10 @@ module ts { Object_literal_s_property_0_implicitly_has_an_1_type: { code: 7018, category: DiagnosticCategory.Error, key: "Object literal's property '{0}' implicitly has an '{1}' type." }, Rest_parameter_0_implicitly_has_an_any_type: { code: 7019, category: DiagnosticCategory.Error, key: "Rest parameter '{0}' implicitly has an 'any[]' type." }, Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: { code: 7020, category: DiagnosticCategory.Error, key: "Call signature, which lacks return-type annotation, implicitly has an 'any' return type." }, + _0_implicitly_has_type_any_because_it_is_referenced_directly_or_indirectly_in_its_own_type_annotation: { code: 7021, category: DiagnosticCategory.Error, key: "'{0}' implicitly has type 'any' because it is referenced directly or indirectly in its own type annotation." }, + _0_implicitly_has_type_any_because_it_is_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer: { code: 7022, category: DiagnosticCategory.Error, key: "'{0}' implicitly has type 'any' because it is does not have a type annotation and is referenced directly or indirectly in its own initializer." }, + _0_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: 7023, category: DiagnosticCategory.Error, key: "'{0}' 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." }, + 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." }, }; } \ No newline at end of file diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 97490648774..6c78ec6bd5d 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1561,6 +1561,22 @@ "category": "Error", "code": 7020 }, + "'{0}' implicitly has type 'any' because it is referenced directly or indirectly in its own type annotation.": { + "category": "Error", + "code": 7021 + }, + "'{0}' implicitly has type 'any' because it is does not have a type annotation and is referenced directly or indirectly in its own initializer.": { + "category": "Error", + "code": 7022 + }, + "'{0}' 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.": { + "category": "Error", + "code": 7023 + }, + "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.": { + "category": "Error", + "code": 7024 + }, "You cannot rename this element.": { "category": "Error", "code": 8000 diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index e55163c3c12..317db201f3e 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -266,7 +266,7 @@ module ts { } } else { - // Single line comment of styly //.... + // Single line comment of style //.... writer.write(currentSourceFile.text.substring(comment.pos, comment.end)); } @@ -393,7 +393,7 @@ module ts { } var prevEncodedEmittedColumn = lastEncodedSourceMapSpan.emittedColumn; - // Line/Comma deliminators + // Line/Comma delimiters if (lastEncodedSourceMapSpan.emittedLine == lastRecordedSourceMapSpan.emittedLine) { // Emit comma to separate the entry if (sourceMapData.sourceMapMappings) { @@ -401,7 +401,7 @@ module ts { } } else { - // Emit line deliminators + // Emit line delimiters for (var encodedLine = lastEncodedSourceMapSpan.emittedLine; encodedLine < lastRecordedSourceMapSpan.emittedLine; encodedLine++) { sourceMapData.sourceMapMappings += ";"; } @@ -470,7 +470,7 @@ module ts { var emittedLine = writer.getLine(); var emittedColumn = writer.getColumn(); - // If this location wasnt recorded or the location in source is going backwards, record the span + // If this location wasn't recorded or the location in source is going backwards, record the span if (!lastRecordedSourceMapSpan || lastRecordedSourceMapSpan.emittedLine != emittedLine || lastRecordedSourceMapSpan.emittedColumn != emittedColumn || @@ -516,7 +516,7 @@ module ts { } function recordNewSourceFileStart(node: SourceFile) { - // Add the the file to tsFilePaths + // Add the file to tsFilePaths // If sourceroot option: Use the relative path corresponding to the common directory path // otherwise source locations relative to map file location var sourcesDirectoryPath = compilerOptions.sourceRoot ? program.getCommonSourceDirectory() : sourceMapDir; @@ -953,7 +953,7 @@ module ts { write(tokenToString(node.operator)); } // In some cases, we need to emit a space between the operator and the operand. One obvious case - // is when the operator is an identifer, like delete or typeof. We also need to do this for plus + // is when the operator is an identifier, like delete or typeof. We also need to do this for plus // and minus expressions in certain cases. Specifically, consider the following two cases (parens // are just for clarity of exposition, and not part of the source code): // @@ -1755,16 +1755,13 @@ module ts { if (!isInstantiated(node)) { return emitPinnedOrTripleSlashComments(node); } - emitLeadingComments(node); - if (!(node.flags & NodeFlags.Export)) { - emitStart(node); - write("var "); - emit(node.name); - write(";"); - emitEnd(node); - writeLine(); - } + emitStart(node); + write("var "); + emit(node.name); + write(";"); + emitEnd(node); + writeLine(); emitStart(node); write("(function ("); emitStart(node.name); @@ -1788,21 +1785,15 @@ module ts { scopeEmitEnd(); } write(")("); + if (node.flags & NodeFlags.Export) { + emit(node.name); + write(" = "); + } emitModuleMemberName(node); write(" || ("); emitModuleMemberName(node); write(" = {}));"); emitEnd(node); - if (node.flags & NodeFlags.Export) { - writeLine(); - emitStart(node); - write("var "); - emit(node.name); - write(" = "); - emitModuleMemberName(node); - emitEnd(node); - write(";"); - } emitTrailingComments(node); } @@ -1982,7 +1973,7 @@ module ts { } } - function emitNode(node: Node) { + function emitNode(node: Node): void { if (!node) { return; } @@ -2125,7 +2116,7 @@ module ts { } function getLeadingCommentsToEmit(node: Node) { - // Emit the leading comments only if the parent's pos doesnt match because parent should take care of emitting these comments + // Emit the leading comments only if the parent's pos doesn't match because parent should take care of emitting these comments if (node.parent.kind === SyntaxKind.SourceFile || node.pos !== node.parent.pos) { var leadingComments: Comment[]; if (hasDetachedComments(node.pos)) { @@ -2148,7 +2139,7 @@ module ts { } function emitTrailingDeclarationComments(node: Node) { - // Emit the trailing comments only if the parent's end doesnt match + // Emit the trailing comments only if the parent's end doesn't match if (node.parent.kind === SyntaxKind.SourceFile || node.end !== node.parent.end) { var trailingComments = getTrailingComments(currentSourceFile.text, node.end); // trailing comments are emitted at space/*trailing comment1 */space/*trailing comment*/ @@ -2224,7 +2215,7 @@ module ts { return currentSourceFile.text.charCodeAt(comment.pos + 2) === CharacterCodes.exclamation; } // Verify this is /// comment, but do the regexp match only when we first can find /// in the comment text - // so that we dont end up computing comment string and doing match for all // comments + // so that we don't end up computing comment string and doing match for all // comments else if (currentSourceFile.text.charCodeAt(comment.pos + 1) === CharacterCodes.slash && comment.pos + 2 < comment.end && currentSourceFile.text.charCodeAt(comment.pos + 2) === CharacterCodes.slash && @@ -2700,7 +2691,7 @@ module ts { } function emitVariableDeclaration(node: VariableDeclaration) { - // If we are emitting property it isnt moduleElement and hence we already know it needs to be emitted + // If we are emitting property it isn't moduleElement and hence we already know it needs to be emitted // so there is no check needed to see if declaration is visible if (node.kind !== SyntaxKind.VariableDeclaration || resolver.isDeclarationVisible(node)) { emitSourceTextOfNode(node.name); @@ -2724,7 +2715,7 @@ module ts { Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; } - // This check is to ensure we dont report error on constructor parameter property as that error would be reported during parameter emit + // This check is to ensure we don't report error on constructor parameter property as that error would be reported during parameter emit else if (node.kind === SyntaxKind.Property) { if (node.flags & NodeFlags.Static) { diagnosticMessage = symbolAccesibilityResult.errorModuleName ? @@ -2829,7 +2820,7 @@ module ts { } function emitFunctionDeclaration(node: FunctionDeclaration) { - // If we are emitting Method/Constructor it isnt moduleElement and hence already determined to be emitting + // If we are emitting Method/Constructor it isn't moduleElement and hence already determined to be emitting // so no need to verify if the declaration is visible if ((node.kind !== SyntaxKind.FunctionDeclaration || resolver.isDeclarationVisible(node)) && !resolver.isImplementationOfOverload(node)) { @@ -3080,9 +3071,7 @@ module ts { } function resolveScriptReference(sourceFile: SourceFile, reference: FileReference) { - var referenceFileName = compilerOptions.noResolve - ? reference.filename - : normalizePath(combinePaths(getDirectoryPath(sourceFile.filename), reference.filename)); + var referenceFileName = normalizePath(combinePaths(getDirectoryPath(sourceFile.filename), reference.filename)); return program.getSourceFile(referenceFileName); } @@ -3107,22 +3096,24 @@ module ts { } if (root) { - // Emiting single file so emit references in this file only - var addedGlobalFileReference = false; - forEach(root.referencedFiles, fileReference => { - var referencedFile = resolveScriptReference(root, fileReference); + // Emitting just a single file, so emit references in this file only + if (!compilerOptions.noResolve) { + var addedGlobalFileReference = false; + forEach(root.referencedFiles, fileReference => { + var referencedFile = resolveScriptReference(root, fileReference); - // All the references that are not going to be part of same file - if ((referencedFile.flags & NodeFlags.DeclarationFile) || // This is a declare file reference - shouldEmitToOwnFile(referencedFile) || // This is referenced file is emitting its own js file - !addedGlobalFileReference) { // Or the global out file corresponding to this reference was not added + // All the references that are not going to be part of same file + if ((referencedFile.flags & NodeFlags.DeclarationFile) || // This is a declare file reference + shouldEmitToOwnFile(referencedFile) || // This is referenced file is emitting its own js file + !addedGlobalFileReference) { // Or the global out file corresponding to this reference was not added - writeReferencePath(referencedFile); - if (!isExternalModuleOrDeclarationFile(referencedFile)) { - addedGlobalFileReference = true; + writeReferencePath(referencedFile); + if (!isExternalModuleOrDeclarationFile(referencedFile)) { + addedGlobalFileReference = true; + } } - } - }); + }); + } emitNode(root); } @@ -3132,17 +3123,19 @@ module ts { forEach(program.getSourceFiles(), sourceFile => { if (!isExternalModuleOrDeclarationFile(sourceFile)) { // Check what references need to be added - forEach(sourceFile.referencedFiles, fileReference => { - var referencedFile = resolveScriptReference(sourceFile, fileReference); + if (!compilerOptions.noResolve) { + forEach(sourceFile.referencedFiles, fileReference => { + var referencedFile = resolveScriptReference(sourceFile, fileReference); - // If the reference file is declaration file or external module emit that reference - if (isExternalModuleOrDeclarationFile(referencedFile) && - !contains(emittedReferencedFiles, referencedFile)) { // If the file refernece was not already emitted + // If the reference file is a declaration file or an external module, emit that reference + if (isExternalModuleOrDeclarationFile(referencedFile) && + !contains(emittedReferencedFiles, referencedFile)) { // If the file reference was not already emitted - writeReferencePath(referencedFile); - emittedReferencedFiles.push(referencedFile); - } - }); + writeReferencePath(referencedFile); + emittedReferencedFiles.push(referencedFile); + } + }); + } emitNode(sourceFile); } diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 5f466eb7bce..25ca24ae61b 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -81,7 +81,7 @@ module ts { export function createDiagnosticForNode(node: Node, message: DiagnosticMessage, arg0?: any, arg1?: any, arg2?: any): Diagnostic { node = getErrorSpanForNode(node); var file = getSourceFileOfNode(node); - var start = skipTrivia(file.text, node.pos); + var start = node.kind === SyntaxKind.Missing ? node.pos : skipTrivia(file.text, node.pos); var length = node.end - start; return createFileDiagnostic(file, start, length, message, arg0, arg1, arg2); @@ -141,11 +141,11 @@ module ts { export function getLeadingCommentsOfNode(node: Node, sourceFileOfNode: SourceFile) { // If parameter/type parameter, the prev token trailing comments are part of this node too if (node.kind === SyntaxKind.Parameter || node.kind === SyntaxKind.TypeParameter) { - // eg (/** blah */ a, /** blah */ b); + // e.g. (/** blah */ a, /** blah */ b); return concatenate(getTrailingComments(sourceFileOfNode.text, node.pos), - // eg: ( - // /** blah */ a, - // /** blah */ b); + // e.g.: ( + // /** blah */ a, + // /** blah */ b); getLeadingComments(sourceFileOfNode.text, node.pos)); } else { @@ -157,7 +157,7 @@ module ts { return filter(getLeadingCommentsOfNode(node, sourceFileOfNode), comment => isJsDocComment(comment)); function isJsDocComment(comment: Comment) { - // js doc is if comment is starting with /** but not if it is /**/ + // 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; @@ -352,6 +352,107 @@ 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.FunctionBlock: + 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.LabelledStatement: + case SyntaxKind.TryStatement: + case SyntaxKind.TryBlock: + case SyntaxKind.CatchBlock: + 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 getContainingFunction(node: Node): SignatureDeclaration { + 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 hasRestParameters(s: SignatureDeclaration): boolean { return s.parameters.length > 0 && (s.parameters[s.parameters.length - 1].flags & NodeFlags.Rest) !== 0; } @@ -665,7 +766,7 @@ module ts { } function reportInvalidUseInStrictMode(node: Identifier): void { - // identifierToString cannot be used here since it uses backreference to 'parent' that is not yet set + // identifierToString cannot be used here since it uses a backreference to 'parent' that is not yet set var name = sourceText.substring(skipTrivia(sourceText, node.pos), node.end); grammarErrorOnNode(node, Diagnostics.Invalid_use_of_0_in_strict_mode, name); } @@ -736,7 +837,7 @@ module ts { lookAheadMode = LookAheadMode.NoErrorYet; var result = callback(); - // If we switched from 1 to to -1 then a parse error occurred during the callback. + // If we switched from 1 to -1 then a parse error occurred during the callback. // If that's the case, then we want to act as if we never got any result at all. Debug.assert(lookAheadMode === LookAheadMode.Error || lookAheadMode === LookAheadMode.NoErrorYet); if (lookAheadMode === LookAheadMode.Error) { @@ -1654,7 +1755,7 @@ module ts { // (i.e. they're both BinaryExpressions with an assignment operator in it). // First, check if we have an arrow function (production '4') that starts with a parenthesized - // parameter list. If we do, we must *not* recurse for productsion 1, 2 or 3. An ArrowFunction is + // parameter list. If we do, we must *not* recurse for productions 1, 2 or 3. An ArrowFunction is // not a LeftHandSideExpression, nor does it start a ConditionalExpression. So we are done // with AssignmentExpression if we see one. var arrowExpression = tryParseParenthesizedArrowFunctionExpression(); @@ -1842,7 +1943,7 @@ module ts { if (token === SyntaxKind.EqualsGreaterThanToken) { // ERROR RECOVERY TWEAK: // If we see a standalone => try to parse it as an arrow function expression as that's - // likely whatthe user intended to write. + // likely what the user intended to write. return Tristate.True; } // Definitely not a parenthesized arrow function. @@ -2745,8 +2846,8 @@ module ts { switch (token) { case SyntaxKind.SemicolonToken: // If we're in error recovery, then we don't want to treat ';' as an empty statement. - // The problem is that ';' can show up in far too many contexts, and if we see one - // and assume it's a statement, then we may bail out innapropriately from whatever + // The problem is that ';' can show up in far too many contexts, and if we see one + // and assume it's a statement, then we may bail out inappropriately from whatever // we're parsing. For example, if we have a semicolon in the middle of a class, then // we really don't want to assume the class is over and we're on a statement in the // outer module. We just want to consume and move on. @@ -2896,10 +2997,11 @@ module ts { parseExpected(SyntaxKind.VarKeyword); node.declarations = parseVariableDeclarationList(flags, /*noIn*/false); parseSemicolon(); + finishNode(node); if (!node.declarations.length && file.syntacticErrors.length === errorCountBeforeVarStatement) { grammarErrorOnNode(node, Diagnostics.Variable_declaration_list_cannot_be_empty); } - return finishNode(node); + return node; } function parseFunctionDeclaration(pos?: number, flags?: NodeFlags): FunctionDeclaration { @@ -3306,7 +3408,7 @@ module ts { function isIntegerLiteral(expression: Expression): boolean { function isInteger(literalExpression: LiteralExpression): boolean { // Allows for scientific notation since literalExpression.text was formed by - // coercing a number to a string. Sometimes this coersion can yield a string + // coercing a number to a string. Sometimes this coercion can yield a string // in scientific notation. // We also don't need special logic for hex because a hex integer is converted // to decimal when it is coerced. @@ -3328,7 +3430,7 @@ module ts { var inConstantEnumMemberSection = true; // In an ambient declaration, the grammar only allows integer literals as initializers. - // In a nonambient declaration, the grammar allows uninitialized members only in a + // In a non-ambient declaration, the grammar allows uninitialized members only in a // ConstantEnumMemberSection, which starts at the beginning of an enum declaration // or any time an integer literal initializer is encountered. function parseAndCheckEnumMember(): EnumMember { @@ -3451,7 +3553,7 @@ module ts { return finishNode(node); } - function isDeclaration() { + function isDeclaration(): boolean { switch (token) { case SyntaxKind.VarKeyword: case SyntaxKind.FunctionKeyword: @@ -3868,7 +3970,7 @@ module ts { commonSourceDirectory = getNormalizedPathFromPathCompoments(commonPathComponents); if (commonSourceDirectory) { // Make sure directory path ends with directory separator so this string can directly - // used to replace with "" to get the relative path of the source file and the relative path doesnt + // used to replace with "" to get the relative path of the source file and the relative path doesn't // start with / making it rooted path commonSourceDirectory += directorySeparator; } diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index 614c190d426..59c7913e24a 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -192,7 +192,7 @@ module ts { return false; } - // Perform binary search in one of the unicode range maps + // Perform binary search in one of the Unicode range maps var lo: number = 0; var hi: number = map.length; var mid: number; @@ -281,8 +281,8 @@ module ts { if (lineNumber < 0) { // If the actual position was not found, // the binary search returns the negative value of the next line start - // eg. if line starts at [5, 10, 23, 80] and position requested was 20 - // the search will return -2 + // e.g. if the line starts at [5, 10, 23, 80] and the position requested was 20 + // then the search will return -2 lineNumber = (~lineNumber) - 1; } return { @@ -369,7 +369,7 @@ module ts { // 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 - // comment. Single-line comment ranges include the the beginning '//' characters but not the ending line break. Multi-line comment + // comment. Single-line comment ranges include the beginning '//' characters but not the ending line break. Multi-line comment // ranges include the beginning '/* and ending '*/' characters. The return value is undefined if no comments were found. function getCommentRanges(text: string, pos: number, trailing: boolean): Comment[] { var result: Comment[]; diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 226f0c357cf..bb8a106a813 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -220,8 +220,8 @@ module ts { FirstFutureReservedWord = ImplementsKeyword, LastFutureReservedWord = YieldKeyword, FirstTypeNode = TypeReference, - LastTypeNode = ArrayType, - FirstPunctuation= OpenBraceToken, + LastTypeNode = TupleType, + FirstPunctuation = OpenBraceToken, LastPunctuation = CaretEqualsToken } @@ -636,12 +636,10 @@ module ts { } export enum TypeFormatFlags { - None = 0x00000000, - - /** writes Array instead T[] */ - WriteArrayAsGenericType = 0x00000001, // Declarations - - UseTypeOfFunction = 0x00000002, // instead of writing signature type of function use typeof + None = 0x00000000, + WriteArrayAsGenericType = 0x00000001, // Write Array instead T[] + UseTypeOfFunction = 0x00000002, // Write typeof instead of function type literal + NoTruncation = 0x00000004, // Don't truncate typeToString result } export enum SymbolAccessibility { @@ -653,7 +651,7 @@ module ts { export interface SymbolAccessiblityResult { accessibility: SymbolAccessibility; errorSymbolName?: string // Optional symbol name that results in error - errorModuleName?: string // If the symbol is not visibile from module, module's name + errorModuleName?: string // If the symbol is not visible from module, module's name aliasesToMakeVisible?: ImportDeclaration[]; // aliases that need to have this symbol visible } @@ -968,6 +966,7 @@ module ts { locale?: string; mapRoot?: string; module?: ModuleKind; + noErrorTruncation?: boolean; noImplicitAny?: boolean; noLib?: boolean; noLibCheck?: boolean; @@ -980,7 +979,6 @@ module ts { target?: ScriptTarget; version?: boolean; watch?: boolean; - [option: string]: any; } diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index c4cb3662eea..c571a7d9f94 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -1084,6 +1084,8 @@ module FourSlash { // Make the edit var ch = text.charAt(i); this.languageServiceShimHost.editScript(this.activeFile.fileName, offset, offset, ch); + this.languageService.getBraceMatchingAtPosition(this.activeFile.fileName, offset); + this.updateMarkersForEdit(this.activeFile.fileName, offset, offset, ch); this.editCheckpoint(this.activeFile.fileName); offset++; diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 654f240b4b5..5ee3139d8f7 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -622,6 +622,7 @@ module Harness { options = options || { noResolve: false }; options.target = options.target || ts.ScriptTarget.ES3; options.module = options.module || ts.ModuleKind.None; + options.noErrorTruncation = true; if (settingsCallback) { settingsCallback(null); @@ -725,6 +726,10 @@ module Harness { options.emitBOM = !!setting.value; break; + case 'errortruncation': + options.noErrorTruncation = setting.value === 'false'; + break; + default: throw new Error('Unsupported compiler setting ' + setting.flag); } @@ -1030,7 +1035,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", "noimplicitany", "noresolve", "newline", "newlines", "emitbom"]; + var fileMetadataNames = ["filename", "comments", "declaration", "module", "nolib", "sourcemap", "target", "out", "outDir", "noimplicitany", "noresolve", "newline", "newlines", "emitbom", "errortruncation"]; function extractCompilerSettings(content: string): CompilerSetting[] { diff --git a/src/harness/typeWriter.ts b/src/harness/typeWriter.ts index a3b23d10f14..8fac5e45dab 100644 --- a/src/harness/typeWriter.ts +++ b/src/harness/typeWriter.ts @@ -86,7 +86,7 @@ class TypeWriterWalker { column: lineAndCharacter.character, syntaxKind: ts.SyntaxKind[node.kind], sourceText: sourceText, - type: this.checker.typeToString(type, node.parent, ts.TypeFormatFlags.None) + type: this.checker.typeToString(type, node.parent, ts.TypeFormatFlags.NoTruncation) }); } diff --git a/src/lib/dom.generated.d.ts b/src/lib/dom.generated.d.ts index 2e7c5eba819..53f21708b3f 100644 --- a/src/lib/dom.generated.d.ts +++ b/src/lib/dom.generated.d.ts @@ -1865,30 +1865,42 @@ declare var Window: { new(): Window; } -interface FormData { - append(name: any, value: any, blobName?: string): void; +interface HTMLCollection extends MSHTMLCollectionExtensions { + /** + * Sets or retrieves the number of objects in a collection. + */ + length: number; + /** + * Retrieves an object from various collections. + */ + item(nameOrIndex?: any, optionalIndex?: any): Element; + /** + * Retrieves a select object or an object from an options collection. + */ + namedItem(name: string): Element; + // [name: string]: Element; + [index: number]: Element; } -declare var FormData: { - prototype: FormData; - new (form?: HTMLFormElement): FormData; +declare var HTMLCollection: { + prototype: HTMLCollection; + new(): HTMLCollection; } -interface SourceBuffer extends EventTarget { - updating: boolean; - appendWindowStart: number; - appendWindowEnd: number; - buffered: TimeRanges; - timestampOffset: number; - audioTracks: AudioTrackList; - appendBuffer(data: ArrayBufferView): void; - appendBuffer(data: ArrayBuffer): void; - remove(start: number, end: number): void; - abort(): void; - appendStream(stream: MSStream, maxSize?: number): void; +interface BlobPropertyBag { + type?: string; + endings?: string; } -declare var SourceBuffer: { - prototype: SourceBuffer; - new(): SourceBuffer; + +interface Blob { + type: string; + size: number; + msDetachStream(): any; + slice(start?: number, end?: number, contentType?: string): Blob; + msClose(): void; +} +declare var Blob: { + prototype: Blob; + new (blobParts?: any[], options?: BlobPropertyBag): Blob; } interface NavigatorID { @@ -3797,26 +3809,6 @@ declare var MSCSSProperties: { new(): MSCSSProperties; } -interface HTMLCollection extends MSHTMLCollectionExtensions { - /** - * Sets or retrieves the number of objects in a collection. - */ - length: number; - /** - * Retrieves an object from various collections. - */ - item(nameOrIndex?: any, optionalIndex?: any): Element; - /** - * Retrieves a select object or an object from an options collection. - */ - namedItem(name: string): Element; - // [name: string]: Element; -} -declare var HTMLCollection: { - prototype: HTMLCollection; - new(): HTMLCollection; -} - interface SVGExternalResourcesRequired { externalResourcesRequired: SVGAnimatedBoolean; } @@ -10052,18 +10044,6 @@ declare var FileReader: { new(): FileReader; } -interface Blob { - type: string; - size: number; - msDetachStream(): any; - slice(start?: number, end?: number, contentType?: string): Blob; - msClose(): void; -} -declare var Blob: { - prototype: Blob; - new(): Blob; -} - interface ApplicationCache extends EventTarget { status: number; ondownloading: (ev: Event) => any; @@ -10222,6 +10202,14 @@ declare var MSManipulationEvent: { MS_MANIPULATION_STATE_CANCELLED: number; } +interface FormData { + append(name: any, value: any, blobName?: string): void; +} +declare var FormData: { + prototype: FormData; + new(): FormData; +} + interface HTMLDataListElement extends HTMLElement { options: HTMLCollection; } @@ -10640,6 +10628,23 @@ interface RandomSource { getRandomValues(array: ArrayBufferView): ArrayBufferView; } +interface SourceBuffer extends EventTarget { + updating: boolean; + appendWindowStart: number; + appendWindowEnd: number; + buffered: TimeRanges; + timestampOffset: number; + audioTracks: AudioTrackList; + appendBuffer(data: ArrayBuffer): void; + remove(start: number, end: number): void; + abort(): void; + appendStream(stream: MSStream, maxSize?: number): void; +} +declare var SourceBuffer: { + prototype: SourceBuffer; + new(): SourceBuffer; +} + interface MSInputMethodContext extends EventTarget { oncandidatewindowshow: (ev: any) => any; target: HTMLElement; diff --git a/src/lib/webworker.generated.d.ts b/src/lib/webworker.generated.d.ts index 5dfaa2f646f..a6119989164 100644 --- a/src/lib/webworker.generated.d.ts +++ b/src/lib/webworker.generated.d.ts @@ -614,6 +614,11 @@ declare var FileReader: { new(): FileReader; } +interface BlobPropertyBag { + type?: string; + endings?: string; +} + interface Blob { type: string; size: number; @@ -623,7 +628,7 @@ interface Blob { } declare var Blob: { prototype: Blob; - new(): Blob; + new (blobParts?: any[], options?: BlobPropertyBag): Blob; } interface MSStream { diff --git a/src/services/services.ts b/src/services/services.ts index 0069f53922d..d51eeee97c0 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1312,20 +1312,6 @@ module ts { return node.parent.kind === SyntaxKind.NewExpression && (node.parent).func === node; } - function isAnyFunction(node: Node): boolean { - 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; - } - function isNameOfFunctionDeclaration(node: Node): boolean { return node.kind === SyntaxKind.Identifier && isAnyFunction(node.parent) && (node.parent).name === node; @@ -2148,7 +2134,6 @@ module ts { return result; } - /// Find references function getOccurrencesAtPosition(filename: string, position: number): ReferenceEntry[] { synchronizeHostData(); @@ -2160,11 +2145,23 @@ module ts { return undefined; } - if (node.kind === SyntaxKind.Identifier || isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || isNameOfExternalModuleImportOrDeclaration(node)) { + if (node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.ThisKeyword || node.kind === SyntaxKind.SuperKeyword || + isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || isNameOfExternalModuleImportOrDeclaration(node)) { return getReferencesForNode(node, [sourceFile]); } switch (node.kind) { + case SyntaxKind.IfKeyword: + case SyntaxKind.ElseKeyword: + if (hasKind(node.parent, SyntaxKind.IfStatement)) { + return getIfElseOccurrences(node.parent); + } + break; + case SyntaxKind.ReturnKeyword: + if (hasKind(node.parent, SyntaxKind.ReturnStatement)) { + return getReturnOccurrences(node.parent); + } + break; case SyntaxKind.TryKeyword: case SyntaxKind.CatchKeyword: case SyntaxKind.FinallyKeyword: @@ -2188,10 +2185,91 @@ module ts { return getBreakStatementOccurences(node.parent); } break; + case SyntaxKind.ConstructorKeyword: + if (hasKind(node.parent, SyntaxKind.Constructor)) { + return getConstructorOccurrences(node.parent); + } + break; } return undefined; + function getIfElseOccurrences(ifStatement: IfStatement): ReferenceEntry[] { + var keywords: Node[] = []; + + // Traverse upwards through all parent if-statements linked by their else-branches. + while (hasKind(ifStatement.parent, SyntaxKind.IfStatement) && (ifStatement.parent).elseStatement === ifStatement) { + ifStatement = ifStatement.parent; + } + + // Now traverse back down through the else branches, aggregating if/else keywords of if-statements. + while (ifStatement) { + var children = ifStatement.getChildren(); + pushKeywordIf(keywords, children[0], SyntaxKind.IfKeyword); + + // Generally the 'else' keyword is second-to-last, so we traverse backwards. + for (var i = children.length - 1; i >= 0; i--) { + if (pushKeywordIf(keywords, children[i], SyntaxKind.ElseKeyword)) { + break; + } + } + + if (!hasKind(ifStatement.elseStatement, SyntaxKind.IfStatement)) { + break + } + + ifStatement = ifStatement.elseStatement; + } + + var result: ReferenceEntry[] = []; + + // We'd like to highlight else/ifs together if they are only separated by whitespace + // (i.e. the keywords are separated by no comments, no newlines). + for (var i = 0; i < keywords.length; i++) { + if (keywords[i].kind === SyntaxKind.ElseKeyword && i < keywords.length - 1) { + var elseKeyword = keywords[i]; + var ifKeyword = keywords[i + 1]; // this *should* always be an 'if' keyword. + + var shouldHighlightNextKeyword = true; + + // Avoid recalculating getStart() by iterating backwards. + for (var j = ifKeyword.getStart() - 1; j >= elseKeyword.end; j--) { + if (!isWhiteSpace(sourceFile.text.charCodeAt(j))) { + shouldHighlightNextKeyword = false; + break; + } + } + + if (shouldHighlightNextKeyword) { + result.push(new ReferenceEntry(filename, TypeScript.TextSpan.fromBounds(elseKeyword.getStart(), ifKeyword.end), /* isWriteAccess */ false)); + i++; // skip the next keyword + continue; + } + } + + // Ordinary case: just highlight the keyword. + result.push(getReferenceEntryFromNode(keywords[i])); + } + + return result; + } + + function getReturnOccurrences(returnStatement: ReturnStatement): ReferenceEntry[] { + var func = getContainingFunction(returnStatement); + + // If we didn't find a containing function with a block body, bail out. + if (!(func && hasKind(func.body, SyntaxKind.FunctionBlock))) { + return undefined; + } + + var keywords: Node[] = [] + forEachReturnStatement((func).body, returnStatement => { + pushKeywordIf(keywords, returnStatement.getFirstToken(), SyntaxKind.ReturnKeyword); + }); + + return map(keywords, getReferenceEntryFromNode); + } + function getTryCatchFinallyOccurrences(tryStatement: TryStatement): ReferenceEntry[] { var keywords: Node[] = []; @@ -2205,7 +2283,7 @@ module ts { pushKeywordIf(keywords, tryStatement.finallyBlock.getFirstToken(), SyntaxKind.FinallyKeyword); } - return keywordsToReferenceEntries(keywords); + return map(keywords, getReferenceEntryFromNode); } function getSwitchCaseDefaultOccurrences(switchStatement: SwitchStatement) { @@ -2241,10 +2319,10 @@ module ts { }); }); - return keywordsToReferenceEntries(keywords); + return map(keywords, getReferenceEntryFromNode); } - function getBreakStatementOccurences(breakStatement: BreakOrContinueStatement): ReferenceEntry[]{ + function getBreakStatementOccurences(breakStatement: BreakOrContinueStatement): ReferenceEntry[] { // TODO (drosen): Deal with labeled statements. if (breakStatement.label) { return undefined; @@ -2272,6 +2350,20 @@ module ts { return undefined; } + function getConstructorOccurrences(constructorDeclaration: ConstructorDeclaration): ReferenceEntry[] { + var declarations = constructorDeclaration.symbol.getDeclarations() + + var keywords: Node[] = []; + + forEach(declarations, declaration => { + forEach(declaration.getChildren(), token => { + return pushKeywordIf(keywords, token, SyntaxKind.ConstructorKeyword); + }); + }); + + return map(keywords, getReferenceEntryFromNode); + } + // returns true if 'node' is defined and has a matching 'kind'. function hasKind(node: Node, kind: SyntaxKind) { return !!(node && node.kind === kind); @@ -2282,20 +2374,13 @@ module ts { return node && node.parent; } - function pushKeywordIf(keywordList: Node[], token: Node, ...expected: SyntaxKind[]): void { - if (!token) { - return; - } - - if (contains(expected, token.kind)) { + function pushKeywordIf(keywordList: Node[], token: Node, ...expected: SyntaxKind[]): boolean { + if (token && contains(expected, token.kind)) { keywordList.push(token); + return true; } - } - function keywordsToReferenceEntries(keywords: Node[]): ReferenceEntry[]{ - return map(keywords, keyword => - new ReferenceEntry(filename, TypeScript.TextSpan.fromBounds(keyword.getStart(), keyword.end), /* isWriteAccess */ false) - ); + return false; } } @@ -2311,6 +2396,9 @@ module ts { } if (node.kind !== SyntaxKind.Identifier && + // TODO (drosen): This should be enabled in a later release - currently breaks rename. + //node.kind !== SyntaxKind.ThisKeyword && + //node.kind !== SyntaxKind.SuperKeyword && !isLiteralNameOfPropertyDeclarationOrIndexAccess(node) && !isNameOfExternalModuleImportOrDeclaration(node)) { return undefined; @@ -2326,7 +2414,7 @@ module ts { var labelDefinition = getTargetLabel((node.parent), (node).text); // if we have a label definition, look within its statement for references, if not, then // the label is undefined, just return a set of one for the current node. - return labelDefinition ? getLabelReferencesInNode(labelDefinition.parent, labelDefinition) : [getReferenceEntry(node)]; + return labelDefinition ? getLabelReferencesInNode(labelDefinition.parent, labelDefinition) : [getReferenceEntryFromNode(node)]; } else { // it is a label definition and not a target, search within the parent labeledStatement @@ -2334,13 +2422,21 @@ module ts { } } + if (node.kind === SyntaxKind.ThisKeyword) { + return getReferencesForThisKeyword(node, sourceFiles); + } + + if (node.kind === SyntaxKind.SuperKeyword) { + return getReferencesForSuperKeyword(node); + } + var symbol = typeInfoResolver.getSymbolInfo(node); // Could not find a symbol e.g. unknown identifier if (!symbol) { // Even if we did not find a symbol, we have an identifer, so there is at least - // one reference that we know of. return than instead of undefined. - return [getReferenceEntry(node)]; + // one reference that we know of. return that instead of undefined. + return [getReferenceEntryFromNode(node)]; } // the symbol was an internal symbol and does not have a declaration e.g.undefined symbol @@ -2484,7 +2580,7 @@ module ts { // Only pick labels that are either the target label, or have a target that is the target label if (node === targetLabel || (isJumpStatementTarget(node) && getTargetLabel(node, labelName) === targetLabel)) { - result.push(getReferenceEntry(node)); + result.push(getReferenceEntryFromNode(node)); } }); return result; @@ -2549,7 +2645,132 @@ module ts { } if (isRelatableToSearchSet(searchSymbols, referenceSymbol, referenceLocation)) { - result.push(getReferenceEntry(referenceLocation)); + result.push(getReferenceEntryFromNode(referenceLocation)); + } + }); + } + } + + function getReferencesForSuperKeyword(superKeyword: Node): ReferenceEntry[]{ + var searchSpaceNode = getSuperContainer(superKeyword); + if (!searchSpaceNode) { + return undefined; + } + // Whether 'super' occurs in a static context within a class. + var staticFlag = NodeFlags.Static; + + switch (searchSpaceNode.kind) { + case SyntaxKind.Property: + case SyntaxKind.Method: + case SyntaxKind.Constructor: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + staticFlag &= searchSpaceNode.flags; + searchSpaceNode = searchSpaceNode.parent; // re-assign to be the owning class + break; + default: + return undefined; + } + + var result: ReferenceEntry[] = []; + + var sourceFile = searchSpaceNode.getSourceFile(); + var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "super", searchSpaceNode.getStart(), searchSpaceNode.getEnd()); + forEach(possiblePositions, position => { + cancellationToken.throwIfCancellationRequested(); + + var node = getNodeAtPosition(sourceFile, position); + + if (!node || node.kind !== SyntaxKind.SuperKeyword) { + return; + } + + var container = getSuperContainer(node); + + // If we have a 'super' container, we must have an enclosing class. + // Now make sure the owning class is the same as the search-space + // and has the same static qualifier as the original 'super's owner. + if (container && (NodeFlags.Static & container.flags) === staticFlag && container.parent.symbol === searchSpaceNode.symbol) { + result.push(getReferenceEntryFromNode(node)); + } + }); + + return result; + } + + function getReferencesForThisKeyword(thisOrSuperKeyword: Node, sourceFiles: SourceFile[]): ReferenceEntry[] { + var searchSpaceNode = getThisContainer(thisOrSuperKeyword, /* includeArrowFunctions */ false); + + // Whether 'this' occurs in a static context within a class. + var staticFlag = NodeFlags.Static; + + switch (searchSpaceNode.kind) { + case SyntaxKind.Property: + case SyntaxKind.Method: + case SyntaxKind.Constructor: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + staticFlag &= searchSpaceNode.flags + searchSpaceNode = searchSpaceNode.parent; // re-assign to be the owning class + break; + case SyntaxKind.SourceFile: + if (isExternalModule(searchSpaceNode)) { + return undefined; + } + // Fall through + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.FunctionExpression: + break; + default: + return undefined; + } + + var result: ReferenceEntry[] = []; + + if (searchSpaceNode.kind === SyntaxKind.SourceFile) { + forEach(sourceFiles, sourceFile => { + var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", sourceFile.getStart(), sourceFile.getEnd()); + getThisReferencesInFile(sourceFile, sourceFile, possiblePositions, result); + }); + } + else { + var sourceFile = searchSpaceNode.getSourceFile(); + var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", searchSpaceNode.getStart(), searchSpaceNode.getEnd()); + getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, result); + } + + return result; + + function getThisReferencesInFile(sourceFile: SourceFile, searchSpaceNode: Node, possiblePositions: number[], result: ReferenceEntry[]): void { + forEach(possiblePositions, position => { + cancellationToken.throwIfCancellationRequested(); + + var node = getNodeAtPosition(sourceFile, position); + if (!node || node.kind !== SyntaxKind.ThisKeyword) { + return; + } + + var container = getThisContainer(node, /* includeArrowFunctions */ false); + + switch (searchSpaceNode.kind) { + case SyntaxKind.FunctionExpression: + case SyntaxKind.FunctionDeclaration: + if (searchSpaceNode.symbol === container.symbol) { + result.push(getReferenceEntryFromNode(node)); + } + break; + case SyntaxKind.ClassDeclaration: + // Make sure the container belongs to the same class + // and has the appropriate static modifier from the original container. + if (container.parent && searchSpaceNode.symbol === container.parent.symbol && (container.flags & NodeFlags.Static) === staticFlag) { + result.push(getReferenceEntryFromNode(node)); + } + break; + case SyntaxKind.SourceFile: + if (container.kind === SyntaxKind.SourceFile && !isExternalModule(container)) { + result.push(getReferenceEntryFromNode(node)); + } + break; } }); } @@ -2651,18 +2872,6 @@ module ts { return undefined; } - function getReferenceEntry(node: Node): ReferenceEntry { - var start = node.getStart(); - var end = node.getEnd(); - - if (node.kind === SyntaxKind.StringLiteral) { - start += 1; - end -= 1; - } - - return new ReferenceEntry(node.getSourceFile().filename, TypeScript.TextSpan.fromBounds(start, end), isWriteAccess(node)); - } - function getMeaningFromDeclaration(node: Declaration): SearchMeaning { switch (node.kind) { case SyntaxKind.Parameter: @@ -2799,40 +3008,38 @@ module ts { } return meaning; } + } - /// A node is considedered a writeAccess iff it is a name of a declaration or a target of an assignment - function isWriteAccess(node: Node): boolean { - if (node.kind === SyntaxKind.Identifier && isDeclarationOrFunctionExpressionOrCatchVariableName(node)) { + function getReferenceEntryFromNode(node: Node): ReferenceEntry { + var start = node.getStart(); + var end = node.getEnd(); + + if (node.kind === SyntaxKind.StringLiteral) { + start += 1; + end -= 1; + } + + return new ReferenceEntry(node.getSourceFile().filename, TypeScript.TextSpan.fromBounds(start, end), isWriteAccess(node)); + } + + /// A node is considedered a writeAccess iff it is a name of a declaration or a target of an assignment + function isWriteAccess(node: Node): boolean { + if (node.kind === SyntaxKind.Identifier && isDeclarationOrFunctionExpressionOrCatchVariableName(node)) { + return true; + } + + var parent = node.parent; + if (parent) { + if (parent.kind === SyntaxKind.PostfixOperator || parent.kind === SyntaxKind.PrefixOperator) { return true; } - - var parent = node.parent; - if (parent) { - if (parent.kind === SyntaxKind.PostfixOperator || parent.kind === SyntaxKind.PrefixOperator) { - return true; - } - else if (parent.kind === SyntaxKind.BinaryExpression && (parent).left === node) { - var operator = (parent).operator; - switch (operator) { - case SyntaxKind.AsteriskEqualsToken: - case SyntaxKind.SlashEqualsToken: - case SyntaxKind.PercentEqualsToken: - case SyntaxKind.MinusEqualsToken: - case SyntaxKind.LessThanLessThanEqualsToken: - case SyntaxKind.GreaterThanGreaterThanEqualsToken: - case SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken: - case SyntaxKind.BarEqualsToken: - case SyntaxKind.CaretEqualsToken: - case SyntaxKind.AmpersandEqualsToken: - case SyntaxKind.PlusEqualsToken: - case SyntaxKind.EqualsToken: - return true; - } - } - - return false; + else if (parent.kind === SyntaxKind.BinaryExpression && (parent).left === node) { + var operator = (parent).operator; + return SyntaxKind.FirstAssignment <= operator && operator <= SyntaxKind.LastAssignment; } } + + return false; } /// Syntactic features diff --git a/src/services/syntax/parser.ts b/src/services/syntax/parser.ts index 0c886f129fc..31a87b857b1 100644 --- a/src/services/syntax/parser.ts +++ b/src/services/syntax/parser.ts @@ -544,18 +544,29 @@ module TypeScript.Parser { } } - function replaceTokenInParent(oldToken: ISyntaxToken, newToken: ISyntaxToken): void { + function replaceTokenInParent(node: ISyntaxNode, oldToken: ISyntaxToken, newToken: ISyntaxToken): void { // oldToken may be parented by a node or a list. replaceTokenInParentWorker(oldToken, newToken); var parent = oldToken.parent; newToken.parent = parent; - // Parent must be a list or a node. All of those have a 'data' element. - Debug.assert(isNode(parent) || isList(parent) || isSeparatedList(parent)); - var dataElement = <{ data: number }>parent; - if (dataElement.data) { - dataElement.data &= SyntaxConstants.NodeParsedInStrictModeMask + // Walk upwards to our outermost node, clearing hte cached 'data' in it. This will + // make sure that the fullWidths and incrementally unusable bits are computed correctly + // when next requested. + while (true) { + // Parent must be a list or a node. All of those have a 'data' element. + Debug.assert(isNode(parent) || isList(parent) || isSeparatedList(parent)); + var dataElement = <{ data: number }>parent; + if (dataElement.data) { + dataElement.data &= SyntaxConstants.NodeParsedInStrictModeMask + } + + if (parent === node) { + break; + } + + parent = parent.parent; } } @@ -602,7 +613,7 @@ module TypeScript.Parser { var oldToken = lastToken(node); var newToken = addSkippedTokenAfterToken(oldToken, skippedToken); - replaceTokenInParent(oldToken, newToken); + replaceTokenInParent(node, oldToken, newToken); return node; } @@ -611,7 +622,7 @@ module TypeScript.Parser { var oldToken = firstToken(node); var newToken = addSkippedTokensBeforeToken(oldToken, skippedTokens); - replaceTokenInParent(oldToken, newToken); + replaceTokenInParent(node, oldToken, newToken); } return node; diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.js index 809cbe92920..ae8d594c2f8 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.js @@ -53,11 +53,11 @@ var A; return Point; })(); A.Point = Point; + var Point; (function (Point) { function Origin() { return ""; } Point.Origin = Origin; //expected duplicate identifier error - })(A.Point || (A.Point = {})); - var Point = A.Point; + })(Point = A.Point || (A.Point = {})); })(A || (A = {})); diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.js index 9a941abdc1e..5bbe60297cc 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.js @@ -52,10 +52,10 @@ var A; return Point; })(); A.Point = Point; + var Point; (function (Point) { function Origin() { return ""; } // not an error since not exported - })(A.Point || (A.Point = {})); - var Point = A.Point; + })(Point = A.Point || (A.Point = {})); })(A || (A = {})); diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.js index 3f377bfaf00..45958ad62d4 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.js @@ -46,8 +46,8 @@ var A; return Point; })(); A.Point = Point; + var Point; (function (Point) { Point.Origin = ""; //expected duplicate identifier error - })(A.Point || (A.Point = {})); - var Point = A.Point; + })(Point = A.Point || (A.Point = {})); })(A || (A = {})); diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.js index ca069294926..ae56fd1acdc 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.js @@ -46,8 +46,8 @@ var A; return Point; })(); A.Point = Point; + var Point; (function (Point) { var Origin = ""; // not an error since not exported - })(A.Point || (A.Point = {})); - var Point = A.Point; + })(Point = A.Point || (A.Point = {})); })(A || (A = {})); diff --git a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.js b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.js index 3956c9e8828..54666ca7aff 100644 --- a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.js +++ b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.js @@ -43,6 +43,7 @@ var a: { id: string }; //// [class.js] var X; (function (X) { + var Y; (function (Y) { var Point = (function () { function Point(x, y) { @@ -52,19 +53,18 @@ var X; return Point; })(); Y.Point = Point; - })(X.Y || (X.Y = {})); - var Y = X.Y; + })(Y = X.Y || (X.Y = {})); })(X || (X = {})); //// [module.js] var X; (function (X) { + var Y; (function (Y) { + var Point; (function (Point) { Point.Origin = new Point(0, 0); - })(Y.Point || (Y.Point = {})); - var Point = Y.Point; - })(X.Y || (X.Y = {})); - var Y = X.Y; + })(Point = Y.Point || (Y.Point = {})); + })(Y = X.Y || (X.Y = {})); })(X || (X = {})); //// [test.js] //var cl: { x: number; y: number; } diff --git a/tests/baselines/reference/ExportModuleWithAccessibleTypesOnItsExportedMembers.js b/tests/baselines/reference/ExportModuleWithAccessibleTypesOnItsExportedMembers.js index e44c511d8da..df6645df3b3 100644 --- a/tests/baselines/reference/ExportModuleWithAccessibleTypesOnItsExportedMembers.js +++ b/tests/baselines/reference/ExportModuleWithAccessibleTypesOnItsExportedMembers.js @@ -31,6 +31,7 @@ var A; return Point; })(); A.Point = Point; + var B; (function (B) { B.Origin = new Point(0, 0); var Line = (function () { @@ -42,6 +43,5 @@ var A; return Line; })(); B.Line = Line; - })(A.B || (A.B = {})); - var B = A.B; + })(B = A.B || (A.B = {})); })(A || (A = {})); diff --git a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.js b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.js index 0e34a18c48b..369a5b4dd52 100644 --- a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.js +++ b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.js @@ -54,10 +54,10 @@ var A; //// [module.js] var A; (function (A) { + var Point; (function (Point) { Point.Origin = { x: 0, y: 0 }; - })(A.Point || (A.Point = {})); - var Point = A.Point; + })(Point = A.Point || (A.Point = {})); })(A || (A = {})); //// [test.js] var fn; @@ -72,10 +72,10 @@ var B; return { x: 0, y: 0 }; } B.Point = Point; + var Point; (function (Point) { Point.Origin = { x: 0, y: 0 }; - })(B.Point || (B.Point = {})); - var Point = B.Point; + })(Point = B.Point || (B.Point = {})); })(B || (B = {})); var fn; var fn = B.Point; // not expected to be an error. bug 840000: [corelang] Function of fundule not assignalbe as expected diff --git a/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.js b/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.js index 2ce4ea31010..13302ea391a 100644 --- a/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.js +++ b/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.js @@ -33,10 +33,10 @@ var A; //// [module.js] var B; (function (B) { + var Point; (function (Point) { Point.Origin = { x: 0, y: 0 }; - })(B.Point || (B.Point = {})); - var Point = B.Point; + })(Point = B.Point || (B.Point = {})); })(B || (B = {})); //// [test.js] var fn; diff --git a/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.js b/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.js index 00b8384722a..e443596d483 100644 --- a/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.js +++ b/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.js @@ -34,17 +34,18 @@ class A { //// [module.js] var X; (function (X) { + var Y; (function (Y) { + var Point; (function (Point) { Point.Origin = new Point(0, 0); - })(Y.Point || (Y.Point = {})); - var Point = Y.Point; - })(X.Y || (X.Y = {})); - var Y = X.Y; + })(Point = Y.Point || (Y.Point = {})); + })(Y = X.Y || (X.Y = {})); })(X || (X = {})); //// [classPoint.js] var X; (function (X) { + var Y; (function (Y) { // duplicate identifier var Point = (function () { @@ -55,8 +56,7 @@ var X; return Point; })(); Y.Point = Point; - })(X.Y || (X.Y = {})); - var Y = X.Y; + })(Y = X.Y || (X.Y = {})); })(X || (X = {})); //// [simple.js] var A; diff --git a/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.js b/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.js index d70f8dcf0b3..e9b8f44f895 100644 --- a/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.js +++ b/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.js @@ -32,10 +32,10 @@ module B { //// [module.js] var A; (function (A) { + var Point; (function (Point) { Point.Origin = { x: 0, y: 0 }; - })(A.Point || (A.Point = {})); - var Point = A.Point; + })(Point = A.Point || (A.Point = {})); })(A || (A = {})); //// [function.js] var A; @@ -49,10 +49,10 @@ var A; //// [simple.js] var B; (function (B) { + var Point; (function (Point) { Point.Origin = { x: 0, y: 0 }; - })(B.Point || (B.Point = {})); - var Point = B.Point; + })(Point = B.Point || (B.Point = {})); // duplicate identifier error function Point() { return { x: 0, y: 0 }; diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.js b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.js index 20347e54e83..deb2f3aa59d 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.js +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.js @@ -66,7 +66,9 @@ var p; var p; var X; (function (X) { + var Y; (function (Y) { + var Z; (function (Z) { var Line = (function () { function Line() { @@ -74,24 +76,22 @@ var X; return Line; })(); Z.Line = Line; - })(Y.Z || (Y.Z = {})); - var Z = Y.Z; - })(X.Y || (X.Y = {})); - var Y = X.Y; + })(Z = Y.Z || (Y.Z = {})); + })(Y = X.Y || (X.Y = {})); })(X || (X = {})); var X; (function (X) { + var Y; (function (Y) { + var Z; (function (Z) { var Line = (function () { function Line() { } return Line; })(); - })(Y.Z || (Y.Z = {})); - var Z = Y.Z; - })(X.Y || (X.Y = {})); - var Y = X.Y; + })(Z = Y.Z || (Y.Z = {})); + })(Y = X.Y || (X.Y = {})); })(X || (X = {})); // ensure merges as expected var l; diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.js b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.js index c845dbe8705..125a803ff39 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.js +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.js @@ -44,13 +44,13 @@ var p = new A.Utils.Plane(o, { x: 1, y: 1 }); //// [part1.js] var A; (function (A) { + var Utils; (function (Utils) { function mirror(p) { return { x: p.y, y: p.x }; } Utils.mirror = mirror; - })(A.Utils || (A.Utils = {})); - var Utils = A.Utils; + })(Utils = A.Utils || (A.Utils = {})); A.Origin = { x: 0, y: 0 }; })(A || (A = {})); //// [part2.js] @@ -58,6 +58,7 @@ var A; (function (A) { // not a collision, since we don't export var Origin = "0,0"; + var Utils; (function (Utils) { var Plane = (function () { function Plane(tl, br) { @@ -67,8 +68,7 @@ var A; return Plane; })(); Utils.Plane = Plane; - })(A.Utils || (A.Utils = {})); - var Utils = A.Utils; + })(Utils = A.Utils || (A.Utils = {})); })(A || (A = {})); //// [part3.js] // test the merging actually worked diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.js b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.js index 5bcc1473675..d2d5a15bde0 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.js +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.js @@ -54,7 +54,9 @@ var A; })(A || (A = {})); var X; (function (X) { + var Y; (function (Y) { + var Z; (function (Z) { var Line = (function () { function Line() { @@ -62,14 +64,14 @@ var X; return Line; })(); Z.Line = Line; - })(Y.Z || (Y.Z = {})); - var Z = Y.Z; - })(X.Y || (X.Y = {})); - var Y = X.Y; + })(Z = Y.Z || (Y.Z = {})); + })(Y = X.Y || (X.Y = {})); })(X || (X = {})); var X; (function (X) { + var Y; (function (Y) { + var Z; (function (Z) { // expected error var Line = (function () { @@ -78,8 +80,6 @@ var X; return Line; })(); Z.Line = Line; - })(Y.Z || (Y.Z = {})); - var Z = Y.Z; - })(X.Y || (X.Y = {})); - var Y = X.Y; + })(Z = Y.Z || (Y.Z = {})); + })(Y = X.Y || (X.Y = {})); })(X || (X = {})); diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.js b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.js index c629923c131..53b065281fc 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.js +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.js @@ -37,10 +37,10 @@ var l: X.Y.Z.Line; //// [TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.js] var A; (function (A) { + var B; (function (B) { B.x; - })(A.B || (A.B = {})); - var B = A.B; + })(B = A.B || (A.B = {})); })(A || (A = {})); var A; (function (A) { @@ -54,7 +54,9 @@ var x; var x = A.B.x; var X; (function (X) { + var Y; (function (Y) { + var Z; (function (Z) { var Line = (function () { function Line() { @@ -62,13 +64,12 @@ var X; return Line; })(); Z.Line = Line; - })(Y.Z || (Y.Z = {})); - var Z = Y.Z; - })(X.Y || (X.Y = {})); - var Y = X.Y; + })(Z = Y.Z || (Y.Z = {})); + })(Y = X.Y || (X.Y = {})); })(X || (X = {})); var X; (function (X) { + var Y; (function (Y) { var Z; (function (Z) { @@ -79,8 +80,7 @@ var X; })(); Z.Line = Line; })(Z || (Z = {})); - })(X.Y || (X.Y = {})); - var Y = X.Y; + })(Y = X.Y || (X.Y = {})); })(X || (X = {})); // make sure merging works as expected var l; diff --git a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.js b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.js index 3af271ed820..a854dff15c6 100644 --- a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.js +++ b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.js @@ -33,23 +33,25 @@ module otherRoot { //// [part1.js] var Root; (function (Root) { + var A; (function (A) { + var Utils; (function (Utils) { function mirror(p) { return { x: p.y, y: p.x }; } Utils.mirror = mirror; - })(A.Utils || (A.Utils = {})); - var Utils = A.Utils; - })(Root.A || (Root.A = {})); - var A = Root.A; + })(Utils = A.Utils || (A.Utils = {})); + })(A = Root.A || (Root.A = {})); })(Root || (Root = {})); //// [part2.js] var otherRoot; (function (otherRoot) { + var A; (function (A) { // have to be fully qualified since in different root A.Origin = { x: 0, y: 0 }; + var Utils; (function (Utils) { var Plane = (function () { function Plane(tl, br) { @@ -59,8 +61,6 @@ var otherRoot; return Plane; })(); Utils.Plane = Plane; - })(A.Utils || (A.Utils = {})); - var Utils = A.Utils; - })(otherRoot.A || (otherRoot.A = {})); - var A = otherRoot.A; + })(Utils = A.Utils || (A.Utils = {})); + })(A = otherRoot.A || (otherRoot.A = {})); })(otherRoot || (otherRoot = {})); diff --git a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.js b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.js index 07350eba553..82c9afd0787 100644 --- a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.js +++ b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.js @@ -42,18 +42,19 @@ var p = new A.Utils.Plane(o, { x: 1, y: 1 }); //// [part1.js] var A; (function (A) { + var Utils; (function (Utils) { function mirror(p) { return { x: p.y, y: p.x }; } Utils.mirror = mirror; - })(A.Utils || (A.Utils = {})); - var Utils = A.Utils; + })(Utils = A.Utils || (A.Utils = {})); })(A || (A = {})); //// [part2.js] var A; (function (A) { A.Origin = { x: 0, y: 0 }; + var Utils; (function (Utils) { var Plane = (function () { function Plane(tl, br) { @@ -63,8 +64,7 @@ var A; return Plane; })(); Utils.Plane = Plane; - })(A.Utils || (A.Utils = {})); - var Utils = A.Utils; + })(Utils = A.Utils || (A.Utils = {})); })(A || (A = {})); //// [part3.js] // test the merging actually worked diff --git a/tests/baselines/reference/aliasBug.js b/tests/baselines/reference/aliasBug.js index 21c130413ae..870060fc5ed 100644 --- a/tests/baselines/reference/aliasBug.js +++ b/tests/baselines/reference/aliasBug.js @@ -29,7 +29,9 @@ var foo; return Provide; })(); foo.Provide = Provide; + var bar; (function (bar) { + var baz; (function (baz) { var boo = (function () { function boo() { @@ -37,10 +39,8 @@ var foo; return boo; })(); baz.boo = boo; - })(bar.baz || (bar.baz = {})); - var baz = bar.baz; - })(foo.bar || (foo.bar = {})); - var bar = foo.bar; + })(baz = bar.baz || (bar.baz = {})); + })(bar = foo.bar || (foo.bar = {})); })(foo || (foo = {})); var provide = foo; var booz = foo.bar.baz; diff --git a/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.errors.txt b/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.errors.txt new file mode 100644 index 00000000000..ca8ceb6d3ec --- /dev/null +++ b/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.errors.txt @@ -0,0 +1,6 @@ +==== tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts (1 errors) ==== + module M { + export declare module "M" { } + ~~~ +!!! Ambient external modules cannot be nested in other modules. + } \ No newline at end of file diff --git a/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.js b/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.js new file mode 100644 index 00000000000..0d06147e802 --- /dev/null +++ b/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.js @@ -0,0 +1,6 @@ +//// [ambientExternalModuleInsideNonAmbient.ts] +module M { + export declare module "M" { } +} + +//// [ambientExternalModuleInsideNonAmbient.js] diff --git a/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.errors.txt b/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.errors.txt new file mode 100644 index 00000000000..44731cf6250 --- /dev/null +++ b/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.errors.txt @@ -0,0 +1,4 @@ +==== tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts (1 errors) ==== + export declare module "M" { } + ~~~ +!!! Ambient external modules cannot be nested in other modules. \ No newline at end of file diff --git a/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.js b/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.js new file mode 100644 index 00000000000..8a3e15e7c7f --- /dev/null +++ b/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.js @@ -0,0 +1,6 @@ +//// [ambientExternalModuleInsideNonAmbientExternalModule.ts] +export declare module "M" { } + +//// [ambientExternalModuleInsideNonAmbientExternalModule.js] +define(["require", "exports"], function (require, exports) { +}); diff --git a/tests/baselines/reference/ambientExternalModuleMerging.js b/tests/baselines/reference/ambientExternalModuleMerging.js new file mode 100644 index 00000000000..1549b725d67 --- /dev/null +++ b/tests/baselines/reference/ambientExternalModuleMerging.js @@ -0,0 +1,25 @@ +//// [tests/cases/conformance/ambient/ambientExternalModuleMerging.ts] //// + +//// [ambientExternalModuleMerging_use.ts] +import M = require("M"); +// Should be strings +var x = M.x; +var y = M.y; + +//// [ambientExternalModuleMerging_declare.ts] +declare module "M" { + export var x: string; +} + +// Merge +declare module "M" { + export var y: string; +} + +//// [ambientExternalModuleMerging_use.js] +define(["require", "exports", "M"], function (require, exports, M) { + // Should be strings + var x = M.x; + var y = M.y; +}); +//// [ambientExternalModuleMerging_declare.js] diff --git a/tests/baselines/reference/ambientExternalModuleMerging.types b/tests/baselines/reference/ambientExternalModuleMerging.types new file mode 100644 index 00000000000..1c1be0fd256 --- /dev/null +++ b/tests/baselines/reference/ambientExternalModuleMerging.types @@ -0,0 +1,28 @@ +=== tests/cases/conformance/ambient/ambientExternalModuleMerging_use.ts === +import M = require("M"); +>M : typeof M + +// Should be strings +var x = M.x; +>x : string +>M.x : string +>M : typeof M +>x : string + +var y = M.y; +>y : string +>M.y : string +>M : typeof M +>y : string + +=== tests/cases/conformance/ambient/ambientExternalModuleMerging_declare.ts === +declare module "M" { + export var x: string; +>x : string +} + +// Merge +declare module "M" { + export var y: string; +>y : string +} diff --git a/tests/baselines/reference/ambientInsideNonAmbient.js b/tests/baselines/reference/ambientInsideNonAmbient.js new file mode 100644 index 00000000000..9a3c5558e07 --- /dev/null +++ b/tests/baselines/reference/ambientInsideNonAmbient.js @@ -0,0 +1,24 @@ +//// [ambientInsideNonAmbient.ts] +module M { + export declare var x; + export declare function f(); + export declare class C { } + export declare enum E { } + export declare module M { } +} + +module M2 { + declare var x; + declare function f(); + declare class C { } + declare enum E { } + declare module M { } +} + +//// [ambientInsideNonAmbient.js] +var M; +(function (M) { +})(M || (M = {})); +var M2; +(function (M2) { +})(M2 || (M2 = {})); diff --git a/tests/baselines/reference/ambientInsideNonAmbient.types b/tests/baselines/reference/ambientInsideNonAmbient.types new file mode 100644 index 00000000000..ee654aee333 --- /dev/null +++ b/tests/baselines/reference/ambientInsideNonAmbient.types @@ -0,0 +1,38 @@ +=== tests/cases/conformance/ambient/ambientInsideNonAmbient.ts === +module M { +>M : typeof M + + export declare var x; +>x : any + + export declare function f(); +>f : () => any + + export declare class C { } +>C : C + + export declare enum E { } +>E : E + + export declare module M { } +>M : unknown +} + +module M2 { +>M2 : typeof M2 + + declare var x; +>x : any + + declare function f(); +>f : () => any + + declare class C { } +>C : C + + declare enum E { } +>E : E + + declare module M { } +>M : unknown +} diff --git a/tests/baselines/reference/ambientInsideNonAmbientExternalModule.js b/tests/baselines/reference/ambientInsideNonAmbientExternalModule.js new file mode 100644 index 00000000000..5db44bb1ce1 --- /dev/null +++ b/tests/baselines/reference/ambientInsideNonAmbientExternalModule.js @@ -0,0 +1,10 @@ +//// [ambientInsideNonAmbientExternalModule.ts] +export declare var x; +export declare function f(); +export declare class C { } +export declare enum E { } +export declare module M { } + +//// [ambientInsideNonAmbientExternalModule.js] +define(["require", "exports"], function (require, exports) { +}); diff --git a/tests/baselines/reference/ambientInsideNonAmbientExternalModule.types b/tests/baselines/reference/ambientInsideNonAmbientExternalModule.types new file mode 100644 index 00000000000..bda7a61a7f3 --- /dev/null +++ b/tests/baselines/reference/ambientInsideNonAmbientExternalModule.types @@ -0,0 +1,16 @@ +=== tests/cases/conformance/ambient/ambientInsideNonAmbientExternalModule.ts === +export declare var x; +>x : any + +export declare function f(); +>f : () => any + +export declare class C { } +>C : C + +export declare enum E { } +>E : E + +export declare module M { } +>M : unknown + diff --git a/tests/baselines/reference/arrayBestCommonTypes.types b/tests/baselines/reference/arrayBestCommonTypes.types index 40f74350fe5..a0f407358c3 100644 --- a/tests/baselines/reference/arrayBestCommonTypes.types +++ b/tests/baselines/reference/arrayBestCommonTypes.types @@ -222,7 +222,7 @@ class f { >base : base >[ { x: undefined, y: new base() }, { x: '', y: new derived() } ] : { x: string; y: base; }[] >{ x: undefined, y: new base() } : { x: undefined; y: base; } ->x : any +>x : undefined >undefined : undefined >y : base >new base() : base diff --git a/tests/baselines/reference/arrayCast.errors.txt b/tests/baselines/reference/arrayCast.errors.txt index f081e0008d9..509ee2110b7 100644 --- a/tests/baselines/reference/arrayCast.errors.txt +++ b/tests/baselines/reference/arrayCast.errors.txt @@ -3,8 +3,9 @@ // has type { foo: string }[], which is not assignable to { id: number }[]. <{ id: number; }[]>[{ foo: "s" }]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Neither type '{ id: number; }[]' nor type '{ foo: string; }[]' is assignable to the other: -!!! Type '{ id: number; }' is not assignable to type '{ foo: string; }'. +!!! Neither type '{ foo: string; }[]' nor type '{ id: number; }[]' is assignable to the other: +!!! Type '{ foo: string; }' is not assignable to type '{ id: number; }': +!!! Property 'id' is missing in type '{ foo: string; }'. // Should succeed, as the {} element causes the type of the array to be {}[] <{ id: number; }[]>[{ foo: "s" }, {}]; \ No newline at end of file diff --git a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.js b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.js index cd687a41db9..b0dbe782d08 100644 --- a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.js +++ b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.js @@ -91,10 +91,10 @@ M = { y: 3 }; // Error (M) = { y: 3 }; // Error var M2; (function (M2) { + var M3; (function (M3) { M3.x; - })(M2.M3 || (M2.M3 = {})); - var M3 = M2.M3; + })(M3 = M2.M3 || (M2.M3 = {})); M3 = { x: 3 }; // Error })(M2 || (M2 = {})); M2.M3 = { x: 3 }; // OK diff --git a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.errors.txt b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.errors.txt index 19824374ebd..4222ab54b15 100644 --- a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.errors.txt +++ b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.errors.txt @@ -1,4 +1,4 @@ -==== tests/cases/compiler/augmentedTypeAssignmentCompatIndexSignature.ts (2 errors) ==== +==== tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts (2 errors) ==== interface Foo { a } interface Bar { b } diff --git a/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.types b/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.types index d02a36409a7..4e6b51730da 100644 --- a/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.types +++ b/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/augmentedTypeBracketAccessIndexSignature.ts === +=== tests/cases/conformance/types/members/augmentedTypeBracketAccessIndexSignature.ts === interface Foo { a } >Foo : Foo >a : any diff --git a/tests/baselines/reference/chainedImportAlias.js b/tests/baselines/reference/chainedImportAlias.js index 6149105bce0..f2b3c6c6cff 100644 --- a/tests/baselines/reference/chainedImportAlias.js +++ b/tests/baselines/reference/chainedImportAlias.js @@ -12,12 +12,12 @@ y.m.foo(); //// [chainedImportAlias_file0.js] +var m; (function (m) { function foo() { } m.foo = foo; -})(exports.m || (exports.m = {})); -var m = exports.m; +})(m = exports.m || (exports.m = {})); //// [chainedImportAlias_file1.js] var x = require('chainedImportAlias_file0'); var y = x; diff --git a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js index bdc4e3c17eb..c2bd2f09cf2 100644 --- a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js +++ b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js @@ -26,10 +26,10 @@ var M; return N; })(); M.N = N; + var N; (function (N) { N.v = 0; - })(M.N || (M.N = {})); - var N = M.N; + })(N = M.N || (M.N = {})); })(M || (M = {})); var M; (function (M) { diff --git a/tests/baselines/reference/classDoesNotDependOnPrivateMember.js b/tests/baselines/reference/classDoesNotDependOnPrivateMember.js new file mode 100644 index 00000000000..548c94b0ea7 --- /dev/null +++ b/tests/baselines/reference/classDoesNotDependOnPrivateMember.js @@ -0,0 +1,26 @@ +//// [classDoesNotDependOnPrivateMember.ts] +module M { + interface I { } + export class C { + private x: I; + } +} + +//// [classDoesNotDependOnPrivateMember.js] +var M; +(function (M) { + var C = (function () { + function C() { + } + return C; + })(); + M.C = C; +})(M || (M = {})); + + +//// [classDoesNotDependOnPrivateMember.d.ts] +declare module M { + class C { + private x; + } +} diff --git a/tests/baselines/reference/classDoesNotDependOnPrivateMember.types b/tests/baselines/reference/classDoesNotDependOnPrivateMember.types new file mode 100644 index 00000000000..213c46ca1d5 --- /dev/null +++ b/tests/baselines/reference/classDoesNotDependOnPrivateMember.types @@ -0,0 +1,15 @@ +=== tests/cases/conformance/declarationEmit/classDoesNotDependOnPrivateMember.ts === +module M { +>M : typeof M + + interface I { } +>I : I + + export class C { +>C : C + + private x: I; +>x : I +>I : I + } +} diff --git a/tests/baselines/reference/cloduleAcrossModuleDefinitions.js b/tests/baselines/reference/cloduleAcrossModuleDefinitions.js index 9f2a55a9ea2..9772af20434 100644 --- a/tests/baselines/reference/cloduleAcrossModuleDefinitions.js +++ b/tests/baselines/reference/cloduleAcrossModuleDefinitions.js @@ -31,9 +31,9 @@ var A; })(A || (A = {})); var A; (function (A) { + var B; (function (B) { B.x = 1; - })(A.B || (A.B = {})); - var B = A.B; + })(B = A.B || (A.B = {})); })(A || (A = {})); var b; // ok diff --git a/tests/baselines/reference/cloduleWithRecursiveReference.js b/tests/baselines/reference/cloduleWithRecursiveReference.js index 00f58260814..1b8a91b3c68 100644 --- a/tests/baselines/reference/cloduleWithRecursiveReference.js +++ b/tests/baselines/reference/cloduleWithRecursiveReference.js @@ -16,8 +16,8 @@ var M; return C; })(); M.C = C; + var C; (function (_C) { _C.C = M.C; - })(M.C || (M.C = {})); - var C = M.C; + })(C = M.C || (M.C = {})); })(M || (M = {})); diff --git a/tests/baselines/reference/clodulesDerivedClasses.js b/tests/baselines/reference/clodulesDerivedClasses.js index ada2d7475cd..f249a7d5589 100644 --- a/tests/baselines/reference/clodulesDerivedClasses.js +++ b/tests/baselines/reference/clodulesDerivedClasses.js @@ -36,13 +36,13 @@ var Shape = (function () { })(); var Shape; (function (Shape) { + var Utils; (function (Utils) { function convert() { return null; } Utils.convert = convert; - })(Shape.Utils || (Shape.Utils = {})); - var Utils = Shape.Utils; + })(Utils = Shape.Utils || (Shape.Utils = {})); })(Shape || (Shape = {})); var Path = (function (_super) { __extends(Path, _super); @@ -53,11 +53,11 @@ var Path = (function (_super) { })(Shape); var Path; (function (Path) { + var Utils; (function (Utils) { function convert2() { return null; } Utils.convert2 = convert2; - })(Path.Utils || (Path.Utils = {})); - var Utils = Path.Utils; + })(Utils = Path.Utils || (Path.Utils = {})); })(Path || (Path = {})); diff --git a/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.js b/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.js index a4c2a39c8f5..07d23016fe6 100644 --- a/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.js +++ b/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.js @@ -24,6 +24,7 @@ module m2 { //// [collisionExportsRequireAndInternalModuleAlias.js] define(["require", "exports"], function (require, exports) { + var m; (function (m) { var c = (function () { function c() { @@ -31,8 +32,7 @@ define(["require", "exports"], function (require, exports) { return c; })(); m.c = c; - })(exports.m || (exports.m = {})); - var m = exports.m; + })(m = exports.m || (exports.m = {})); var exports = m.c; var require = m.c; new exports(); diff --git a/tests/baselines/reference/collisionExportsRequireAndModule.js b/tests/baselines/reference/collisionExportsRequireAndModule.js index 76e170b18d1..112a84bc3e8 100644 --- a/tests/baselines/reference/collisionExportsRequireAndModule.js +++ b/tests/baselines/reference/collisionExportsRequireAndModule.js @@ -93,6 +93,7 @@ module m4 { //// [collisionExportsRequireAndModule_externalmodule.js] define(["require", "exports"], function (require, exports) { + var require; (function (require) { var C = (function () { function C() { @@ -100,12 +101,12 @@ define(["require", "exports"], function (require, exports) { return C; })(); require.C = C; - })(exports.require || (exports.require = {})); - var require = exports.require; + })(require = exports.require || (exports.require = {})); function foo() { return null; } exports.foo = foo; + var exports; (function (exports) { var C = (function () { function C() { @@ -113,8 +114,7 @@ define(["require", "exports"], function (require, exports) { return C; })(); exports.C = C; - })(exports.exports || (exports.exports = {})); - var exports = exports.exports; + })(exports = exports.exports || (exports.exports = {})); function foo2() { return null; } @@ -142,6 +142,7 @@ define(["require", "exports"], function (require, exports) { })(m1 || (m1 = {})); var m2; (function (m2) { + var require; (function (require) { var C = (function () { function C() { @@ -149,8 +150,8 @@ define(["require", "exports"], function (require, exports) { return C; })(); require.C = C; - })(m2.require || (m2.require = {})); - var require = m2.require; + })(require = m2.require || (m2.require = {})); + var exports; (function (exports) { var C = (function () { function C() { @@ -158,8 +159,7 @@ define(["require", "exports"], function (require, exports) { return C; })(); exports.C = C; - })(m2.exports || (m2.exports = {})); - var exports = m2.exports; + })(exports = m2.exports || (m2.exports = {})); })(m2 || (m2 = {})); }); //// [collisionExportsRequireAndModule_globalFile.js] @@ -204,6 +204,7 @@ var m3; })(m3 || (m3 = {})); var m4; (function (m4) { + var require; (function (require) { var C = (function () { function C() { @@ -211,8 +212,8 @@ var m4; return C; })(); require.C = C; - })(m4.require || (m4.require = {})); - var require = m4.require; + })(require = m4.require || (m4.require = {})); + var exports; (function (exports) { var C = (function () { function C() { @@ -220,6 +221,5 @@ var m4; return C; })(); exports.C = C; - })(m4.exports || (m4.exports = {})); - var exports = m4.exports; + })(exports = m4.exports || (m4.exports = {})); })(m4 || (m4 = {})); diff --git a/tests/baselines/reference/commentsClassMembers.js b/tests/baselines/reference/commentsClassMembers.js index a0cf8f2b631..298991c2eef 100644 --- a/tests/baselines/reference/commentsClassMembers.js +++ b/tests/baselines/reference/commentsClassMembers.js @@ -557,11 +557,11 @@ declare var i1_ncf: (b: number) => number; declare var i1_ncr: number; declare var i1_ncprop: number; declare var i1_s_p: number; -declare var i1_s_f: typeof s2; +declare var i1_s_f: typeof c1.s2; declare var i1_s_r: number; declare var i1_s_prop: number; declare var i1_s_nc_p: number; -declare var i1_s_ncf: typeof nc_s2; +declare var i1_s_ncf: typeof c1.nc_s2; declare var i1_s_ncr: number; declare var i1_s_ncprop: number; declare var i1_c: typeof c1; @@ -577,111 +577,3 @@ declare class cProperties { private y; } declare var cProperties_i: cProperties; - - -//// [DtsFileErrors] - - -==== tests/cases/compiler/commentsClassMembers.d.ts (2 errors) ==== - /** This is comment for c1*/ - declare class c1 { - /** p1 is property of c1*/ - p1: number; - /** sum with property*/ - p2(/** number to add*/ b: number): number; - /** getter property*/ - /** setter property*/ - p3: number; - /** pp1 is property of c1*/ - private pp1; - /** sum with property*/ - private pp2(/** number to add*/ b); - /** getter property*/ - /** setter property*/ - private pp3; - /** Constructor method*/ - constructor(); - /** s1 is static property of c1*/ - static s1: number; - /** static sum with property*/ - static s2(/** number to add*/ b: number): number; - /** static getter property*/ - /** setter property*/ - static s3: number; - nc_p1: number; - nc_p2(b: number): number; - nc_p3: number; - private nc_pp1; - private nc_pp2(b); - private nc_pp3; - static nc_s1: number; - static nc_s2(b: number): number; - static nc_s3: number; - a_p1: number; - a_p2(b: number): number; - a_p3: number; - private a_pp1; - private a_pp2(b); - private a_pp3; - static a_s1: number; - static a_s2(b: number): number; - static a_s3: number; - /** p1 is property of c1 */ - b_p1: number; - /** sum with property */ - b_p2(b: number): number; - /** getter property */ - /** setter property */ - b_p3: number; - /** pp1 is property of c1 */ - private b_pp1; - /** sum with property */ - private b_pp2(b); - /** getter property */ - /** setter property */ - private b_pp3; - /** s1 is static property of c1 */ - static b_s1: number; - /** static sum with property */ - static b_s2(b: number): number; - /** static getter property - */ - /** setter property - */ - static b_s3: number; - } - declare var i1: c1; - declare var i1_p: number; - declare var i1_f: (b: number) => number; - declare var i1_r: number; - declare var i1_prop: number; - declare var i1_nc_p: number; - declare var i1_ncf: (b: number) => number; - declare var i1_ncr: number; - declare var i1_ncprop: number; - declare var i1_s_p: number; - declare var i1_s_f: typeof s2; - ~~ -!!! Cannot find name 's2'. - declare var i1_s_r: number; - declare var i1_s_prop: number; - declare var i1_s_nc_p: number; - declare var i1_s_ncf: typeof nc_s2; - ~~~~~ -!!! Cannot find name 'nc_s2'. - declare var i1_s_ncr: number; - declare var i1_s_ncprop: number; - declare var i1_c: typeof c1; - declare class cProperties { - private val; - /** getter only property*/ - p1: number; - nc_p1: number; - /**setter only property*/ - p2: number; - nc_p2: number; - x: number; - private y; - } - declare var cProperties_i: cProperties; - \ No newline at end of file diff --git a/tests/baselines/reference/commentsDottedModuleName.js b/tests/baselines/reference/commentsDottedModuleName.js index 7044a244279..b727d8afa72 100644 --- a/tests/baselines/reference/commentsDottedModuleName.js +++ b/tests/baselines/reference/commentsDottedModuleName.js @@ -10,7 +10,9 @@ export module outerModule.InnerModule { //// [commentsDottedModuleName.js] define(["require", "exports"], function (require, exports) { /** this is multi declare module*/ + var outerModule; (function (outerModule) { + var InnerModule; (function (InnerModule) { /// class b comment var b = (function () { @@ -19,10 +21,8 @@ define(["require", "exports"], function (require, exports) { return b; })(); InnerModule.b = b; - })(outerModule.InnerModule || (outerModule.InnerModule = {})); - var InnerModule = outerModule.InnerModule; - })(exports.outerModule || (exports.outerModule = {})); - var outerModule = exports.outerModule; + })(InnerModule = outerModule.InnerModule || (outerModule.InnerModule = {})); + })(outerModule = exports.outerModule || (exports.outerModule = {})); }); diff --git a/tests/baselines/reference/commentsExternalModules.js b/tests/baselines/reference/commentsExternalModules.js index d4a0094e049..7f1193c7d1d 100644 --- a/tests/baselines/reference/commentsExternalModules.js +++ b/tests/baselines/reference/commentsExternalModules.js @@ -64,6 +64,7 @@ var newVar2 = new extMod.m4.m2.c(); //// [commentsExternalModules_0.js] define(["require", "exports"], function (require, exports) { /** Module comment*/ + var m1; (function (m1) { /** b's comment*/ m1.b; @@ -72,6 +73,7 @@ define(["require", "exports"], function (require, exports) { return m1.b; } /** m2 comments*/ + var m2; (function (m2) { /** class comment;*/ var c = (function () { @@ -83,18 +85,17 @@ define(["require", "exports"], function (require, exports) { ; /** i*/ m2.i = new c(); - })(m1.m2 || (m1.m2 = {})); - var m2 = m1.m2; + })(m2 = m1.m2 || (m1.m2 = {})); /** exported function*/ function fooExport() { return foo(); } m1.fooExport = fooExport; - })(exports.m1 || (exports.m1 = {})); - var m1 = exports.m1; + })(m1 = exports.m1 || (exports.m1 = {})); m1.fooExport(); var myvar = new m1.m2.c(); /** Module comment */ + var m4; (function (m4) { /** b's comment */ m4.b; @@ -105,6 +106,7 @@ define(["require", "exports"], function (require, exports) { } /** m2 comments */ + var m2; (function (m2) { /** class comment; */ var c = (function () { @@ -116,15 +118,13 @@ define(["require", "exports"], function (require, exports) { ; /** i */ m2.i = new c(); - })(m4.m2 || (m4.m2 = {})); - var m2 = m4.m2; + })(m2 = m4.m2 || (m4.m2 = {})); /** exported function */ function fooExport() { return foo(); } m4.fooExport = fooExport; - })(exports.m4 || (exports.m4 = {})); - var m4 = exports.m4; + })(m4 = exports.m4 || (exports.m4 = {})); m4.fooExport(); var myvar2 = new m4.m2.c(); }); diff --git a/tests/baselines/reference/commentsExternalModules2.js b/tests/baselines/reference/commentsExternalModules2.js index ab2db534e14..cba04c8cc02 100644 --- a/tests/baselines/reference/commentsExternalModules2.js +++ b/tests/baselines/reference/commentsExternalModules2.js @@ -64,6 +64,7 @@ export var newVar2 = new extMod.m4.m2.c(); //// [commentsExternalModules2_0.js] define(["require", "exports"], function (require, exports) { /** Module comment*/ + var m1; (function (m1) { /** b's comment*/ m1.b; @@ -72,6 +73,7 @@ define(["require", "exports"], function (require, exports) { return m1.b; } /** m2 comments*/ + var m2; (function (m2) { /** class comment;*/ var c = (function () { @@ -83,18 +85,17 @@ define(["require", "exports"], function (require, exports) { ; /** i*/ m2.i = new c(); - })(m1.m2 || (m1.m2 = {})); - var m2 = m1.m2; + })(m2 = m1.m2 || (m1.m2 = {})); /** exported function*/ function fooExport() { return foo(); } m1.fooExport = fooExport; - })(exports.m1 || (exports.m1 = {})); - var m1 = exports.m1; + })(m1 = exports.m1 || (exports.m1 = {})); m1.fooExport(); var myvar = new m1.m2.c(); /** Module comment */ + var m4; (function (m4) { /** b's comment */ m4.b; @@ -105,6 +106,7 @@ define(["require", "exports"], function (require, exports) { } /** m2 comments */ + var m2; (function (m2) { /** class comment; */ var c = (function () { @@ -116,15 +118,13 @@ define(["require", "exports"], function (require, exports) { ; /** i */ m2.i = new c(); - })(m4.m2 || (m4.m2 = {})); - var m2 = m4.m2; + })(m2 = m4.m2 || (m4.m2 = {})); /** exported function */ function fooExport() { return foo(); } m4.fooExport = fooExport; - })(exports.m4 || (exports.m4 = {})); - var m4 = exports.m4; + })(m4 = exports.m4 || (exports.m4 = {})); m4.fooExport(); var myvar2 = new m4.m2.c(); }); diff --git a/tests/baselines/reference/commentsExternalModules3.js b/tests/baselines/reference/commentsExternalModules3.js index afade653a6f..ff384507b79 100644 --- a/tests/baselines/reference/commentsExternalModules3.js +++ b/tests/baselines/reference/commentsExternalModules3.js @@ -63,6 +63,7 @@ export var newVar2 = new extMod.m4.m2.c(); //// [commentsExternalModules2_0.js] /** Module comment*/ +var m1; (function (m1) { /** b's comment*/ m1.b; @@ -71,6 +72,7 @@ export var newVar2 = new extMod.m4.m2.c(); return m1.b; } /** m2 comments*/ + var m2; (function (m2) { /** class comment;*/ var c = (function () { @@ -82,18 +84,17 @@ export var newVar2 = new extMod.m4.m2.c(); ; /** i*/ m2.i = new c(); - })(m1.m2 || (m1.m2 = {})); - var m2 = m1.m2; + })(m2 = m1.m2 || (m1.m2 = {})); /** exported function*/ function fooExport() { return foo(); } m1.fooExport = fooExport; -})(exports.m1 || (exports.m1 = {})); -var m1 = exports.m1; +})(m1 = exports.m1 || (exports.m1 = {})); m1.fooExport(); var myvar = new m1.m2.c(); /** Module comment */ +var m4; (function (m4) { /** b's comment */ m4.b; @@ -104,6 +105,7 @@ var myvar = new m1.m2.c(); } /** m2 comments */ + var m2; (function (m2) { /** class comment; */ var c = (function () { @@ -115,15 +117,13 @@ var myvar = new m1.m2.c(); ; /** i */ m2.i = new c(); - })(m4.m2 || (m4.m2 = {})); - var m2 = m4.m2; + })(m2 = m4.m2 || (m4.m2 = {})); /** exported function */ function fooExport() { return foo(); } m4.fooExport = fooExport; -})(exports.m4 || (exports.m4 = {})); -var m4 = exports.m4; +})(m4 = exports.m4 || (exports.m4 = {})); m4.fooExport(); var myvar2 = new m4.m2.c(); //// [commentsExternalModules_1.js] diff --git a/tests/baselines/reference/commentsModules.js b/tests/baselines/reference/commentsModules.js index f964c45f843..7607e6e050c 100644 --- a/tests/baselines/reference/commentsModules.js +++ b/tests/baselines/reference/commentsModules.js @@ -108,6 +108,7 @@ var m1; return m1.b; } /** m2 comments*/ + var m2; (function (m2) { /** class comment;*/ var c = (function () { @@ -119,8 +120,7 @@ var m1; ; /** i*/ m2.i = new c(); - })(m1.m2 || (m1.m2 = {})); - var m2 = m1.m2; + })(m2 = m1.m2 || (m1.m2 = {})); /** exported function*/ function fooExport() { return foo(); @@ -147,6 +147,7 @@ var myvar = new m1.m2.c(); /** module comment of m2.m3*/ var m2; (function (m2) { + var m3; (function (m3) { /** Exported class comment*/ var c = (function () { @@ -155,14 +156,15 @@ var m2; return c; })(); m3.c = c; - })(m2.m3 || (m2.m3 = {})); - var m3 = m2.m3; + })(m3 = m2.m3 || (m2.m3 = {})); })(m2 || (m2 = {})); /* trailing dotted module comment*/ new m2.m3.c(); /** module comment of m3.m4.m5*/ var m3; (function (m3) { + var m4; (function (m4) { + var m5; (function (m5) { /** Exported class comment*/ var c = (function () { @@ -171,17 +173,18 @@ var m3; return c; })(); m5.c = c; - })(m4.m5 || (m4.m5 = {})); - var m5 = m4.m5; - })(m3.m4 || (m3.m4 = {})); - var m4 = m3.m4; + })(m5 = m4.m5 || (m4.m5 = {})); + })(m4 = m3.m4 || (m3.m4 = {})); })(m3 || (m3 = {})); // trailing dotted module 2 new m3.m4.m5.c(); /** module comment of m4.m5.m6*/ var m4; (function (m4) { + var m5; (function (m5) { + var m6; (function (m6) { + var m7; (function (m7) { /** Exported class comment*/ var c = (function () { @@ -190,20 +193,20 @@ var m4; return c; })(); m7.c = c; - })(m6.m7 || (m6.m7 = {})); - var m7 = m6.m7; /* trailing inner module */ /* multiple comments*/ - })(m5.m6 || (m5.m6 = {})); - var m6 = m5.m6; - })(m4.m5 || (m4.m5 = {})); - var m5 = m4.m5; + })(m7 = m6.m7 || (m6.m7 = {})); /* trailing inner module */ /* multiple comments*/ + })(m6 = m5.m6 || (m5.m6 = {})); + })(m5 = m4.m5 || (m4.m5 = {})); })(m4 || (m4 = {})); new m4.m5.m6.m7.c(); /** module comment of m5.m6.m7*/ var m5; (function (m5) { + var m6; (function (m6) { + var m7; (function (m7) { /** module m8 comment*/ + var m8; (function (m8) { /** Exported class comment*/ var c = (function () { @@ -212,17 +215,16 @@ var m5; return c; })(); m8.c = c; - })(m7.m8 || (m7.m8 = {})); - var m8 = m7.m8; - })(m6.m7 || (m6.m7 = {})); - var m7 = m6.m7; - })(m5.m6 || (m5.m6 = {})); - var m6 = m5.m6; + })(m8 = m7.m8 || (m7.m8 = {})); + })(m7 = m6.m7 || (m6.m7 = {})); + })(m6 = m5.m6 || (m5.m6 = {})); })(m5 || (m5 = {})); new m5.m6.m7.m8.c(); var m6; (function (m6) { + var m7; (function (m7) { + var m8; (function (m8) { /** Exported class comment*/ var c = (function () { @@ -231,16 +233,16 @@ var m6; return c; })(); m8.c = c; - })(m7.m8 || (m7.m8 = {})); - var m8 = m7.m8; - })(m6.m7 || (m6.m7 = {})); - var m7 = m6.m7; + })(m8 = m7.m8 || (m7.m8 = {})); + })(m7 = m6.m7 || (m6.m7 = {})); })(m6 || (m6 = {})); new m6.m7.m8.c(); var m7; (function (m7) { + var m8; (function (m8) { /** module m9 comment*/ + var m9; (function (m9) { /** Exported class comment*/ var c = (function () { @@ -262,10 +264,8 @@ var m7; return e; })(); m9.e = e; - })(m8.m9 || (m8.m9 = {})); - var m9 = m8.m9; - })(m7.m8 || (m7.m8 = {})); - var m8 = m7.m8; + })(m9 = m8.m9 || (m8.m9 = {})); + })(m8 = m7.m8 || (m7.m8 = {})); })(m7 || (m7 = {})); new m7.m8.m9.c(); diff --git a/tests/baselines/reference/commentsMultiModuleMultiFile.js b/tests/baselines/reference/commentsMultiModuleMultiFile.js index 2c0cf2b837e..3201c256256 100644 --- a/tests/baselines/reference/commentsMultiModuleMultiFile.js +++ b/tests/baselines/reference/commentsMultiModuleMultiFile.js @@ -39,6 +39,7 @@ new multiM.d(); //// [commentsMultiModuleMultiFile_0.js] define(["require", "exports"], function (require, exports) { /** this is multi declare module*/ + var multiM; (function (multiM) { /// class b comment var b = (function () { @@ -47,9 +48,9 @@ define(["require", "exports"], function (require, exports) { return b; })(); multiM.b = b; - })(exports.multiM || (exports.multiM = {})); - var multiM = exports.multiM; + })(multiM = exports.multiM || (exports.multiM = {})); /** thi is multi module 2*/ + var multiM; (function (multiM) { /** class c comment*/ var c = (function () { @@ -65,14 +66,14 @@ define(["require", "exports"], function (require, exports) { return e; })(); multiM.e = e; - })(exports.multiM || (exports.multiM = {})); - var multiM = exports.multiM; + })(multiM = exports.multiM || (exports.multiM = {})); new multiM.b(); new multiM.c(); }); //// [commentsMultiModuleMultiFile_1.js] define(["require", "exports"], function (require, exports) { /** this is multi module 3 comment*/ + var multiM; (function (multiM) { /** class d comment*/ var d = (function () { @@ -88,8 +89,7 @@ define(["require", "exports"], function (require, exports) { return f; })(); multiM.f = f; - })(exports.multiM || (exports.multiM = {})); - var multiM = exports.multiM; + })(multiM = exports.multiM || (exports.multiM = {})); new multiM.d(); }); diff --git a/tests/baselines/reference/contextualTyping39.errors.txt b/tests/baselines/reference/contextualTyping39.errors.txt index c0907b8fe7b..10be2415329 100644 --- a/tests/baselines/reference/contextualTyping39.errors.txt +++ b/tests/baselines/reference/contextualTyping39.errors.txt @@ -1,4 +1,5 @@ ==== tests/cases/compiler/contextualTyping39.ts (1 errors) ==== var foo = <{ (): number; }> function() { return "err"; }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Neither type '() => number' nor type '() => string' is assignable to the other. \ No newline at end of file +!!! Neither type '() => string' nor type '() => number' is assignable to the other: +!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping41.errors.txt b/tests/baselines/reference/contextualTyping41.errors.txt index d74e45f8a08..6e95b0092ca 100644 --- a/tests/baselines/reference/contextualTyping41.errors.txt +++ b/tests/baselines/reference/contextualTyping41.errors.txt @@ -1,4 +1,5 @@ ==== tests/cases/compiler/contextualTyping41.ts (1 errors) ==== var foo = <{():number; (i:number):number; }> (function(){return "err";}); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Neither type '{ (): number; (i: number): number; }' nor type '() => string' is assignable to the other. \ No newline at end of file +!!! Neither type '() => string' nor type '{ (): number; (i: number): number; }' is assignable to the other: +!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/contextuallyTypedFunctionExpressionsAndReturnAnnotations.js b/tests/baselines/reference/contextuallyTypedFunctionExpressionsAndReturnAnnotations.js new file mode 100644 index 00000000000..05bf5937039 --- /dev/null +++ b/tests/baselines/reference/contextuallyTypedFunctionExpressionsAndReturnAnnotations.js @@ -0,0 +1,28 @@ +//// [contextuallyTypedFunctionExpressionsAndReturnAnnotations.ts] +declare function foo(x: (y: string) => (y2: number) => void); + +// Contextually type the parameter even if there is a return annotation +foo((y): (y2: number) => void => { + var z = y.charAt(0); // Should be string + return null; +}); + +foo((y: string) => { + return y2 => { + var z = y2.toFixed(); // Should be string + return 0; + }; +}); + +//// [contextuallyTypedFunctionExpressionsAndReturnAnnotations.js] +// Contextually type the parameter even if there is a return annotation +foo(function (y) { + var z = y.charAt(0); // Should be string + return null; +}); +foo(function (y) { + return function (y2) { + var z = y2.toFixed(); // Should be string + return 0; + }; +}); diff --git a/tests/baselines/reference/contextuallyTypedFunctionExpressionsAndReturnAnnotations.types b/tests/baselines/reference/contextuallyTypedFunctionExpressionsAndReturnAnnotations.types new file mode 100644 index 00000000000..09c317c64a0 --- /dev/null +++ b/tests/baselines/reference/contextuallyTypedFunctionExpressionsAndReturnAnnotations.types @@ -0,0 +1,45 @@ +=== tests/cases/conformance/expressions/functions/contextuallyTypedFunctionExpressionsAndReturnAnnotations.ts === +declare function foo(x: (y: string) => (y2: number) => void); +>foo : (x: (y: string) => (y2: number) => void) => any +>x : (y: string) => (y2: number) => void +>y : string +>y2 : number + +// Contextually type the parameter even if there is a return annotation +foo((y): (y2: number) => void => { +>foo((y): (y2: number) => void => { var z = y.charAt(0); // Should be string return null;}) : any +>foo : (x: (y: string) => (y2: number) => void) => any +>(y): (y2: number) => void => { var z = y.charAt(0); // Should be string return null;} : (y: string) => (y2: number) => void +>y : string +>y2 : number + + var z = y.charAt(0); // Should be string +>z : string +>y.charAt(0) : string +>y.charAt : (pos: number) => string +>y : string +>charAt : (pos: number) => string + + return null; +}); + +foo((y: string) => { +>foo((y: string) => { return y2 => { var z = y2.toFixed(); // Should be string return 0; };}) : any +>foo : (x: (y: string) => (y2: number) => void) => any +>(y: string) => { return y2 => { var z = y2.toFixed(); // Should be string return 0; };} : (y: string) => (y2: number) => number +>y : string + + return y2 => { +>y2 => { var z = y2.toFixed(); // Should be string return 0; } : (y2: number) => number +>y2 : number + + var z = y2.toFixed(); // Should be string +>z : string +>y2.toFixed() : string +>y2.toFixed : (fractionDigits?: number) => string +>y2 : number +>toFixed : (fractionDigits?: number) => string + + return 0; + }; +}); diff --git a/tests/baselines/reference/crashRegressionTest.js b/tests/baselines/reference/crashRegressionTest.js index cd4cc40d553..6b8067df83c 100644 --- a/tests/baselines/reference/crashRegressionTest.js +++ b/tests/baselines/reference/crashRegressionTest.js @@ -28,7 +28,9 @@ module MsPortal.Util.TemplateEngine { //// [crashRegressionTest.js] var MsPortal; (function (MsPortal) { + var Util; (function (Util) { + var TemplateEngine; (function (TemplateEngine) { "use strict"; var StringTemplate = (function () { @@ -48,8 +50,6 @@ var MsPortal; return TemplateStorage; })(); TemplateEngine.TemplateStorage = TemplateStorage; - })(Util.TemplateEngine || (Util.TemplateEngine = {})); - var TemplateEngine = Util.TemplateEngine; - })(MsPortal.Util || (MsPortal.Util = {})); - var Util = MsPortal.Util; + })(TemplateEngine = Util.TemplateEngine || (Util.TemplateEngine = {})); + })(Util = MsPortal.Util || (MsPortal.Util = {})); })(MsPortal || (MsPortal = {})); diff --git a/tests/baselines/reference/declFileExportImportChain.js b/tests/baselines/reference/declFileExportImportChain.js index bac4bdadbda..547189948c9 100644 --- a/tests/baselines/reference/declFileExportImportChain.js +++ b/tests/baselines/reference/declFileExportImportChain.js @@ -28,6 +28,7 @@ export var x: c.b1.a.m2.c1; define(["require", "exports"], function (require, exports) { var m1; (function (m1) { + var m2; (function (m2) { var c1 = (function () { function c1() { @@ -35,8 +36,7 @@ define(["require", "exports"], function (require, exports) { return c1; })(); m2.c1 = c1; - })(m1.m2 || (m1.m2 = {})); - var m2 = m1.m2; + })(m2 = m1.m2 || (m1.m2 = {})); })(m1 || (m1 = {})); return m1; }); diff --git a/tests/baselines/reference/declFileExportImportChain2.js b/tests/baselines/reference/declFileExportImportChain2.js index 9a739056c3d..d1299a21c5a 100644 --- a/tests/baselines/reference/declFileExportImportChain2.js +++ b/tests/baselines/reference/declFileExportImportChain2.js @@ -25,6 +25,7 @@ export var x: c.b.m2.c1; define(["require", "exports"], function (require, exports) { var m1; (function (m1) { + var m2; (function (m2) { var c1 = (function () { function c1() { @@ -32,8 +33,7 @@ define(["require", "exports"], function (require, exports) { return c1; })(); m2.c1 = c1; - })(m1.m2 || (m1.m2 = {})); - var m2 = m1.m2; + })(m2 = m1.m2 || (m1.m2 = {})); })(m1 || (m1 = {})); return m1; }); diff --git a/tests/baselines/reference/declFileGenericType.js b/tests/baselines/reference/declFileGenericType.js index 815b8712f15..ef8d6d453af 100644 --- a/tests/baselines/reference/declFileGenericType.js +++ b/tests/baselines/reference/declFileGenericType.js @@ -46,6 +46,7 @@ var __extends = this.__extends || function (d, b) { __.prototype = b.prototype; d.prototype = new __(); }; +var C; (function (C) { var A = (function () { function A() { @@ -90,8 +91,7 @@ var __extends = this.__extends || function (d, b) { return D; })(); C.D = D; -})(exports.C || (exports.C = {})); -var C = exports.C; +})(C = exports.C || (exports.C = {})); exports.a; exports.b = C.F; exports.c = C.F2; diff --git a/tests/baselines/reference/declFileGenericType2.js b/tests/baselines/reference/declFileGenericType2.js index c2b8c2baaa3..0e0381cd87d 100644 --- a/tests/baselines/reference/declFileGenericType2.js +++ b/tests/baselines/reference/declFileGenericType2.js @@ -52,7 +52,9 @@ var __extends = this.__extends || function (d, b) { // Module var templa; (function (templa) { + var dom; (function (dom) { + var mvc; (function (mvc) { var AbstractElementController = (function (_super) { __extends(AbstractElementController, _super); @@ -62,16 +64,17 @@ var templa; return AbstractElementController; })(templa.mvc.AbstractController); mvc.AbstractElementController = AbstractElementController; - })(dom.mvc || (dom.mvc = {})); - var mvc = dom.mvc; - })(templa.dom || (templa.dom = {})); - var dom = templa.dom; + })(mvc = dom.mvc || (dom.mvc = {})); + })(dom = templa.dom || (templa.dom = {})); })(templa || (templa = {})); // Module var templa; (function (templa) { + var dom; (function (dom) { + var mvc; (function (mvc) { + var composite; (function (composite) { var AbstractCompositeElementController = (function (_super) { __extends(AbstractCompositeElementController, _super); @@ -82,12 +85,9 @@ var templa; return AbstractCompositeElementController; })(templa.dom.mvc.AbstractElementController); composite.AbstractCompositeElementController = AbstractCompositeElementController; - })(mvc.composite || (mvc.composite = {})); - var composite = mvc.composite; - })(dom.mvc || (dom.mvc = {})); - var mvc = dom.mvc; - })(templa.dom || (templa.dom = {})); - var dom = templa.dom; + })(composite = mvc.composite || (mvc.composite = {})); + })(mvc = dom.mvc || (dom.mvc = {})); + })(dom = templa.dom || (templa.dom = {})); })(templa || (templa = {})); diff --git a/tests/baselines/reference/declFileImportChainInExportAssignment.js b/tests/baselines/reference/declFileImportChainInExportAssignment.js index 73d8ede215a..c8773889a7d 100644 --- a/tests/baselines/reference/declFileImportChainInExportAssignment.js +++ b/tests/baselines/reference/declFileImportChainInExportAssignment.js @@ -12,6 +12,7 @@ export = b; //// [declFileImportChainInExportAssignment.js] var m; (function (m) { + var c; (function (_c) { var c = (function () { function c() { @@ -19,8 +20,7 @@ var m; return c; })(); _c.c = c; - })(m.c || (m.c = {})); - var c = m.c; + })(c = m.c || (m.c = {})); })(m || (m = {})); var a = m.c; var b = a; diff --git a/tests/baselines/reference/declFileModuleContinuation.js b/tests/baselines/reference/declFileModuleContinuation.js index 52925a387b1..70cb0e43668 100644 --- a/tests/baselines/reference/declFileModuleContinuation.js +++ b/tests/baselines/reference/declFileModuleContinuation.js @@ -12,7 +12,9 @@ module A.B.C { //// [declFileModuleContinuation.js] var A; (function (A) { + var B; (function (B) { + var C; (function (C) { var W = (function () { function W() { @@ -20,10 +22,8 @@ var A; return W; })(); C.W = W; - })(B.C || (B.C = {})); - var C = B.C; - })(A.B || (A.B = {})); - var B = A.B; + })(C = B.C || (B.C = {})); + })(B = A.B || (A.B = {})); })(A || (A = {})); diff --git a/tests/baselines/reference/declFileRegressionTests.types b/tests/baselines/reference/declFileRegressionTests.types index f230d93f0dd..8d058769c0a 100644 --- a/tests/baselines/reference/declFileRegressionTests.types +++ b/tests/baselines/reference/declFileRegressionTests.types @@ -4,7 +4,7 @@ var n = { w: null, x: '', y: () => { }, z: 32 }; >n : { w: any; x: string; y: () => void; z: number; } >{ w: null, x: '', y: () => { }, z: 32 } : { w: null; x: string; y: () => void; z: number; } ->w : any +>w : null >x : string >y : () => void >() => { } : () => void diff --git a/tests/baselines/reference/declFileTypeofFunction.js b/tests/baselines/reference/declFileTypeofFunction.js index 67475c557d3..ea876e6dad8 100644 --- a/tests/baselines/reference/declFileTypeofFunction.js +++ b/tests/baselines/reference/declFileTypeofFunction.js @@ -73,6 +73,6 @@ declare function b1(): typeof b1; declare function foo(): typeof foo; declare var foo1: typeof foo; declare var foo2: typeof foo; -declare var foo3: any; -declare var x: any; +declare var foo3: () => any; +declare var x: () => any; declare function foo5(x: number): (x: number) => number; diff --git a/tests/baselines/reference/declFileTypeofFunction.types b/tests/baselines/reference/declFileTypeofFunction.types index 5f1cc26168f..bede9ba254b 100644 --- a/tests/baselines/reference/declFileTypeofFunction.types +++ b/tests/baselines/reference/declFileTypeofFunction.types @@ -54,18 +54,18 @@ var foo2 = foo; >foo : () => typeof foo var foo3 = function () { ->foo3 : any +>foo3 : () => any >function () { return foo3;} : () => any return foo3; ->foo3 : any +>foo3 : () => any } var x = () => { ->x : any +>x : () => any >() => { return x;} : () => any return x; ->x : any +>x : () => any } function foo5(x: number) { diff --git a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js index ed695e40400..0bcbf2fff68 100644 --- a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js +++ b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js @@ -29,7 +29,9 @@ var __extends = this.__extends || function (d, b) { }; var X; (function (X) { + var Y; (function (Y) { + var base; (function (base) { var W = (function (_super) { __extends(W, _super); @@ -39,15 +41,16 @@ var X; return W; })(A.B.Base.W); base.W = W; - })(Y.base || (Y.base = {})); - var base = Y.base; - })(X.Y || (X.Y = {})); - var Y = X.Y; + })(base = Y.base || (Y.base = {})); + })(Y = X.Y || (X.Y = {})); })(X || (X = {})); var X; (function (X) { + var Y; (function (Y) { + var base; (function (base) { + var Z; (function (Z) { var W = (function (_super) { __extends(W, _super); @@ -57,12 +60,9 @@ var X; return W; })(X.Y.base.W); Z.W = W; - })(base.Z || (base.Z = {})); - var Z = base.Z; - })(Y.base || (Y.base = {})); - var base = Y.base; - })(X.Y || (X.Y = {})); - var Y = X.Y; + })(Z = base.Z || (base.Z = {})); + })(base = Y.base || (Y.base = {})); + })(Y = X.Y || (X.Y = {})); })(X || (X = {})); diff --git a/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js b/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js index a96cc86cdf3..5f6509cb597 100644 --- a/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js +++ b/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js @@ -27,6 +27,7 @@ var __extends = this.__extends || function (d, b) { }; var A; (function (A) { + var B; (function (B) { var EventManager = (function () { function EventManager() { @@ -34,12 +35,13 @@ var A; return EventManager; })(); B.EventManager = EventManager; - })(A.B || (A.B = {})); - var B = A.B; + })(B = A.B || (A.B = {})); })(A || (A = {})); var A; (function (A) { + var B; (function (B) { + var C; (function (C) { var ContextMenu = (function (_super) { __extends(ContextMenu, _super); @@ -49,10 +51,8 @@ var A; return ContextMenu; })(B.EventManager); C.ContextMenu = ContextMenu; - })(B.C || (B.C = {})); - var C = B.C; - })(A.B || (A.B = {})); - var B = A.B; + })(C = B.C || (B.C = {})); + })(B = A.B || (A.B = {})); })(A || (A = {})); diff --git a/tests/baselines/reference/declFileWithInternalModuleNameConflictsInExtendsClause1.js b/tests/baselines/reference/declFileWithInternalModuleNameConflictsInExtendsClause1.js index dfd9f27f47d..1e599870302 100644 --- a/tests/baselines/reference/declFileWithInternalModuleNameConflictsInExtendsClause1.js +++ b/tests/baselines/reference/declFileWithInternalModuleNameConflictsInExtendsClause1.js @@ -14,8 +14,11 @@ module X.A.B.C { //// [declFileWithInternalModuleNameConflictsInExtendsClause1.js] var X; (function (X) { + var A; (function (A) { + var B; (function (B) { + var C; (function (C) { var W = (function () { function W() { @@ -23,12 +26,9 @@ var X; return W; })(); C.W = W; - })(B.C || (B.C = {})); - var C = B.C; - })(A.B || (A.B = {})); - var B = A.B; - })(X.A || (X.A = {})); - var A = X.A; + })(C = B.C || (B.C = {})); + })(B = A.B || (A.B = {})); + })(A = X.A || (X.A = {})); })(X || (X = {})); diff --git a/tests/baselines/reference/declFileWithInternalModuleNameConflictsInExtendsClause2.js b/tests/baselines/reference/declFileWithInternalModuleNameConflictsInExtendsClause2.js index 06929c73cb7..e225e9bb9f6 100644 --- a/tests/baselines/reference/declFileWithInternalModuleNameConflictsInExtendsClause2.js +++ b/tests/baselines/reference/declFileWithInternalModuleNameConflictsInExtendsClause2.js @@ -17,8 +17,11 @@ module X.A.B.C { //// [declFileWithInternalModuleNameConflictsInExtendsClause2.js] var X; (function (X) { + var A; (function (A) { + var B; (function (B) { + var C; (function (C) { var W = (function () { function W() { @@ -26,12 +29,9 @@ var X; return W; })(); C.W = W; - })(B.C || (B.C = {})); - var C = B.C; - })(A.B || (A.B = {})); - var B = A.B; - })(X.A || (X.A = {})); - var A = X.A; + })(C = B.C || (B.C = {})); + })(B = A.B || (A.B = {})); + })(A = X.A || (X.A = {})); })(X || (X = {})); diff --git a/tests/baselines/reference/declFileWithInternalModuleNameConflictsInExtendsClause3.js b/tests/baselines/reference/declFileWithInternalModuleNameConflictsInExtendsClause3.js index d6e6961c4ea..34be43c93b3 100644 --- a/tests/baselines/reference/declFileWithInternalModuleNameConflictsInExtendsClause3.js +++ b/tests/baselines/reference/declFileWithInternalModuleNameConflictsInExtendsClause3.js @@ -17,8 +17,11 @@ module X.A.B.C { //// [declFileWithInternalModuleNameConflictsInExtendsClause3.js] var X; (function (X) { + var A; (function (A) { + var B; (function (B) { + var C; (function (C) { var W = (function () { function W() { @@ -26,12 +29,9 @@ var X; return W; })(); C.W = W; - })(B.C || (B.C = {})); - var C = B.C; - })(A.B || (A.B = {})); - var B = A.B; - })(X.A || (X.A = {})); - var A = X.A; + })(C = B.C || (B.C = {})); + })(B = A.B || (A.B = {})); + })(A = X.A || (X.A = {})); })(X || (X = {})); diff --git a/tests/baselines/reference/declInput3.types b/tests/baselines/reference/declInput3.types index 4147396b26d..df69422f55b 100644 --- a/tests/baselines/reference/declInput3.types +++ b/tests/baselines/reference/declInput3.types @@ -16,9 +16,9 @@ class bar { >a : bar >null : bar >bar : bar ->b : any +>b : undefined >undefined : undefined ->c : any +>c : undefined >void 4 : undefined public h(x = 4, y = null, z = '') { x++; } diff --git a/tests/baselines/reference/declarationEmit_invalidReference.js b/tests/baselines/reference/declarationEmit_invalidReference.js new file mode 100644 index 00000000000..d6ef9f48e53 --- /dev/null +++ b/tests/baselines/reference/declarationEmit_invalidReference.js @@ -0,0 +1,11 @@ +//// [declarationEmit_invalidReference.ts] +/// +var x = 0; + +//// [declarationEmit_invalidReference.js] +/// +var x = 0; + + +//// [declarationEmit_invalidReference.d.ts] +declare var x: number; diff --git a/tests/baselines/reference/declarationEmit_invalidReference.types b/tests/baselines/reference/declarationEmit_invalidReference.types new file mode 100644 index 00000000000..1fe465887ed --- /dev/null +++ b/tests/baselines/reference/declarationEmit_invalidReference.types @@ -0,0 +1,5 @@ +=== tests/cases/compiler/declarationEmit_invalidReference.ts === +/// +var x = 0; +>x : number + diff --git a/tests/baselines/reference/declarationEmit_invalidReference2.errors.txt b/tests/baselines/reference/declarationEmit_invalidReference2.errors.txt new file mode 100644 index 00000000000..91368320ba3 --- /dev/null +++ b/tests/baselines/reference/declarationEmit_invalidReference2.errors.txt @@ -0,0 +1,5 @@ +==== tests/cases/compiler/declarationEmit_invalidReference2.ts (1 errors) ==== + /// + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! File 'invalid.ts' not found. + var x = 0; \ No newline at end of file diff --git a/tests/baselines/reference/declarationEmit_nameConflicts.js b/tests/baselines/reference/declarationEmit_nameConflicts.js index bbb7826707b..ab2e5fce42a 100644 --- a/tests/baselines/reference/declarationEmit_nameConflicts.js +++ b/tests/baselines/reference/declarationEmit_nameConflicts.js @@ -62,6 +62,7 @@ var f; module.exports = f; //// [declarationEmit_nameConflicts_0.js] var im = require('declarationEmit_nameConflicts_1'); +var M; (function (M) { function f() { } @@ -72,20 +73,21 @@ var im = require('declarationEmit_nameConflicts_1'); return C; })(); M.C = C; + var N; (function (N) { function g() { } N.g = g; ; - })(M.N || (M.N = {})); - var N = M.N; + })(N = M.N || (M.N = {})); M.a = M.f; M.b = M.C; M.c = N; M.d = im; -})(exports.M || (exports.M = {})); -var M = exports.M; +})(M = exports.M || (exports.M = {})); +var M; (function (M) { + var P; (function (P) { function f() { } @@ -96,24 +98,24 @@ var M = exports.M; return C; })(); P.C = C; + var N; (function (N) { function g() { } N.g = g; ; - })(P.N || (P.N = {})); - var N = P.N; + })(N = P.N || (P.N = {})); P.im = M.P.f; P.a = M.a; // emitted incorrectly as typeof f P.b = M.b; // ok P.c = M.c; // ok P.g = M.c.g; // ok P.d = M.d; // emitted incorrectly as typeof im - })(M.P || (M.P = {})); - var P = M.P; -})(exports.M || (exports.M = {})); -var M = exports.M; + })(P = M.P || (M.P = {})); +})(M = exports.M || (exports.M = {})); +var M; (function (M) { + var Q; (function (Q) { function f() { } @@ -124,17 +126,15 @@ var M = exports.M; return C; })(); Q.C = C; + var N; (function (N) { function g() { } N.g = g; ; - })(Q.N || (Q.N = {})); - var N = Q.N; - })(M.Q || (M.Q = {})); - var Q = M.Q; -})(exports.M || (exports.M = {})); -var M = exports.M; + })(N = Q.N || (Q.N = {})); + })(Q = M.Q || (M.Q = {})); +})(M = exports.M || (exports.M = {})); //// [declarationEmit_nameConflicts_1.d.ts] diff --git a/tests/baselines/reference/declarationEmit_nameConflicts2.js b/tests/baselines/reference/declarationEmit_nameConflicts2.js index 7b8e1ce17c9..43167f531d7 100644 --- a/tests/baselines/reference/declarationEmit_nameConflicts2.js +++ b/tests/baselines/reference/declarationEmit_nameConflicts2.js @@ -18,7 +18,9 @@ module X.Y.base.Z { //// [declarationEmit_nameConflicts2.js] var X; (function (X) { + var Y; (function (Y) { + var base; (function (base) { function f() { } @@ -29,33 +31,31 @@ var X; return C; })(); base.C = C; + var M; (function (M) { M.v; - })(base.M || (base.M = {})); - var M = base.M; + })(M = base.M || (base.M = {})); (function (E) { })(base.E || (base.E = {})); var E = base.E; - })(Y.base || (Y.base = {})); - var base = Y.base; - })(X.Y || (X.Y = {})); - var Y = X.Y; + })(base = Y.base || (Y.base = {})); + })(Y = X.Y || (X.Y = {})); })(X || (X = {})); var X; (function (X) { + var Y; (function (Y) { + var base; (function (base) { + var Z; (function (Z) { Z.f = X.Y.base.f; // Should be base.f Z.C = X.Y.base.C; // Should be base.C Z.M = X.Y.base.M; // Should be base.M Z.E = X.Y.base.E; // Should be base.E - })(base.Z || (base.Z = {})); - var Z = base.Z; - })(Y.base || (Y.base = {})); - var base = Y.base; - })(X.Y || (X.Y = {})); - var Y = X.Y; + })(Z = base.Z || (base.Z = {})); + })(base = Y.base || (Y.base = {})); + })(Y = X.Y || (X.Y = {})); })(X || (X = {})); diff --git a/tests/baselines/reference/declarationEmit_nameConflicts3.js b/tests/baselines/reference/declarationEmit_nameConflicts3.js index a8dc1217ef4..848343362bc 100644 --- a/tests/baselines/reference/declarationEmit_nameConflicts3.js +++ b/tests/baselines/reference/declarationEmit_nameConflicts3.js @@ -35,27 +35,28 @@ var __extends = this.__extends || function (d, b) { }; var M; (function (M) { + var D; (function (D) { function f() { } D.f = f; - })(M.D || (M.D = {})); - var D = M.D; + })(D = M.D || (M.D = {})); + var C; (function (C) { function f() { } C.f = f; - })(M.C || (M.C = {})); - var C = M.C; + })(C = M.C || (M.C = {})); + var E; (function (E) { function f() { } E.f = f; - })(M.E || (M.E = {})); - var E = M.E; + })(E = M.E || (M.E = {})); })(M || (M = {})); var M; (function (M) { + var P; (function (P) { var C = (function () { function C() { @@ -81,8 +82,7 @@ var M; P.w = M.D.f; // error, should be typeof M.D.f P.x = M.C.f; // error, should be typeof M.C.f P.x = M.E.f; // error, should be typeof M.E.f - })(M.P || (M.P = {})); - var P = M.P; + })(P = M.P || (M.P = {})); })(M || (M = {})); diff --git a/tests/baselines/reference/declarationEmit_nameConflictsWithAlias.js b/tests/baselines/reference/declarationEmit_nameConflictsWithAlias.js index a5b2f397bf8..9d6ab935fdb 100644 --- a/tests/baselines/reference/declarationEmit_nameConflictsWithAlias.js +++ b/tests/baselines/reference/declarationEmit_nameConflictsWithAlias.js @@ -7,10 +7,10 @@ export module M { } //// [declarationEmit_nameConflictsWithAlias.js] +var M; (function (M) { M.w; // Gets emitted as C.I, which is the wrong interface -})(exports.M || (exports.M = {})); -var M = exports.M; +})(M = exports.M || (exports.M = {})); //// [declarationEmit_nameConflictsWithAlias.d.ts] diff --git a/tests/baselines/reference/decrementOperatorWithAnyOtherType.types b/tests/baselines/reference/decrementOperatorWithAnyOtherType.types index 1a4aea0d507..4e8387f9066 100644 --- a/tests/baselines/reference/decrementOperatorWithAnyOtherType.types +++ b/tests/baselines/reference/decrementOperatorWithAnyOtherType.types @@ -15,7 +15,7 @@ var obj = {x:1,y:null}; >obj : { x: number; y: any; } >{x:1,y:null} : { x: number; y: null; } >x : number ->y : any +>y : null class A { >A : A diff --git a/tests/baselines/reference/defaultArgsForwardReferencing.errors.txt b/tests/baselines/reference/defaultArgsForwardReferencing.errors.txt index 7f317049695..2b8250f6fb4 100644 --- a/tests/baselines/reference/defaultArgsForwardReferencing.errors.txt +++ b/tests/baselines/reference/defaultArgsForwardReferencing.errors.txt @@ -1,4 +1,4 @@ -==== tests/cases/compiler/defaultArgsForwardReferencing.ts (12 errors) ==== +==== tests/cases/compiler/defaultArgsForwardReferencing.ts (10 errors) ==== function left(a, b = a, c = b) { a; b; @@ -37,11 +37,7 @@ } function defaultArgFunction(a = function () { return b; }, b = 1) { } - ~ -!!! Initializer of parameter 'a' cannot reference identifier 'b' declared after it. function defaultArgArrow(a = () => () => b, b = 3) { } - ~ -!!! Initializer of parameter 'a' cannot reference identifier 'b' declared after it. class C { constructor(a = b, b = 1) { } diff --git a/tests/baselines/reference/defaultArgsInFunctionExpressions.errors.txt b/tests/baselines/reference/defaultArgsInFunctionExpressions.errors.txt index b34c4902000..7fb00da2b40 100644 --- a/tests/baselines/reference/defaultArgsInFunctionExpressions.errors.txt +++ b/tests/baselines/reference/defaultArgsInFunctionExpressions.errors.txt @@ -22,7 +22,7 @@ // Contextually type the default arg with the type annotation var f3 = function (a: (s: string) => any = (s) => s) { }; ~~~~~~~~~ -!!! Neither type 'number' nor type 'string' is assignable to the other. +!!! Neither type 'string' nor type 'number' is assignable to the other. // Type check using the function's contextual type var f4: (a: number) => void = function (a = "") { }; @@ -32,7 +32,7 @@ // Contextually type the default arg using the function's contextual type var f5: (a: (s: string) => any) => void = function (a = s => s) { }; ~~~~~~~~~ -!!! Neither type 'number' nor type 'string' is assignable to the other. +!!! Neither type 'string' nor type 'number' is assignable to the other. // Instantiated module module T { } diff --git a/tests/baselines/reference/derivedInterfaceDoesNotHideBaseSignatures.js b/tests/baselines/reference/derivedInterfaceDoesNotHideBaseSignatures.js new file mode 100644 index 00000000000..2cce6e72209 --- /dev/null +++ b/tests/baselines/reference/derivedInterfaceDoesNotHideBaseSignatures.js @@ -0,0 +1,13 @@ +//// [derivedInterfaceDoesNotHideBaseSignatures.ts] +// Derived interfaces no longer hide signatures from base types, so these signatures are always compatible. +interface Base { + (): string; + new (x: string): number; +} + +interface Derived extends Base { + (): number; + new (x: string): string; +} + +//// [derivedInterfaceDoesNotHideBaseSignatures.js] diff --git a/tests/baselines/reference/derivedInterfaceDoesNotHideBaseSignatures.types b/tests/baselines/reference/derivedInterfaceDoesNotHideBaseSignatures.types new file mode 100644 index 00000000000..7ee090b7de3 --- /dev/null +++ b/tests/baselines/reference/derivedInterfaceDoesNotHideBaseSignatures.types @@ -0,0 +1,18 @@ +=== tests/cases/conformance/interfaces/interfaceDeclarations/derivedInterfaceDoesNotHideBaseSignatures.ts === +// Derived interfaces no longer hide signatures from base types, so these signatures are always compatible. +interface Base { +>Base : Base + + (): string; + new (x: string): number; +>x : string +} + +interface Derived extends Base { +>Derived : Derived +>Base : Base + + (): number; + new (x: string): string; +>x : string +} diff --git a/tests/baselines/reference/doNotWidenAtObjectLiteralPropertyAssignment.types b/tests/baselines/reference/doNotWidenAtObjectLiteralPropertyAssignment.types index 24eafce8cde..225bca8de63 100644 --- a/tests/baselines/reference/doNotWidenAtObjectLiteralPropertyAssignment.types +++ b/tests/baselines/reference/doNotWidenAtObjectLiteralPropertyAssignment.types @@ -26,5 +26,5 @@ var test: IIntervalTreeNode[] = [{ interval: { begin: 0 }, children: null }]; // >interval : { begin: number; } >{ begin: 0 } : { begin: number; } >begin : number ->children : any +>children : null diff --git a/tests/baselines/reference/dottedModuleName2.js b/tests/baselines/reference/dottedModuleName2.js index 5103eceaf00..4cbffa0e12f 100644 --- a/tests/baselines/reference/dottedModuleName2.js +++ b/tests/baselines/reference/dottedModuleName2.js @@ -46,27 +46,27 @@ module M //// [dottedModuleName2.js] var A; (function (A) { + var B; (function (B) { B.x = 1; - })(A.B || (A.B = {})); - var B = A.B; + })(B = A.B || (A.B = {})); })(A || (A = {})); var AA; (function (AA) { + var B; (function (B) { B.x = 1; - })(AA.B || (AA.B = {})); - var B = AA.B; + })(B = AA.B || (AA.B = {})); })(AA || (AA = {})); var tmpOK = AA.B.x; var tmpError = A.B.x; var A; (function (A) { + var B; (function (B) { + var C; (function (C) { C.x = 1; - })(B.C || (B.C = {})); - var C = B.C; - })(A.B || (A.B = {})); - var B = A.B; + })(C = B.C || (B.C = {})); + })(B = A.B || (A.B = {})); })(A || (A = {})); diff --git a/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.js b/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.js index eaef5d09bdd..018d148f9c3 100644 --- a/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.js +++ b/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.js @@ -124,8 +124,8 @@ var Foo; })(Foo || (Foo = {})); var N; (function (N) { + var F; (function (F) { var t; - })(N.F || (N.F = {})); - var F = N.F; + })(F = N.F || (N.F = {})); })(N || (N = {})); diff --git a/tests/baselines/reference/duplicateSymbolsExportMatching.js b/tests/baselines/reference/duplicateSymbolsExportMatching.js index 43a610c7d33..e34ed7c8d02 100644 --- a/tests/baselines/reference/duplicateSymbolsExportMatching.js +++ b/tests/baselines/reference/duplicateSymbolsExportMatching.js @@ -74,10 +74,10 @@ define(["require", "exports"], function (require, exports) { (function (inst) { var t; })(inst || (inst = {})); + var inst; (function (inst) { var t; - })(M.inst || (M.inst = {})); - var inst = M.inst; + })(inst = M.inst || (M.inst = {})); })(M || (M = {})); // Variables of the same / different type var M2; @@ -104,9 +104,9 @@ define(["require", "exports"], function (require, exports) { } return C; })(); + var C; (function (C) { var t; - })(M.C || (M.C = {})); - var C = M.C; + })(C = M.C || (M.C = {})); })(M || (M = {})); }); diff --git a/tests/baselines/reference/emitMemberAccessExpression.js b/tests/baselines/reference/emitMemberAccessExpression.js index 9488bbac5f0..92fef4b36ff 100644 --- a/tests/baselines/reference/emitMemberAccessExpression.js +++ b/tests/baselines/reference/emitMemberAccessExpression.js @@ -29,7 +29,9 @@ module Microsoft.PeopleAtWork.Model { "use strict"; var Microsoft; (function (Microsoft) { + var PeopleAtWork; (function (PeopleAtWork) { + var Model; (function (Model) { var _Person = (function () { function _Person() { @@ -40,10 +42,8 @@ var Microsoft; return _Person; })(); Model._Person = _Person; - })(PeopleAtWork.Model || (PeopleAtWork.Model = {})); - var Model = PeopleAtWork.Model; - })(Microsoft.PeopleAtWork || (Microsoft.PeopleAtWork = {})); - var PeopleAtWork = Microsoft.PeopleAtWork; + })(Model = PeopleAtWork.Model || (PeopleAtWork.Model = {})); + })(PeopleAtWork = Microsoft.PeopleAtWork || (Microsoft.PeopleAtWork = {})); })(Microsoft || (Microsoft = {})); //// [emitMemberAccessExpression_file1.js] /// @@ -53,7 +53,9 @@ var Microsoft; /// var Microsoft; (function (Microsoft) { + var PeopleAtWork; (function (PeopleAtWork) { + var Model; (function (Model) { var KnockoutExtentions = (function () { function KnockoutExtentions() { @@ -61,8 +63,6 @@ var Microsoft; return KnockoutExtentions; })(); Model.KnockoutExtentions = KnockoutExtentions; - })(PeopleAtWork.Model || (PeopleAtWork.Model = {})); - var Model = PeopleAtWork.Model; - })(Microsoft.PeopleAtWork || (Microsoft.PeopleAtWork = {})); - var PeopleAtWork = Microsoft.PeopleAtWork; + })(Model = PeopleAtWork.Model || (PeopleAtWork.Model = {})); + })(PeopleAtWork = Microsoft.PeopleAtWork || (Microsoft.PeopleAtWork = {})); })(Microsoft || (Microsoft = {})); diff --git a/tests/baselines/reference/enumConstantMembers.errors.txt b/tests/baselines/reference/enumConstantMembers.errors.txt new file mode 100644 index 00000000000..ac77e2b7b4e --- /dev/null +++ b/tests/baselines/reference/enumConstantMembers.errors.txt @@ -0,0 +1,24 @@ +==== tests/cases/conformance/enums/enumConstantMembers.ts (2 errors) ==== + // Constant members allow negatives, but not decimals. Also hex literals are allowed + enum E1 { + a = 1, + b + } + enum E2 { + a = - 1, + b + } + enum E3 { + a = 0.1, + b // Error because 0.1 is not a constant + ~ +!!! Enum member must have initializer. + } + + declare enum E4 { + a = 1, + b = -1, + c = 0.1 // Not a constant + ~ +!!! Ambient enum elements can only have integer literal initializers. + } \ No newline at end of file diff --git a/tests/baselines/reference/enumMerging.js b/tests/baselines/reference/enumMerging.js index 5e4ff368481..b0da96c4b6e 100644 --- a/tests/baselines/reference/enumMerging.js +++ b/tests/baselines/reference/enumMerging.js @@ -150,6 +150,7 @@ var M5; })(M5 || (M5 = {})); var M6; (function (M6) { + var A; (function (A) { (function (Color) { Color[Color["Red"] = 0] = "Red"; @@ -157,18 +158,17 @@ var M6; Color[Color["Blue"] = 2] = "Blue"; })(A.Color || (A.Color = {})); var Color = A.Color; - })(M6.A || (M6.A = {})); - var A = M6.A; + })(A = M6.A || (M6.A = {})); })(M6 || (M6 = {})); var M6; (function (M6) { + var A; (function (A) { (function (Color) { Color[Color["Yellow"] = 1] = "Yellow"; })(A.Color || (A.Color = {})); var Color = A.Color; - })(M6.A || (M6.A = {})); - var A = M6.A; + })(A = M6.A || (M6.A = {})); var t = 1 /* Yellow */; t = 0 /* Red */; })(M6 || (M6 = {})); diff --git a/tests/baselines/reference/errorWithTruncatedType.errors.txt b/tests/baselines/reference/errorWithTruncatedType.errors.txt new file mode 100644 index 00000000000..7d3cab5f3c5 --- /dev/null +++ b/tests/baselines/reference/errorWithTruncatedType.errors.txt @@ -0,0 +1,15 @@ +==== tests/cases/compiler/errorWithTruncatedType.ts (1 errors) ==== + + var x: { + propertyWithAnExceedinglyLongName1: string; + propertyWithAnExceedinglyLongName2: string; + propertyWithAnExceedinglyLongName3: string; + propertyWithAnExceedinglyLongName4: string; + propertyWithAnExceedinglyLongName5: string; + }; + + // String representation of type of 'x' should be truncated in error message + var s: string = x; + ~ +!!! Type '{ propertyWithAnExceedinglyLongName1: string; propertyWithAnExceedinglyLongName2: string; propert...' is not assignable to type 'string'. + \ No newline at end of file diff --git a/tests/baselines/reference/errorWithTruncatedType.js b/tests/baselines/reference/errorWithTruncatedType.js new file mode 100644 index 00000000000..5fd45579a29 --- /dev/null +++ b/tests/baselines/reference/errorWithTruncatedType.js @@ -0,0 +1,18 @@ +//// [errorWithTruncatedType.ts] + +var x: { + propertyWithAnExceedinglyLongName1: string; + propertyWithAnExceedinglyLongName2: string; + propertyWithAnExceedinglyLongName3: string; + propertyWithAnExceedinglyLongName4: string; + propertyWithAnExceedinglyLongName5: string; +}; + +// String representation of type of 'x' should be truncated in error message +var s: string = x; + + +//// [errorWithTruncatedType.js] +var x; +// String representation of type of 'x' should be truncated in error message +var s = x; diff --git a/tests/baselines/reference/exportAssignmentMergedModule.js b/tests/baselines/reference/exportAssignmentMergedModule.js index b8e40412ff8..51413796eb2 100644 --- a/tests/baselines/reference/exportAssignmentMergedModule.js +++ b/tests/baselines/reference/exportAssignmentMergedModule.js @@ -39,10 +39,10 @@ var Foo; return a; } Foo.c = c; + var Test; (function (Test) { Test.answer = 42; - })(Foo.Test || (Foo.Test = {})); - var Test = Foo.Test; + })(Test = Foo.Test || (Foo.Test = {})); })(Foo || (Foo = {})); module.exports = Foo; //// [foo_1.js] diff --git a/tests/baselines/reference/exportCodeGen.js b/tests/baselines/reference/exportCodeGen.js index 724edf842cf..1b1f934b2f9 100644 --- a/tests/baselines/reference/exportCodeGen.js +++ b/tests/baselines/reference/exportCodeGen.js @@ -103,10 +103,10 @@ var E; return C; })(); E.C = C; + var M; (function (M) { M.x = 42; - })(E.M || (E.M = {})); - var M = E.M; + })(M = E.M || (E.M = {})); })(E || (E = {})); // validate all exportable statements, // which are not exported diff --git a/tests/baselines/reference/exportImportAlias.js b/tests/baselines/reference/exportImportAlias.js index f445d7b2bc5..dea9705fc9f 100644 --- a/tests/baselines/reference/exportImportAlias.js +++ b/tests/baselines/reference/exportImportAlias.js @@ -96,6 +96,7 @@ var X; return 42; } X.Y = Y; + var Y; (function (Y) { var Point = (function () { function Point(x, y) { @@ -105,8 +106,7 @@ var X; return Point; })(); Y.Point = Point; - })(X.Y || (X.Y = {})); - var Y = X.Y; + })(Y = X.Y || (X.Y = {})); })(X || (X = {})); var Z; (function (Z) { @@ -124,10 +124,10 @@ var K; return L; })(); K.L = L; + var L; (function (L) { L.y = 12; - })(K.L || (K.L = {})); - var L = K.L; + })(L = K.L || (K.L = {})); })(K || (K = {})); var M; (function (M) { diff --git a/tests/baselines/reference/exportImportAndClodule.js b/tests/baselines/reference/exportImportAndClodule.js index 32362686c95..0873051b40d 100644 --- a/tests/baselines/reference/exportImportAndClodule.js +++ b/tests/baselines/reference/exportImportAndClodule.js @@ -29,10 +29,10 @@ var K; return L; })(); K.L = L; + var L; (function (L) { L.y = 12; - })(K.L || (K.L = {})); - var L = K.L; + })(L = K.L || (K.L = {})); })(K || (K = {})); var M; (function (M) { diff --git a/tests/baselines/reference/forStatementsMultipleValidDecl.types b/tests/baselines/reference/forStatementsMultipleValidDecl.types index f894eef1404..2f3bfd70cea 100644 --- a/tests/baselines/reference/forStatementsMultipleValidDecl.types +++ b/tests/baselines/reference/forStatementsMultipleValidDecl.types @@ -39,7 +39,7 @@ for (var p: Point = { x: 0, y: undefined }; ;) { } >Point : Point >{ x: 0, y: undefined } : { x: number; y: undefined; } >x : number ->y : any +>y : undefined >undefined : undefined for (var p = { x: 1, y: undefined }; ;) { } @@ -65,7 +65,7 @@ for (var p = <{ x: number; y: number; }>{ x: 0, y: undefined }; ;) { } >y : number >{ x: 0, y: undefined } : { x: number; y: undefined; } >x : number ->y : any +>y : undefined >undefined : undefined for (var p: typeof p; ;) { } diff --git a/tests/baselines/reference/forgottenNew.errors.txt b/tests/baselines/reference/forgottenNew.errors.txt index 3a6d490a0e9..ba44223819c 100644 --- a/tests/baselines/reference/forgottenNew.errors.txt +++ b/tests/baselines/reference/forgottenNew.errors.txt @@ -1,4 +1,4 @@ -==== tests/cases/compiler/forgottenNew.ts (1 errors) ==== +==== tests/cases/conformance/expressions/functionCalls/forgottenNew.ts (1 errors) ==== module Tools { export class NullLogger { } } diff --git a/tests/baselines/reference/functionImplementations.types b/tests/baselines/reference/functionImplementations.types index fe03fa58d98..29fe7c0e39c 100644 --- a/tests/baselines/reference/functionImplementations.types +++ b/tests/baselines/reference/functionImplementations.types @@ -253,8 +253,8 @@ function opt2(n = { x: null, y: undefined }) { >opt2 : (n?: { x: any; y: any; }) => void >n : { x: any; y: any; } >{ x: null, y: undefined } : { x: null; y: undefined; } ->x : any ->y : any +>x : null +>y : undefined >undefined : undefined var m = n; diff --git a/tests/baselines/reference/functionMergedWithModule.js b/tests/baselines/reference/functionMergedWithModule.js index 21a1e5af5c7..d83c1cd4e37 100644 --- a/tests/baselines/reference/functionMergedWithModule.js +++ b/tests/baselines/reference/functionMergedWithModule.js @@ -20,20 +20,20 @@ function foo(title) { } var foo; (function (foo) { + var Bar; (function (Bar) { function f() { } Bar.f = f; - })(foo.Bar || (foo.Bar = {})); - var Bar = foo.Bar; + })(Bar = foo.Bar || (foo.Bar = {})); })(foo || (foo = {})); var foo; (function (foo) { + var Baz; (function (Baz) { function g() { foo.Bar.f(); } Baz.g = g; - })(foo.Baz || (foo.Baz = {})); - var Baz = foo.Baz; + })(Baz = foo.Baz || (foo.Baz = {})); })(foo || (foo = {})); diff --git a/tests/baselines/reference/fuzzy.errors.txt b/tests/baselines/reference/fuzzy.errors.txt index dfe667b5be9..36124da5cea 100644 --- a/tests/baselines/reference/fuzzy.errors.txt +++ b/tests/baselines/reference/fuzzy.errors.txt @@ -32,7 +32,8 @@ worksToo():R { return ({ oneI: this }); ~~~~~~~~~~~~~~~~~~~ -!!! Neither type 'R' nor type '{ oneI: C; }' is assignable to the other. +!!! Neither type '{ oneI: C; }' nor type 'R' is assignable to the other: +!!! Property 'anything' is missing in type '{ oneI: C; }'. } } } diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments5.errors.txt b/tests/baselines/reference/genericCallWithFunctionTypedArguments5.errors.txt index c185756667a..8de5453e2af 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments5.errors.txt +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments5.errors.txt @@ -10,9 +10,9 @@ // more args not allowed var r2 = foo({ cb: (x: T, y: T) => '' }); // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '{ cb: (x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: (t: any) => string; }'. +!!! Argument of type '{ cb: (x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: (t: {}) => string; }'. !!! Types of property 'cb' are incompatible: -!!! Type '(x: T, y: T) => string' is not assignable to type '(t: any) => string'. +!!! Type '(x: T, y: T) => string' is not assignable to type '(t: {}) => string'. var r3 = foo({ cb: (x: string, y: number) => '' }); // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! Argument of type '{ cb: (x: string, y: number) => string; }' is not assignable to parameter of type '{ cb: (t: string) => string; }'. diff --git a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js index 52e66dafb7b..8d1e87cb495 100644 --- a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js +++ b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js @@ -84,7 +84,9 @@ var __extends = this.__extends || function (d, b) { }; var Portal; (function (Portal) { + var Controls; (function (Controls) { + var Validators; (function (Validators) { var Validator = (function () { function Validator(message) { @@ -97,15 +99,16 @@ var Portal; return Validator; })(); Validators.Validator = Validator; - })(Controls.Validators || (Controls.Validators = {})); - var Validators = Controls.Validators; - })(Portal.Controls || (Portal.Controls = {})); - var Controls = Portal.Controls; + })(Validators = Controls.Validators || (Controls.Validators = {})); + })(Controls = Portal.Controls || (Portal.Controls = {})); })(Portal || (Portal = {})); var PortalFx; (function (PortalFx) { + var ViewModels; (function (ViewModels) { + var Controls; (function (Controls) { + var Validators; (function (Validators) { var Validator = (function (_super) { __extends(Validator, _super); @@ -115,12 +118,9 @@ var PortalFx; return Validator; })(Portal.Controls.Validators.Validator); Validators.Validator = Validator; - })(Controls.Validators || (Controls.Validators = {})); - var Validators = Controls.Validators; - })(ViewModels.Controls || (ViewModels.Controls = {})); - var Controls = ViewModels.Controls; - })(PortalFx.ViewModels || (PortalFx.ViewModels = {})); - var ViewModels = PortalFx.ViewModels; + })(Validators = Controls.Validators || (Controls.Validators = {})); + })(Controls = ViewModels.Controls || (ViewModels.Controls = {})); + })(ViewModels = PortalFx.ViewModels || (PortalFx.ViewModels = {})); })(PortalFx || (PortalFx = {})); var ViewModel = (function () { function ViewModel() { diff --git a/tests/baselines/reference/genericCloduleInModule.js b/tests/baselines/reference/genericCloduleInModule.js index 9e39b518a03..f3938735695 100644 --- a/tests/baselines/reference/genericCloduleInModule.js +++ b/tests/baselines/reference/genericCloduleInModule.js @@ -25,10 +25,10 @@ var A; return B; })(); A.B = B; + var B; (function (B) { B.x = 1; - })(A.B || (A.B = {})); - var B = A.B; + })(B = A.B || (A.B = {})); })(A || (A = {})); var b; b.foo(); diff --git a/tests/baselines/reference/genericCloduleInModule2.js b/tests/baselines/reference/genericCloduleInModule2.js index 689f6d7da7b..1cb3bd66403 100644 --- a/tests/baselines/reference/genericCloduleInModule2.js +++ b/tests/baselines/reference/genericCloduleInModule2.js @@ -31,10 +31,10 @@ var A; })(A || (A = {})); var A; (function (A) { + var B; (function (B) { B.x = 1; - })(A.B || (A.B = {})); - var B = A.B; + })(B = A.B || (A.B = {})); })(A || (A = {})); var b; b.foo(); diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js index fbb4131d900..e2babf511b4 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js @@ -35,6 +35,7 @@ var __extends = this.__extends || function (d, b) { }; var EndGate; (function (EndGate) { + var Tweening; (function (Tweening) { var Tween = (function () { function Tween(from) { @@ -43,11 +44,11 @@ var EndGate; return Tween; })(); Tweening.Tween = Tween; - })(EndGate.Tweening || (EndGate.Tweening = {})); - var Tweening = EndGate.Tweening; + })(Tweening = EndGate.Tweening || (EndGate.Tweening = {})); })(EndGate || (EndGate = {})); var EndGate; (function (EndGate) { + var Tweening; (function (Tweening) { var NumberTween = (function (_super) { __extends(NumberTween, _super); @@ -57,6 +58,5 @@ var EndGate; return NumberTween; })(Tweening.Tween); Tweening.NumberTween = NumberTween; - })(EndGate.Tweening || (EndGate.Tweening = {})); - var Tweening = EndGate.Tweening; + })(Tweening = EndGate.Tweening || (EndGate.Tweening = {})); })(EndGate || (EndGate = {})); diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js index 0ffb1927f8d..ccbbf9d11a6 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js @@ -34,6 +34,7 @@ var __extends = this.__extends || function (d, b) { }; var EndGate; (function (EndGate) { + var Tweening; (function (Tweening) { var Tween = (function () { function Tween(from) { @@ -42,11 +43,11 @@ var EndGate; return Tween; })(); Tweening.Tween = Tween; - })(EndGate.Tweening || (EndGate.Tweening = {})); - var Tweening = EndGate.Tweening; + })(Tweening = EndGate.Tweening || (EndGate.Tweening = {})); })(EndGate || (EndGate = {})); var EndGate; (function (EndGate) { + var Tweening; (function (Tweening) { var NumberTween = (function (_super) { __extends(NumberTween, _super); @@ -56,6 +57,5 @@ var EndGate; return NumberTween; })(Tweening.Tween); Tweening.NumberTween = NumberTween; - })(EndGate.Tweening || (EndGate.Tweening = {})); - var Tweening = EndGate.Tweening; + })(Tweening = EndGate.Tweening || (EndGate.Tweening = {})); })(EndGate || (EndGate = {})); diff --git a/tests/baselines/reference/genericFunduleInModule.js b/tests/baselines/reference/genericFunduleInModule.js index f689770286c..5a85a46a395 100644 --- a/tests/baselines/reference/genericFunduleInModule.js +++ b/tests/baselines/reference/genericFunduleInModule.js @@ -16,10 +16,10 @@ var A; return x; } A.B = B; + var B; (function (B) { B.x = 1; - })(A.B || (A.B = {})); - var B = A.B; + })(B = A.B || (A.B = {})); })(A || (A = {})); var b; A.B(1); diff --git a/tests/baselines/reference/genericFunduleInModule2.js b/tests/baselines/reference/genericFunduleInModule2.js index 0d26023d3f0..6b5a0a74e23 100644 --- a/tests/baselines/reference/genericFunduleInModule2.js +++ b/tests/baselines/reference/genericFunduleInModule2.js @@ -22,10 +22,10 @@ var A; })(A || (A = {})); var A; (function (A) { + var B; (function (B) { B.x = 1; - })(A.B || (A.B = {})); - var B = A.B; + })(B = A.B || (A.B = {})); })(A || (A = {})); var b; A.B(1); diff --git a/tests/baselines/reference/genericOfACloduleType1.js b/tests/baselines/reference/genericOfACloduleType1.js index f9899f33cfc..435575b0152 100644 --- a/tests/baselines/reference/genericOfACloduleType1.js +++ b/tests/baselines/reference/genericOfACloduleType1.js @@ -31,6 +31,7 @@ var M; return C; })(); M.C = C; + var C; (function (C) { var X = (function () { function X() { @@ -38,8 +39,7 @@ var M; return X; })(); C.X = X; - })(M.C || (M.C = {})); - var C = M.C; + })(C = M.C || (M.C = {})); var g1 = new G(); g1.bar(null).foo(); })(M || (M = {})); diff --git a/tests/baselines/reference/genericOfACloduleType2.js b/tests/baselines/reference/genericOfACloduleType2.js index 7eb0a6f110e..4c73addcf72 100644 --- a/tests/baselines/reference/genericOfACloduleType2.js +++ b/tests/baselines/reference/genericOfACloduleType2.js @@ -34,6 +34,7 @@ var M; return C; })(); M.C = C; + var C; (function (C) { var X = (function () { function X() { @@ -41,8 +42,7 @@ var M; return X; })(); C.X = X; - })(M.C || (M.C = {})); - var C = M.C; + })(C = M.C || (M.C = {})); var g1 = new G(); g1.bar(null).foo(); // no error })(M || (M = {})); diff --git a/tests/baselines/reference/genericTypeAssertions1.errors.txt b/tests/baselines/reference/genericTypeAssertions1.errors.txt index 4a9b9207575..7ab9e056611 100644 --- a/tests/baselines/reference/genericTypeAssertions1.errors.txt +++ b/tests/baselines/reference/genericTypeAssertions1.errors.txt @@ -10,5 +10,6 @@ !!! Type 'A>' is not assignable to type 'A': !!! Type 'A' is not assignable to type 'number'. ~~~~~~~~~~~~~~~~~ -!!! Neither type 'A>' nor type 'A' is assignable to the other: -!!! Type 'A' is not assignable to type 'number'. \ No newline at end of file +!!! Neither type 'A' nor type 'A>' is assignable to the other: +!!! Type 'number' is not assignable to type 'A': +!!! Property 'foo' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeAssertions2.errors.txt b/tests/baselines/reference/genericTypeAssertions2.errors.txt index e2f874b5983..886031edaaf 100644 --- a/tests/baselines/reference/genericTypeAssertions2.errors.txt +++ b/tests/baselines/reference/genericTypeAssertions2.errors.txt @@ -22,4 +22,5 @@ var r4: A = >new A(); var r5: A = >[]; // error ~~~~~~~~~~~~~ -!!! Neither type 'A' nor type 'any[]' is assignable to the other. \ No newline at end of file +!!! Neither type 'undefined[]' nor type 'A' is assignable to the other: +!!! Property 'foo' is missing in type 'undefined[]'. \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeAssertions4.errors.txt b/tests/baselines/reference/genericTypeAssertions4.errors.txt index 13a4e2929b3..c109b6988e9 100644 --- a/tests/baselines/reference/genericTypeAssertions4.errors.txt +++ b/tests/baselines/reference/genericTypeAssertions4.errors.txt @@ -29,8 +29,8 @@ y = a; y = b; // error: cannot convert B to T ~~~~ -!!! Neither type 'T' nor type 'B' is assignable to the other. +!!! Neither type 'B' nor type 'T' is assignable to the other. y = c; // error: cannot convert C to T ~~~~ -!!! Neither type 'T' nor type 'C' is assignable to the other. +!!! Neither type 'C' nor type 'T' is assignable to the other. } \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeAssertions5.errors.txt b/tests/baselines/reference/genericTypeAssertions5.errors.txt index 7b25b898213..7fe23527273 100644 --- a/tests/baselines/reference/genericTypeAssertions5.errors.txt +++ b/tests/baselines/reference/genericTypeAssertions5.errors.txt @@ -29,8 +29,8 @@ y = a; y = b; // error: cannot convert B to T ~~~~ -!!! Neither type 'T' nor type 'B' is assignable to the other. +!!! Neither type 'B' nor type 'T' is assignable to the other. y = c; // error: cannot convert C to T ~~~~ -!!! Neither type 'T' nor type 'C' is assignable to the other. +!!! Neither type 'C' nor type 'T' is assignable to the other. } \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeAssertions6.errors.txt b/tests/baselines/reference/genericTypeAssertions6.errors.txt index abc78833071..99d7f6b8509 100644 --- a/tests/baselines/reference/genericTypeAssertions6.errors.txt +++ b/tests/baselines/reference/genericTypeAssertions6.errors.txt @@ -8,10 +8,10 @@ f(x: T, y: U) { x = y; ~~~~ -!!! Neither type 'T' nor type 'U' is assignable to the other. +!!! Neither type 'U' nor type 'T' is assignable to the other. y = x; ~~~~ -!!! Neither type 'U' nor type 'T' is assignable to the other. +!!! Neither type 'T' nor type 'U' is assignable to the other. } } @@ -23,7 +23,7 @@ var d = new Date(); var e = new Date(); ~~~~~~~~~~~~~~~~ -!!! Neither type 'T' nor type 'U' is assignable to the other. +!!! Neither type 'U' nor type 'T' is assignable to the other. } } diff --git a/tests/baselines/reference/implicitAnyFromCircularInference.errors.txt b/tests/baselines/reference/implicitAnyFromCircularInference.errors.txt new file mode 100644 index 00000000000..84366f86ec7 --- /dev/null +++ b/tests/baselines/reference/implicitAnyFromCircularInference.errors.txt @@ -0,0 +1,73 @@ +==== tests/cases/compiler/implicitAnyFromCircularInference.ts (9 errors) ==== + + // Error expected + var a: typeof a; + ~ +!!! 'a' implicitly has type 'any' because it is referenced directly or indirectly in its own type annotation. + + // Error expected on b or c + var b: typeof c; + var c: typeof b; + ~ +!!! 'c' implicitly has type 'any' because it is referenced directly or indirectly in its own type annotation. + + // Error expected + var d: Array; + ~ +!!! 'd' implicitly has type 'any' because it is referenced directly or indirectly in its own type annotation. + + function f() { return f; } + + // Error expected + function g() { return g(); } + ~ +!!! 'g' 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. + + // Error expected + var f1 = function () { + ~~~~~~~~~~~~~ + return f1(); + ~~~~~~~~~~~~~~~~ + }; + ~ +!!! 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. + + // Error expected + var f2 = () => f2(); + ~~~~~~~~~~ +!!! 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. + + // Error expected + function h() { + ~ +!!! 'h' 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. + return foo(); + function foo() { + return h() || "hello"; + } + } + + interface A { + s: string; + } + + function foo(x: A): string { return "abc"; } + + class C { + // Error expected + s = foo(this); + ~~~~~~~~~~~~~~ +!!! 's' implicitly has type 'any' because it is does not have a type annotation and is referenced directly or indirectly in its own initializer. + } + + class D { + // Error expected + get x() { + ~~~~~~~~~ + return this.x; + ~~~~~~~~~~~~~~~~~~~~~~ + } + ~~~~~ +!!! 'x' 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. + } + \ No newline at end of file diff --git a/tests/baselines/reference/implicitAnyFromCircularInference.js b/tests/baselines/reference/implicitAnyFromCircularInference.js new file mode 100644 index 00000000000..d97b8420ebf --- /dev/null +++ b/tests/baselines/reference/implicitAnyFromCircularInference.js @@ -0,0 +1,103 @@ +//// [implicitAnyFromCircularInference.ts] + +// Error expected +var a: typeof a; + +// Error expected on b or c +var b: typeof c; +var c: typeof b; + +// Error expected +var d: Array; + +function f() { return f; } + +// Error expected +function g() { return g(); } + +// Error expected +var f1 = function () { + return f1(); +}; + +// Error expected +var f2 = () => f2(); + +// Error expected +function h() { + return foo(); + function foo() { + return h() || "hello"; + } +} + +interface A { + s: string; +} + +function foo(x: A): string { return "abc"; } + +class C { + // Error expected + s = foo(this); +} + +class D { + // Error expected + get x() { + return this.x; + } +} + + +//// [implicitAnyFromCircularInference.js] +// Error expected +var a; +// Error expected on b or c +var b; +var c; +// Error expected +var d; +function f() { + return f; +} +// Error expected +function g() { + return g(); +} +// Error expected +var f1 = function () { + return f1(); +}; +// Error expected +var f2 = function () { return f2(); }; +// Error expected +function h() { + return foo(); + function foo() { + return h() || "hello"; + } +} +function foo(x) { + return "abc"; +} +var C = (function () { + function C() { + // Error expected + this.s = foo(this); + } + return C; +})(); +var D = (function () { + function D() { + } + Object.defineProperty(D.prototype, "x", { + // Error expected + get: function () { + return this.x; + }, + enumerable: true, + configurable: true + }); + return D; +})(); diff --git a/tests/baselines/reference/importAliasWithDottedName.js b/tests/baselines/reference/importAliasWithDottedName.js index 0d6769e7354..b78657f53ad 100644 --- a/tests/baselines/reference/importAliasWithDottedName.js +++ b/tests/baselines/reference/importAliasWithDottedName.js @@ -16,10 +16,10 @@ module A { var M; (function (M) { M.x = 1; + var N; (function (N) { N.y = 2; - })(M.N || (M.N = {})); - var N = M.N; + })(N = M.N || (M.N = {})); })(M || (M = {})); var A; (function (A) { diff --git a/tests/baselines/reference/importDecl.js b/tests/baselines/reference/importDecl.js index c9ef33c1201..d6f2855908e 100644 --- a/tests/baselines/reference/importDecl.js +++ b/tests/baselines/reference/importDecl.js @@ -144,6 +144,7 @@ var m4 = require("importDecl_require"); // Emit used exports.x4 = m4.x; exports.d4 = m4.d; exports.f4 = m4.foo(); +var m1; (function (m1) { m1.x2 = m4.x; m1.d2 = m4.d; @@ -151,8 +152,7 @@ exports.f4 = m4.foo(); var x3 = m4.x; var d3 = m4.d; var f3 = m4.foo(); -})(exports.m1 || (exports.m1 = {})); -var m1 = exports.m1; +})(m1 = exports.m1 || (exports.m1 = {})); //Emit global only usage var glo_m4 = require("importDecl_require1"); exports.useGlo_m4_d4 = glo_m4.d; @@ -162,12 +162,12 @@ var fncOnly_m4 = require("importDecl_require2"); exports.useFncOnly_m4_f4 = fncOnly_m4.foo(); // only used privately no need to emit var private_m4 = require("importDecl_require3"); +var usePrivate_m4_m1; (function (usePrivate_m4_m1) { var x3 = private_m4.x; var d3 = private_m4.d; var f3 = private_m4.foo(); -})(exports.usePrivate_m4_m1 || (exports.usePrivate_m4_m1 = {})); -var usePrivate_m4_m1 = exports.usePrivate_m4_m1; +})(usePrivate_m4_m1 = exports.usePrivate_m4_m1 || (exports.usePrivate_m4_m1 = {})); // Do not emit unused import var m5 = require("importDecl_require4"); exports.d = m5.foo2(); diff --git a/tests/baselines/reference/import_reference-exported-alias.js b/tests/baselines/reference/import_reference-exported-alias.js index e331583f14e..db6e10107fd 100644 --- a/tests/baselines/reference/import_reference-exported-alias.js +++ b/tests/baselines/reference/import_reference-exported-alias.js @@ -25,6 +25,7 @@ var x = new UserServices().getUserName(); define(["require", "exports"], function (require, exports) { var App; (function (App) { + var Services; (function (Services) { var UserServices = (function () { function UserServices() { @@ -35,8 +36,7 @@ define(["require", "exports"], function (require, exports) { return UserServices; })(); Services.UserServices = UserServices; - })(App.Services || (App.Services = {})); - var Services = App.Services; + })(Services = App.Services || (App.Services = {})); })(App || (App = {})); var Mod = App; return Mod; diff --git a/tests/baselines/reference/import_reference-to-type-alias.js b/tests/baselines/reference/import_reference-to-type-alias.js index 1c13b12d412..6d5415bcd2a 100644 --- a/tests/baselines/reference/import_reference-to-type-alias.js +++ b/tests/baselines/reference/import_reference-to-type-alias.js @@ -19,7 +19,9 @@ var x = new Services.UserServices().getUserName(); //// [file1.js] define(["require", "exports"], function (require, exports) { + var App; (function (App) { + var Services; (function (Services) { var UserServices = (function () { function UserServices() { @@ -30,10 +32,8 @@ define(["require", "exports"], function (require, exports) { return UserServices; })(); Services.UserServices = UserServices; - })(App.Services || (App.Services = {})); - var Services = App.Services; - })(exports.App || (exports.App = {})); - var App = exports.App; + })(Services = App.Services || (App.Services = {})); + })(App = exports.App || (exports.App = {})); }); //// [file2.js] define(["require", "exports", "file1"], function (require, exports, appJs) { diff --git a/tests/baselines/reference/incrementOperatorWithAnyOtherType.types b/tests/baselines/reference/incrementOperatorWithAnyOtherType.types index 3d43764943a..165c166941c 100644 --- a/tests/baselines/reference/incrementOperatorWithAnyOtherType.types +++ b/tests/baselines/reference/incrementOperatorWithAnyOtherType.types @@ -15,7 +15,7 @@ var obj = {x:1,y:null}; >obj : { x: number; y: any; } >{x:1,y:null} : { x: number; y: null; } >x : number ->y : any +>y : null class A { >A : A diff --git a/tests/baselines/reference/indexSignatureTypeInference.errors.txt b/tests/baselines/reference/indexSignatureTypeInference.errors.txt index a37e4458543..ee42069a4ec 100644 --- a/tests/baselines/reference/indexSignatureTypeInference.errors.txt +++ b/tests/baselines/reference/indexSignatureTypeInference.errors.txt @@ -1,4 +1,4 @@ -==== tests/cases/compiler/indexSignatureTypeInference.ts (1 errors) ==== +==== tests/cases/conformance/types/typeRelationships/typeInference/indexSignatureTypeInference.ts (1 errors) ==== interface NumberMap { [index: number]: T; } diff --git a/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.types b/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.types index 0596081ade3..c411dd00514 100644 --- a/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.types +++ b/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.types @@ -20,10 +20,10 @@ declare function identity(y: V): V; >V : V var s = map("", () => { return { x: identity }; }); ->s : any ->map("", () => { return { x: identity }; }) : any +>s : string +>map("", () => { return { x: identity }; }) : string >map : (x: T, f: () => { x: (s: T) => U; }) => U ->() => { return { x: identity }; } : () => { x: (y: V) => V; } +>() => { return { x: identity }; } : () => { x: (y: string) => string; } >{ x: identity } : { x: (y: V) => V; } >x : (y: V) => V >identity : (y: V) => V diff --git a/tests/baselines/reference/innerAliases.js b/tests/baselines/reference/innerAliases.js index 65699636505..95a3712ca85 100644 --- a/tests/baselines/reference/innerAliases.js +++ b/tests/baselines/reference/innerAliases.js @@ -26,7 +26,9 @@ c = new D.inner.Class1(); //// [innerAliases.js] var A; (function (A) { + var B; (function (B) { + var C; (function (C) { var Class1 = (function () { function Class1() { @@ -34,15 +36,14 @@ var A; return Class1; })(); C.Class1 = Class1; - })(B.C || (B.C = {})); - var C = B.C; - })(A.B || (A.B = {})); - var B = A.B; + })(C = B.C || (B.C = {})); + })(B = A.B || (A.B = {})); })(A || (A = {})); var D; (function (D) { var inner = A.B.C; var c1 = new inner.Class1(); + var E; (function (E) { var Class2 = (function () { function Class2() { @@ -50,8 +51,7 @@ var D; return Class2; })(); E.Class2 = Class2; - })(D.E || (D.E = {})); - var E = D.E; + })(E = D.E || (D.E = {})); })(D || (D = {})); var c; c = new D.inner.Class1(); diff --git a/tests/baselines/reference/innerExtern.js b/tests/baselines/reference/innerExtern.js index 2b1eaff0b00..5b933f980f4 100644 --- a/tests/baselines/reference/innerExtern.js +++ b/tests/baselines/reference/innerExtern.js @@ -16,6 +16,7 @@ module A { //// [innerExtern.js] var A; (function (A) { + var B; (function (B) { var C = (function () { function C() { @@ -24,6 +25,5 @@ var A; return C; })(); B.C = C; - })(A.B || (A.B = {})); - var B = A.B; + })(B = A.B || (A.B = {})); })(A || (A = {})); diff --git a/tests/baselines/reference/intTypeCheck.errors.txt b/tests/baselines/reference/intTypeCheck.errors.txt index cb2075efbdc..29462bbf527 100644 --- a/tests/baselines/reference/intTypeCheck.errors.txt +++ b/tests/baselines/reference/intTypeCheck.errors.txt @@ -315,7 +315,7 @@ var obj69: i7 = new obj66; var obj70: i7 = new Base; ~~~~~~~~~~~~ -!!! Neither type 'i7' nor type 'Base' is assignable to the other. +!!! Neither type 'Base' nor type 'i7' is assignable to the other. var obj71: i7 = null; var obj72: i7 = function () { }; ~~~~~ diff --git a/tests/baselines/reference/interMixingModulesInterfaces0.js b/tests/baselines/reference/interMixingModulesInterfaces0.js index 8a35ab32f66..bedf1404c87 100644 --- a/tests/baselines/reference/interMixingModulesInterfaces0.js +++ b/tests/baselines/reference/interMixingModulesInterfaces0.js @@ -18,12 +18,12 @@ var x: A.B = A.B.createB(); //// [interMixingModulesInterfaces0.js] var A; (function (A) { + var B; (function (B) { function createB() { return null; } B.createB = createB; - })(A.B || (A.B = {})); - var B = A.B; + })(B = A.B || (A.B = {})); })(A || (A = {})); var x = A.B.createB(); diff --git a/tests/baselines/reference/interMixingModulesInterfaces1.js b/tests/baselines/reference/interMixingModulesInterfaces1.js index 8ab1d6c0f2a..97f9d339dc8 100644 --- a/tests/baselines/reference/interMixingModulesInterfaces1.js +++ b/tests/baselines/reference/interMixingModulesInterfaces1.js @@ -18,12 +18,12 @@ var x: A.B = A.B.createB(); //// [interMixingModulesInterfaces1.js] var A; (function (A) { + var B; (function (B) { function createB() { return null; } B.createB = createB; - })(A.B || (A.B = {})); - var B = A.B; + })(B = A.B || (A.B = {})); })(A || (A = {})); var x = A.B.createB(); diff --git a/tests/baselines/reference/interMixingModulesInterfaces4.js b/tests/baselines/reference/interMixingModulesInterfaces4.js index 5eb2023add0..a7527b8ec8f 100644 --- a/tests/baselines/reference/interMixingModulesInterfaces4.js +++ b/tests/baselines/reference/interMixingModulesInterfaces4.js @@ -18,12 +18,12 @@ var x : number = A.B.createB(); //// [interMixingModulesInterfaces4.js] var A; (function (A) { + var B; (function (B) { function createB() { return null; } B.createB = createB; - })(A.B || (A.B = {})); - var B = A.B; + })(B = A.B || (A.B = {})); })(A || (A = {})); var x = A.B.createB(); diff --git a/tests/baselines/reference/interMixingModulesInterfaces5.js b/tests/baselines/reference/interMixingModulesInterfaces5.js index 6faa5631bc3..3edbcdfae43 100644 --- a/tests/baselines/reference/interMixingModulesInterfaces5.js +++ b/tests/baselines/reference/interMixingModulesInterfaces5.js @@ -18,12 +18,12 @@ var x: number = A.B.createB(); //// [interMixingModulesInterfaces5.js] var A; (function (A) { + var B; (function (B) { function createB() { return null; } B.createB = createB; - })(A.B || (A.B = {})); - var B = A.B; + })(B = A.B || (A.B = {})); })(A || (A = {})); var x = A.B.createB(); diff --git a/tests/baselines/reference/interfaceDeclaration3.js b/tests/baselines/reference/interfaceDeclaration3.js index 95d8409bd4c..4984bc48126 100644 --- a/tests/baselines/reference/interfaceDeclaration3.js +++ b/tests/baselines/reference/interfaceDeclaration3.js @@ -85,6 +85,7 @@ define(["require", "exports"], function (require, exports) { return C5; })(); })(M1 || (M1 = {})); + var M2; (function (M2) { var C1 = (function () { function C1() { @@ -101,8 +102,7 @@ define(["require", "exports"], function (require, exports) { } return C3; })(); - })(exports.M2 || (exports.M2 = {})); - var M2 = exports.M2; + })(M2 = exports.M2 || (exports.M2 = {})); var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/interfaceWithPropertyOfEveryType.types b/tests/baselines/reference/interfaceWithPropertyOfEveryType.types index 69ad29374a2..21d4359b6fb 100644 --- a/tests/baselines/reference/interfaceWithPropertyOfEveryType.types +++ b/tests/baselines/reference/interfaceWithPropertyOfEveryType.types @@ -95,7 +95,7 @@ var a: Foo = { >{} : {} e: null , ->e : any +>e : null f: [1], >f : number[] diff --git a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithExport.js b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithExport.js index 811585cbf4f..c240f97b3c9 100644 --- a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithExport.js +++ b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithExport.js @@ -18,6 +18,7 @@ export module m2 { export var d = new m2.m3.c(); //// [internalAliasClassInsideLocalModuleWithExport.js] +var x; (function (x) { var c = (function () { function c() { @@ -28,17 +29,16 @@ export var d = new m2.m3.c(); return c; })(); x.c = c; -})(exports.x || (exports.x = {})); -var x = exports.x; +})(x = exports.x || (exports.x = {})); +var m2; (function (m2) { + var m3; (function (m3) { m3.c = x.c; m3.cProp = new m3.c(); var cReturnVal = m3.cProp.foo(10); - })(m2.m3 || (m2.m3 = {})); - var m3 = m2.m3; -})(exports.m2 || (exports.m2 = {})); -var m2 = exports.m2; + })(m3 = m2.m3 || (m2.m3 = {})); +})(m2 = exports.m2 || (exports.m2 = {})); exports.d = new m2.m3.c(); diff --git a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExport.js b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExport.js index 911800e0c69..1685843d113 100644 --- a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExport.js @@ -16,6 +16,7 @@ export module m2 { } //// [internalAliasClassInsideLocalModuleWithoutExport.js] +var x; (function (x) { var c = (function () { function c() { @@ -26,17 +27,16 @@ export module m2 { return c; })(); x.c = c; -})(exports.x || (exports.x = {})); -var x = exports.x; +})(x = exports.x || (exports.x = {})); +var m2; (function (m2) { + var m3; (function (m3) { var c = x.c; m3.cProp = new c(); var cReturnVal = m3.cProp.foo(10); - })(m2.m3 || (m2.m3 = {})); - var m3 = m2.m3; -})(exports.m2 || (exports.m2 = {})); -var m2 = exports.m2; + })(m3 = m2.m3 || (m2.m3 = {})); +})(m2 = exports.m2 || (exports.m2 = {})); //// [internalAliasClassInsideLocalModuleWithoutExport.d.ts] diff --git a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExportAccessError.js b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExportAccessError.js index 0c0290ab87b..d8af951b7e8 100644 --- a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExportAccessError.js +++ b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExportAccessError.js @@ -18,6 +18,7 @@ export module m2 { export var d = new m2.m3.c(); //// [internalAliasClassInsideLocalModuleWithoutExportAccessError.js] +var x; (function (x) { var c = (function () { function c() { @@ -28,15 +29,14 @@ export var d = new m2.m3.c(); return c; })(); x.c = c; -})(exports.x || (exports.x = {})); -var x = exports.x; +})(x = exports.x || (exports.x = {})); +var m2; (function (m2) { + var m3; (function (m3) { var c = x.c; m3.cProp = new c(); var cReturnVal = m3.cProp.foo(10); - })(m2.m3 || (m2.m3 = {})); - var m3 = m2.m3; -})(exports.m2 || (exports.m2 = {})); -var m2 = exports.m2; + })(m3 = m2.m3 || (m2.m3 = {})); +})(m2 = exports.m2 || (exports.m2 = {})); exports.d = new m2.m3.c(); diff --git a/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithExport.js b/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithExport.js index eea66559139..ef13909e48c 100644 --- a/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithExport.js +++ b/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithExport.js @@ -12,6 +12,7 @@ export var cProp = new xc(); var cReturnVal = cProp.foo(10); //// [internalAliasClassInsideTopLevelModuleWithExport.js] +var x; (function (x) { var c = (function () { function c() { @@ -22,8 +23,7 @@ var cReturnVal = cProp.foo(10); return c; })(); x.c = c; -})(exports.x || (exports.x = {})); -var x = exports.x; +})(x = exports.x || (exports.x = {})); exports.xc = x.c; exports.cProp = new exports.xc(); var cReturnVal = exports.cProp.foo(10); diff --git a/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithoutExport.js b/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithoutExport.js index 21b96842e17..156ca84dfb2 100644 --- a/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithoutExport.js @@ -12,6 +12,7 @@ export var cProp = new xc(); var cReturnVal = cProp.foo(10); //// [internalAliasClassInsideTopLevelModuleWithoutExport.js] +var x; (function (x) { var c = (function () { function c() { @@ -22,8 +23,7 @@ var cReturnVal = cProp.foo(10); return c; })(); x.c = c; -})(exports.x || (exports.x = {})); -var x = exports.x; +})(x = exports.x || (exports.x = {})); var xc = x.c; exports.cProp = new xc(); var cReturnVal = exports.cProp.foo(10); diff --git a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.js b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.js index 56cac6ad16d..e21dd355322 100644 --- a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.js +++ b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.js @@ -14,6 +14,7 @@ export module c { //// [internalAliasEnumInsideLocalModuleWithExport.js] +var a; (function (a) { (function (weekend) { weekend[weekend["Friday"] = 0] = "Friday"; @@ -21,13 +22,12 @@ export module c { weekend[weekend["Sunday"] = 2] = "Sunday"; })(a.weekend || (a.weekend = {})); var weekend = a.weekend; -})(exports.a || (exports.a = {})); -var a = exports.a; +})(a = exports.a || (exports.a = {})); +var c; (function (c) { c.b = a.weekend; c.bVal = 2 /* Sunday */; -})(exports.c || (exports.c = {})); -var c = exports.c; +})(c = exports.c || (exports.c = {})); //// [internalAliasEnumInsideLocalModuleWithExport.d.ts] diff --git a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.js b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.js index b4b4730eb28..3d60e055ede 100644 --- a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.js @@ -14,6 +14,7 @@ export module c { //// [internalAliasEnumInsideLocalModuleWithoutExport.js] +var a; (function (a) { (function (weekend) { weekend[weekend["Friday"] = 0] = "Friday"; @@ -21,13 +22,12 @@ export module c { weekend[weekend["Sunday"] = 2] = "Sunday"; })(a.weekend || (a.weekend = {})); var weekend = a.weekend; -})(exports.a || (exports.a = {})); -var a = exports.a; +})(a = exports.a || (exports.a = {})); +var c; (function (c) { var b = a.weekend; c.bVal = 2 /* Sunday */; -})(exports.c || (exports.c = {})); -var c = exports.c; +})(c = exports.c || (exports.c = {})); //// [internalAliasEnumInsideLocalModuleWithoutExport.d.ts] diff --git a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.js b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.js index 266e51bfe35..f050d6f9a55 100644 --- a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.js +++ b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.js @@ -15,6 +15,7 @@ export module c { var happyFriday = c.b.Friday; //// [internalAliasEnumInsideLocalModuleWithoutExportAccessError.js] +var a; (function (a) { (function (weekend) { weekend[weekend["Friday"] = 0] = "Friday"; @@ -22,11 +23,10 @@ var happyFriday = c.b.Friday; weekend[weekend["Sunday"] = 2] = "Sunday"; })(a.weekend || (a.weekend = {})); var weekend = a.weekend; -})(exports.a || (exports.a = {})); -var a = exports.a; +})(a = exports.a || (exports.a = {})); +var c; (function (c) { var b = a.weekend; c.bVal = 2 /* Sunday */; -})(exports.c || (exports.c = {})); -var c = exports.c; +})(c = exports.c || (exports.c = {})); var happyFriday = c.b.Friday; diff --git a/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithExport.js b/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithExport.js index 3ac848b7093..e4dc73b2403 100644 --- a/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithExport.js +++ b/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithExport.js @@ -13,6 +13,7 @@ export var bVal: b = b.Sunday; //// [internalAliasEnumInsideTopLevelModuleWithExport.js] define(["require", "exports"], function (require, exports) { + var a; (function (a) { (function (weekend) { weekend[weekend["Friday"] = 0] = "Friday"; @@ -20,8 +21,7 @@ define(["require", "exports"], function (require, exports) { weekend[weekend["Sunday"] = 2] = "Sunday"; })(a.weekend || (a.weekend = {})); var weekend = a.weekend; - })(exports.a || (exports.a = {})); - var a = exports.a; + })(a = exports.a || (exports.a = {})); exports.b = a.weekend; exports.bVal = 2 /* Sunday */; }); diff --git a/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithoutExport.js b/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithoutExport.js index 762bc0a343a..e81093147e8 100644 --- a/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithoutExport.js @@ -13,6 +13,7 @@ export var bVal: b = b.Sunday; //// [internalAliasEnumInsideTopLevelModuleWithoutExport.js] define(["require", "exports"], function (require, exports) { + var a; (function (a) { (function (weekend) { weekend[weekend["Friday"] = 0] = "Friday"; @@ -20,8 +21,7 @@ define(["require", "exports"], function (require, exports) { weekend[weekend["Sunday"] = 2] = "Sunday"; })(a.weekend || (a.weekend = {})); var weekend = a.weekend; - })(exports.a || (exports.a = {})); - var a = exports.a; + })(a = exports.a || (exports.a = {})); var b = a.weekend; exports.bVal = 2 /* Sunday */; }); diff --git a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithExport.js b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithExport.js index eb758b913e6..e7b536f3107 100644 --- a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithExport.js +++ b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithExport.js @@ -13,19 +13,19 @@ export module c { //// [internalAliasFunctionInsideLocalModuleWithExport.js] +var a; (function (a) { function foo(x) { return x; } a.foo = foo; -})(exports.a || (exports.a = {})); -var a = exports.a; +})(a = exports.a || (exports.a = {})); +var c; (function (c) { c.b = a.foo; c.bVal = c.b(10); c.bVal2 = c.b; -})(exports.c || (exports.c = {})); -var c = exports.c; +})(c = exports.c || (exports.c = {})); //// [internalAliasFunctionInsideLocalModuleWithExport.d.ts] diff --git a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExport.js b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExport.js index 0423a587e84..da24367ad50 100644 --- a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExport.js @@ -13,19 +13,19 @@ export module c { //// [internalAliasFunctionInsideLocalModuleWithoutExport.js] +var a; (function (a) { function foo(x) { return x; } a.foo = foo; -})(exports.a || (exports.a = {})); -var a = exports.a; +})(a = exports.a || (exports.a = {})); +var c; (function (c) { var b = a.foo; var bVal = b(10); c.bVal2 = b; -})(exports.c || (exports.c = {})); -var c = exports.c; +})(c = exports.c || (exports.c = {})); //// [internalAliasFunctionInsideLocalModuleWithoutExport.d.ts] diff --git a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.js b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.js index 20a7ea28201..dd1eaa222c2 100644 --- a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.js +++ b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.js @@ -13,17 +13,17 @@ export module c { var d = c.b(11); //// [internalAliasFunctionInsideLocalModuleWithoutExportAccessError.js] +var a; (function (a) { function foo(x) { return x; } a.foo = foo; -})(exports.a || (exports.a = {})); -var a = exports.a; +})(a = exports.a || (exports.a = {})); +var c; (function (c) { var b = a.foo; var bVal = b(10); c.bVal2 = b; -})(exports.c || (exports.c = {})); -var c = exports.c; +})(c = exports.c || (exports.c = {})); var d = c.b(11); diff --git a/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithExport.js b/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithExport.js index 7fe09d1e02b..cfcb7737be6 100644 --- a/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithExport.js +++ b/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithExport.js @@ -12,13 +12,13 @@ export var bVal2 = b; //// [internalAliasFunctionInsideTopLevelModuleWithExport.js] define(["require", "exports"], function (require, exports) { + var a; (function (a) { function foo(x) { return x; } a.foo = foo; - })(exports.a || (exports.a = {})); - var a = exports.a; + })(a = exports.a || (exports.a = {})); exports.b = a.foo; exports.bVal = exports.b(10); exports.bVal2 = exports.b; diff --git a/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithoutExport.js b/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithoutExport.js index c049bfcf858..1d33505c103 100644 --- a/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithoutExport.js @@ -11,13 +11,13 @@ export var bVal2 = b; //// [internalAliasFunctionInsideTopLevelModuleWithoutExport.js] +var a; (function (a) { function foo(x) { return x; } a.foo = foo; -})(exports.a || (exports.a = {})); -var a = exports.a; +})(a = exports.a || (exports.a = {})); var b = a.foo; exports.bVal = b(10); exports.bVal2 = b; diff --git a/tests/baselines/reference/internalAliasInitializedModule.js b/tests/baselines/reference/internalAliasInitializedModule.js index 9e97ba637d0..d7f741b7228 100644 --- a/tests/baselines/reference/internalAliasInitializedModule.js +++ b/tests/baselines/reference/internalAliasInitializedModule.js @@ -14,6 +14,7 @@ module c { //// [internalAliasInitializedModule.js] var a; (function (a) { + var b; (function (b) { var c = (function () { function c() { @@ -21,8 +22,7 @@ var a; return c; })(); b.c = c; - })(a.b || (a.b = {})); - var b = a.b; + })(b = a.b || (a.b = {})); })(a || (a = {})); var c; (function (c) { diff --git a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithExport.js b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithExport.js index b39fd09a73c..ca8ad55cdcd 100644 --- a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithExport.js +++ b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithExport.js @@ -13,7 +13,9 @@ export module c { //// [internalAliasInitializedModuleInsideLocalModuleWithExport.js] define(["require", "exports"], function (require, exports) { + var a; (function (a) { + var b; (function (b) { var c = (function () { function c() { @@ -21,15 +23,13 @@ define(["require", "exports"], function (require, exports) { return c; })(); b.c = c; - })(a.b || (a.b = {})); - var b = a.b; - })(exports.a || (exports.a = {})); - var a = exports.a; + })(b = a.b || (a.b = {})); + })(a = exports.a || (exports.a = {})); + var c; (function (c) { c.b = a.b; c.x = new c.b.c(); - })(exports.c || (exports.c = {})); - var c = exports.c; + })(c = exports.c || (exports.c = {})); }); diff --git a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExport.js b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExport.js index 79cbcbac448..c50324562af 100644 --- a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExport.js @@ -12,7 +12,9 @@ export module c { } //// [internalAliasInitializedModuleInsideLocalModuleWithoutExport.js] +var a; (function (a) { + var b; (function (b) { var c = (function () { function c() { @@ -20,15 +22,13 @@ export module c { return c; })(); b.c = c; - })(a.b || (a.b = {})); - var b = a.b; -})(exports.a || (exports.a = {})); -var a = exports.a; + })(b = a.b || (a.b = {})); +})(a = exports.a || (exports.a = {})); +var c; (function (c) { var b = a.b; c.x = new b.c(); -})(exports.c || (exports.c = {})); -var c = exports.c; +})(c = exports.c || (exports.c = {})); //// [internalAliasInitializedModuleInsideLocalModuleWithoutExport.d.ts] diff --git a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.js b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.js index 15283a8962d..50885663062 100644 --- a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.js +++ b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.js @@ -14,7 +14,9 @@ export module c { export var d = new c.b.c(); //// [internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.js] +var a; (function (a) { + var b; (function (b) { var c = (function () { function c() { @@ -22,13 +24,11 @@ export var d = new c.b.c(); return c; })(); b.c = c; - })(a.b || (a.b = {})); - var b = a.b; -})(exports.a || (exports.a = {})); -var a = exports.a; + })(b = a.b || (a.b = {})); +})(a = exports.a || (exports.a = {})); +var c; (function (c) { var b = a.b; c.x = new b.c(); -})(exports.c || (exports.c = {})); -var c = exports.c; +})(c = exports.c || (exports.c = {})); exports.d = new c.b.c(); diff --git a/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js b/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js index 919d1037922..cf1e82bb725 100644 --- a/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js +++ b/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js @@ -10,7 +10,9 @@ export import b = a.b; export var x: b.c = new b.c(); //// [internalAliasInitializedModuleInsideTopLevelModuleWithExport.js] +var a; (function (a) { + var b; (function (b) { var c = (function () { function c() { @@ -18,10 +20,8 @@ export var x: b.c = new b.c(); return c; })(); b.c = c; - })(a.b || (a.b = {})); - var b = a.b; -})(exports.a || (exports.a = {})); -var a = exports.a; + })(b = a.b || (a.b = {})); +})(a = exports.a || (exports.a = {})); exports.b = a.b; exports.x = new exports.b.c(); diff --git a/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.js b/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.js index c066c10298e..8c905bd5543 100644 --- a/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.js @@ -11,7 +11,9 @@ export var x: b.c = new b.c(); //// [internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.js] define(["require", "exports"], function (require, exports) { + var a; (function (a) { + var b; (function (b) { var c = (function () { function c() { @@ -19,10 +21,8 @@ define(["require", "exports"], function (require, exports) { return c; })(); b.c = c; - })(a.b || (a.b = {})); - var b = a.b; - })(exports.a || (exports.a = {})); - var a = exports.a; + })(b = a.b || (a.b = {})); + })(a = exports.a || (exports.a = {})); var b = a.b; exports.x = new b.c(); }); diff --git a/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithExport.js b/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithExport.js index 0b8181b88e2..c4852ffe27a 100644 --- a/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithExport.js +++ b/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithExport.js @@ -12,10 +12,10 @@ export module c { //// [internalAliasInterfaceInsideLocalModuleWithExport.js] define(["require", "exports"], function (require, exports) { + var c; (function (c) { c.x; - })(exports.c || (exports.c = {})); - var c = exports.c; + })(c = exports.c || (exports.c = {})); }); diff --git a/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExport.js b/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExport.js index 04a3bfa25c1..b09f21650e4 100644 --- a/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExport.js @@ -12,10 +12,10 @@ export module c { //// [internalAliasInterfaceInsideLocalModuleWithoutExport.js] define(["require", "exports"], function (require, exports) { + var c; (function (c) { c.x; - })(exports.c || (exports.c = {})); - var c = exports.c; + })(c = exports.c || (exports.c = {})); }); diff --git a/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.js b/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.js index 57c4dfb4cd0..1d13192c928 100644 --- a/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.js +++ b/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.js @@ -13,9 +13,9 @@ var x: c.b; //// [internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.js] define(["require", "exports"], function (require, exports) { + var c; (function (c) { c.x; - })(exports.c || (exports.c = {})); - var c = exports.c; + })(c = exports.c || (exports.c = {})); var x; }); diff --git a/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithExport.js b/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithExport.js index c3a6173cb04..5c67c835f1f 100644 --- a/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithExport.js +++ b/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithExport.js @@ -14,11 +14,11 @@ export module c { } //// [internalAliasUninitializedModuleInsideLocalModuleWithExport.js] +var c; (function (c) { c.x; c.x.foo(); -})(exports.c || (exports.c = {})); -var c = exports.c; +})(c = exports.c || (exports.c = {})); //// [internalAliasUninitializedModuleInsideLocalModuleWithExport.d.ts] diff --git a/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.js b/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.js index 13c4ef61689..6f85a346891 100644 --- a/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.js @@ -14,11 +14,11 @@ export module c { } //// [internalAliasUninitializedModuleInsideLocalModuleWithoutExport.js] +var c; (function (c) { c.x; c.x.foo(); -})(exports.c || (exports.c = {})); -var c = exports.c; +})(c = exports.c || (exports.c = {})); //// [internalAliasUninitializedModuleInsideLocalModuleWithoutExport.d.ts] diff --git a/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.js b/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.js index dacc4d6a134..61d1005c9f4 100644 --- a/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.js +++ b/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.js @@ -18,10 +18,10 @@ export var z: c.b.I; //// [internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.js] define(["require", "exports"], function (require, exports) { + var c; (function (c) { c.x; c.x.foo(); - })(exports.c || (exports.c = {})); - var c = exports.c; + })(c = exports.c || (exports.c = {})); exports.z; }); diff --git a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithExport.js b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithExport.js index 3ec1f939c8f..ab8cae06910 100644 --- a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithExport.js +++ b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithExport.js @@ -11,15 +11,15 @@ export module c { //// [internalAliasVarInsideLocalModuleWithExport.js] define(["require", "exports"], function (require, exports) { + var a; (function (a) { a.x = 10; - })(exports.a || (exports.a = {})); - var a = exports.a; + })(a = exports.a || (exports.a = {})); + var c; (function (c) { c.b = a.x; c.bVal = c.b; - })(exports.c || (exports.c = {})); - var c = exports.c; + })(c = exports.c || (exports.c = {})); }); diff --git a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExport.js b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExport.js index 60a20c3c72b..ac6f282ba81 100644 --- a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExport.js @@ -11,15 +11,15 @@ export module c { //// [internalAliasVarInsideLocalModuleWithoutExport.js] define(["require", "exports"], function (require, exports) { + var a; (function (a) { a.x = 10; - })(exports.a || (exports.a = {})); - var a = exports.a; + })(a = exports.a || (exports.a = {})); + var c; (function (c) { var b = a.x; c.bVal = b; - })(exports.c || (exports.c = {})); - var c = exports.c; + })(c = exports.c || (exports.c = {})); }); diff --git a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.js b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.js index c1a6493066a..604a9a2a414 100644 --- a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.js +++ b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.js @@ -11,13 +11,13 @@ export module c { export var z = c.b; //// [internalAliasVarInsideLocalModuleWithoutExportAccessError.js] +var a; (function (a) { a.x = 10; -})(exports.a || (exports.a = {})); -var a = exports.a; +})(a = exports.a || (exports.a = {})); +var c; (function (c) { var b = a.x; c.bVal = b; -})(exports.c || (exports.c = {})); -var c = exports.c; +})(c = exports.c || (exports.c = {})); exports.z = c.b; diff --git a/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithExport.js b/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithExport.js index 6371af09e2f..3dbc9b6a94a 100644 --- a/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithExport.js +++ b/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithExport.js @@ -10,10 +10,10 @@ export var bVal = b; //// [internalAliasVarInsideTopLevelModuleWithExport.js] define(["require", "exports"], function (require, exports) { + var a; (function (a) { a.x = 10; - })(exports.a || (exports.a = {})); - var a = exports.a; + })(a = exports.a || (exports.a = {})); exports.b = a.x; exports.bVal = exports.b; }); diff --git a/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithoutExport.js b/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithoutExport.js index be322802389..8ce6f91d040 100644 --- a/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithoutExport.js @@ -9,10 +9,10 @@ export var bVal = b; //// [internalAliasVarInsideTopLevelModuleWithoutExport.js] +var a; (function (a) { a.x = 10; -})(exports.a || (exports.a = {})); -var a = exports.a; +})(a = exports.a || (exports.a = {})); var b = a.x; exports.bVal = b; diff --git a/tests/baselines/reference/internalAliasWithDottedNameEmit.js b/tests/baselines/reference/internalAliasWithDottedNameEmit.js index d6a4cfcfff7..98c8ce36a6c 100644 --- a/tests/baselines/reference/internalAliasWithDottedNameEmit.js +++ b/tests/baselines/reference/internalAliasWithDottedNameEmit.js @@ -10,13 +10,13 @@ module a.e.f { //// [internalAliasWithDottedNameEmit.js] var a; (function (a) { + var b; (function (b) { + var c; (function (c) { c.d; - })(b.c || (b.c = {})); - var c = b.c; - })(a.b || (a.b = {})); - var b = a.b; + })(c = b.c || (b.c = {})); + })(b = a.b || (a.b = {})); })(a || (a = {})); diff --git a/tests/baselines/reference/invalidNestedModules.js b/tests/baselines/reference/invalidNestedModules.js index 83e82ec656c..0679dae7ac6 100644 --- a/tests/baselines/reference/invalidNestedModules.js +++ b/tests/baselines/reference/invalidNestedModules.js @@ -32,7 +32,9 @@ module M2 { //// [invalidNestedModules.js] var A; (function (A) { + var B; (function (B) { + var C; (function (C) { var Point = (function () { function Point() { @@ -40,13 +42,12 @@ var A; return Point; })(); C.Point = Point; - })(B.C || (B.C = {})); - var C = B.C; - })(A.B || (A.B = {})); - var B = A.B; + })(C = B.C || (B.C = {})); + })(B = A.B || (A.B = {})); })(A || (A = {})); var A; (function (A) { + var B; (function (B) { var C = (function () { function C() { @@ -54,11 +55,11 @@ var A; return C; })(); B.C = C; - })(A.B || (A.B = {})); - var B = A.B; + })(B = A.B || (A.B = {})); })(A || (A = {})); var M2; (function (M2) { + var X; (function (X) { var Point = (function () { function Point() { @@ -66,13 +67,12 @@ var M2; return Point; })(); X.Point = Point; - })(M2.X || (M2.X = {})); - var X = M2.X; + })(X = M2.X || (M2.X = {})); })(M2 || (M2 = {})); var M2; (function (M2) { + var X; (function (X) { X.Point; // Error - })(M2.X || (M2.X = {})); - var X = M2.X; + })(X = M2.X || (M2.X = {})); })(M2 || (M2 = {})); diff --git a/tests/baselines/reference/literals-negative.errors.txt b/tests/baselines/reference/literals-negative.errors.txt index a7e7b08d46a..276afb5a81d 100644 --- a/tests/baselines/reference/literals-negative.errors.txt +++ b/tests/baselines/reference/literals-negative.errors.txt @@ -5,7 +5,7 @@ var s = (null); var b = (n); ~~~~~~~~~~~~ -!!! Neither type 'boolean' nor type 'number' is assignable to the other. +!!! Neither type 'number' nor type 'boolean' is assignable to the other. function isVoid() : void { } diff --git a/tests/baselines/reference/mergeThreeInterfaces2.js b/tests/baselines/reference/mergeThreeInterfaces2.js index cab0019a641..f853dad3a28 100644 --- a/tests/baselines/reference/mergeThreeInterfaces2.js +++ b/tests/baselines/reference/mergeThreeInterfaces2.js @@ -86,30 +86,30 @@ var M2; // same as above but with an additional level of nesting and third module declaration var M2; (function (M2) { + var M3; (function (M3) { var a; var r1 = a.foo; var r2 = a.bar; - })(M2.M3 || (M2.M3 = {})); - var M3 = M2.M3; + })(M3 = M2.M3 || (M2.M3 = {})); })(M2 || (M2 = {})); var M2; (function (M2) { + var M3; (function (M3) { var a; var r1 = a.foo; var r2 = a.bar; var r3 = a.baz; - })(M2.M3 || (M2.M3 = {})); - var M3 = M2.M3; + })(M3 = M2.M3 || (M2.M3 = {})); })(M2 || (M2 = {})); var M2; (function (M2) { + var M3; (function (M3) { var a; var r1 = a.foo; var r2 = a.bar; var r3 = a.baz; - })(M2.M3 || (M2.M3 = {})); - var M3 = M2.M3; + })(M3 = M2.M3 || (M2.M3 = {})); })(M2 || (M2 = {})); diff --git a/tests/baselines/reference/mergeTwoInterfaces2.js b/tests/baselines/reference/mergeTwoInterfaces2.js index cdc414b3ccd..4f45c8f821e 100644 --- a/tests/baselines/reference/mergeTwoInterfaces2.js +++ b/tests/baselines/reference/mergeTwoInterfaces2.js @@ -65,19 +65,19 @@ var M2; // same as above but with an additional level of nesting var M2; (function (M2) { + var M3; (function (M3) { var a; var r1 = a.foo; var r2 = a.bar; - })(M2.M3 || (M2.M3 = {})); - var M3 = M2.M3; + })(M3 = M2.M3 || (M2.M3 = {})); })(M2 || (M2 = {})); var M2; (function (M2) { + var M3; (function (M3) { var a; var r1 = a.foo; var r2 = a.bar; - })(M2.M3 || (M2.M3 = {})); - var M3 = M2.M3; + })(M3 = M2.M3 || (M2.M3 = {})); })(M2 || (M2 = {})); diff --git a/tests/baselines/reference/mergedDeclarations3.js b/tests/baselines/reference/mergedDeclarations3.js index c86fa204669..272946b5075 100644 --- a/tests/baselines/reference/mergedDeclarations3.js +++ b/tests/baselines/reference/mergedDeclarations3.js @@ -50,10 +50,10 @@ var M; })(M || (M = {})); var M; (function (M) { + var Color; (function (Color) { Color.Blue = 4; - })(M.Color || (M.Color = {})); - var Color = M.Color; + })(Color = M.Color || (M.Color = {})); })(M || (M = {})); var p = M.Color.Blue; // ok var M; @@ -71,10 +71,10 @@ var M; })(M || (M = {})); var M; (function (M) { + var foo; (function (foo) { foo.y = 2; - })(M.foo || (M.foo = {})); - var foo = M.foo; + })(foo = M.foo || (M.foo = {})); })(M || (M = {})); var M; (function (M) { diff --git a/tests/baselines/reference/mergedDeclarations4.js b/tests/baselines/reference/mergedDeclarations4.js index 727549450c2..a3dab29ff75 100644 --- a/tests/baselines/reference/mergedDeclarations4.js +++ b/tests/baselines/reference/mergedDeclarations4.js @@ -30,10 +30,10 @@ var M; })(M || (M = {})); var M; (function (M) { + var f; (function (f) { f.hello = 1; - })(M.f || (M.f = {})); - var f = M.f; + })(f = M.f || (M.f = {})); f(); M.f(); var r = f.hello; diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen2.js b/tests/baselines/reference/mergedModuleDeclarationCodeGen2.js index eff079e0c34..457bd12b8f0 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen2.js +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen2.js @@ -11,22 +11,22 @@ module my.data { //// [mergedModuleDeclarationCodeGen2.js] var my; (function (my) { + var data; (function (data) { + var foo; (function (foo) { function buz() { } foo.buz = buz; - })(data.foo || (data.foo = {})); - var foo = data.foo; - })(my.data || (my.data = {})); - var data = my.data; + })(foo = data.foo || (data.foo = {})); + })(data = my.data || (my.data = {})); })(my || (my = {})); var my; (function (_my) { + var data; (function (_data) { function data(my) { _data.foo.buz(); } - })(_my.data || (_my.data = {})); - var data = _my.data; + })(data = _my.data || (_my.data = {})); })(my || (my = {})); diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen3.js b/tests/baselines/reference/mergedModuleDeclarationCodeGen3.js index 88b349dd02b..0618346dd75 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen3.js +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen3.js @@ -11,22 +11,22 @@ module my.data.foo { //// [mergedModuleDeclarationCodeGen3.js] var my; (function (my) { + var data; (function (data) { function buz() { } data.buz = buz; - })(my.data || (my.data = {})); - var data = my.data; + })(data = my.data || (my.data = {})); })(my || (my = {})); var my; (function (_my) { + var data; (function (_data) { + var foo; (function (_foo) { function data(my, foo) { _data.buz(); } - })(_data.foo || (_data.foo = {})); - var foo = _data.foo; - })(_my.data || (_my.data = {})); - var data = _my.data; + })(foo = _data.foo || (_data.foo = {})); + })(data = _my.data || (_my.data = {})); })(my || (my = {})); diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen4.js b/tests/baselines/reference/mergedModuleDeclarationCodeGen4.js index 361a657e7e7..2463c9cae90 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen4.js +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen4.js @@ -19,32 +19,32 @@ module superContain { //// [mergedModuleDeclarationCodeGen4.js] var superContain; (function (superContain) { + var contain; (function (_contain) { + var my; (function (my) { + var buz; (function (buz) { + var data; (function (data) { function foo() { } data.foo = foo; - })(buz.data || (buz.data = {})); - var data = buz.data; - })(my.buz || (my.buz = {})); - var buz = my.buz; - })(_contain.my || (_contain.my = {})); - var my = _contain.my; + })(data = buz.data || (buz.data = {})); + })(buz = my.buz || (my.buz = {})); + })(my = _contain.my || (_contain.my = {})); + var my; (function (_my) { + var buz; (function (_buz) { + var data; (function (_data) { function bar(contain, my, buz, data) { _data.foo(); } _data.bar = bar; - })(_buz.data || (_buz.data = {})); - var data = _buz.data; - })(_my.buz || (_my.buz = {})); - var buz = _my.buz; - })(_contain.my || (_contain.my = {})); - var my = _contain.my; - })(superContain.contain || (superContain.contain = {})); - var contain = superContain.contain; + })(data = _buz.data || (_buz.data = {})); + })(buz = _my.buz || (_my.buz = {})); + })(my = _contain.my || (_contain.my = {})); + })(contain = superContain.contain || (superContain.contain = {})); })(superContain || (superContain = {})); diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js b/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js index f521b6d8d11..2c8e0bb79e4 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js @@ -21,7 +21,9 @@ module M.buz.plop { //// [mergedModuleDeclarationCodeGen5.js] var M; (function (_M) { + var buz; (function (buz) { + var plop; (function (plop) { function doom() { } @@ -29,14 +31,14 @@ var M; function M() { } plop.M = M; - })(buz.plop || (buz.plop = {})); - var plop = buz.plop; - })(_M.buz || (_M.buz = {})); - var buz = _M.buz; + })(plop = buz.plop || (buz.plop = {})); + })(buz = _M.buz || (_M.buz = {})); })(M || (M = {})); var M; (function (M) { + var buz; (function (_buz) { + var plop; (function (_plop) { function gunk() { } @@ -58,8 +60,6 @@ var M; _plop.v4 = _plop.M; // _plop.M _plop.v5 = fudge; // fudge _plop.v6 = plop; // plop - })(_buz.plop || (_buz.plop = {})); - var plop = _buz.plop; - })(M.buz || (M.buz = {})); - var buz = M.buz; + })(plop = _buz.plop || (_buz.plop = {})); + })(buz = M.buz || (M.buz = {})); })(M || (M = {})); diff --git a/tests/baselines/reference/moduleAndInterfaceWithSameName.js b/tests/baselines/reference/moduleAndInterfaceWithSameName.js index b7754c354c7..96c58249b47 100644 --- a/tests/baselines/reference/moduleAndInterfaceWithSameName.js +++ b/tests/baselines/reference/moduleAndInterfaceWithSameName.js @@ -34,10 +34,10 @@ module Foo3 { //// [moduleAndInterfaceWithSameName.js] var Foo1; (function (Foo1) { + var Bar; (function (Bar) { Bar.x = 42; - })(Foo1.Bar || (Foo1.Bar = {})); - var Bar = Foo1.Bar; + })(Bar = Foo1.Bar || (Foo1.Bar = {})); })(Foo1 || (Foo1 = {})); var Foo2; (function (Foo2) { @@ -49,8 +49,8 @@ var Foo2; var z2 = Foo2.Bar.y; // Error for using interface name as a value. var Foo3; (function (Foo3) { + var Bar; (function (Bar) { Bar.x = 42; - })(Foo3.Bar || (Foo3.Bar = {})); - var Bar = Foo3.Bar; + })(Bar = Foo3.Bar || (Foo3.Bar = {})); })(Foo3 || (Foo3 = {})); diff --git a/tests/baselines/reference/moduleAssignmentCompat4.js b/tests/baselines/reference/moduleAssignmentCompat4.js index 2f7fa110ee6..49e49a2e9fb 100644 --- a/tests/baselines/reference/moduleAssignmentCompat4.js +++ b/tests/baselines/reference/moduleAssignmentCompat4.js @@ -19,17 +19,18 @@ b = a; // error //// [moduleAssignmentCompat4.js] var A; (function (A) { + var M; (function (M) { var C = (function () { function C() { } return C; })(); - })(A.M || (A.M = {})); - var M = A.M; + })(M = A.M || (A.M = {})); })(A || (A = {})); var B; (function (B) { + var M; (function (M) { var D = (function () { function D() { @@ -37,8 +38,7 @@ var B; return D; })(); M.D = D; - })(B.M || (B.M = {})); - var M = B.M; + })(M = B.M || (B.M = {})); })(B || (B = {})); var a; var b; diff --git a/tests/baselines/reference/moduleCodegenTest4.js b/tests/baselines/reference/moduleCodegenTest4.js index 1c9c125fef0..884b88e0160 100644 --- a/tests/baselines/reference/moduleCodegenTest4.js +++ b/tests/baselines/reference/moduleCodegenTest4.js @@ -5,9 +5,9 @@ Baz.x = "goodbye"; void 0; //// [moduleCodegenTest4.js] +var Baz; (function (Baz) { Baz.x = "hello"; -})(exports.Baz || (exports.Baz = {})); -var Baz = exports.Baz; +})(Baz = exports.Baz || (exports.Baz = {})); Baz.x = "goodbye"; void 0; diff --git a/tests/baselines/reference/moduleExports1.js b/tests/baselines/reference/moduleExports1.js index 8dbfe773271..70ed9380c59 100644 --- a/tests/baselines/reference/moduleExports1.js +++ b/tests/baselines/reference/moduleExports1.js @@ -15,8 +15,11 @@ if (!module.exports) module.exports = ""; //// [moduleExports1.js] define(["require", "exports"], function (require, exports) { + var TypeScript; (function (TypeScript) { + var Strasse; (function (Strasse) { + var Street; (function (Street) { var Rue = (function () { function Rue() { @@ -24,12 +27,9 @@ define(["require", "exports"], function (require, exports) { return Rue; })(); Street.Rue = Rue; - })(Strasse.Street || (Strasse.Street = {})); - var Street = Strasse.Street; - })(TypeScript.Strasse || (TypeScript.Strasse = {})); - var Strasse = TypeScript.Strasse; - })(exports.TypeScript || (exports.TypeScript = {})); - var TypeScript = exports.TypeScript; + })(Street = Strasse.Street || (Strasse.Street = {})); + })(Strasse = TypeScript.Strasse || (TypeScript.Strasse = {})); + })(TypeScript = exports.TypeScript || (exports.TypeScript = {})); var rue = new TypeScript.Strasse.Street.Rue(); rue.address = "1 Main Street"; void 0; diff --git a/tests/baselines/reference/moduleImport.js b/tests/baselines/reference/moduleImport.js index a71b87b73eb..76d46f2ebfe 100644 --- a/tests/baselines/reference/moduleImport.js +++ b/tests/baselines/reference/moduleImport.js @@ -16,7 +16,9 @@ module X { //// [moduleImport.js] var A; (function (A) { + var B; (function (B) { + var C; (function (C) { var XYZ = X.Y.Z; function ping(x) { @@ -24,10 +26,8 @@ var A; XYZ.pong(x - 1); } C.ping = ping; - })(B.C || (B.C = {})); - var C = B.C; - })(A.B || (A.B = {})); - var B = A.B; + })(C = B.C || (B.C = {})); + })(B = A.B || (A.B = {})); })(A || (A = {})); var X; (function (X) { diff --git a/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.js b/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.js index d2c53003e5f..63ccf613a77 100644 --- a/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.js +++ b/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.js @@ -49,6 +49,7 @@ module TypeScript.Syntax { //// [moduleMemberWithoutTypeAnnotation1.js] var TypeScript; (function (TypeScript) { + var Parser; (function (Parser) { var SyntaxCursor = (function () { function SyntaxCursor() { @@ -58,8 +59,7 @@ var TypeScript; }; return SyntaxCursor; })(); - })(TypeScript.Parser || (TypeScript.Parser = {})); - var Parser = TypeScript.Parser; + })(Parser = TypeScript.Parser || (TypeScript.Parser = {})); })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { @@ -100,6 +100,7 @@ var TypeScript; })(TypeScript || (TypeScript = {})); var TypeScript; (function (TypeScript) { + var Syntax; (function (Syntax) { function childIndex() { } @@ -113,6 +114,5 @@ var TypeScript; return VariableWidthTokenWithTrailingTrivia; })(); Syntax.VariableWidthTokenWithTrailingTrivia = VariableWidthTokenWithTrailingTrivia; - })(TypeScript.Syntax || (TypeScript.Syntax = {})); - var Syntax = TypeScript.Syntax; + })(Syntax = TypeScript.Syntax || (TypeScript.Syntax = {})); })(TypeScript || (TypeScript = {})); diff --git a/tests/baselines/reference/moduleMemberWithoutTypeAnnotation2.js b/tests/baselines/reference/moduleMemberWithoutTypeAnnotation2.js index 7e2a9a0791a..bfdd9202513 100644 --- a/tests/baselines/reference/moduleMemberWithoutTypeAnnotation2.js +++ b/tests/baselines/reference/moduleMemberWithoutTypeAnnotation2.js @@ -20,6 +20,7 @@ module TypeScript { //// [moduleMemberWithoutTypeAnnotation2.js] var TypeScript; (function (TypeScript) { + var CompilerDiagnostics; (function (CompilerDiagnostics) { CompilerDiagnostics.diagnosticWriter = null; function Alert(output) { @@ -28,6 +29,5 @@ var TypeScript; } } CompilerDiagnostics.Alert = Alert; - })(TypeScript.CompilerDiagnostics || (TypeScript.CompilerDiagnostics = {})); - var CompilerDiagnostics = TypeScript.CompilerDiagnostics; + })(CompilerDiagnostics = TypeScript.CompilerDiagnostics || (TypeScript.CompilerDiagnostics = {})); })(TypeScript || (TypeScript = {})); diff --git a/tests/baselines/reference/moduleVisibilityTest1.js b/tests/baselines/reference/moduleVisibilityTest1.js index b9a9649002d..d8bdedfafe2 100644 --- a/tests/baselines/reference/moduleVisibilityTest1.js +++ b/tests/baselines/reference/moduleVisibilityTest1.js @@ -74,24 +74,24 @@ var OuterMod; return -1; } OuterMod.someExportedOuterFunc = someExportedOuterFunc; + var OuterInnerMod; (function (OuterInnerMod) { function someExportedOuterInnerFunc() { return "foo"; } OuterInnerMod.someExportedOuterInnerFunc = someExportedOuterInnerFunc; - })(OuterMod.OuterInnerMod || (OuterMod.OuterInnerMod = {})); - var OuterInnerMod = OuterMod.OuterInnerMod; + })(OuterInnerMod = OuterMod.OuterInnerMod || (OuterMod.OuterInnerMod = {})); })(OuterMod || (OuterMod = {})); var OuterInnerAlias = OuterMod.OuterInnerMod; var M; (function (M) { + var InnerMod; (function (InnerMod) { function someExportedInnerFunc() { return -2; } InnerMod.someExportedInnerFunc = someExportedInnerFunc; - })(M.InnerMod || (M.InnerMod = {})); - var InnerMod = M.InnerMod; + })(InnerMod = M.InnerMod || (M.InnerMod = {})); (function (E) { E[E["A"] = 0] = "A"; E[E["B"] = 1] = "B"; diff --git a/tests/baselines/reference/moduleVisibilityTest2.js b/tests/baselines/reference/moduleVisibilityTest2.js index 90de82ed680..63ecaf0c135 100644 --- a/tests/baselines/reference/moduleVisibilityTest2.js +++ b/tests/baselines/reference/moduleVisibilityTest2.js @@ -75,13 +75,13 @@ var OuterMod; return -1; } OuterMod.someExportedOuterFunc = someExportedOuterFunc; + var OuterInnerMod; (function (OuterInnerMod) { function someExportedOuterInnerFunc() { return "foo"; } OuterInnerMod.someExportedOuterInnerFunc = someExportedOuterInnerFunc; - })(OuterMod.OuterInnerMod || (OuterMod.OuterInnerMod = {})); - var OuterInnerMod = OuterMod.OuterInnerMod; + })(OuterInnerMod = OuterMod.OuterInnerMod || (OuterMod.OuterInnerMod = {})); })(OuterMod || (OuterMod = {})); var OuterInnerAlias = OuterMod.OuterInnerMod; var M; diff --git a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js index f123c854cca..d30c36584b8 100644 --- a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js @@ -136,14 +136,14 @@ var Y; return BB; })(A); Y.BB = BB; + var Module; (function (Module) { var A = (function () { function A() { } return A; })(); - })(Y.Module || (Y.Module = {})); - var Module = Y.Module; + })(Module = Y.Module || (Y.Module = {})); (function (Color) { Color[Color["Blue"] = 0] = "Blue"; Color[Color["Red"] = 1] = "Red"; diff --git a/tests/baselines/reference/nameCollision.js b/tests/baselines/reference/nameCollision.js index 0972729fb4e..67e6f3afa47 100644 --- a/tests/baselines/reference/nameCollision.js +++ b/tests/baselines/reference/nameCollision.js @@ -71,27 +71,27 @@ var B; var X; (function (_X) { var X = 13; + var Y; (function (_Y) { var Y = 13; + var Z; (function (_Z) { var X = 12; var Y = 12; var Z = 12; - })(_Y.Z || (_Y.Z = {})); - var Z = _Y.Z; - })(_X.Y || (_X.Y = {})); - var Y = _X.Y; + })(Z = _Y.Z || (_Y.Z = {})); + })(Y = _X.Y || (_X.Y = {})); })(X || (X = {})); var Y; (function (_Y) { + var Y; (function (_Y) { (function (Y) { Y[Y["Red"] = 0] = "Red"; Y[Y["Blue"] = 1] = "Blue"; })(_Y.Y || (_Y.Y = {})); var Y = _Y.Y; - })(_Y.Y || (_Y.Y = {})); - var Y = _Y.Y; + })(Y = _Y.Y || (_Y.Y = {})); })(Y || (Y = {})); // no collision, since interface doesn't // generate code. diff --git a/tests/baselines/reference/nameWithRelativePaths.js b/tests/baselines/reference/nameWithRelativePaths.js index ba8e933dabd..c0793e31ab6 100644 --- a/tests/baselines/reference/nameWithRelativePaths.js +++ b/tests/baselines/reference/nameWithRelativePaths.js @@ -31,10 +31,10 @@ function f() { } exports.f = f; //// [foo_2.js] +var M2; (function (M2) { M2.x = true; -})(exports.M2 || (exports.M2 = {})); -var M2 = exports.M2; +})(M2 = exports.M2 || (exports.M2 = {})); //// [foo_3.js] var foo0 = require('../foo_0'); var foo1 = require('./test/foo_1'); diff --git a/tests/baselines/reference/namedFunctionExpressionCall.types b/tests/baselines/reference/namedFunctionExpressionCall.types index 018cf64afcd..f70bc8c17dc 100644 --- a/tests/baselines/reference/namedFunctionExpressionCall.types +++ b/tests/baselines/reference/namedFunctionExpressionCall.types @@ -1,6 +1,6 @@ === tests/cases/compiler/namedFunctionExpressionCall.ts === var recurser = function foo() { ->recurser : any +>recurser : () => void >function foo() { // using the local name foo(); // using the globally visible name recurser();} : () => void >foo : () => void @@ -11,8 +11,8 @@ var recurser = function foo() { // using the globally visible name recurser(); ->recurser() : any ->recurser : any +>recurser() : void +>recurser : () => void }; diff --git a/tests/baselines/reference/namespaces2.js b/tests/baselines/reference/namespaces2.js index 88edd871902..980d6ea9243 100644 --- a/tests/baselines/reference/namespaces2.js +++ b/tests/baselines/reference/namespaces2.js @@ -10,6 +10,7 @@ var c: A.B.C = new A.B.C(); //// [namespaces2.js] var A; (function (A) { + var B; (function (B) { var C = (function () { function C() { @@ -17,7 +18,6 @@ var A; return C; })(); B.C = C; - })(A.B || (A.B = {})); - var B = A.B; + })(B = A.B || (A.B = {})); })(A || (A = {})); var c = new A.B.C(); diff --git a/tests/baselines/reference/nestedModules.js b/tests/baselines/reference/nestedModules.js index 73b475f8160..f146990ec82 100644 --- a/tests/baselines/reference/nestedModules.js +++ b/tests/baselines/reference/nestedModules.js @@ -35,17 +35,17 @@ var p: M2.X.Point; //// [nestedModules.js] var A; (function (A) { + var B; (function (B) { var Point = { x: 0, y: 0 }; // bug 832088: could not find module 'C' - })(A.B || (A.B = {})); - var B = A.B; + })(B = A.B || (A.B = {})); })(A || (A = {})); var M2; (function (M2) { + var X; (function (X) { X.Point; - })(M2.X || (M2.X = {})); - var X = M2.X; + })(X = M2.X || (M2.X = {})); })(M2 || (M2 = {})); var m = M2.X; var point; diff --git a/tests/baselines/reference/noImplicitAnyInCastExpression.errors.txt b/tests/baselines/reference/noImplicitAnyInCastExpression.errors.txt new file mode 100644 index 00000000000..bc7542df511 --- /dev/null +++ b/tests/baselines/reference/noImplicitAnyInCastExpression.errors.txt @@ -0,0 +1,20 @@ +==== tests/cases/compiler/noImplicitAnyInCastExpression.ts (1 errors) ==== + + // verify no noImplictAny errors reported with cast expression + + interface IFoo { + a: number; + b: string; + } + + // Expr type not assignable to target type + ({ a: null }); + + // Expr type assignable to target type + ({ a: 2, b: undefined }); + + // Neither types is assignable to each other + ({ c: null }); + ~~~~~~~~~~~~~~~~~ +!!! Neither type '{ c: null; }' nor type 'IFoo' is assignable to the other: +!!! Property 'a' is missing in type '{ c: null; }'. \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyInCastExpression.js b/tests/baselines/reference/noImplicitAnyInCastExpression.js new file mode 100644 index 00000000000..1b7cc59c7c0 --- /dev/null +++ b/tests/baselines/reference/noImplicitAnyInCastExpression.js @@ -0,0 +1,26 @@ +//// [noImplicitAnyInCastExpression.ts] + +// verify no noImplictAny errors reported with cast expression + +interface IFoo { + a: number; + b: string; +} + +// Expr type not assignable to target type +({ a: null }); + +// Expr type assignable to target type +({ a: 2, b: undefined }); + +// Neither types is assignable to each other +({ c: null }); + +//// [noImplicitAnyInCastExpression.js] +// verify no noImplictAny errors reported with cast expression +// Expr type not assignable to target type +{ a: null }; +// Expr type assignable to target type +{ a: 2, b: undefined }; +// Neither types is assignable to each other +{ c: null }; diff --git a/tests/baselines/reference/nonInstantiatedModule.js b/tests/baselines/reference/nonInstantiatedModule.js index cf69d5b1bf6..fc3ad19546f 100644 --- a/tests/baselines/reference/nonInstantiatedModule.js +++ b/tests/baselines/reference/nonInstantiatedModule.js @@ -59,13 +59,13 @@ var a2; var a2 = m.a; var M2; (function (M2) { + var Point; (function (Point) { function Origin() { return { x: 0, y: 0 }; } Point.Origin = Origin; - })(M2.Point || (M2.Point = {})); - var Point = M2.Point; + })(Point = M2.Point || (M2.Point = {})); })(M2 || (M2 = {})); var p; var p; diff --git a/tests/baselines/reference/null.types b/tests/baselines/reference/null.types index 0614b5efec4..7a5232efb0b 100644 --- a/tests/baselines/reference/null.types +++ b/tests/baselines/reference/null.types @@ -41,7 +41,7 @@ var w:I={x:null,y:3}; >w : I >I : I >{x:null,y:3} : { x: null; y: number; } ->x : any +>x : null >y : number diff --git a/tests/baselines/reference/objectLiteralWidened.types b/tests/baselines/reference/objectLiteralWidened.types index e8dc707a489..3f9163e77ef 100644 --- a/tests/baselines/reference/objectLiteralWidened.types +++ b/tests/baselines/reference/objectLiteralWidened.types @@ -6,10 +6,10 @@ var x = { >{ foo: null, bar: undefined} : { foo: null; bar: undefined; } foo: null, ->foo : any +>foo : null bar: undefined ->bar : any +>bar : undefined >undefined : undefined } @@ -18,17 +18,17 @@ var y = { >{ foo: null, bar: { baz: null, boo: undefined }} : { foo: null; bar: { baz: null; boo: undefined; }; } foo: null, ->foo : any +>foo : null bar: { ->bar : { baz: any; boo: any; } +>bar : { baz: null; boo: undefined; } >{ baz: null, boo: undefined } : { baz: null; boo: undefined; } baz: null, ->baz : any +>baz : null boo: undefined ->boo : any +>boo : undefined >undefined : undefined } } diff --git a/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.types b/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.types index 6bc491fd157..846190010b4 100644 --- a/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.types +++ b/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.types @@ -61,7 +61,7 @@ module Bugs { >startIndex : number >type : string >bracket : number ->state : any +>state : null >length : number } } diff --git a/tests/baselines/reference/parserEqualsGreaterThanAfterFunction1.errors.txt b/tests/baselines/reference/parserEqualsGreaterThanAfterFunction1.errors.txt index e3ff187a00e..9f428d7fea7 100644 --- a/tests/baselines/reference/parserEqualsGreaterThanAfterFunction1.errors.txt +++ b/tests/baselines/reference/parserEqualsGreaterThanAfterFunction1.errors.txt @@ -2,5 +2,5 @@ function => ~~ !!! Identifier expected. - + !!! Function implementation is missing or not immediately following the declaration. \ No newline at end of file diff --git a/tests/baselines/reference/parserEqualsGreaterThanAfterFunction2.errors.txt b/tests/baselines/reference/parserEqualsGreaterThanAfterFunction2.errors.txt index 24866e9e424..4e9b5fbaa86 100644 --- a/tests/baselines/reference/parserEqualsGreaterThanAfterFunction2.errors.txt +++ b/tests/baselines/reference/parserEqualsGreaterThanAfterFunction2.errors.txt @@ -8,5 +8,5 @@ !!! ',' expected. !!! ')' expected. - + !!! Function implementation is missing or not immediately following the declaration. \ No newline at end of file diff --git a/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.errors.txt b/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.errors.txt index 0d8f7d23d3b..534f3371ede 100644 --- a/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.errors.txt +++ b/tests/baselines/reference/parserStatementIsNotAMemberVariableDeclaration1.errors.txt @@ -1,4 +1,4 @@ -==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserStatementIsNotAMemberVariableDeclaration1.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserStatementIsNotAMemberVariableDeclaration1.ts (2 errors) ==== return { ~~~~~~ !!! A 'return' statement can only be used within a function body. @@ -7,6 +7,8 @@ // 'private' should not be considered a member variable here. private[key] = value; + ~~~~~~~ +!!! Cannot find name 'private'. } diff --git a/tests/baselines/reference/parserSuperExpression1.js b/tests/baselines/reference/parserSuperExpression1.js index cb78b6f5e5e..d0d7f4dcd52 100644 --- a/tests/baselines/reference/parserSuperExpression1.js +++ b/tests/baselines/reference/parserSuperExpression1.js @@ -24,6 +24,7 @@ var C = (function () { })(); var M1; (function (M1) { + var M2; (function (M2) { var C = (function () { function C() { @@ -33,6 +34,5 @@ var M1; }; return C; })(); - })(M1.M2 || (M1.M2 = {})); - var M2 = M1.M2; + })(M2 = M1.M2 || (M1.M2 = {})); })(M1 || (M1 = {})); diff --git a/tests/baselines/reference/parserSuperExpression4.js b/tests/baselines/reference/parserSuperExpression4.js index 6151eded6b9..a36981416df 100644 --- a/tests/baselines/reference/parserSuperExpression4.js +++ b/tests/baselines/reference/parserSuperExpression4.js @@ -24,6 +24,7 @@ var C = (function () { })(); var M1; (function (M1) { + var M2; (function (M2) { var C = (function () { function C() { @@ -33,6 +34,5 @@ var M1; }; return C; })(); - })(M1.M2 || (M1.M2 = {})); - var M2 = M1.M2; + })(M2 = M1.M2 || (M1.M2 = {})); })(M1 || (M1 = {})); diff --git a/tests/baselines/reference/parserVariableDeclaration6.errors.txt b/tests/baselines/reference/parserVariableDeclaration6.errors.txt index 01f3935495d..466384c7e0c 100644 --- a/tests/baselines/reference/parserVariableDeclaration6.errors.txt +++ b/tests/baselines/reference/parserVariableDeclaration6.errors.txt @@ -1,4 +1,4 @@ ==== tests/cases/conformance/parser/ecmascript5/VariableDeclarations/parserVariableDeclaration6.ts (1 errors) ==== var - + ~~~ !!! Variable declaration list cannot be empty. \ No newline at end of file diff --git a/tests/baselines/reference/parserVariableDeclaration8.errors.txt b/tests/baselines/reference/parserVariableDeclaration8.errors.txt index 5e7f335a920..9e2f8edfd25 100644 --- a/tests/baselines/reference/parserVariableDeclaration8.errors.txt +++ b/tests/baselines/reference/parserVariableDeclaration8.errors.txt @@ -1,4 +1,4 @@ ==== tests/cases/conformance/parser/ecmascript5/VariableDeclarations/parserVariableDeclaration8.ts (1 errors) ==== var ; - + ~~~~~ !!! Variable declaration list cannot be empty. \ No newline at end of file diff --git a/tests/baselines/reference/privacyAccessorDeclFile.js b/tests/baselines/reference/privacyAccessorDeclFile.js index 9744e4ef220..b9825807eb7 100644 --- a/tests/baselines/reference/privacyAccessorDeclFile.js +++ b/tests/baselines/reference/privacyAccessorDeclFile.js @@ -1537,6 +1537,7 @@ var privateClassWithPrivateModuleSetAccessorTypes = (function () { }); return privateClassWithPrivateModuleSetAccessorTypes; })(); +var publicModule; (function (publicModule) { var privateClass = (function () { function privateClass() { @@ -2015,8 +2016,7 @@ var privateClassWithPrivateModuleSetAccessorTypes = (function () { }); return privateClassWithPrivateModuleSetAccessorTypes; })(); -})(exports.publicModule || (exports.publicModule = {})); -var publicModule = exports.publicModule; +})(publicModule = exports.publicModule || (exports.publicModule = {})); var privateModule; (function (privateModule) { var privateClass = (function () { diff --git a/tests/baselines/reference/privacyCannotNameAccessorDeclFile.js b/tests/baselines/reference/privacyCannotNameAccessorDeclFile.js index 41e0bfec1ab..0295e42e654 100644 --- a/tests/baselines/reference/privacyCannotNameAccessorDeclFile.js +++ b/tests/baselines/reference/privacyCannotNameAccessorDeclFile.js @@ -149,6 +149,7 @@ function createWidget1() { return new Widget1(); } exports.createWidget1 = createWidget1; +var SpecializedWidget; (function (SpecializedWidget) { var Widget2 = (function () { function Widget2() { @@ -161,8 +162,7 @@ exports.createWidget1 = createWidget1; return new Widget2(); } SpecializedWidget.createWidget2 = createWidget2; -})(exports.SpecializedWidget || (exports.SpecializedWidget = {})); -var SpecializedWidget = exports.SpecializedWidget; +})(SpecializedWidget = exports.SpecializedWidget || (exports.SpecializedWidget = {})); //// [privacyCannotNameAccessorDeclFile_exporter.js] /// var Widgets = require("privacyCannotNameAccessorDeclFile_Widgets"); diff --git a/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js b/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js index fca1c2e32ac..d1f04ee3cef 100644 --- a/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js +++ b/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js @@ -113,6 +113,7 @@ function createWidget1() { return new Widget1(); } exports.createWidget1 = createWidget1; +var SpecializedWidget; (function (SpecializedWidget) { var Widget2 = (function () { function Widget2() { @@ -125,8 +126,7 @@ exports.createWidget1 = createWidget1; return new Widget2(); } SpecializedWidget.createWidget2 = createWidget2; -})(exports.SpecializedWidget || (exports.SpecializedWidget = {})); -var SpecializedWidget = exports.SpecializedWidget; +})(SpecializedWidget = exports.SpecializedWidget || (exports.SpecializedWidget = {})); //// [privacyCannotNameVarTypeDeclFile_exporter.js] /// var Widgets = require("privacyCannotNameVarTypeDeclFile_Widgets"); diff --git a/tests/baselines/reference/privacyClass.js b/tests/baselines/reference/privacyClass.js index 8cacd983510..564d49721f1 100644 --- a/tests/baselines/reference/privacyClass.js +++ b/tests/baselines/reference/privacyClass.js @@ -134,6 +134,7 @@ var __extends = this.__extends || function (d, b) { __.prototype = b.prototype; d.prototype = new __(); }; +var m1; (function (m1) { var m1_c_public = (function () { function m1_c_public() { @@ -230,8 +231,7 @@ var __extends = this.__extends || function (d, b) { return m1_C12_public; })(m1_c_private); m1.m1_C12_public = m1_C12_public; -})(exports.m1 || (exports.m1 = {})); -var m1 = exports.m1; +})(m1 = exports.m1 || (exports.m1 = {})); var m2; (function (m2) { var m2_c_public = (function () { diff --git a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js index 77adca24aa6..6a7d716d50d 100644 --- a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js +++ b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js @@ -104,6 +104,7 @@ var __extends = this.__extends || function (d, b) { __.prototype = b.prototype; d.prototype = new __(); }; +var publicModule; (function (publicModule) { var publicClassInPublicModule = (function () { function publicClassInPublicModule() { @@ -163,8 +164,7 @@ var __extends = this.__extends || function (d, b) { return publicClassExtendingFromPrivateModuleClass; })(privateModule.publicClassInPrivateModule); publicModule.publicClassExtendingFromPrivateModuleClass = publicClassExtendingFromPrivateModuleClass; -})(exports.publicModule || (exports.publicModule = {})); -var publicModule = exports.publicModule; +})(publicModule = exports.publicModule || (exports.publicModule = {})); var privateModule; (function (privateModule) { var publicClassInPrivateModule = (function () { diff --git a/tests/baselines/reference/privacyClassImplementsClauseDeclFile.js b/tests/baselines/reference/privacyClassImplementsClauseDeclFile.js index d4a1ffafd53..8327a75b8ab 100644 --- a/tests/baselines/reference/privacyClassImplementsClauseDeclFile.js +++ b/tests/baselines/reference/privacyClassImplementsClauseDeclFile.js @@ -95,6 +95,7 @@ class publicClassImplementingPublicInterfaceInGlobal implements publicInterfaceI //// [privacyClassImplementsClauseDeclFile_externalModule.js] +var publicModule; (function (publicModule) { var privateClassImplementingPublicInterfaceInModule = (function () { function privateClassImplementingPublicInterfaceInModule() { @@ -135,8 +136,7 @@ class publicClassImplementingPublicInterfaceInGlobal implements publicInterfaceI return publicClassImplementingPrivateAndPublicInterface; })(); publicModule.publicClassImplementingPrivateAndPublicInterface = publicClassImplementingPrivateAndPublicInterface; -})(exports.publicModule || (exports.publicModule = {})); -var publicModule = exports.publicModule; +})(publicModule = exports.publicModule || (exports.publicModule = {})); var privateModule; (function (privateModule) { var privateClassImplementingPublicInterfaceInModule = (function () { diff --git a/tests/baselines/reference/privacyFunctionCannotNameParameterTypeDeclFile.js b/tests/baselines/reference/privacyFunctionCannotNameParameterTypeDeclFile.js index 253a99f4a76..7acd56927c7 100644 --- a/tests/baselines/reference/privacyFunctionCannotNameParameterTypeDeclFile.js +++ b/tests/baselines/reference/privacyFunctionCannotNameParameterTypeDeclFile.js @@ -169,6 +169,7 @@ function createWidget1() { return new Widget1(); } exports.createWidget1 = createWidget1; +var SpecializedWidget; (function (SpecializedWidget) { var Widget2 = (function () { function Widget2() { @@ -181,8 +182,7 @@ exports.createWidget1 = createWidget1; return new Widget2(); } SpecializedWidget.createWidget2 = createWidget2; -})(exports.SpecializedWidget || (exports.SpecializedWidget = {})); -var SpecializedWidget = exports.SpecializedWidget; +})(SpecializedWidget = exports.SpecializedWidget || (exports.SpecializedWidget = {})); //// [privacyFunctionCannotNameParameterTypeDeclFile_exporter.js] /// var Widgets = require("privacyFunctionCannotNameParameterTypeDeclFile_Widgets"); diff --git a/tests/baselines/reference/privacyFunctionCannotNameReturnTypeDeclFile.js b/tests/baselines/reference/privacyFunctionCannotNameReturnTypeDeclFile.js index 7a7ef6691e2..5f822929a48 100644 --- a/tests/baselines/reference/privacyFunctionCannotNameReturnTypeDeclFile.js +++ b/tests/baselines/reference/privacyFunctionCannotNameReturnTypeDeclFile.js @@ -176,6 +176,7 @@ function createWidget1() { return new Widget1(); } exports.createWidget1 = createWidget1; +var SpecializedWidget; (function (SpecializedWidget) { var Widget2 = (function () { function Widget2() { @@ -188,8 +189,7 @@ exports.createWidget1 = createWidget1; return new Widget2(); } SpecializedWidget.createWidget2 = createWidget2; -})(exports.SpecializedWidget || (exports.SpecializedWidget = {})); -var SpecializedWidget = exports.SpecializedWidget; +})(SpecializedWidget = exports.SpecializedWidget || (exports.SpecializedWidget = {})); //// [privacyFunctionReturnTypeDeclFile_exporter.js] /// var Widgets = require("privacyFunctionReturnTypeDeclFile_Widgets"); diff --git a/tests/baselines/reference/privacyFunctionParameterDeclFile.js b/tests/baselines/reference/privacyFunctionParameterDeclFile.js index 0e2f72ce3a6..91de4d4ffff 100644 --- a/tests/baselines/reference/privacyFunctionParameterDeclFile.js +++ b/tests/baselines/reference/privacyFunctionParameterDeclFile.js @@ -798,6 +798,7 @@ var privateClassWithPrivateModuleParameterTypes = (function () { })(); function privateFunctionWithPrivateModuleParameterTypes(param) { } +var publicModule; (function (publicModule) { var privateClass = (function () { function privateClass() { @@ -910,8 +911,7 @@ function privateFunctionWithPrivateModuleParameterTypes(param) { })(); function privateFunctionWithPrivateModuleParameterTypes(param) { } -})(exports.publicModule || (exports.publicModule = {})); -var publicModule = exports.publicModule; +})(publicModule = exports.publicModule || (exports.publicModule = {})); var privateModule; (function (privateModule) { var privateClass = (function () { diff --git a/tests/baselines/reference/privacyFunctionReturnTypeDeclFile.js b/tests/baselines/reference/privacyFunctionReturnTypeDeclFile.js index 06a64104148..05e418ccaa8 100644 --- a/tests/baselines/reference/privacyFunctionReturnTypeDeclFile.js +++ b/tests/baselines/reference/privacyFunctionReturnTypeDeclFile.js @@ -1400,6 +1400,7 @@ function privateFunctionWithPrivateModuleParameterTypes() { function privateFunctionWithPrivateModuleParameterTypes1() { return new privateModule.publicClass(); } +var publicModule; (function (publicModule) { var privateClass = (function () { function privateClass() { @@ -1607,8 +1608,7 @@ function privateFunctionWithPrivateModuleParameterTypes1() { function privateFunctionWithPrivateModuleParameterTypes1() { return new privateModule.publicClass(); } -})(exports.publicModule || (exports.publicModule = {})); -var publicModule = exports.publicModule; +})(publicModule = exports.publicModule || (exports.publicModule = {})); var privateModule; (function (privateModule) { var privateClass = (function () { diff --git a/tests/baselines/reference/privacyGetter.js b/tests/baselines/reference/privacyGetter.js index 7a9239b134d..ff10e6238cb 100644 --- a/tests/baselines/reference/privacyGetter.js +++ b/tests/baselines/reference/privacyGetter.js @@ -209,6 +209,7 @@ class C8_private { //// [privacyGetter.js] define(["require", "exports"], function (require, exports) { + var m1; (function (m1) { var C1_public = (function () { function C1_public() { @@ -306,8 +307,7 @@ define(["require", "exports"], function (require, exports) { }); return C4_private; })(); - })(exports.m1 || (exports.m1 = {})); - var m1 = exports.m1; + })(m1 = exports.m1 || (exports.m1 = {})); var m2; (function (m2) { var m2_C1_public = (function () { diff --git a/tests/baselines/reference/privacyGloFunc.js b/tests/baselines/reference/privacyGloFunc.js index 735c8745540..3ae522b146c 100644 --- a/tests/baselines/reference/privacyGloFunc.js +++ b/tests/baselines/reference/privacyGloFunc.js @@ -532,6 +532,7 @@ export function f12_public(): C5_private { //error //// [privacyGloFunc.js] define(["require", "exports"], function (require, exports) { + var m1; (function (m1) { var C1_public = (function () { function C1_public() { @@ -681,8 +682,7 @@ define(["require", "exports"], function (require, exports) { return new C2_private(); //error } m1.f12_public = f12_public; - })(exports.m1 || (exports.m1 = {})); - var m1 = exports.m1; + })(m1 = exports.m1 || (exports.m1 = {})); var m2; (function (m2) { var m2_C1_public = (function () { diff --git a/tests/baselines/reference/privacyGloImport.js b/tests/baselines/reference/privacyGloImport.js index db29e2ae2fa..9f29e383786 100644 --- a/tests/baselines/reference/privacyGloImport.js +++ b/tests/baselines/reference/privacyGloImport.js @@ -155,6 +155,7 @@ module m2 { //// [privacyGloImport.js] var m1; (function (m1) { + var m1_M1_public; (function (m1_M1_public) { var c1 = (function () { function c1() { @@ -168,8 +169,7 @@ var m1; m1_M1_public.f1 = f1; m1_M1_public.v1 = c1; m1_M1_public.v2; - })(m1.m1_M1_public || (m1.m1_M1_public = {})); - var m1_M1_public = m1.m1_M1_public; + })(m1_M1_public = m1.m1_M1_public || (m1.m1_M1_public = {})); var m1_M2_private; (function (m1_M2_private) { var c1 = (function () { diff --git a/tests/baselines/reference/privacyImport.js b/tests/baselines/reference/privacyImport.js index c093903106e..fb200cac363 100644 --- a/tests/baselines/reference/privacyImport.js +++ b/tests/baselines/reference/privacyImport.js @@ -357,7 +357,9 @@ export module m3 { } //// [privacyImport.js] +var m1; (function (m1) { + var m1_M1_public; (function (m1_M1_public) { var c1 = (function () { function c1() { @@ -371,8 +373,7 @@ export module m3 { m1_M1_public.f1 = f1; m1_M1_public.v1 = c1; m1_M1_public.v2; - })(m1.m1_M1_public || (m1.m1_M1_public = {})); - var m1_M1_public = m1.m1_M1_public; + })(m1_M1_public = m1.m1_M1_public || (m1.m1_M1_public = {})); var m1_M2_private; (function (m1_M2_private) { var c1 = (function () { @@ -440,10 +441,10 @@ export module m3 { //var m1_im4_private_v4_private = m1_im4_private.f1(); m1.m1_im1_public = m1_M1_public; m1.m1_im2_public = m1_M2_private; -})(exports.m1 || (exports.m1 = {})); -var m1 = exports.m1; +})(m1 = exports.m1 || (exports.m1 = {})); var m2; (function (m2) { + var m2_M1_public; (function (m2_M1_public) { var c1 = (function () { function c1() { @@ -457,8 +458,7 @@ var m2; m2_M1_public.f1 = f1; m2_M1_public.v1 = c1; m2_M1_public.v2; - })(m2.m2_M1_public || (m2.m2_M1_public = {})); - var m2_M1_public = m2.m2_M1_public; + })(m2_M1_public = m2.m2_M1_public || (m2.m2_M1_public = {})); var m2_M2_private; (function (m2_M2_private) { var c1 = (function () { @@ -528,6 +528,7 @@ var m2; m2.m1_im1_public = m2_M1_public; m2.m1_im2_public = m2_M2_private; })(m2 || (m2 = {})); +var glo_M1_public; (function (glo_M1_public) { var c1 = (function () { function c1() { @@ -541,8 +542,7 @@ var m2; glo_M1_public.f1 = f1; glo_M1_public.v1 = c1; glo_M1_public.v2; -})(exports.glo_M1_public || (exports.glo_M1_public = {})); -var glo_M1_public = exports.glo_M1_public; +})(glo_M1_public = exports.glo_M1_public || (exports.glo_M1_public = {})); //export declare module "glo_M2_public" { // export function f1(); // export class c1 { @@ -550,6 +550,7 @@ var glo_M1_public = exports.glo_M1_public; // export var v1: { new (): c1; }; // export var v2: c1; //} +var glo_M3_private; (function (glo_M3_private) { var c1 = (function () { function c1() { @@ -563,8 +564,7 @@ var glo_M1_public = exports.glo_M1_public; glo_M3_private.f1 = f1; glo_M3_private.v1 = c1; glo_M3_private.v2; -})(exports.glo_M3_private || (exports.glo_M3_private = {})); -var glo_M3_private = exports.glo_M3_private; +})(glo_M3_private = exports.glo_M3_private || (exports.glo_M3_private = {})); //export declare module "glo_M4_private" { // export function f1(); // export class c1 { @@ -693,11 +693,11 @@ var m2; var a = 10; })(m4 || (m4 = {})); })(m2 || (m2 = {})); +var m3; (function (m3) { //import m3 = require("use_glo_M1_public"); var m4; (function (m4) { var a = 10; })(m4 || (m4 = {})); -})(exports.m3 || (exports.m3 = {})); -var m3 = exports.m3; +})(m3 = exports.m3 || (exports.m3 = {})); diff --git a/tests/baselines/reference/privacyInterface.js b/tests/baselines/reference/privacyInterface.js index c368b18b10a..43fd3682f50 100644 --- a/tests/baselines/reference/privacyInterface.js +++ b/tests/baselines/reference/privacyInterface.js @@ -265,6 +265,7 @@ export interface glo_C6_public extends glo_i_private, glo_i_public { } //// [privacyInterface.js] +var m1; (function (m1) { var C1_public = (function () { function C1_public() { @@ -279,8 +280,7 @@ export interface glo_C6_public extends glo_i_private, glo_i_public { } return C2_private; })(); -})(exports.m1 || (exports.m1 = {})); -var m1 = exports.m1; +})(m1 = exports.m1 || (exports.m1 = {})); var m2; (function (m2) { var C1_public = (function () { diff --git a/tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.js b/tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.js index ae9885d7018..c3c5ba3a7af 100644 --- a/tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.js +++ b/tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.js @@ -172,6 +172,7 @@ var m_private; } m_private.f_private = f_private; m_private.v_private = new c_private(); + var mi_private; (function (mi_private) { var c = (function () { function c() { @@ -179,10 +180,10 @@ var m_private; return c; })(); mi_private.c = c; - })(m_private.mi_private || (m_private.mi_private = {})); - var mi_private = m_private.mi_private; + })(mi_private = m_private.mi_private || (m_private.mi_private = {})); })(m_private || (m_private = {})); // Public elements +var m_public; (function (m_public) { var c_public = (function () { function c_public() { @@ -200,6 +201,7 @@ var m_private; } m_public.f_public = f_public; m_public.v_public = 10; + var mi_public; (function (mi_public) { var c = (function () { function c() { @@ -207,10 +209,9 @@ var m_private; return c; })(); mi_public.c = c; - })(m_public.mi_public || (m_public.mi_public = {})); - var mi_public = m_public.mi_public; -})(exports.m_public || (exports.m_public = {})); -var m_public = exports.m_public; + })(mi_public = m_public.mi_public || (m_public.mi_public = {})); +})(m_public = exports.m_public || (exports.m_public = {})); +var import_public; (function (import_public) { // Privacy errors - importing private elements import_public.im_public_c_private = m_private.c_private; @@ -254,8 +255,7 @@ var m_public = exports.m_public; import_public.publicUse_im_public_mi_public = new import_public.im_public_mi_public.c(); var privateUse_im_public_mu_public; import_public.publicUse_im_public_mu_public; -})(exports.import_public || (exports.import_public = {})); -var import_public = exports.import_public; +})(import_public = exports.import_public || (exports.import_public = {})); var import_private; (function (import_private) { // No Privacy errors - importing private elements diff --git a/tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.js b/tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.js index c47e2ffd059..9dae3ce7ce9 100644 --- a/tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.js +++ b/tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.js @@ -173,6 +173,7 @@ define(["require", "exports"], function (require, exports) { } m_private.f_private = f_private; m_private.v_private = new c_private(); + var mi_private; (function (mi_private) { var c = (function () { function c() { @@ -180,10 +181,10 @@ define(["require", "exports"], function (require, exports) { return c; })(); mi_private.c = c; - })(m_private.mi_private || (m_private.mi_private = {})); - var mi_private = m_private.mi_private; + })(mi_private = m_private.mi_private || (m_private.mi_private = {})); })(m_private || (m_private = {})); // Public elements + var m_public; (function (m_public) { var c_public = (function () { function c_public() { @@ -201,6 +202,7 @@ define(["require", "exports"], function (require, exports) { } m_public.f_public = f_public; m_public.v_public = 10; + var mi_public; (function (mi_public) { var c = (function () { function c() { @@ -208,10 +210,9 @@ define(["require", "exports"], function (require, exports) { return c; })(); mi_public.c = c; - })(m_public.mi_public || (m_public.mi_public = {})); - var mi_public = m_public.mi_public; - })(exports.m_public || (exports.m_public = {})); - var m_public = exports.m_public; + })(mi_public = m_public.mi_public || (m_public.mi_public = {})); + })(m_public = exports.m_public || (exports.m_public = {})); + var import_public; (function (import_public) { // No Privacy errors - importing private elements var im_private_c_private = m_private.c_private; @@ -255,8 +256,7 @@ define(["require", "exports"], function (require, exports) { import_public.publicUse_im_private_mi_public = new im_private_mi_public.c(); var privateUse_im_private_mu_public; import_public.publicUse_im_private_mu_public; - })(exports.import_public || (exports.import_public = {})); - var import_public = exports.import_public; + })(import_public = exports.import_public || (exports.import_public = {})); var import_private; (function (import_private) { // No Privacy errors - importing private elements diff --git a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.js b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.js index aeeccb82a2d..54f018fe475 100644 --- a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.js +++ b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.js @@ -120,6 +120,7 @@ define(["require", "exports"], function (require, exports) { } m_private.f_private = f_private; m_private.v_private = new c_private(); + var mi_private; (function (mi_private) { var c = (function () { function c() { @@ -127,10 +128,10 @@ define(["require", "exports"], function (require, exports) { return c; })(); mi_private.c = c; - })(m_private.mi_private || (m_private.mi_private = {})); - var mi_private = m_private.mi_private; + })(mi_private = m_private.mi_private || (m_private.mi_private = {})); })(m_private || (m_private = {})); // Public elements + var m_public; (function (m_public) { var c_public = (function () { function c_public() { @@ -148,6 +149,7 @@ define(["require", "exports"], function (require, exports) { } m_public.f_public = f_public; m_public.v_public = 10; + var mi_public; (function (mi_public) { var c = (function () { function c() { @@ -155,10 +157,8 @@ define(["require", "exports"], function (require, exports) { return c; })(); mi_public.c = c; - })(m_public.mi_public || (m_public.mi_public = {})); - var mi_public = m_public.mi_public; - })(exports.m_public || (exports.m_public = {})); - var m_public = exports.m_public; + })(mi_public = m_public.mi_public || (m_public.mi_public = {})); + })(m_public = exports.m_public || (exports.m_public = {})); // Privacy errors - importing private elements exports.im_public_c_private = m_private.c_private; exports.im_public_e_private = m_private.e_private; diff --git a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.js b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.js index acc9f6e438e..d2f051bf331 100644 --- a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.js +++ b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.js @@ -121,6 +121,7 @@ define(["require", "exports"], function (require, exports) { } m_private.f_private = f_private; m_private.v_private = new c_private(); + var mi_private; (function (mi_private) { var c = (function () { function c() { @@ -128,10 +129,10 @@ define(["require", "exports"], function (require, exports) { return c; })(); mi_private.c = c; - })(m_private.mi_private || (m_private.mi_private = {})); - var mi_private = m_private.mi_private; + })(mi_private = m_private.mi_private || (m_private.mi_private = {})); })(m_private || (m_private = {})); // Public elements + var m_public; (function (m_public) { var c_public = (function () { function c_public() { @@ -149,6 +150,7 @@ define(["require", "exports"], function (require, exports) { } m_public.f_public = f_public; m_public.v_public = 10; + var mi_public; (function (mi_public) { var c = (function () { function c() { @@ -156,10 +158,8 @@ define(["require", "exports"], function (require, exports) { return c; })(); mi_public.c = c; - })(m_public.mi_public || (m_public.mi_public = {})); - var mi_public = m_public.mi_public; - })(exports.m_public || (exports.m_public = {})); - var m_public = exports.m_public; + })(mi_public = m_public.mi_public || (m_public.mi_public = {})); + })(m_public = exports.m_public || (exports.m_public = {})); // No Privacy errors - importing private elements var im_private_c_private = m_private.c_private; var im_private_e_private = m_private.e_private; diff --git a/tests/baselines/reference/privacyTypeParameterOfFunctionDeclFile.js b/tests/baselines/reference/privacyTypeParameterOfFunctionDeclFile.js index 173b48b8049..16b1e360f33 100644 --- a/tests/baselines/reference/privacyTypeParameterOfFunctionDeclFile.js +++ b/tests/baselines/reference/privacyTypeParameterOfFunctionDeclFile.js @@ -570,6 +570,7 @@ var privateClassWithWithPrivateModuleTypeParameters = (function () { })(); function privateFunctionWithPrivateMopduleTypeParameters() { } +var publicModule; (function (publicModule) { var privateClass = (function () { function privateClass() { @@ -702,8 +703,7 @@ function privateFunctionWithPrivateMopduleTypeParameters() { })(); function privateFunctionWithPrivateMopduleTypeParameters() { } -})(exports.publicModule || (exports.publicModule = {})); -var publicModule = exports.publicModule; +})(publicModule = exports.publicModule || (exports.publicModule = {})); var privateModule; (function (privateModule) { var privateClass = (function () { diff --git a/tests/baselines/reference/privacyTypeParametersOfClassDeclFile.js b/tests/baselines/reference/privacyTypeParametersOfClassDeclFile.js index ae829f5ab8a..d2db553e9db 100644 --- a/tests/baselines/reference/privacyTypeParametersOfClassDeclFile.js +++ b/tests/baselines/reference/privacyTypeParametersOfClassDeclFile.js @@ -234,6 +234,7 @@ var privateClassWithTypeParametersFromPrivateModule = (function () { }; return privateClassWithTypeParametersFromPrivateModule; })(); +var publicModule; (function (publicModule) { var privateClassInPublicModule = (function () { function privateClassInPublicModule() { @@ -314,8 +315,7 @@ var privateClassWithTypeParametersFromPrivateModule = (function () { }; return privateClassWithTypeParametersFromPrivateModule; })(); -})(exports.publicModule || (exports.publicModule = {})); -var publicModule = exports.publicModule; +})(publicModule = exports.publicModule || (exports.publicModule = {})); var privateModule; (function (privateModule) { var privateClassInPrivateModule = (function () { diff --git a/tests/baselines/reference/privacyTypeParametersOfInterfaceDeclFile.js b/tests/baselines/reference/privacyTypeParametersOfInterfaceDeclFile.js index 2ae5488dd3c..69ed8d36fc3 100644 --- a/tests/baselines/reference/privacyTypeParametersOfInterfaceDeclFile.js +++ b/tests/baselines/reference/privacyTypeParametersOfInterfaceDeclFile.js @@ -213,6 +213,7 @@ var publicClassT = (function () { return publicClassT; })(); exports.publicClassT = publicClassT; +var publicModule; (function (publicModule) { var privateClassInPublicModule = (function () { function privateClassInPublicModule() { @@ -236,8 +237,7 @@ exports.publicClassT = publicClassT; return publicClassInPublicModuleT; })(); publicModule.publicClassInPublicModuleT = publicClassInPublicModuleT; -})(exports.publicModule || (exports.publicModule = {})); -var publicModule = exports.publicModule; +})(publicModule = exports.publicModule || (exports.publicModule = {})); var privateModule; (function (privateModule) { var privateClassInPrivateModule = (function () { diff --git a/tests/baselines/reference/privacyVar.js b/tests/baselines/reference/privacyVar.js index 7d3d94dc4eb..04b4cc28dd5 100644 --- a/tests/baselines/reference/privacyVar.js +++ b/tests/baselines/reference/privacyVar.js @@ -175,6 +175,7 @@ var glo_v23_private: glo_C2_private = new glo_C2_private(); export var glo_v24_public: glo_C2_private = new glo_C2_private(); // error //// [privacyVar.js] +var m1; (function (m1) { var C1_public = (function () { function C1_public() { @@ -228,8 +229,7 @@ export var glo_v24_public: glo_C2_private = new glo_C2_private(); // error m1.m1_v22_public = new C1_public(); var m1_v23_private = new C2_private(); m1.m1_v24_public = new C2_private(); // error -})(exports.m1 || (exports.m1 = {})); -var m1 = exports.m1; +})(m1 = exports.m1 || (exports.m1 = {})); var m2; (function (m2) { var m2_C1_public = (function () { diff --git a/tests/baselines/reference/privacyVarDeclFile.js b/tests/baselines/reference/privacyVarDeclFile.js index 3be0d92e397..1f0a14fc7cf 100644 --- a/tests/baselines/reference/privacyVarDeclFile.js +++ b/tests/baselines/reference/privacyVarDeclFile.js @@ -476,6 +476,7 @@ var privateClassWithPrivateModulePropertyTypes = (function () { return privateClassWithPrivateModulePropertyTypes; })(); var privateVarWithPrivateModulePropertyTypes; +var publicModule; (function (publicModule) { var privateClass = (function () { function privateClass() { @@ -527,8 +528,7 @@ var privateVarWithPrivateModulePropertyTypes; return privateClassWithPrivateModulePropertyTypes; })(); var privateVarWithPrivateModulePropertyTypes; -})(exports.publicModule || (exports.publicModule = {})); -var publicModule = exports.publicModule; +})(publicModule = exports.publicModule || (exports.publicModule = {})); var privateModule; (function (privateModule) { var privateClass = (function () { diff --git a/tests/baselines/reference/project/baseline3/amd/nestedModule.js b/tests/baselines/reference/project/baseline3/amd/nestedModule.js index 0cf18a09d58..d1d6f93af98 100644 --- a/tests/baselines/reference/project/baseline3/amd/nestedModule.js +++ b/tests/baselines/reference/project/baseline3/amd/nestedModule.js @@ -1,10 +1,10 @@ define(["require", "exports"], function (require, exports) { + var outer; (function (outer) { + var inner; (function (inner) { var local = 1; inner.a = local; - })(outer.inner || (outer.inner = {})); - var inner = outer.inner; - })(exports.outer || (exports.outer = {})); - var outer = exports.outer; + })(inner = outer.inner || (outer.inner = {})); + })(outer = exports.outer || (exports.outer = {})); }); diff --git a/tests/baselines/reference/project/baseline3/node/nestedModule.js b/tests/baselines/reference/project/baseline3/node/nestedModule.js index 03682a19b36..d69e2022379 100644 --- a/tests/baselines/reference/project/baseline3/node/nestedModule.js +++ b/tests/baselines/reference/project/baseline3/node/nestedModule.js @@ -1,8 +1,8 @@ +var outer; (function (outer) { + var inner; (function (inner) { var local = 1; inner.a = local; - })(outer.inner || (outer.inner = {})); - var inner = outer.inner; -})(exports.outer || (exports.outer = {})); -var outer = exports.outer; + })(inner = outer.inner || (outer.inner = {})); +})(outer = exports.outer || (exports.outer = {})); diff --git a/tests/baselines/reference/project/declarationsImportedInPrivate/amd/useModule.js b/tests/baselines/reference/project/declarationsImportedInPrivate/amd/useModule.js index 67fafa501e4..640e4412366 100644 --- a/tests/baselines/reference/project/declarationsImportedInPrivate/amd/useModule.js +++ b/tests/baselines/reference/project/declarationsImportedInPrivate/amd/useModule.js @@ -1,9 +1,9 @@ define(["require", "exports", "private_m4"], function (require, exports, private_m4) { + var usePrivate_m4_m1; (function (usePrivate_m4_m1) { var x3 = private_m4.x; var d3 = private_m4.d; var f3 = private_m4.foo(); usePrivate_m4_m1.numberVar; - })(exports.usePrivate_m4_m1 || (exports.usePrivate_m4_m1 = {})); - var usePrivate_m4_m1 = exports.usePrivate_m4_m1; + })(usePrivate_m4_m1 = exports.usePrivate_m4_m1 || (exports.usePrivate_m4_m1 = {})); }); diff --git a/tests/baselines/reference/project/declarationsImportedInPrivate/node/useModule.js b/tests/baselines/reference/project/declarationsImportedInPrivate/node/useModule.js index e7ac9c48bb8..77f1d44c2a9 100644 --- a/tests/baselines/reference/project/declarationsImportedInPrivate/node/useModule.js +++ b/tests/baselines/reference/project/declarationsImportedInPrivate/node/useModule.js @@ -1,9 +1,9 @@ // only used privately no need to emit var private_m4 = require("private_m4"); +var usePrivate_m4_m1; (function (usePrivate_m4_m1) { var x3 = private_m4.x; var d3 = private_m4.d; var f3 = private_m4.foo(); usePrivate_m4_m1.numberVar; -})(exports.usePrivate_m4_m1 || (exports.usePrivate_m4_m1 = {})); -var usePrivate_m4_m1 = exports.usePrivate_m4_m1; +})(usePrivate_m4_m1 = exports.usePrivate_m4_m1 || (exports.usePrivate_m4_m1 = {})); diff --git a/tests/baselines/reference/project/declarationsMultipleTimesImport/amd/useModule.js b/tests/baselines/reference/project/declarationsMultipleTimesImport/amd/useModule.js index a9d9d58b842..870c93af085 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesImport/amd/useModule.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesImport/amd/useModule.js @@ -2,6 +2,7 @@ define(["require", "exports", "m4", "m4"], function (require, exports, m4, multi exports.x4 = m4.x; exports.d4 = m4.d; exports.f4 = m4.foo(); + var m1; (function (m1) { m1.x2 = m4.x; m1.d2 = m4.d; @@ -9,8 +10,7 @@ define(["require", "exports", "m4", "m4"], function (require, exports, m4, multi var x3 = m4.x; var d3 = m4.d; var f3 = m4.foo(); - })(exports.m1 || (exports.m1 = {})); - var m1 = exports.m1; + })(m1 = exports.m1 || (exports.m1 = {})); exports.useMultiImport_m4_x4 = multiImport_m4.x; exports.useMultiImport_m4_d4 = multiImport_m4.d; exports.useMultiImport_m4_f4 = multiImport_m4.foo(); diff --git a/tests/baselines/reference/project/declarationsMultipleTimesImport/node/useModule.js b/tests/baselines/reference/project/declarationsMultipleTimesImport/node/useModule.js index 0a8842569a7..f55c2425fa1 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesImport/node/useModule.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesImport/node/useModule.js @@ -2,6 +2,7 @@ var m4 = require("m4"); // Emit used exports.x4 = m4.x; exports.d4 = m4.d; exports.f4 = m4.foo(); +var m1; (function (m1) { m1.x2 = m4.x; m1.d2 = m4.d; @@ -9,8 +10,7 @@ exports.f4 = m4.foo(); var x3 = m4.x; var d3 = m4.d; var f3 = m4.foo(); -})(exports.m1 || (exports.m1 = {})); -var m1 = exports.m1; +})(m1 = exports.m1 || (exports.m1 = {})); // Do not emit multiple used import statements var multiImport_m4 = require("m4"); // Emit used exports.useMultiImport_m4_x4 = multiImport_m4.x; diff --git a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/useModule.js b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/useModule.js index 94582ed6208..f3874188538 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/useModule.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/useModule.js @@ -2,6 +2,7 @@ define(["require", "exports", "m4", "m5"], function (require, exports, m4, m5) { exports.x4 = m4.x; exports.d4 = m4.d; exports.f4 = m4.foo(); + var m1; (function (m1) { m1.x2 = m4.x; m1.d2 = m4.d; @@ -9,7 +10,6 @@ define(["require", "exports", "m4", "m5"], function (require, exports, m4, m5) { var x3 = m4.x; var d3 = m4.d; var f3 = m4.foo(); - })(exports.m1 || (exports.m1 = {})); - var m1 = exports.m1; + })(m1 = exports.m1 || (exports.m1 = {})); exports.d = m5.foo2(); }); diff --git a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/useModule.js b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/useModule.js index 34022b3c8ff..0e0b8a00f81 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/useModule.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/useModule.js @@ -2,6 +2,7 @@ var m4 = require("m4"); // Emit used exports.x4 = m4.x; exports.d4 = m4.d; exports.f4 = m4.foo(); +var m1; (function (m1) { m1.x2 = m4.x; m1.d2 = m4.d; @@ -9,8 +10,7 @@ exports.f4 = m4.foo(); var x3 = m4.x; var d3 = m4.d; var f3 = m4.foo(); -})(exports.m1 || (exports.m1 = {})); -var m1 = exports.m1; +})(m1 = exports.m1 || (exports.m1 = {})); // Do not emit unused import var m5 = require("m5"); exports.d = m5.foo2(); diff --git a/tests/baselines/reference/project/declarationsSimpleImport/amd/useModule.js b/tests/baselines/reference/project/declarationsSimpleImport/amd/useModule.js index 0f3891c0212..065672a1e0a 100644 --- a/tests/baselines/reference/project/declarationsSimpleImport/amd/useModule.js +++ b/tests/baselines/reference/project/declarationsSimpleImport/amd/useModule.js @@ -2,6 +2,7 @@ define(["require", "exports", "m4"], function (require, exports, m4) { exports.x4 = m4.x; exports.d4 = m4.d; exports.f4 = m4.foo(); + var m1; (function (m1) { m1.x2 = m4.x; m1.d2 = m4.d; @@ -9,6 +10,5 @@ define(["require", "exports", "m4"], function (require, exports, m4) { var x3 = m4.x; var d3 = m4.d; var f3 = m4.foo(); - })(exports.m1 || (exports.m1 = {})); - var m1 = exports.m1; + })(m1 = exports.m1 || (exports.m1 = {})); }); diff --git a/tests/baselines/reference/project/declarationsSimpleImport/node/useModule.js b/tests/baselines/reference/project/declarationsSimpleImport/node/useModule.js index 799c888c144..66e5ab17142 100644 --- a/tests/baselines/reference/project/declarationsSimpleImport/node/useModule.js +++ b/tests/baselines/reference/project/declarationsSimpleImport/node/useModule.js @@ -2,6 +2,7 @@ var m4 = require("m4"); // Emit used exports.x4 = m4.x; exports.d4 = m4.d; exports.f4 = m4.foo(); +var m1; (function (m1) { m1.x2 = m4.x; m1.d2 = m4.d; @@ -9,5 +10,4 @@ exports.f4 = m4.foo(); var x3 = m4.x; var d3 = m4.d; var f3 = m4.foo(); -})(exports.m1 || (exports.m1 = {})); -var m1 = exports.m1; +})(m1 = exports.m1 || (exports.m1 = {})); diff --git a/tests/baselines/reference/propertyNameWithoutTypeAnnotation.types b/tests/baselines/reference/propertyNameWithoutTypeAnnotation.types index bdc8452863d..520567d33a1 100644 --- a/tests/baselines/reference/propertyNameWithoutTypeAnnotation.types +++ b/tests/baselines/reference/propertyNameWithoutTypeAnnotation.types @@ -25,7 +25,7 @@ var b = { >{ foo: null} : { foo: null; } foo: null ->foo : any +>foo : null } // These should all be of type 'any' diff --git a/tests/baselines/reference/qualify.js b/tests/baselines/reference/qualify.js index 93cd15af340..ffb643b8ea4 100644 --- a/tests/baselines/reference/qualify.js +++ b/tests/baselines/reference/qualify.js @@ -64,35 +64,36 @@ var x:T.I=y; var M; (function (M) { M.m = 0; + var N; (function (N) { N.n = 1; - })(M.N || (M.N = {})); - var N = M.N; + })(N = M.N || (M.N = {})); })(M || (M = {})); var M; (function (M) { + var N; (function (N) { var y = M.m; var x = N.n + y; - })(M.N || (M.N = {})); - var N = M.N; + })(N = M.N || (M.N = {})); })(M || (M = {})); var T; (function (T) { + var U; (function (U) { var z = 3; - })(T.U || (T.U = {})); - var U = T.U; + })(U = T.U || (T.U = {})); })(T || (T = {})); var Peer; (function (Peer) { + var U2; (function (U2) { var z = 3; - })(Peer.U2 || (Peer.U2 = {})); - var U2 = Peer.U2; + })(U2 = Peer.U2 || (Peer.U2 = {})); })(Peer || (Peer = {})); var Everest; (function (Everest) { + var K2; (function (K2) { var v1; var v2 = v1; @@ -100,8 +101,7 @@ var Everest; var v4 = v1; var v5 = v1; var v6 = v1; - })(Everest.K2 || (Everest.K2 = {})); - var K2 = Everest.K2; + })(K2 = Everest.K2 || (Everest.K2 = {})); })(Everest || (Everest = {})); var y; var x = y; diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js b/tests/baselines/reference/recursiveClassReferenceTest.js index ac211c9dc02..661ecb3a0e7 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.js +++ b/tests/baselines/reference/recursiveClassReferenceTest.js @@ -113,8 +113,11 @@ var __extends = this.__extends || function (d, b) { }; var Sample; (function (Sample) { + var Actions; (function (Actions) { + var Thing; (function (_Thing) { + var Find; (function (Find) { var StartFindAction = (function () { function StartFindAction() { @@ -128,16 +131,15 @@ var Sample; return StartFindAction; })(); Find.StartFindAction = StartFindAction; - })(_Thing.Find || (_Thing.Find = {})); - var Find = _Thing.Find; - })(Actions.Thing || (Actions.Thing = {})); - var Thing = Actions.Thing; - })(Sample.Actions || (Sample.Actions = {})); - var Actions = Sample.Actions; + })(Find = _Thing.Find || (_Thing.Find = {})); + })(Thing = Actions.Thing || (Actions.Thing = {})); + })(Actions = Sample.Actions || (Sample.Actions = {})); })(Sample || (Sample = {})); var Sample; (function (Sample) { + var Thing; (function (Thing) { + var Widgets; (function (Widgets) { var FindWidget = (function () { function FindWidget(codeThing) { @@ -159,10 +161,8 @@ var Sample; return FindWidget; })(); Widgets.FindWidget = FindWidget; - })(Thing.Widgets || (Thing.Widgets = {})); - var Widgets = Thing.Widgets; - })(Sample.Thing || (Sample.Thing = {})); - var Thing = Sample.Thing; + })(Widgets = Thing.Widgets || (Thing.Widgets = {})); + })(Thing = Sample.Thing || (Sample.Thing = {})); })(Sample || (Sample = {})); var AbstractMode = (function () { function AbstractMode() { @@ -174,8 +174,11 @@ var AbstractMode = (function () { })(); var Sample; (function (Sample) { + var Thing; (function (Thing) { + var Languages; (function (Languages) { + var PlainText; (function (PlainText) { var State = (function () { function State(mode) { @@ -205,11 +208,8 @@ var Sample; return Mode; })(AbstractMode); PlainText.Mode = Mode; - })(Languages.PlainText || (Languages.PlainText = {})); - var PlainText = Languages.PlainText; - })(Thing.Languages || (Thing.Languages = {})); - var Languages = Thing.Languages; - })(Sample.Thing || (Sample.Thing = {})); - var Thing = Sample.Thing; + })(PlainText = Languages.PlainText || (Languages.PlainText = {})); + })(Languages = Thing.Languages || (Thing.Languages = {})); + })(Thing = Sample.Thing || (Sample.Thing = {})); })(Sample || (Sample = {})); //# sourceMappingURL=recursiveClassReferenceTest.js.map \ No newline at end of file diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js.map b/tests/baselines/reference/recursiveClassReferenceTest.js.map index 0908d04e3b4..d2e66a925a8 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.js.map +++ b/tests/baselines/reference/recursiveClassReferenceTest.js.map @@ -1,2 +1,2 @@ //// [recursiveClassReferenceTest.js.map] -{"version":3,"file":"recursiveClassReferenceTest.js","sourceRoot":"","sources":["recursiveClassReferenceTest.ts"],"names":["Sample","Sample.Actions","Sample.Actions.Thing","Sample.Actions.Thing.Find","Sample.Actions.Thing.Find.StartFindAction","Sample.Actions.Thing.Find.StartFindAction.constructor","Sample.Actions.Thing.Find.StartFindAction.getId","Sample.Actions.Thing.Find.StartFindAction.run","Sample.Thing","Sample.Thing.Widgets","Sample.Thing.Widgets.FindWidget","Sample.Thing.Widgets.FindWidget.constructor","Sample.Thing.Widgets.FindWidget.gar","Sample.Thing.Widgets.FindWidget.getDomNode","Sample.Thing.Widgets.FindWidget.destroy","AbstractMode","AbstractMode.constructor","AbstractMode.getInitialState","Sample.Thing.Languages","Sample.Thing.Languages.PlainText","Sample.Thing.Languages.PlainText.State","Sample.Thing.Languages.PlainText.State.constructor","Sample.Thing.Languages.PlainText.State.clone","Sample.Thing.Languages.PlainText.State.equals","Sample.Thing.Languages.PlainText.State.getMode","Sample.Thing.Languages.PlainText.Mode","Sample.Thing.Languages.PlainText.Mode.constructor","Sample.Thing.Languages.PlainText.Mode.getInitialState"],"mappings":"AAAA,iEAAiE;AACjE,0EAA0E;;;;;;;AA8B1E,IAAO,MAAM,CAUZ;AAVD,WAAO,MAAM;IAACA,WAAAA,OAAOA;QAACC,WAAAA,MAAKA;YAACC,WAAAA,IAAIA,EAACA,CAACA;gBACjCC,IAAaA,eAAeA;oBAA5BC,SAAaA,eAAeA;oBAQ5BC,CAACA;oBANOD,+BAAKA,GAAZA;wBAAiBE,MAAMA,CAACA,IAAIA,CAACA;oBAACA,CAACA;oBAExBF,6BAAGA,GAAVA,UAAWA,KAA6BA;wBAEvCG,MAAMA,CAACA,IAAIA,CAACA;oBACbA,CAACA;oBACFH,sBAACA;gBAADA,CAACA,AARDD,IAQCA;gBARYA,oBAAeA,GAAfA,eAQZA,CAAAA;YACFA,CAACA,EAV2BD,WAAIA,KAAJA,WAAIA,QAU/BA;YAV2BA,IAAAA,IAAIA,GAAJA,WAU3BA,CAAAA;QAADA,CAACA,EAVqBD,aAAKA,KAALA,aAAKA,QAU1BA;QAVqBA,IAAAA,KAAKA,GAALA,aAUrBA,CAAAA;IAADA,CAACA,EAVaD,cAAOA,KAAPA,cAAOA,QAUpBA;IAVaA,IAAAA,OAAOA,GAAPA,cAUbA,CAAAA;AAADA,CAACA,EAVM,MAAM,KAAN,MAAM,QAUZ;AAED,IAAO,MAAM,CAoBZ;AApBD,WAAO,MAAM;IAACA,WAAAA,KAAKA;QAACQ,WAAAA,OAAOA,EAACA,CAACA;YAC5BC,IAAaA,UAAUA;gBAKtBC,SALYA,UAAUA,CAKFA,SAAkCA;oBAAlCC,cAASA,GAATA,SAASA,CAAyBA;oBAD9CA,YAAOA,GAAOA,IAAIA,CAACA;oBAGvBA,AADAA,aAAaA;oBACbA,SAASA,CAACA,SAASA,CAACA,WAAWA,EAAEA,IAAIA,CAACA,CAACA;gBAC3CA,CAACA;gBANMD,wBAAGA,GAAVA,UAAWA,MAAyCA;oBAAIE,EAAEA,CAACA,CAACA,IAAIA,CAACA,CAACA,CAACA;wBAAAA,MAAMA,CAACA,MAAMA,CAACA,IAAIA,CAACA,CAACA;oBAAAA,CAACA;gBAAAA,CAACA;gBAQlFF,+BAAUA,GAAjBA;oBACCG,MAAMA,CAACA,OAAOA,CAACA;gBAChBA,CAACA;gBAEMH,4BAAOA,GAAdA;gBAEAI,CAACA;gBAEFJ,iBAACA;YAADA,CAACA,AAlBDD,IAkBCA;YAlBYA,kBAAUA,GAAVA,UAkBZA,CAAAA;QACFA,CAACA,EApBmBD,aAAOA,KAAPA,aAAOA,QAoB1BA;QApBmBA,IAAAA,OAAOA,GAAPA,aAoBnBA,CAAAA;IAADA,CAACA,EApBaR,YAAKA,KAALA,YAAKA,QAoBlBA;IApBaA,IAAAA,KAAKA,GAALA,YAoBbA,CAAAA;AAADA,CAACA,EApBM,MAAM,KAAN,MAAM,QAoBZ;AAGD,IAAM,YAAY;IAAlBe,SAAMA,YAAYA;IAAqEC,CAACA;IAA3CD,sCAAeA,GAAtBA;QAAmCE,MAAMA,CAACA,IAAIA,CAACA;IAAAA,CAACA;IAACF,mBAACA;AAADA,CAACA,AAAxF,IAAwF;AASxF,IAAO,MAAM,CAwBZ;AAxBD,WAAO,MAAM;IAACf,WAAAA,KAAKA;QAACQ,WAAAA,SAASA;YAACU,WAAAA,SAASA,EAACA,CAACA;gBAExCC,IAAaA,KAAKA;oBACXC,SADMA,KAAKA,CACSA,IAAWA;wBAAXC,SAAIA,GAAJA,IAAIA,CAAOA;oBAAIA,CAACA;oBACnCD,qBAAKA,GAAZA;wBACCE,MAAMA,CAACA,IAAIA,CAACA;oBACbA,CAACA;oBAEMF,sBAAMA,GAAbA,UAAcA,KAAYA;wBACzBG,MAAMA,CAACA,IAAIA,KAAKA,KAAKA,CAACA;oBACvBA,CAACA;oBAEMH,uBAAOA,GAAdA;wBAA0BI,MAAMA,CAACA,IAAIA,CAACA;oBAACA,CAACA;oBACzCJ,YAACA;gBAADA,CAACA,AAXDD,IAWCA;gBAXYA,eAAKA,GAALA,KAWZA,CAAAA;gBAEDA,IAAaA,IAAIA;oBAASM,UAAbA,IAAIA,UAAqBA;oBAAtCA,SAAaA,IAAIA;wBAASC,8BAAYA;oBAQtCA,CAACA;oBANAD,aAAaA;oBACNA,8BAAeA,GAAtBA;wBACCE,MAAMA,CAACA,IAAIA,KAAKA,CAACA,IAAIA,CAACA,CAACA;oBACxBA,CAACA;oBAGFF,WAACA;gBAADA,CAACA,AARDN,EAA0BA,YAAYA,EAQrCA;gBARYA,cAAIA,GAAJA,IAQZA,CAAAA;YACFA,CAACA,EAxB6BD,mBAASA,KAATA,mBAASA,QAwBtCA;YAxB6BA,IAAAA,SAASA,GAATA,mBAwB7BA,CAAAA;QAADA,CAACA,EAxBmBV,eAASA,KAATA,eAASA,QAwB5BA;QAxBmBA,IAAAA,SAASA,GAATA,eAwBnBA,CAAAA;IAADA,CAACA,EAxBaR,YAAKA,KAALA,YAAKA,QAwBlBA;IAxBaA,IAAAA,KAAKA,GAALA,YAwBbA,CAAAA;AAADA,CAACA,EAxBM,MAAM,KAAN,MAAM,QAwBZ"} \ No newline at end of file +{"version":3,"file":"recursiveClassReferenceTest.js","sourceRoot":"","sources":["recursiveClassReferenceTest.ts"],"names":["Sample","Sample.Actions","Sample.Actions.Thing","Sample.Actions.Thing.Find","Sample.Actions.Thing.Find.StartFindAction","Sample.Actions.Thing.Find.StartFindAction.constructor","Sample.Actions.Thing.Find.StartFindAction.getId","Sample.Actions.Thing.Find.StartFindAction.run","Sample.Thing","Sample.Thing.Widgets","Sample.Thing.Widgets.FindWidget","Sample.Thing.Widgets.FindWidget.constructor","Sample.Thing.Widgets.FindWidget.gar","Sample.Thing.Widgets.FindWidget.getDomNode","Sample.Thing.Widgets.FindWidget.destroy","AbstractMode","AbstractMode.constructor","AbstractMode.getInitialState","Sample.Thing.Languages","Sample.Thing.Languages.PlainText","Sample.Thing.Languages.PlainText.State","Sample.Thing.Languages.PlainText.State.constructor","Sample.Thing.Languages.PlainText.State.clone","Sample.Thing.Languages.PlainText.State.equals","Sample.Thing.Languages.PlainText.State.getMode","Sample.Thing.Languages.PlainText.Mode","Sample.Thing.Languages.PlainText.Mode.constructor","Sample.Thing.Languages.PlainText.Mode.getInitialState"],"mappings":"AAAA,iEAAiE;AACjE,0EAA0E;;;;;;;AA8B1E,IAAO,MAAM,CAUZ;AAVD,WAAO,MAAM;IAACA,IAAAA,OAAOA,CAUpBA;IAVaA,WAAAA,OAAOA;QAACC,IAAAA,KAAKA,CAU1BA;QAVqBA,WAAAA,MAAKA;YAACC,IAAAA,IAAIA,CAU/BA;YAV2BA,WAAAA,IAAIA,EAACA,CAACA;gBACjCC,IAAaA,eAAeA;oBAA5BC,SAAaA,eAAeA;oBAQ5BC,CAACA;oBANOD,+BAAKA,GAAZA;wBAAiBE,MAAMA,CAACA,IAAIA,CAACA;oBAACA,CAACA;oBAExBF,6BAAGA,GAAVA,UAAWA,KAA6BA;wBAEvCG,MAAMA,CAACA,IAAIA,CAACA;oBACbA,CAACA;oBACFH,sBAACA;gBAADA,CAACA,AARDD,IAQCA;gBARYA,oBAAeA,GAAfA,eAQZA,CAAAA;YACFA,CAACA,EAV2BD,IAAIA,GAAJA,WAAIA,KAAJA,WAAIA,QAU/BA;QAADA,CAACA,EAVqBD,KAAKA,GAALA,aAAKA,KAALA,aAAKA,QAU1BA;IAADA,CAACA,EAVaD,OAAOA,GAAPA,cAAOA,KAAPA,cAAOA,QAUpBA;AAADA,CAACA,EAVM,MAAM,KAAN,MAAM,QAUZ;AAED,IAAO,MAAM,CAoBZ;AApBD,WAAO,MAAM;IAACA,IAAAA,KAAKA,CAoBlBA;IApBaA,WAAAA,KAAKA;QAACQ,IAAAA,OAAOA,CAoB1BA;QApBmBA,WAAAA,OAAOA,EAACA,CAACA;YAC5BC,IAAaA,UAAUA;gBAKtBC,SALYA,UAAUA,CAKFA,SAAkCA;oBAAlCC,cAASA,GAATA,SAASA,CAAyBA;oBAD9CA,YAAOA,GAAOA,IAAIA,CAACA;oBAGvBA,AADAA,aAAaA;oBACbA,SAASA,CAACA,SAASA,CAACA,WAAWA,EAAEA,IAAIA,CAACA,CAACA;gBAC3CA,CAACA;gBANMD,wBAAGA,GAAVA,UAAWA,MAAyCA;oBAAIE,EAAEA,CAACA,CAACA,IAAIA,CAACA,CAACA,CAACA;wBAAAA,MAAMA,CAACA,MAAMA,CAACA,IAAIA,CAACA,CAACA;oBAAAA,CAACA;gBAAAA,CAACA;gBAQlFF,+BAAUA,GAAjBA;oBACCG,MAAMA,CAACA,OAAOA,CAACA;gBAChBA,CAACA;gBAEMH,4BAAOA,GAAdA;gBAEAI,CAACA;gBAEFJ,iBAACA;YAADA,CAACA,AAlBDD,IAkBCA;YAlBYA,kBAAUA,GAAVA,UAkBZA,CAAAA;QACFA,CAACA,EApBmBD,OAAOA,GAAPA,aAAOA,KAAPA,aAAOA,QAoB1BA;IAADA,CAACA,EApBaR,KAAKA,GAALA,YAAKA,KAALA,YAAKA,QAoBlBA;AAADA,CAACA,EApBM,MAAM,KAAN,MAAM,QAoBZ;AAGD,IAAM,YAAY;IAAlBe,SAAMA,YAAYA;IAAqEC,CAACA;IAA3CD,sCAAeA,GAAtBA;QAAmCE,MAAMA,CAACA,IAAIA,CAACA;IAAAA,CAACA;IAACF,mBAACA;AAADA,CAACA,AAAxF,IAAwF;AASxF,IAAO,MAAM,CAwBZ;AAxBD,WAAO,MAAM;IAACf,IAAAA,KAAKA,CAwBlBA;IAxBaA,WAAAA,KAAKA;QAACQ,IAAAA,SAASA,CAwB5BA;QAxBmBA,WAAAA,SAASA;YAACU,IAAAA,SAASA,CAwBtCA;YAxB6BA,WAAAA,SAASA,EAACA,CAACA;gBAExCC,IAAaA,KAAKA;oBACXC,SADMA,KAAKA,CACSA,IAAWA;wBAAXC,SAAIA,GAAJA,IAAIA,CAAOA;oBAAIA,CAACA;oBACnCD,qBAAKA,GAAZA;wBACCE,MAAMA,CAACA,IAAIA,CAACA;oBACbA,CAACA;oBAEMF,sBAAMA,GAAbA,UAAcA,KAAYA;wBACzBG,MAAMA,CAACA,IAAIA,KAAKA,KAAKA,CAACA;oBACvBA,CAACA;oBAEMH,uBAAOA,GAAdA;wBAA0BI,MAAMA,CAACA,IAAIA,CAACA;oBAACA,CAACA;oBACzCJ,YAACA;gBAADA,CAACA,AAXDD,IAWCA;gBAXYA,eAAKA,GAALA,KAWZA,CAAAA;gBAEDA,IAAaA,IAAIA;oBAASM,UAAbA,IAAIA,UAAqBA;oBAAtCA,SAAaA,IAAIA;wBAASC,8BAAYA;oBAQtCA,CAACA;oBANAD,aAAaA;oBACNA,8BAAeA,GAAtBA;wBACCE,MAAMA,CAACA,IAAIA,KAAKA,CAACA,IAAIA,CAACA,CAACA;oBACxBA,CAACA;oBAGFF,WAACA;gBAADA,CAACA,AARDN,EAA0BA,YAAYA,EAQrCA;gBARYA,cAAIA,GAAJA,IAQZA,CAAAA;YACFA,CAACA,EAxB6BD,SAASA,GAATA,mBAASA,KAATA,mBAASA,QAwBtCA;QAADA,CAACA,EAxBmBV,SAASA,GAATA,eAASA,KAATA,eAASA,QAwB5BA;IAADA,CAACA,EAxBaR,KAAKA,GAALA,YAAKA,KAALA,YAAKA,QAwBlBA;AAADA,CAACA,EAxBM,MAAM,KAAN,MAAM,QAwBZ"} \ No newline at end of file diff --git a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt index 2c51f0949f2..d7163bf7760 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt +++ b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt @@ -91,7 +91,6 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 >^^^^^^^^^^^ 3 > ^^^^^^ -4 > ^^^^^^^^^-> 1-> 2 >module 3 > Sample @@ -99,29 +98,102 @@ sourceFile:recursiveClassReferenceTest.ts 2 >Emitted(10, 12) Source(32, 8) + SourceIndex(0) 3 >Emitted(10, 18) Source(32, 14) + SourceIndex(0) --- +>>> var Actions; +1 >^^^^ +2 > ^^^^ +3 > ^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^-> +1 >. +2 > +3 > Actions +4 > .Thing.Find { + > export class StartFindAction implements Sample.Thing.IAction { + > + > public getId() { return "yo"; } + > + > public run(Thing:Sample.Thing.ICodeThing):boolean { + > + > return true; + > } + > } + > } +1 >Emitted(11, 5) Source(32, 15) + SourceIndex(0) name (Sample) +2 >Emitted(11, 9) Source(32, 15) + SourceIndex(0) name (Sample) +3 >Emitted(11, 16) Source(32, 22) + SourceIndex(0) name (Sample) +4 >Emitted(11, 17) Source(42, 2) + SourceIndex(0) name (Sample) +--- >>> (function (Actions) { 1->^^^^ 2 > ^^^^^^^^^^^ 3 > ^^^^^^^ -4 > ^^^^^^^-> -1->. +1-> 2 > 3 > Actions -1->Emitted(11, 5) Source(32, 15) + SourceIndex(0) name (Sample) -2 >Emitted(11, 16) Source(32, 15) + SourceIndex(0) name (Sample) -3 >Emitted(11, 23) Source(32, 22) + SourceIndex(0) name (Sample) +1->Emitted(12, 5) Source(32, 15) + SourceIndex(0) name (Sample) +2 >Emitted(12, 16) Source(32, 15) + SourceIndex(0) name (Sample) +3 >Emitted(12, 23) Source(32, 22) + SourceIndex(0) name (Sample) +--- +>>> var Thing; +1 >^^^^^^^^ +2 > ^^^^ +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^^-> +1 >. +2 > +3 > Thing +4 > .Find { + > export class StartFindAction implements Sample.Thing.IAction { + > + > public getId() { return "yo"; } + > + > public run(Thing:Sample.Thing.ICodeThing):boolean { + > + > return true; + > } + > } + > } +1 >Emitted(13, 9) Source(32, 23) + SourceIndex(0) name (Sample.Actions) +2 >Emitted(13, 13) Source(32, 23) + SourceIndex(0) name (Sample.Actions) +3 >Emitted(13, 18) Source(32, 28) + SourceIndex(0) name (Sample.Actions) +4 >Emitted(13, 19) Source(42, 2) + SourceIndex(0) name (Sample.Actions) --- >>> (function (_Thing) { 1->^^^^^^^^ 2 > ^^^^^^^^^^^ 3 > ^^^^^^ -4 > ^^^^^^-> -1->. +1-> 2 > 3 > Thing -1->Emitted(12, 9) Source(32, 23) + SourceIndex(0) name (Sample.Actions) -2 >Emitted(12, 20) Source(32, 23) + SourceIndex(0) name (Sample.Actions) -3 >Emitted(12, 26) Source(32, 28) + SourceIndex(0) name (Sample.Actions) +1->Emitted(14, 9) Source(32, 23) + SourceIndex(0) name (Sample.Actions) +2 >Emitted(14, 20) Source(32, 23) + SourceIndex(0) name (Sample.Actions) +3 >Emitted(14, 26) Source(32, 28) + SourceIndex(0) name (Sample.Actions) +--- +>>> var Find; +1 >^^^^^^^^^^^^ +2 > ^^^^ +3 > ^^^^ +4 > ^ +5 > ^^^^^^^^^^-> +1 >. +2 > +3 > Find +4 > { + > export class StartFindAction implements Sample.Thing.IAction { + > + > public getId() { return "yo"; } + > + > public run(Thing:Sample.Thing.ICodeThing):boolean { + > + > return true; + > } + > } + > } +1 >Emitted(15, 13) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) +2 >Emitted(15, 17) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) +3 >Emitted(15, 21) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) +4 >Emitted(15, 22) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing) --- >>> (function (Find) { 1->^^^^^^^^^^^^ @@ -130,16 +202,16 @@ sourceFile:recursiveClassReferenceTest.ts 4 > ^^ 5 > ^ 6 > ^^^^^^^^^^^^^^^^^^^^^^^-> -1->. +1-> 2 > 3 > Find 4 > 5 > { -1->Emitted(13, 13) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) -2 >Emitted(13, 24) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) -3 >Emitted(13, 28) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) -4 >Emitted(13, 30) Source(32, 34) + SourceIndex(0) name (Sample.Actions.Thing) -5 >Emitted(13, 31) Source(32, 35) + SourceIndex(0) name (Sample.Actions.Thing) +1->Emitted(16, 13) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) +2 >Emitted(16, 24) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) +3 >Emitted(16, 28) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) +4 >Emitted(16, 30) Source(32, 34) + SourceIndex(0) name (Sample.Actions.Thing) +5 >Emitted(16, 31) Source(32, 35) + SourceIndex(0) name (Sample.Actions.Thing) --- >>> var StartFindAction = (function () { 1->^^^^^^^^^^^^^^^^ @@ -150,9 +222,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 > export class 3 > StartFindAction -1->Emitted(14, 17) Source(33, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find) -2 >Emitted(14, 21) Source(33, 15) + SourceIndex(0) name (Sample.Actions.Thing.Find) -3 >Emitted(14, 36) Source(33, 30) + SourceIndex(0) name (Sample.Actions.Thing.Find) +1->Emitted(17, 17) Source(33, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find) +2 >Emitted(17, 21) Source(33, 15) + SourceIndex(0) name (Sample.Actions.Thing.Find) +3 >Emitted(17, 36) Source(33, 30) + SourceIndex(0) name (Sample.Actions.Thing.Find) --- >>> function StartFindAction() { 1->^^^^^^^^^^^^^^^^^^^^ @@ -161,9 +233,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > export class 3 > StartFindAction -1->Emitted(15, 21) Source(33, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -2 >Emitted(15, 30) Source(33, 15) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -3 >Emitted(15, 45) Source(33, 30) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +1->Emitted(18, 21) Source(33, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +2 >Emitted(18, 30) Source(33, 15) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +3 >Emitted(18, 45) Source(33, 30) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ @@ -179,8 +251,8 @@ sourceFile:recursiveClassReferenceTest.ts > } > 2 > } -1 >Emitted(16, 21) Source(41, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.constructor) -2 >Emitted(16, 22) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.constructor) +1 >Emitted(19, 21) Source(41, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.constructor) +2 >Emitted(19, 22) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.constructor) --- >>> StartFindAction.prototype.getId = function () { 1->^^^^^^^^^^^^^^^^^^^^ @@ -189,9 +261,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > getId 3 > -1->Emitted(17, 21) Source(35, 10) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -2 >Emitted(17, 52) Source(35, 15) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -3 >Emitted(17, 55) Source(35, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +1->Emitted(20, 21) Source(35, 10) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +2 >Emitted(20, 52) Source(35, 15) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +3 >Emitted(20, 55) Source(35, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) --- >>> return "yo"; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -204,11 +276,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > "yo" 5 > ; -1 >Emitted(18, 25) Source(35, 20) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) -2 >Emitted(18, 31) Source(35, 26) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) -3 >Emitted(18, 32) Source(35, 27) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) -4 >Emitted(18, 36) Source(35, 31) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) -5 >Emitted(18, 37) Source(35, 32) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) +1 >Emitted(21, 25) Source(35, 20) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) +2 >Emitted(21, 31) Source(35, 26) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) +3 >Emitted(21, 32) Source(35, 27) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) +4 >Emitted(21, 36) Source(35, 31) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) +5 >Emitted(21, 37) Source(35, 32) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -216,8 +288,8 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 2 > } -1 >Emitted(19, 21) Source(35, 33) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) -2 >Emitted(19, 22) Source(35, 34) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) +1 >Emitted(22, 21) Source(35, 33) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) +2 >Emitted(22, 22) Source(35, 34) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) --- >>> StartFindAction.prototype.run = function (Thing) { 1->^^^^^^^^^^^^^^^^^^^^ @@ -232,11 +304,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > public run( 5 > Thing:Sample.Thing.ICodeThing -1->Emitted(20, 21) Source(37, 10) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -2 >Emitted(20, 50) Source(37, 13) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -3 >Emitted(20, 53) Source(37, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -4 >Emitted(20, 63) Source(37, 14) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -5 >Emitted(20, 68) Source(37, 43) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +1->Emitted(23, 21) Source(37, 10) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +2 >Emitted(23, 50) Source(37, 13) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +3 >Emitted(23, 53) Source(37, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +4 >Emitted(23, 63) Source(37, 14) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +5 >Emitted(23, 68) Source(37, 43) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) --- >>> return true; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -251,11 +323,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > true 5 > ; -1 >Emitted(21, 25) Source(39, 4) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) -2 >Emitted(21, 31) Source(39, 10) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) -3 >Emitted(21, 32) Source(39, 11) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) -4 >Emitted(21, 36) Source(39, 15) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) -5 >Emitted(21, 37) Source(39, 16) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) +1 >Emitted(24, 25) Source(39, 4) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) +2 >Emitted(24, 31) Source(39, 10) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) +3 >Emitted(24, 32) Source(39, 11) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) +4 >Emitted(24, 36) Source(39, 15) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) +5 >Emitted(24, 37) Source(39, 16) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -264,8 +336,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(22, 21) Source(40, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) -2 >Emitted(22, 22) Source(40, 4) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) +1 >Emitted(25, 21) Source(40, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) +2 >Emitted(25, 22) Source(40, 4) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) --- >>> return StartFindAction; 1->^^^^^^^^^^^^^^^^^^^^ @@ -273,8 +345,8 @@ sourceFile:recursiveClassReferenceTest.ts 1-> > 2 > } -1->Emitted(23, 21) Source(41, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -2 >Emitted(23, 43) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +1->Emitted(26, 21) Source(41, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +2 >Emitted(26, 43) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -294,10 +366,10 @@ sourceFile:recursiveClassReferenceTest.ts > return true; > } > } -1 >Emitted(24, 17) Source(41, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -2 >Emitted(24, 18) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -3 >Emitted(24, 18) Source(33, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find) -4 >Emitted(24, 22) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find) +1 >Emitted(27, 17) Source(41, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +2 >Emitted(27, 18) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +3 >Emitted(27, 18) Source(33, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find) +4 >Emitted(27, 22) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find) --- >>> Find.StartFindAction = StartFindAction; 1->^^^^^^^^^^^^^^^^ @@ -305,6 +377,7 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^ 4 > ^^^^^^^^^^^^^^^ 5 > ^ +6 > ^^^-> 1-> 2 > StartFindAction 3 > @@ -318,203 +391,131 @@ sourceFile:recursiveClassReferenceTest.ts > } > } 5 > -1->Emitted(25, 17) Source(33, 15) + SourceIndex(0) name (Sample.Actions.Thing.Find) -2 >Emitted(25, 37) Source(33, 30) + SourceIndex(0) name (Sample.Actions.Thing.Find) -3 >Emitted(25, 40) Source(33, 15) + SourceIndex(0) name (Sample.Actions.Thing.Find) -4 >Emitted(25, 55) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find) -5 >Emitted(25, 56) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find) +1->Emitted(28, 17) Source(33, 15) + SourceIndex(0) name (Sample.Actions.Thing.Find) +2 >Emitted(28, 37) Source(33, 30) + SourceIndex(0) name (Sample.Actions.Thing.Find) +3 >Emitted(28, 40) Source(33, 15) + SourceIndex(0) name (Sample.Actions.Thing.Find) +4 >Emitted(28, 55) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find) +5 >Emitted(28, 56) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find) --- ->>> })(_Thing.Find || (_Thing.Find = {})); -1 >^^^^^^^^^^^^ +>>> })(Find = _Thing.Find || (_Thing.Find = {})); +1->^^^^^^^^^^^^ 2 > ^ 3 > ^^ -4 > ^^^^^^^^^^^ -5 > ^^^^^ -6 > ^^^^^^^^^^^ -7 > ^^^^^^^^ -1 > +4 > ^^^^ +5 > ^^^ +6 > ^^^^^^^^^^^ +7 > ^^^^^ +8 > ^^^^^^^^^^^ +9 > ^^^^^^^^ +10> ^^-> +1-> > 2 > } 3 > 4 > Find -5 > -6 > Find -7 > { - > export class StartFindAction implements Sample.Thing.IAction { - > - > public getId() { return "yo"; } - > - > public run(Thing:Sample.Thing.ICodeThing):boolean { - > - > return true; - > } - > } - > } -1 >Emitted(26, 13) Source(42, 1) + SourceIndex(0) name (Sample.Actions.Thing.Find) -2 >Emitted(26, 14) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find) -3 >Emitted(26, 16) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) -4 >Emitted(26, 27) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) -5 >Emitted(26, 32) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) -6 >Emitted(26, 43) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) -7 >Emitted(26, 51) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing) +5 > +6 > Find +7 > +8 > Find +9 > { + > export class StartFindAction implements Sample.Thing.IAction { + > + > public getId() { return "yo"; } + > + > public run(Thing:Sample.Thing.ICodeThing):boolean { + > + > return true; + > } + > } + > } +1->Emitted(29, 13) Source(42, 1) + SourceIndex(0) name (Sample.Actions.Thing.Find) +2 >Emitted(29, 14) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find) +3 >Emitted(29, 16) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) +4 >Emitted(29, 20) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) +5 >Emitted(29, 23) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) +6 >Emitted(29, 34) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) +7 >Emitted(29, 39) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) +8 >Emitted(29, 50) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) +9 >Emitted(29, 58) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing) --- ->>> var Find = _Thing.Find; -1 >^^^^^^^^^^^^ -2 > ^^^^ -3 > ^^^^ -4 > ^^^ -5 > ^^^^^^^^^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^-> -1 > -2 > -3 > Find -4 > -5 > Find { - > export class StartFindAction implements Sample.Thing.IAction { - > - > public getId() { return "yo"; } - > - > public run(Thing:Sample.Thing.ICodeThing):boolean { - > - > return true; - > } - > } - > } -6 > -1 >Emitted(27, 13) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) -2 >Emitted(27, 17) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) -3 >Emitted(27, 21) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) -4 >Emitted(27, 24) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) -5 >Emitted(27, 35) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing) -6 >Emitted(27, 36) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing) ---- ->>> })(Actions.Thing || (Actions.Thing = {})); +>>> })(Thing = Actions.Thing || (Actions.Thing = {})); 1->^^^^^^^^ 2 > ^ 3 > ^^ -4 > ^^^^^^^^^^^^^ -5 > ^^^^^ -6 > ^^^^^^^^^^^^^ -7 > ^^^^^^^^ +4 > ^^^^^ +5 > ^^^ +6 > ^^^^^^^^^^^^^ +7 > ^^^^^ +8 > ^^^^^^^^^^^^^ +9 > ^^^^^^^^ +10> ^-> 1-> 2 > } 3 > 4 > Thing -5 > -6 > Thing -7 > .Find { - > export class StartFindAction implements Sample.Thing.IAction { - > - > public getId() { return "yo"; } - > - > public run(Thing:Sample.Thing.ICodeThing):boolean { - > - > return true; - > } - > } - > } -1->Emitted(28, 9) Source(42, 1) + SourceIndex(0) name (Sample.Actions.Thing) -2 >Emitted(28, 10) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing) -3 >Emitted(28, 12) Source(32, 23) + SourceIndex(0) name (Sample.Actions) -4 >Emitted(28, 25) Source(32, 28) + SourceIndex(0) name (Sample.Actions) -5 >Emitted(28, 30) Source(32, 23) + SourceIndex(0) name (Sample.Actions) -6 >Emitted(28, 43) Source(32, 28) + SourceIndex(0) name (Sample.Actions) -7 >Emitted(28, 51) Source(42, 2) + SourceIndex(0) name (Sample.Actions) +5 > +6 > Thing +7 > +8 > Thing +9 > .Find { + > export class StartFindAction implements Sample.Thing.IAction { + > + > public getId() { return "yo"; } + > + > public run(Thing:Sample.Thing.ICodeThing):boolean { + > + > return true; + > } + > } + > } +1->Emitted(30, 9) Source(42, 1) + SourceIndex(0) name (Sample.Actions.Thing) +2 >Emitted(30, 10) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing) +3 >Emitted(30, 12) Source(32, 23) + SourceIndex(0) name (Sample.Actions) +4 >Emitted(30, 17) Source(32, 28) + SourceIndex(0) name (Sample.Actions) +5 >Emitted(30, 20) Source(32, 23) + SourceIndex(0) name (Sample.Actions) +6 >Emitted(30, 33) Source(32, 28) + SourceIndex(0) name (Sample.Actions) +7 >Emitted(30, 38) Source(32, 23) + SourceIndex(0) name (Sample.Actions) +8 >Emitted(30, 51) Source(32, 28) + SourceIndex(0) name (Sample.Actions) +9 >Emitted(30, 59) Source(42, 2) + SourceIndex(0) name (Sample.Actions) --- ->>> var Thing = Actions.Thing; -1 >^^^^^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^ -5 > ^^^^^^^^^^^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^-> -1 > -2 > -3 > Thing -4 > -5 > Thing.Find { - > export class StartFindAction implements Sample.Thing.IAction { - > - > public getId() { return "yo"; } - > - > public run(Thing:Sample.Thing.ICodeThing):boolean { - > - > return true; - > } - > } - > } -6 > -1 >Emitted(29, 9) Source(32, 23) + SourceIndex(0) name (Sample.Actions) -2 >Emitted(29, 13) Source(32, 23) + SourceIndex(0) name (Sample.Actions) -3 >Emitted(29, 18) Source(32, 28) + SourceIndex(0) name (Sample.Actions) -4 >Emitted(29, 21) Source(32, 23) + SourceIndex(0) name (Sample.Actions) -5 >Emitted(29, 34) Source(42, 2) + SourceIndex(0) name (Sample.Actions) -6 >Emitted(29, 35) Source(42, 2) + SourceIndex(0) name (Sample.Actions) ---- ->>> })(Sample.Actions || (Sample.Actions = {})); +>>> })(Actions = Sample.Actions || (Sample.Actions = {})); 1->^^^^ 2 > ^ 3 > ^^ -4 > ^^^^^^^^^^^^^^ -5 > ^^^^^ -6 > ^^^^^^^^^^^^^^ -7 > ^^^^^^^^ +4 > ^^^^^^^ +5 > ^^^ +6 > ^^^^^^^^^^^^^^ +7 > ^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^^^^^^^ 1-> 2 > } 3 > 4 > Actions -5 > -6 > Actions -7 > .Thing.Find { - > export class StartFindAction implements Sample.Thing.IAction { - > - > public getId() { return "yo"; } - > - > public run(Thing:Sample.Thing.ICodeThing):boolean { - > - > return true; - > } - > } - > } -1->Emitted(30, 5) Source(42, 1) + SourceIndex(0) name (Sample.Actions) -2 >Emitted(30, 6) Source(42, 2) + SourceIndex(0) name (Sample.Actions) -3 >Emitted(30, 8) Source(32, 15) + SourceIndex(0) name (Sample) -4 >Emitted(30, 22) Source(32, 22) + SourceIndex(0) name (Sample) -5 >Emitted(30, 27) Source(32, 15) + SourceIndex(0) name (Sample) -6 >Emitted(30, 41) Source(32, 22) + SourceIndex(0) name (Sample) -7 >Emitted(30, 49) Source(42, 2) + SourceIndex(0) name (Sample) ---- ->>> var Actions = Sample.Actions; -1 >^^^^ -2 > ^^^^ -3 > ^^^^^^^ -4 > ^^^ -5 > ^^^^^^^^^^^^^^ -6 > ^ -1 > -2 > -3 > Actions -4 > -5 > Actions.Thing.Find { - > export class StartFindAction implements Sample.Thing.IAction { - > - > public getId() { return "yo"; } - > - > public run(Thing:Sample.Thing.ICodeThing):boolean { - > - > return true; - > } - > } - > } -6 > -1 >Emitted(31, 5) Source(32, 15) + SourceIndex(0) name (Sample) -2 >Emitted(31, 9) Source(32, 15) + SourceIndex(0) name (Sample) -3 >Emitted(31, 16) Source(32, 22) + SourceIndex(0) name (Sample) -4 >Emitted(31, 19) Source(32, 15) + SourceIndex(0) name (Sample) -5 >Emitted(31, 33) Source(42, 2) + SourceIndex(0) name (Sample) -6 >Emitted(31, 34) Source(42, 2) + SourceIndex(0) name (Sample) +5 > +6 > Actions +7 > +8 > Actions +9 > .Thing.Find { + > export class StartFindAction implements Sample.Thing.IAction { + > + > public getId() { return "yo"; } + > + > public run(Thing:Sample.Thing.ICodeThing):boolean { + > + > return true; + > } + > } + > } +1->Emitted(31, 5) Source(42, 1) + SourceIndex(0) name (Sample.Actions) +2 >Emitted(31, 6) Source(42, 2) + SourceIndex(0) name (Sample.Actions) +3 >Emitted(31, 8) Source(32, 15) + SourceIndex(0) name (Sample) +4 >Emitted(31, 15) Source(32, 22) + SourceIndex(0) name (Sample) +5 >Emitted(31, 18) Source(32, 15) + SourceIndex(0) name (Sample) +6 >Emitted(31, 32) Source(32, 22) + SourceIndex(0) name (Sample) +7 >Emitted(31, 37) Source(32, 15) + SourceIndex(0) name (Sample) +8 >Emitted(31, 51) Source(32, 22) + SourceIndex(0) name (Sample) +9 >Emitted(31, 59) Source(42, 2) + SourceIndex(0) name (Sample) --- >>>})(Sample || (Sample = {})); 1 > @@ -590,7 +591,6 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 >^^^^^^^^^^^ 3 > ^^^^^^ -4 > ^^^^^^^-> 1-> 2 >module 3 > Sample @@ -598,17 +598,87 @@ sourceFile:recursiveClassReferenceTest.ts 2 >Emitted(34, 12) Source(44, 8) + SourceIndex(0) 3 >Emitted(34, 18) Source(44, 14) + SourceIndex(0) --- +>>> var Thing; +1 >^^^^ +2 > ^^^^ +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^-> +1 >. +2 > +3 > Thing +4 > .Widgets { + > export class FindWidget implements Sample.Thing.IWidget { + > + > public gar(runner:(widget:Sample.Thing.IWidget)=>any) { if (true) {return runner(this);}} + > + > private domNode:any = null; + > constructor(private codeThing: Sample.Thing.ICodeThing) { + > // scenario 1 + > codeThing.addWidget("addWidget", this); + > } + > + > public getDomNode() { + > return domNode; + > } + > + > public destroy() { + > + > } + > + > } + > } +1 >Emitted(35, 5) Source(44, 15) + SourceIndex(0) name (Sample) +2 >Emitted(35, 9) Source(44, 15) + SourceIndex(0) name (Sample) +3 >Emitted(35, 14) Source(44, 20) + SourceIndex(0) name (Sample) +4 >Emitted(35, 15) Source(64, 2) + SourceIndex(0) name (Sample) +--- >>> (function (Thing) { 1->^^^^ 2 > ^^^^^^^^^^^ 3 > ^^^^^ -4 > ^^^^^^^^^^-> -1->. +4 > ^-> +1-> 2 > 3 > Thing -1->Emitted(35, 5) Source(44, 15) + SourceIndex(0) name (Sample) -2 >Emitted(35, 16) Source(44, 15) + SourceIndex(0) name (Sample) -3 >Emitted(35, 21) Source(44, 20) + SourceIndex(0) name (Sample) +1->Emitted(36, 5) Source(44, 15) + SourceIndex(0) name (Sample) +2 >Emitted(36, 16) Source(44, 15) + SourceIndex(0) name (Sample) +3 >Emitted(36, 21) Source(44, 20) + SourceIndex(0) name (Sample) +--- +>>> var Widgets; +1->^^^^^^^^ +2 > ^^^^ +3 > ^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^-> +1->. +2 > +3 > Widgets +4 > { + > export class FindWidget implements Sample.Thing.IWidget { + > + > public gar(runner:(widget:Sample.Thing.IWidget)=>any) { if (true) {return runner(this);}} + > + > private domNode:any = null; + > constructor(private codeThing: Sample.Thing.ICodeThing) { + > // scenario 1 + > codeThing.addWidget("addWidget", this); + > } + > + > public getDomNode() { + > return domNode; + > } + > + > public destroy() { + > + > } + > + > } + > } +1->Emitted(37, 9) Source(44, 21) + SourceIndex(0) name (Sample.Thing) +2 >Emitted(37, 13) Source(44, 21) + SourceIndex(0) name (Sample.Thing) +3 >Emitted(37, 20) Source(44, 28) + SourceIndex(0) name (Sample.Thing) +4 >Emitted(37, 21) Source(64, 2) + SourceIndex(0) name (Sample.Thing) --- >>> (function (Widgets) { 1->^^^^^^^^ @@ -617,16 +687,16 @@ sourceFile:recursiveClassReferenceTest.ts 4 > ^^ 5 > ^ 6 > ^^^^^^^^^^^^^^^-> -1->. +1-> 2 > 3 > Widgets 4 > 5 > { -1->Emitted(36, 9) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -2 >Emitted(36, 20) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -3 >Emitted(36, 27) Source(44, 28) + SourceIndex(0) name (Sample.Thing) -4 >Emitted(36, 29) Source(44, 29) + SourceIndex(0) name (Sample.Thing) -5 >Emitted(36, 30) Source(44, 30) + SourceIndex(0) name (Sample.Thing) +1->Emitted(38, 9) Source(44, 21) + SourceIndex(0) name (Sample.Thing) +2 >Emitted(38, 20) Source(44, 21) + SourceIndex(0) name (Sample.Thing) +3 >Emitted(38, 27) Source(44, 28) + SourceIndex(0) name (Sample.Thing) +4 >Emitted(38, 29) Source(44, 29) + SourceIndex(0) name (Sample.Thing) +5 >Emitted(38, 30) Source(44, 30) + SourceIndex(0) name (Sample.Thing) --- >>> var FindWidget = (function () { 1->^^^^^^^^^^^^ @@ -637,9 +707,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 > export class 3 > FindWidget -1->Emitted(37, 13) Source(45, 2) + SourceIndex(0) name (Sample.Thing.Widgets) -2 >Emitted(37, 17) Source(45, 15) + SourceIndex(0) name (Sample.Thing.Widgets) -3 >Emitted(37, 27) Source(45, 25) + SourceIndex(0) name (Sample.Thing.Widgets) +1->Emitted(39, 13) Source(45, 2) + SourceIndex(0) name (Sample.Thing.Widgets) +2 >Emitted(39, 17) Source(45, 15) + SourceIndex(0) name (Sample.Thing.Widgets) +3 >Emitted(39, 27) Source(45, 25) + SourceIndex(0) name (Sample.Thing.Widgets) --- >>> function FindWidget(codeThing) { 1->^^^^^^^^^^^^^^^^ @@ -663,11 +733,11 @@ sourceFile:recursiveClassReferenceTest.ts > private domNode:any = null; > constructor(private 5 > codeThing: Sample.Thing.ICodeThing -1->Emitted(38, 17) Source(50, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -2 >Emitted(38, 26) Source(45, 15) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -3 >Emitted(38, 36) Source(45, 25) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -4 >Emitted(38, 37) Source(50, 23) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -5 >Emitted(38, 46) Source(50, 57) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +1->Emitted(40, 17) Source(50, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +2 >Emitted(40, 26) Source(45, 15) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +3 >Emitted(40, 36) Source(45, 25) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +4 >Emitted(40, 37) Source(50, 23) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +5 >Emitted(40, 46) Source(50, 57) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) --- >>> this.codeThing = codeThing; 1->^^^^^^^^^^^^^^^^^^^^ @@ -680,11 +750,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > codeThing 5 > : Sample.Thing.ICodeThing -1->Emitted(39, 21) Source(50, 23) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -2 >Emitted(39, 35) Source(50, 32) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -3 >Emitted(39, 38) Source(50, 23) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -4 >Emitted(39, 47) Source(50, 32) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -5 >Emitted(39, 48) Source(50, 57) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +1->Emitted(41, 21) Source(50, 23) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +2 >Emitted(41, 35) Source(50, 32) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +3 >Emitted(41, 38) Source(50, 23) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +4 >Emitted(41, 47) Source(50, 32) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +5 >Emitted(41, 48) Source(50, 57) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) --- >>> this.domNode = null; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -697,11 +767,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > :any = 4 > null 5 > ; -1 >Emitted(40, 21) Source(49, 11) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -2 >Emitted(40, 33) Source(49, 18) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -3 >Emitted(40, 36) Source(49, 25) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -4 >Emitted(40, 40) Source(49, 29) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -5 >Emitted(40, 41) Source(49, 30) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +1 >Emitted(42, 21) Source(49, 11) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +2 >Emitted(42, 33) Source(49, 18) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +3 >Emitted(42, 36) Source(49, 25) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +4 >Emitted(42, 40) Source(49, 29) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +5 >Emitted(42, 41) Source(49, 30) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) --- >>> // scenario 1 1 >^^^^^^^^^^^^^^^^^^^^ @@ -714,9 +784,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 > 3 > // scenario 1 -1 >Emitted(41, 21) Source(52, 7) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -2 >Emitted(41, 21) Source(51, 7) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -3 >Emitted(41, 34) Source(51, 20) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +1 >Emitted(43, 21) Source(52, 7) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +2 >Emitted(43, 21) Source(51, 7) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +3 >Emitted(43, 34) Source(51, 20) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) --- >>> codeThing.addWidget("addWidget", this); 1->^^^^^^^^^^^^^^^^^^^^ @@ -740,16 +810,16 @@ sourceFile:recursiveClassReferenceTest.ts 8 > this 9 > ) 10> ; -1->Emitted(42, 21) Source(52, 7) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -2 >Emitted(42, 30) Source(52, 16) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -3 >Emitted(42, 31) Source(52, 17) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -4 >Emitted(42, 40) Source(52, 26) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -5 >Emitted(42, 41) Source(52, 27) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -6 >Emitted(42, 52) Source(52, 38) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -7 >Emitted(42, 54) Source(52, 40) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -8 >Emitted(42, 58) Source(52, 44) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -9 >Emitted(42, 59) Source(52, 45) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -10>Emitted(42, 60) Source(52, 46) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +1->Emitted(44, 21) Source(52, 7) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +2 >Emitted(44, 30) Source(52, 16) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +3 >Emitted(44, 31) Source(52, 17) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +4 >Emitted(44, 40) Source(52, 26) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +5 >Emitted(44, 41) Source(52, 27) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +6 >Emitted(44, 52) Source(52, 38) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +7 >Emitted(44, 54) Source(52, 40) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +8 >Emitted(44, 58) Source(52, 44) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +9 >Emitted(44, 59) Source(52, 45) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +10>Emitted(44, 60) Source(52, 46) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) --- >>> } 1 >^^^^^^^^^^^^^^^^ @@ -758,8 +828,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(43, 17) Source(53, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -2 >Emitted(43, 18) Source(53, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +1 >Emitted(45, 17) Source(53, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +2 >Emitted(45, 18) Source(53, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) --- >>> FindWidget.prototype.gar = function (runner) { 1->^^^^^^^^^^^^^^^^ @@ -772,11 +842,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > public gar( 5 > runner:(widget:Sample.Thing.IWidget)=>any -1->Emitted(44, 17) Source(47, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -2 >Emitted(44, 41) Source(47, 13) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -3 >Emitted(44, 44) Source(47, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -4 >Emitted(44, 54) Source(47, 14) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -5 >Emitted(44, 60) Source(47, 55) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +1->Emitted(46, 17) Source(47, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +2 >Emitted(46, 41) Source(47, 13) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +3 >Emitted(46, 44) Source(47, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +4 >Emitted(46, 54) Source(47, 14) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +5 >Emitted(46, 60) Source(47, 55) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) --- >>> if (true) { 1 >^^^^^^^^^^^^^^^^^^^^ @@ -796,14 +866,14 @@ sourceFile:recursiveClassReferenceTest.ts 6 > ) 7 > 8 > { -1 >Emitted(45, 21) Source(47, 59) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -2 >Emitted(45, 23) Source(47, 61) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -3 >Emitted(45, 24) Source(47, 62) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -4 >Emitted(45, 25) Source(47, 63) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -5 >Emitted(45, 29) Source(47, 67) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -6 >Emitted(45, 30) Source(47, 68) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -7 >Emitted(45, 31) Source(47, 69) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -8 >Emitted(45, 32) Source(47, 70) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +1 >Emitted(47, 21) Source(47, 59) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +2 >Emitted(47, 23) Source(47, 61) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +3 >Emitted(47, 24) Source(47, 62) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +4 >Emitted(47, 25) Source(47, 63) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +5 >Emitted(47, 29) Source(47, 67) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +6 >Emitted(47, 30) Source(47, 68) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +7 >Emitted(47, 31) Source(47, 69) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +8 >Emitted(47, 32) Source(47, 70) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) --- >>> return runner(this); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -822,22 +892,22 @@ sourceFile:recursiveClassReferenceTest.ts 6 > this 7 > ) 8 > ; -1->Emitted(46, 25) Source(47, 70) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -2 >Emitted(46, 31) Source(47, 76) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -3 >Emitted(46, 32) Source(47, 77) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -4 >Emitted(46, 38) Source(47, 83) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -5 >Emitted(46, 39) Source(47, 84) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -6 >Emitted(46, 43) Source(47, 88) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -7 >Emitted(46, 44) Source(47, 89) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -8 >Emitted(46, 45) Source(47, 90) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +1->Emitted(48, 25) Source(47, 70) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +2 >Emitted(48, 31) Source(47, 76) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +3 >Emitted(48, 32) Source(47, 77) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +4 >Emitted(48, 38) Source(47, 83) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +5 >Emitted(48, 39) Source(47, 84) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +6 >Emitted(48, 43) Source(47, 88) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +7 >Emitted(48, 44) Source(47, 89) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +8 >Emitted(48, 45) Source(47, 90) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ 2 > ^ 1 > 2 > } -1 >Emitted(47, 21) Source(47, 90) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -2 >Emitted(47, 22) Source(47, 91) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +1 >Emitted(49, 21) Source(47, 90) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +2 >Emitted(49, 22) Source(47, 91) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) --- >>> }; 1 >^^^^^^^^^^^^^^^^ @@ -845,8 +915,8 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 2 > } -1 >Emitted(48, 17) Source(47, 91) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -2 >Emitted(48, 18) Source(47, 92) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +1 >Emitted(50, 17) Source(47, 91) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +2 >Emitted(50, 18) Source(47, 92) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) --- >>> FindWidget.prototype.getDomNode = function () { 1->^^^^^^^^^^^^^^^^ @@ -863,9 +933,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > getDomNode 3 > -1->Emitted(49, 17) Source(55, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -2 >Emitted(49, 48) Source(55, 20) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -3 >Emitted(49, 51) Source(55, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +1->Emitted(51, 17) Source(55, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +2 >Emitted(51, 48) Source(55, 20) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +3 >Emitted(51, 51) Source(55, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) --- >>> return domNode; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -879,11 +949,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > domNode 5 > ; -1 >Emitted(50, 21) Source(56, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) -2 >Emitted(50, 27) Source(56, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) -3 >Emitted(50, 28) Source(56, 11) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) -4 >Emitted(50, 35) Source(56, 18) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) -5 >Emitted(50, 36) Source(56, 19) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) +1 >Emitted(52, 21) Source(56, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) +2 >Emitted(52, 27) Source(56, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) +3 >Emitted(52, 28) Source(56, 11) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) +4 >Emitted(52, 35) Source(56, 18) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) +5 >Emitted(52, 36) Source(56, 19) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) --- >>> }; 1 >^^^^^^^^^^^^^^^^ @@ -892,8 +962,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(51, 17) Source(57, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) -2 >Emitted(51, 18) Source(57, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) +1 >Emitted(53, 17) Source(57, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) +2 >Emitted(53, 18) Source(57, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) --- >>> FindWidget.prototype.destroy = function () { 1->^^^^^^^^^^^^^^^^ @@ -904,9 +974,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > destroy 3 > -1->Emitted(52, 17) Source(59, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -2 >Emitted(52, 45) Source(59, 17) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -3 >Emitted(52, 48) Source(59, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +1->Emitted(54, 17) Source(59, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +2 >Emitted(54, 45) Source(59, 17) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +3 >Emitted(54, 48) Source(59, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) --- >>> }; 1 >^^^^^^^^^^^^^^^^ @@ -916,8 +986,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1 >Emitted(53, 17) Source(61, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.destroy) -2 >Emitted(53, 18) Source(61, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.destroy) +1 >Emitted(55, 17) Source(61, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.destroy) +2 >Emitted(55, 18) Source(61, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.destroy) --- >>> return FindWidget; 1->^^^^^^^^^^^^^^^^ @@ -926,8 +996,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1->Emitted(54, 17) Source(63, 2) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -2 >Emitted(54, 34) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +1->Emitted(56, 17) Source(63, 2) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +2 >Emitted(56, 34) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) --- >>> })(); 1 >^^^^^^^^^^^^ @@ -957,10 +1027,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > > } -1 >Emitted(55, 13) Source(63, 2) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -2 >Emitted(55, 14) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -3 >Emitted(55, 14) Source(45, 2) + SourceIndex(0) name (Sample.Thing.Widgets) -4 >Emitted(55, 18) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets) +1 >Emitted(57, 13) Source(63, 2) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +2 >Emitted(57, 14) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +3 >Emitted(57, 14) Source(45, 2) + SourceIndex(0) name (Sample.Thing.Widgets) +4 >Emitted(57, 18) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets) --- >>> Widgets.FindWidget = FindWidget; 1->^^^^^^^^^^^^ @@ -968,7 +1038,7 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^ 4 > ^^^^^^^^^^ 5 > ^ -6 > ^^^^^^^-> +6 > ^^^^^^^^^^^^^^^^^-> 1-> 2 > FindWidget 3 > @@ -992,179 +1062,110 @@ sourceFile:recursiveClassReferenceTest.ts > > } 5 > -1->Emitted(56, 13) Source(45, 15) + SourceIndex(0) name (Sample.Thing.Widgets) -2 >Emitted(56, 31) Source(45, 25) + SourceIndex(0) name (Sample.Thing.Widgets) -3 >Emitted(56, 34) Source(45, 15) + SourceIndex(0) name (Sample.Thing.Widgets) -4 >Emitted(56, 44) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets) -5 >Emitted(56, 45) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets) +1->Emitted(58, 13) Source(45, 15) + SourceIndex(0) name (Sample.Thing.Widgets) +2 >Emitted(58, 31) Source(45, 25) + SourceIndex(0) name (Sample.Thing.Widgets) +3 >Emitted(58, 34) Source(45, 15) + SourceIndex(0) name (Sample.Thing.Widgets) +4 >Emitted(58, 44) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets) +5 >Emitted(58, 45) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets) --- ->>> })(Thing.Widgets || (Thing.Widgets = {})); +>>> })(Widgets = Thing.Widgets || (Thing.Widgets = {})); 1->^^^^^^^^ 2 > ^ 3 > ^^ -4 > ^^^^^^^^^^^^^ -5 > ^^^^^ -6 > ^^^^^^^^^^^^^ -7 > ^^^^^^^^ +4 > ^^^^^^^ +5 > ^^^ +6 > ^^^^^^^^^^^^^ +7 > ^^^^^ +8 > ^^^^^^^^^^^^^ +9 > ^^^^^^^^ 1-> > 2 > } 3 > 4 > Widgets -5 > -6 > Widgets -7 > { - > export class FindWidget implements Sample.Thing.IWidget { - > - > public gar(runner:(widget:Sample.Thing.IWidget)=>any) { if (true) {return runner(this);}} - > - > private domNode:any = null; - > constructor(private codeThing: Sample.Thing.ICodeThing) { - > // scenario 1 - > codeThing.addWidget("addWidget", this); - > } - > - > public getDomNode() { - > return domNode; - > } - > - > public destroy() { - > - > } - > - > } - > } -1->Emitted(57, 9) Source(64, 1) + SourceIndex(0) name (Sample.Thing.Widgets) -2 >Emitted(57, 10) Source(64, 2) + SourceIndex(0) name (Sample.Thing.Widgets) -3 >Emitted(57, 12) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -4 >Emitted(57, 25) Source(44, 28) + SourceIndex(0) name (Sample.Thing) -5 >Emitted(57, 30) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -6 >Emitted(57, 43) Source(44, 28) + SourceIndex(0) name (Sample.Thing) -7 >Emitted(57, 51) Source(64, 2) + SourceIndex(0) name (Sample.Thing) +5 > +6 > Widgets +7 > +8 > Widgets +9 > { + > export class FindWidget implements Sample.Thing.IWidget { + > + > public gar(runner:(widget:Sample.Thing.IWidget)=>any) { if (true) {return runner(this);}} + > + > private domNode:any = null; + > constructor(private codeThing: Sample.Thing.ICodeThing) { + > // scenario 1 + > codeThing.addWidget("addWidget", this); + > } + > + > public getDomNode() { + > return domNode; + > } + > + > public destroy() { + > + > } + > + > } + > } +1->Emitted(59, 9) Source(64, 1) + SourceIndex(0) name (Sample.Thing.Widgets) +2 >Emitted(59, 10) Source(64, 2) + SourceIndex(0) name (Sample.Thing.Widgets) +3 >Emitted(59, 12) Source(44, 21) + SourceIndex(0) name (Sample.Thing) +4 >Emitted(59, 19) Source(44, 28) + SourceIndex(0) name (Sample.Thing) +5 >Emitted(59, 22) Source(44, 21) + SourceIndex(0) name (Sample.Thing) +6 >Emitted(59, 35) Source(44, 28) + SourceIndex(0) name (Sample.Thing) +7 >Emitted(59, 40) Source(44, 21) + SourceIndex(0) name (Sample.Thing) +8 >Emitted(59, 53) Source(44, 28) + SourceIndex(0) name (Sample.Thing) +9 >Emitted(59, 61) Source(64, 2) + SourceIndex(0) name (Sample.Thing) --- ->>> var Widgets = Thing.Widgets; -1 >^^^^^^^^ -2 > ^^^^ -3 > ^^^^^^^ -4 > ^^^ -5 > ^^^^^^^^^^^^^ -6 > ^ -7 > ^^^^^^^^^-> -1 > -2 > -3 > Widgets -4 > -5 > Widgets { - > export class FindWidget implements Sample.Thing.IWidget { - > - > public gar(runner:(widget:Sample.Thing.IWidget)=>any) { if (true) {return runner(this);}} - > - > private domNode:any = null; - > constructor(private codeThing: Sample.Thing.ICodeThing) { - > // scenario 1 - > codeThing.addWidget("addWidget", this); - > } - > - > public getDomNode() { - > return domNode; - > } - > - > public destroy() { - > - > } - > - > } - > } -6 > -1 >Emitted(58, 9) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -2 >Emitted(58, 13) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -3 >Emitted(58, 20) Source(44, 28) + SourceIndex(0) name (Sample.Thing) -4 >Emitted(58, 23) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -5 >Emitted(58, 36) Source(64, 2) + SourceIndex(0) name (Sample.Thing) -6 >Emitted(58, 37) Source(64, 2) + SourceIndex(0) name (Sample.Thing) ---- ->>> })(Sample.Thing || (Sample.Thing = {})); -1->^^^^ +>>> })(Thing = Sample.Thing || (Sample.Thing = {})); +1 >^^^^ 2 > ^ 3 > ^^ -4 > ^^^^^^^^^^^^ -5 > ^^^^^ -6 > ^^^^^^^^^^^^ -7 > ^^^^^^^^ -1-> +4 > ^^^^^ +5 > ^^^ +6 > ^^^^^^^^^^^^ +7 > ^^^^^ +8 > ^^^^^^^^^^^^ +9 > ^^^^^^^^ +1 > 2 > } 3 > 4 > Thing -5 > -6 > Thing -7 > .Widgets { - > export class FindWidget implements Sample.Thing.IWidget { - > - > public gar(runner:(widget:Sample.Thing.IWidget)=>any) { if (true) {return runner(this);}} - > - > private domNode:any = null; - > constructor(private codeThing: Sample.Thing.ICodeThing) { - > // scenario 1 - > codeThing.addWidget("addWidget", this); - > } - > - > public getDomNode() { - > return domNode; - > } - > - > public destroy() { - > - > } - > - > } - > } -1->Emitted(59, 5) Source(64, 1) + SourceIndex(0) name (Sample.Thing) -2 >Emitted(59, 6) Source(64, 2) + SourceIndex(0) name (Sample.Thing) -3 >Emitted(59, 8) Source(44, 15) + SourceIndex(0) name (Sample) -4 >Emitted(59, 20) Source(44, 20) + SourceIndex(0) name (Sample) -5 >Emitted(59, 25) Source(44, 15) + SourceIndex(0) name (Sample) -6 >Emitted(59, 37) Source(44, 20) + SourceIndex(0) name (Sample) -7 >Emitted(59, 45) Source(64, 2) + SourceIndex(0) name (Sample) ---- ->>> var Thing = Sample.Thing; -1 >^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^ -5 > ^^^^^^^^^^^^ -6 > ^ -1 > -2 > -3 > Thing -4 > -5 > Thing.Widgets { - > export class FindWidget implements Sample.Thing.IWidget { - > - > public gar(runner:(widget:Sample.Thing.IWidget)=>any) { if (true) {return runner(this);}} - > - > private domNode:any = null; - > constructor(private codeThing: Sample.Thing.ICodeThing) { - > // scenario 1 - > codeThing.addWidget("addWidget", this); - > } - > - > public getDomNode() { - > return domNode; - > } - > - > public destroy() { - > - > } - > - > } - > } -6 > -1 >Emitted(60, 5) Source(44, 15) + SourceIndex(0) name (Sample) -2 >Emitted(60, 9) Source(44, 15) + SourceIndex(0) name (Sample) -3 >Emitted(60, 14) Source(44, 20) + SourceIndex(0) name (Sample) -4 >Emitted(60, 17) Source(44, 15) + SourceIndex(0) name (Sample) -5 >Emitted(60, 29) Source(64, 2) + SourceIndex(0) name (Sample) -6 >Emitted(60, 30) Source(64, 2) + SourceIndex(0) name (Sample) +5 > +6 > Thing +7 > +8 > Thing +9 > .Widgets { + > export class FindWidget implements Sample.Thing.IWidget { + > + > public gar(runner:(widget:Sample.Thing.IWidget)=>any) { if (true) {return runner(this);}} + > + > private domNode:any = null; + > constructor(private codeThing: Sample.Thing.ICodeThing) { + > // scenario 1 + > codeThing.addWidget("addWidget", this); + > } + > + > public getDomNode() { + > return domNode; + > } + > + > public destroy() { + > + > } + > + > } + > } +1 >Emitted(60, 5) Source(64, 1) + SourceIndex(0) name (Sample.Thing) +2 >Emitted(60, 6) Source(64, 2) + SourceIndex(0) name (Sample.Thing) +3 >Emitted(60, 8) Source(44, 15) + SourceIndex(0) name (Sample) +4 >Emitted(60, 13) Source(44, 20) + SourceIndex(0) name (Sample) +5 >Emitted(60, 16) Source(44, 15) + SourceIndex(0) name (Sample) +6 >Emitted(60, 28) Source(44, 20) + SourceIndex(0) name (Sample) +7 >Emitted(60, 33) Source(44, 15) + SourceIndex(0) name (Sample) +8 >Emitted(60, 45) Source(44, 20) + SourceIndex(0) name (Sample) +9 >Emitted(60, 53) Source(64, 2) + SourceIndex(0) name (Sample) --- >>>})(Sample || (Sample = {})); 1 > @@ -1357,7 +1358,6 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 >^^^^^^^^^^^ 3 > ^^^^^^ -4 > ^^^^^^^-> 1-> 2 >module 3 > Sample @@ -1365,29 +1365,145 @@ sourceFile:recursiveClassReferenceTest.ts 2 >Emitted(71, 12) Source(76, 8) + SourceIndex(0) 3 >Emitted(71, 18) Source(76, 14) + SourceIndex(0) --- +>>> var Thing; +1 >^^^^ +2 > ^^^^ +3 > ^^^^^ +4 > ^ +5 > ^^^^^^^^^^-> +1 >. +2 > +3 > Thing +4 > .Languages.PlainText { + > + > export class State implements IState { + > constructor(private mode: IMode) { } + > public clone():IState { + > return this; + > } + > + > public equals(other:IState):boolean { + > return this === other; + > } + > + > public getMode(): IMode { return mode; } + > } + > + > export class Mode extends AbstractMode { + > + > // scenario 2 + > public getInitialState(): IState { + > return new State(self); + > } + > + > + > } + > } +1 >Emitted(72, 5) Source(76, 15) + SourceIndex(0) name (Sample) +2 >Emitted(72, 9) Source(76, 15) + SourceIndex(0) name (Sample) +3 >Emitted(72, 14) Source(76, 20) + SourceIndex(0) name (Sample) +4 >Emitted(72, 15) Source(100, 2) + SourceIndex(0) name (Sample) +--- >>> (function (Thing) { 1->^^^^ 2 > ^^^^^^^^^^^ 3 > ^^^^^ -4 > ^^^^^^^^^^^^-> -1->. +4 > ^^^-> +1-> 2 > 3 > Thing -1->Emitted(72, 5) Source(76, 15) + SourceIndex(0) name (Sample) -2 >Emitted(72, 16) Source(76, 15) + SourceIndex(0) name (Sample) -3 >Emitted(72, 21) Source(76, 20) + SourceIndex(0) name (Sample) +1->Emitted(73, 5) Source(76, 15) + SourceIndex(0) name (Sample) +2 >Emitted(73, 16) Source(76, 15) + SourceIndex(0) name (Sample) +3 >Emitted(73, 21) Source(76, 20) + SourceIndex(0) name (Sample) +--- +>>> var Languages; +1->^^^^^^^^ +2 > ^^^^ +3 > ^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^-> +1->. +2 > +3 > Languages +4 > .PlainText { + > + > export class State implements IState { + > constructor(private mode: IMode) { } + > public clone():IState { + > return this; + > } + > + > public equals(other:IState):boolean { + > return this === other; + > } + > + > public getMode(): IMode { return mode; } + > } + > + > export class Mode extends AbstractMode { + > + > // scenario 2 + > public getInitialState(): IState { + > return new State(self); + > } + > + > + > } + > } +1->Emitted(74, 9) Source(76, 21) + SourceIndex(0) name (Sample.Thing) +2 >Emitted(74, 13) Source(76, 21) + SourceIndex(0) name (Sample.Thing) +3 >Emitted(74, 22) Source(76, 30) + SourceIndex(0) name (Sample.Thing) +4 >Emitted(74, 23) Source(100, 2) + SourceIndex(0) name (Sample.Thing) --- >>> (function (Languages) { 1->^^^^^^^^ 2 > ^^^^^^^^^^^ 3 > ^^^^^^^^^ -4 > ^^^^^^^^-> -1->. +1-> 2 > 3 > Languages -1->Emitted(73, 9) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -2 >Emitted(73, 20) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -3 >Emitted(73, 29) Source(76, 30) + SourceIndex(0) name (Sample.Thing) +1->Emitted(75, 9) Source(76, 21) + SourceIndex(0) name (Sample.Thing) +2 >Emitted(75, 20) Source(76, 21) + SourceIndex(0) name (Sample.Thing) +3 >Emitted(75, 29) Source(76, 30) + SourceIndex(0) name (Sample.Thing) +--- +>>> var PlainText; +1 >^^^^^^^^^^^^ +2 > ^^^^ +3 > ^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^-> +1 >. +2 > +3 > PlainText +4 > { + > + > export class State implements IState { + > constructor(private mode: IMode) { } + > public clone():IState { + > return this; + > } + > + > public equals(other:IState):boolean { + > return this === other; + > } + > + > public getMode(): IMode { return mode; } + > } + > + > export class Mode extends AbstractMode { + > + > // scenario 2 + > public getInitialState(): IState { + > return new State(self); + > } + > + > + > } + > } +1 >Emitted(76, 13) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) +2 >Emitted(76, 17) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) +3 >Emitted(76, 26) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) +4 >Emitted(76, 27) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages) --- >>> (function (PlainText) { 1->^^^^^^^^^^^^ @@ -1396,16 +1512,16 @@ sourceFile:recursiveClassReferenceTest.ts 4 > ^^ 5 > ^ 6 > ^^^^^^^^-> -1->. +1-> 2 > 3 > PlainText 4 > 5 > { -1->Emitted(74, 13) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -2 >Emitted(74, 24) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -3 >Emitted(74, 33) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) -4 >Emitted(74, 35) Source(76, 41) + SourceIndex(0) name (Sample.Thing.Languages) -5 >Emitted(74, 36) Source(76, 42) + SourceIndex(0) name (Sample.Thing.Languages) +1->Emitted(77, 13) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) +2 >Emitted(77, 24) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) +3 >Emitted(77, 33) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) +4 >Emitted(77, 35) Source(76, 41) + SourceIndex(0) name (Sample.Thing.Languages) +5 >Emitted(77, 36) Source(76, 42) + SourceIndex(0) name (Sample.Thing.Languages) --- >>> var State = (function () { 1->^^^^^^^^^^^^^^^^ @@ -1417,9 +1533,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 > export class 3 > State -1->Emitted(75, 17) Source(78, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -2 >Emitted(75, 21) Source(78, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -3 >Emitted(75, 26) Source(78, 20) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +1->Emitted(78, 17) Source(78, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +2 >Emitted(78, 21) Source(78, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +3 >Emitted(78, 26) Source(78, 20) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) --- >>> function State(mode) { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1435,11 +1551,11 @@ sourceFile:recursiveClassReferenceTest.ts 4 > implements IState { > constructor(private 5 > mode: IMode -1->Emitted(76, 21) Source(79, 9) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -2 >Emitted(76, 30) Source(78, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -3 >Emitted(76, 35) Source(78, 20) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -4 >Emitted(76, 36) Source(79, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -5 >Emitted(76, 40) Source(79, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +1->Emitted(79, 21) Source(79, 9) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +2 >Emitted(79, 30) Source(78, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +3 >Emitted(79, 35) Source(78, 20) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +4 >Emitted(79, 36) Source(79, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +5 >Emitted(79, 40) Source(79, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) --- >>> this.mode = mode; 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1452,11 +1568,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > mode 5 > : IMode -1->Emitted(77, 25) Source(79, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) -2 >Emitted(77, 34) Source(79, 33) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) -3 >Emitted(77, 37) Source(79, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) -4 >Emitted(77, 41) Source(79, 33) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) -5 >Emitted(77, 42) Source(79, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) +1->Emitted(80, 25) Source(79, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) +2 >Emitted(80, 34) Source(79, 33) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) +3 >Emitted(80, 37) Source(79, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) +4 >Emitted(80, 41) Source(79, 33) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) +5 >Emitted(80, 42) Source(79, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1464,8 +1580,8 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 > } -1 >Emitted(78, 21) Source(79, 44) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) -2 >Emitted(78, 22) Source(79, 45) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) +1 >Emitted(81, 21) Source(79, 44) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) +2 >Emitted(81, 22) Source(79, 45) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) --- >>> State.prototype.clone = function () { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1475,9 +1591,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > clone 3 > -1->Emitted(79, 21) Source(80, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -2 >Emitted(79, 42) Source(80, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -3 >Emitted(79, 45) Source(80, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +1->Emitted(82, 21) Source(80, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +2 >Emitted(82, 42) Source(80, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +3 >Emitted(82, 45) Source(80, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) --- >>> return this; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1491,11 +1607,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > this 5 > ; -1 >Emitted(80, 25) Source(81, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) -2 >Emitted(80, 31) Source(81, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) -3 >Emitted(80, 32) Source(81, 11) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) -4 >Emitted(80, 36) Source(81, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) -5 >Emitted(80, 37) Source(81, 16) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) +1 >Emitted(83, 25) Source(81, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) +2 >Emitted(83, 31) Source(81, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) +3 >Emitted(83, 32) Source(81, 11) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) +4 >Emitted(83, 36) Source(81, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) +5 >Emitted(83, 37) Source(81, 16) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1504,8 +1620,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(81, 21) Source(82, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) -2 >Emitted(81, 22) Source(82, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) +1 >Emitted(84, 21) Source(82, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) +2 >Emitted(84, 22) Source(82, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) --- >>> State.prototype.equals = function (other) { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1520,11 +1636,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > public equals( 5 > other:IState -1->Emitted(82, 21) Source(84, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -2 >Emitted(82, 43) Source(84, 16) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -3 >Emitted(82, 46) Source(84, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -4 >Emitted(82, 56) Source(84, 17) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -5 >Emitted(82, 61) Source(84, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +1->Emitted(85, 21) Source(84, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +2 >Emitted(85, 43) Source(84, 16) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +3 >Emitted(85, 46) Source(84, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +4 >Emitted(85, 56) Source(84, 17) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +5 >Emitted(85, 61) Source(84, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) --- >>> return this === other; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1542,13 +1658,13 @@ sourceFile:recursiveClassReferenceTest.ts 5 > === 6 > other 7 > ; -1 >Emitted(83, 25) Source(85, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -2 >Emitted(83, 31) Source(85, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -3 >Emitted(83, 32) Source(85, 11) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -4 >Emitted(83, 36) Source(85, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -5 >Emitted(83, 41) Source(85, 20) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -6 >Emitted(83, 46) Source(85, 25) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -7 >Emitted(83, 47) Source(85, 26) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +1 >Emitted(86, 25) Source(85, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +2 >Emitted(86, 31) Source(85, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +3 >Emitted(86, 32) Source(85, 11) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +4 >Emitted(86, 36) Source(85, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +5 >Emitted(86, 41) Source(85, 20) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +6 >Emitted(86, 46) Source(85, 25) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +7 >Emitted(86, 47) Source(85, 26) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1557,8 +1673,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(84, 21) Source(86, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -2 >Emitted(84, 22) Source(86, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +1 >Emitted(87, 21) Source(86, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +2 >Emitted(87, 22) Source(86, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) --- >>> State.prototype.getMode = function () { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1569,9 +1685,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > getMode 3 > -1->Emitted(85, 21) Source(88, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -2 >Emitted(85, 44) Source(88, 17) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -3 >Emitted(85, 47) Source(88, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +1->Emitted(88, 21) Source(88, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +2 >Emitted(88, 44) Source(88, 17) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +3 >Emitted(88, 47) Source(88, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) --- >>> return mode; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1584,11 +1700,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > mode 5 > ; -1 >Emitted(86, 25) Source(88, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) -2 >Emitted(86, 31) Source(88, 35) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) -3 >Emitted(86, 32) Source(88, 36) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) -4 >Emitted(86, 36) Source(88, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) -5 >Emitted(86, 37) Source(88, 41) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) +1 >Emitted(89, 25) Source(88, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) +2 >Emitted(89, 31) Source(88, 35) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) +3 >Emitted(89, 32) Source(88, 36) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) +4 >Emitted(89, 36) Source(88, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) +5 >Emitted(89, 37) Source(88, 41) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1596,8 +1712,8 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^^^^^^^^^^^-> 1 > 2 > } -1 >Emitted(87, 21) Source(88, 42) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) -2 >Emitted(87, 22) Source(88, 43) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) +1 >Emitted(90, 21) Source(88, 42) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) +2 >Emitted(90, 22) Source(88, 43) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) --- >>> return State; 1->^^^^^^^^^^^^^^^^^^^^ @@ -1605,8 +1721,8 @@ sourceFile:recursiveClassReferenceTest.ts 1-> > 2 > } -1->Emitted(88, 21) Source(89, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -2 >Emitted(88, 33) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +1->Emitted(91, 21) Source(89, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +2 >Emitted(91, 33) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -1629,10 +1745,10 @@ sourceFile:recursiveClassReferenceTest.ts > > public getMode(): IMode { return mode; } > } -1 >Emitted(89, 17) Source(89, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -2 >Emitted(89, 18) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -3 >Emitted(89, 18) Source(78, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -4 >Emitted(89, 22) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +1 >Emitted(92, 17) Source(89, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +2 >Emitted(92, 18) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +3 >Emitted(92, 18) Source(78, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +4 >Emitted(92, 22) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) --- >>> PlainText.State = State; 1->^^^^^^^^^^^^^^^^ @@ -1657,11 +1773,11 @@ sourceFile:recursiveClassReferenceTest.ts > public getMode(): IMode { return mode; } > } 5 > -1->Emitted(90, 17) Source(78, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -2 >Emitted(90, 32) Source(78, 20) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -3 >Emitted(90, 35) Source(78, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -4 >Emitted(90, 40) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -5 >Emitted(90, 41) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +1->Emitted(93, 17) Source(78, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +2 >Emitted(93, 32) Source(78, 20) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +3 >Emitted(93, 35) Source(78, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +4 >Emitted(93, 40) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +5 >Emitted(93, 41) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) --- >>> var Mode = (function (_super) { 1->^^^^^^^^^^^^^^^^ @@ -1673,9 +1789,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 > export class 3 > Mode -1->Emitted(91, 17) Source(91, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -2 >Emitted(91, 21) Source(91, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -3 >Emitted(91, 25) Source(91, 19) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +1->Emitted(94, 17) Source(91, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +2 >Emitted(94, 21) Source(91, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +3 >Emitted(94, 25) Source(91, 19) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) --- >>> __extends(Mode, _super); 1->^^^^^^^^^^^^^^^^^^^^ @@ -1686,10 +1802,10 @@ sourceFile:recursiveClassReferenceTest.ts 2 > 3 > Mode 4 > extends AbstractMode -1->Emitted(92, 21) Source(91, 28) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -2 >Emitted(92, 31) Source(91, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -3 >Emitted(92, 35) Source(91, 19) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -4 >Emitted(92, 45) Source(91, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +1->Emitted(95, 21) Source(91, 28) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +2 >Emitted(95, 31) Source(91, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +3 >Emitted(95, 35) Source(91, 19) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +4 >Emitted(95, 45) Source(91, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) --- >>> function Mode() { 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1699,17 +1815,17 @@ sourceFile:recursiveClassReferenceTest.ts 1 > 2 > export class 3 > Mode -1 >Emitted(93, 21) Source(91, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -2 >Emitted(93, 30) Source(91, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -3 >Emitted(93, 34) Source(91, 19) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +1 >Emitted(96, 21) Source(91, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +2 >Emitted(96, 30) Source(91, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +3 >Emitted(96, 34) Source(91, 19) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) --- >>> _super.apply(this, arguments); 1->^^^^^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> extends 2 > AbstractMode -1->Emitted(94, 25) Source(91, 28) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) -2 >Emitted(94, 55) Source(91, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) +1->Emitted(97, 25) Source(91, 28) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) +2 >Emitted(97, 55) Source(91, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1725,8 +1841,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1 >Emitted(95, 21) Source(99, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) -2 >Emitted(95, 22) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) +1 >Emitted(98, 21) Source(99, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) +2 >Emitted(98, 22) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) --- >>> // scenario 2 1->^^^^^^^^^^^^^^^^^^^^ @@ -1734,8 +1850,8 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 > // scenario 2 -1->Emitted(96, 21) Source(93, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -2 >Emitted(96, 34) Source(93, 16) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +1->Emitted(99, 21) Source(93, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +2 >Emitted(99, 34) Source(93, 16) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) --- >>> Mode.prototype.getInitialState = function () { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1745,9 +1861,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > getInitialState 3 > -1->Emitted(97, 21) Source(94, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -2 >Emitted(97, 51) Source(94, 25) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -3 >Emitted(97, 54) Source(94, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +1->Emitted(100, 21) Source(94, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +2 >Emitted(100, 51) Source(94, 25) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +3 >Emitted(100, 54) Source(94, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) --- >>> return new State(self); 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1769,15 +1885,15 @@ sourceFile:recursiveClassReferenceTest.ts 7 > self 8 > ) 9 > ; -1 >Emitted(98, 25) Source(95, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -2 >Emitted(98, 31) Source(95, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -3 >Emitted(98, 32) Source(95, 11) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -4 >Emitted(98, 36) Source(95, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -5 >Emitted(98, 41) Source(95, 20) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -6 >Emitted(98, 42) Source(95, 21) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -7 >Emitted(98, 46) Source(95, 25) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -8 >Emitted(98, 47) Source(95, 26) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -9 >Emitted(98, 48) Source(95, 27) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +1 >Emitted(101, 25) Source(95, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +2 >Emitted(101, 31) Source(95, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +3 >Emitted(101, 32) Source(95, 11) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +4 >Emitted(101, 36) Source(95, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +5 >Emitted(101, 41) Source(95, 20) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +6 >Emitted(101, 42) Source(95, 21) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +7 >Emitted(101, 46) Source(95, 25) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +8 >Emitted(101, 47) Source(95, 26) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +9 >Emitted(101, 48) Source(95, 27) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1786,8 +1902,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(99, 21) Source(96, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -2 >Emitted(99, 22) Source(96, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +1 >Emitted(102, 21) Source(96, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +2 >Emitted(102, 22) Source(96, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) --- >>> return Mode; 1->^^^^^^^^^^^^^^^^^^^^ @@ -1798,8 +1914,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1->Emitted(100, 21) Source(99, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -2 >Emitted(100, 32) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +1->Emitted(103, 21) Source(99, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +2 >Emitted(103, 32) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) --- >>> })(AbstractMode); 1->^^^^^^^^^^^^^^^^ @@ -1823,12 +1939,12 @@ sourceFile:recursiveClassReferenceTest.ts > > > } -1->Emitted(101, 17) Source(99, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -2 >Emitted(101, 18) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -3 >Emitted(101, 18) Source(91, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -4 >Emitted(101, 20) Source(91, 28) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -5 >Emitted(101, 32) Source(91, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -6 >Emitted(101, 34) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +1->Emitted(104, 17) Source(99, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +2 >Emitted(104, 18) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +3 >Emitted(104, 18) Source(91, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +4 >Emitted(104, 20) Source(91, 28) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +5 >Emitted(104, 32) Source(91, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +6 >Emitted(104, 34) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) --- >>> PlainText.Mode = Mode; 1->^^^^^^^^^^^^^^^^ @@ -1836,7 +1952,7 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^ 4 > ^^^^ 5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 > Mode 3 > @@ -1850,28 +1966,85 @@ sourceFile:recursiveClassReferenceTest.ts > > } 5 > -1->Emitted(102, 17) Source(91, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -2 >Emitted(102, 31) Source(91, 19) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -3 >Emitted(102, 34) Source(91, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -4 >Emitted(102, 38) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -5 >Emitted(102, 39) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +1->Emitted(105, 17) Source(91, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +2 >Emitted(105, 31) Source(91, 19) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +3 >Emitted(105, 34) Source(91, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +4 >Emitted(105, 38) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +5 >Emitted(105, 39) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) --- ->>> })(Languages.PlainText || (Languages.PlainText = {})); +>>> })(PlainText = Languages.PlainText || (Languages.PlainText = {})); 1->^^^^^^^^^^^^ 2 > ^ 3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^ -5 > ^^^^^ -6 > ^^^^^^^^^^^^^^^^^^^ -7 > ^^^^^^^^ +4 > ^^^^^^^^^ +5 > ^^^ +6 > ^^^^^^^^^^^^^^^^^^^ +7 > ^^^^^ +8 > ^^^^^^^^^^^^^^^^^^^ +9 > ^^^^^^^^ 1-> > 2 > } 3 > 4 > PlainText -5 > -6 > PlainText -7 > { +5 > +6 > PlainText +7 > +8 > PlainText +9 > { + > + > export class State implements IState { + > constructor(private mode: IMode) { } + > public clone():IState { + > return this; + > } + > + > public equals(other:IState):boolean { + > return this === other; + > } + > + > public getMode(): IMode { return mode; } + > } + > + > export class Mode extends AbstractMode { + > + > // scenario 2 + > public getInitialState(): IState { + > return new State(self); + > } + > + > + > } + > } +1->Emitted(106, 13) Source(100, 1) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +2 >Emitted(106, 14) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +3 >Emitted(106, 16) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) +4 >Emitted(106, 25) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) +5 >Emitted(106, 28) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) +6 >Emitted(106, 47) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) +7 >Emitted(106, 52) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) +8 >Emitted(106, 71) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) +9 >Emitted(106, 79) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages) +--- +>>> })(Languages = Thing.Languages || (Thing.Languages = {})); +1 >^^^^^^^^ +2 > ^ +3 > ^^ +4 > ^^^^^^^^^ +5 > ^^^ +6 > ^^^^^^^^^^^^^^^ +7 > ^^^^^ +8 > ^^^^^^^^^^^^^^^ +9 > ^^^^^^^^ +1 > +2 > } +3 > +4 > Languages +5 > +6 > Languages +7 > +8 > Languages +9 > .PlainText { > > export class State implements IState { > constructor(private mode: IMode) { } @@ -1896,241 +2069,68 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(103, 13) Source(100, 1) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -2 >Emitted(103, 14) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -3 >Emitted(103, 16) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -4 >Emitted(103, 35) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) -5 >Emitted(103, 40) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -6 >Emitted(103, 59) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) -7 >Emitted(103, 67) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages) +1 >Emitted(107, 9) Source(100, 1) + SourceIndex(0) name (Sample.Thing.Languages) +2 >Emitted(107, 10) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages) +3 >Emitted(107, 12) Source(76, 21) + SourceIndex(0) name (Sample.Thing) +4 >Emitted(107, 21) Source(76, 30) + SourceIndex(0) name (Sample.Thing) +5 >Emitted(107, 24) Source(76, 21) + SourceIndex(0) name (Sample.Thing) +6 >Emitted(107, 39) Source(76, 30) + SourceIndex(0) name (Sample.Thing) +7 >Emitted(107, 44) Source(76, 21) + SourceIndex(0) name (Sample.Thing) +8 >Emitted(107, 59) Source(76, 30) + SourceIndex(0) name (Sample.Thing) +9 >Emitted(107, 67) Source(100, 2) + SourceIndex(0) name (Sample.Thing) --- ->>> var PlainText = Languages.PlainText; -1 >^^^^^^^^^^^^ -2 > ^^^^ -3 > ^^^^^^^^^ -4 > ^^^ -5 > ^^^^^^^^^^^^^^^^^^^ -6 > ^ -7 > ^^^^^^^-> -1 > -2 > -3 > PlainText -4 > -5 > PlainText { - > - > export class State implements IState { - > constructor(private mode: IMode) { } - > public clone():IState { - > return this; - > } - > - > public equals(other:IState):boolean { - > return this === other; - > } - > - > public getMode(): IMode { return mode; } - > } - > - > export class Mode extends AbstractMode { - > - > // scenario 2 - > public getInitialState(): IState { - > return new State(self); - > } - > - > - > } - > } -6 > -1 >Emitted(104, 13) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -2 >Emitted(104, 17) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -3 >Emitted(104, 26) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) -4 >Emitted(104, 29) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -5 >Emitted(104, 48) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages) -6 >Emitted(104, 49) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages) ---- ->>> })(Thing.Languages || (Thing.Languages = {})); -1->^^^^^^^^ -2 > ^ -3 > ^^ -4 > ^^^^^^^^^^^^^^^ -5 > ^^^^^ -6 > ^^^^^^^^^^^^^^^ -7 > ^^^^^^^^ -1-> -2 > } -3 > -4 > Languages -5 > -6 > Languages -7 > .PlainText { - > - > export class State implements IState { - > constructor(private mode: IMode) { } - > public clone():IState { - > return this; - > } - > - > public equals(other:IState):boolean { - > return this === other; - > } - > - > public getMode(): IMode { return mode; } - > } - > - > export class Mode extends AbstractMode { - > - > // scenario 2 - > public getInitialState(): IState { - > return new State(self); - > } - > - > - > } - > } -1->Emitted(105, 9) Source(100, 1) + SourceIndex(0) name (Sample.Thing.Languages) -2 >Emitted(105, 10) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages) -3 >Emitted(105, 12) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -4 >Emitted(105, 27) Source(76, 30) + SourceIndex(0) name (Sample.Thing) -5 >Emitted(105, 32) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -6 >Emitted(105, 47) Source(76, 30) + SourceIndex(0) name (Sample.Thing) -7 >Emitted(105, 55) Source(100, 2) + SourceIndex(0) name (Sample.Thing) ---- ->>> var Languages = Thing.Languages; -1 >^^^^^^^^ -2 > ^^^^ -3 > ^^^^^^^^^ -4 > ^^^ -5 > ^^^^^^^^^^^^^^^ -6 > ^ -7 > ^^^^^-> -1 > -2 > -3 > Languages -4 > -5 > Languages.PlainText { - > - > export class State implements IState { - > constructor(private mode: IMode) { } - > public clone():IState { - > return this; - > } - > - > public equals(other:IState):boolean { - > return this === other; - > } - > - > public getMode(): IMode { return mode; } - > } - > - > export class Mode extends AbstractMode { - > - > // scenario 2 - > public getInitialState(): IState { - > return new State(self); - > } - > - > - > } - > } -6 > -1 >Emitted(106, 9) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -2 >Emitted(106, 13) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -3 >Emitted(106, 22) Source(76, 30) + SourceIndex(0) name (Sample.Thing) -4 >Emitted(106, 25) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -5 >Emitted(106, 40) Source(100, 2) + SourceIndex(0) name (Sample.Thing) -6 >Emitted(106, 41) Source(100, 2) + SourceIndex(0) name (Sample.Thing) ---- ->>> })(Sample.Thing || (Sample.Thing = {})); -1->^^^^ +>>> })(Thing = Sample.Thing || (Sample.Thing = {})); +1 >^^^^ 2 > ^ 3 > ^^ -4 > ^^^^^^^^^^^^ -5 > ^^^^^ -6 > ^^^^^^^^^^^^ -7 > ^^^^^^^^ -1-> +4 > ^^^^^ +5 > ^^^ +6 > ^^^^^^^^^^^^ +7 > ^^^^^ +8 > ^^^^^^^^^^^^ +9 > ^^^^^^^^ +1 > 2 > } 3 > 4 > Thing -5 > -6 > Thing -7 > .Languages.PlainText { - > - > export class State implements IState { - > constructor(private mode: IMode) { } - > public clone():IState { - > return this; - > } - > - > public equals(other:IState):boolean { - > return this === other; - > } - > - > public getMode(): IMode { return mode; } - > } - > - > export class Mode extends AbstractMode { - > - > // scenario 2 - > public getInitialState(): IState { - > return new State(self); - > } - > - > - > } - > } -1->Emitted(107, 5) Source(100, 1) + SourceIndex(0) name (Sample.Thing) -2 >Emitted(107, 6) Source(100, 2) + SourceIndex(0) name (Sample.Thing) -3 >Emitted(107, 8) Source(76, 15) + SourceIndex(0) name (Sample) -4 >Emitted(107, 20) Source(76, 20) + SourceIndex(0) name (Sample) -5 >Emitted(107, 25) Source(76, 15) + SourceIndex(0) name (Sample) -6 >Emitted(107, 37) Source(76, 20) + SourceIndex(0) name (Sample) -7 >Emitted(107, 45) Source(100, 2) + SourceIndex(0) name (Sample) ---- ->>> var Thing = Sample.Thing; -1 >^^^^ -2 > ^^^^ -3 > ^^^^^ -4 > ^^^ -5 > ^^^^^^^^^^^^ -6 > ^ -1 > -2 > -3 > Thing -4 > -5 > Thing.Languages.PlainText { - > - > export class State implements IState { - > constructor(private mode: IMode) { } - > public clone():IState { - > return this; - > } - > - > public equals(other:IState):boolean { - > return this === other; - > } - > - > public getMode(): IMode { return mode; } - > } - > - > export class Mode extends AbstractMode { - > - > // scenario 2 - > public getInitialState(): IState { - > return new State(self); - > } - > - > - > } - > } -6 > -1 >Emitted(108, 5) Source(76, 15) + SourceIndex(0) name (Sample) -2 >Emitted(108, 9) Source(76, 15) + SourceIndex(0) name (Sample) -3 >Emitted(108, 14) Source(76, 20) + SourceIndex(0) name (Sample) -4 >Emitted(108, 17) Source(76, 15) + SourceIndex(0) name (Sample) -5 >Emitted(108, 29) Source(100, 2) + SourceIndex(0) name (Sample) -6 >Emitted(108, 30) Source(100, 2) + SourceIndex(0) name (Sample) +5 > +6 > Thing +7 > +8 > Thing +9 > .Languages.PlainText { + > + > export class State implements IState { + > constructor(private mode: IMode) { } + > public clone():IState { + > return this; + > } + > + > public equals(other:IState):boolean { + > return this === other; + > } + > + > public getMode(): IMode { return mode; } + > } + > + > export class Mode extends AbstractMode { + > + > // scenario 2 + > public getInitialState(): IState { + > return new State(self); + > } + > + > + > } + > } +1 >Emitted(108, 5) Source(100, 1) + SourceIndex(0) name (Sample.Thing) +2 >Emitted(108, 6) Source(100, 2) + SourceIndex(0) name (Sample.Thing) +3 >Emitted(108, 8) Source(76, 15) + SourceIndex(0) name (Sample) +4 >Emitted(108, 13) Source(76, 20) + SourceIndex(0) name (Sample) +5 >Emitted(108, 16) Source(76, 15) + SourceIndex(0) name (Sample) +6 >Emitted(108, 28) Source(76, 20) + SourceIndex(0) name (Sample) +7 >Emitted(108, 33) Source(76, 15) + SourceIndex(0) name (Sample) +8 >Emitted(108, 45) Source(76, 20) + SourceIndex(0) name (Sample) +9 >Emitted(108, 53) Source(100, 2) + SourceIndex(0) name (Sample) --- >>>})(Sample || (Sample = {})); 1 > diff --git a/tests/baselines/reference/recursiveCloduleReference.js b/tests/baselines/reference/recursiveCloduleReference.js index ec994951fc6..5cb6e6b2c1e 100644 --- a/tests/baselines/reference/recursiveCloduleReference.js +++ b/tests/baselines/reference/recursiveCloduleReference.js @@ -19,10 +19,10 @@ var M; return C; })(); M.C = C; + var C; (function (_C) { _C.C = M.C; - })(M.C || (M.C = {})); - var C = M.C; + })(C = M.C || (M.C = {})); ; })(M || (M = {})); ; diff --git a/tests/baselines/reference/recursiveFunctionTypes1.types b/tests/baselines/reference/recursiveFunctionTypes1.types index 535555ef13d..b78494ba24c 100644 --- a/tests/baselines/reference/recursiveFunctionTypes1.types +++ b/tests/baselines/reference/recursiveFunctionTypes1.types @@ -3,8 +3,8 @@ class C { >C : C static g(t: typeof C.g){ } ->g : (t: typeof g) => void ->t : (t: typeof g) => void +>g : (t: typeof C.g) => void +>t : (t: typeof C.g) => void >C : typeof C ->g : (t: typeof g) => void +>g : (t: typeof C.g) => void } diff --git a/tests/baselines/reference/recursiveInitializer.types b/tests/baselines/reference/recursiveInitializer.types index 84d9dbd8b19..540553ea529 100644 --- a/tests/baselines/reference/recursiveInitializer.types +++ b/tests/baselines/reference/recursiveInitializer.types @@ -69,10 +69,10 @@ var b4 = (!b4) && b4; // expected boolean here. actually 'any' // (x:string) => any var f = (x: string) => f(x); ->f : any +>f : (x: string) => any >(x: string) => f(x) : (x: string) => any >x : string >f(x) : any ->f : any +>f : (x: string) => any >x : string diff --git a/tests/baselines/reference/recursiveMods.js b/tests/baselines/reference/recursiveMods.js index d897224166e..36d2712e040 100644 --- a/tests/baselines/reference/recursiveMods.js +++ b/tests/baselines/reference/recursiveMods.js @@ -24,6 +24,7 @@ export module Foo { //// [recursiveMods.js] +var Foo; (function (Foo) { var C = (function () { function C() { @@ -31,8 +32,8 @@ export module Foo { return C; })(); Foo.C = C; -})(exports.Foo || (exports.Foo = {})); -var Foo = exports.Foo; +})(Foo = exports.Foo || (exports.Foo = {})); +var Foo; (function (Foo) { function Bar() { if (true) { @@ -48,5 +49,4 @@ var Foo = exports.Foo; var c = Baz(); return; } -})(exports.Foo || (exports.Foo = {})); -var Foo = exports.Foo; +})(Foo = exports.Foo || (exports.Foo = {})); diff --git a/tests/baselines/reference/recursiveTypesWithTypeof.js b/tests/baselines/reference/recursiveTypesWithTypeof.js new file mode 100644 index 00000000000..36c13405b0b --- /dev/null +++ b/tests/baselines/reference/recursiveTypesWithTypeof.js @@ -0,0 +1,99 @@ +//// [recursiveTypesWithTypeof.ts] +// None of these declarations should have any errors! +// Using typeof directly, these should be any +var c: typeof c; +var c: any; +var d: typeof e; +var d: any; +var e: typeof d; +var e: any; + +// In type arguments, these should be any +interface Foo { } +var f: Array; +var f: any; +var f2: Foo; +var f2: any; +var f3: Foo[]; +var f3: any; + +// Truly recursive types +var g: { x: typeof g; }; +var g: typeof g.x; +var h: () => typeof h; +var h = h(); +var i: (x: typeof i) => typeof x; +var i = i(i); +var j: (x: T) => T; +var j = j(j); + +// Same as h, i, j with construct signatures +var h2: new () => typeof h2; +var h2 = new h2(); +var i2: new (x: typeof i2) => typeof x; +var i2 = new i2(i2); +var j2: new (x: T) => T; +var j2 = new j2(j2); + +// Indexers +var k: { [n: number]: typeof k;[s: string]: typeof k }; +var k = k[0]; +var k = k['']; + +// Hybrid - contains type literals as well as type arguments +// These two are recursive +var hy1: { x: typeof hy1 }[]; +var hy1 = hy1[0].x; +var hy2: { x: Array }; +var hy2 = hy2.x[0]; + +interface Foo2 { } + +// This one should be any because the first type argument is not contained inside a type literal +var hy3: Foo2; +var hy3: any; + +//// [recursiveTypesWithTypeof.js] +// None of these declarations should have any errors! +// Using typeof directly, these should be any +var c; +var c; +var d; +var d; +var e; +var e; +var f; +var f; +var f2; +var f2; +var f3; +var f3; +// Truly recursive types +var g; +var g; +var h; +var h = h(); +var i; +var i = i(i); +var j; +var j = j(j); +// Same as h, i, j with construct signatures +var h2; +var h2 = new h2(); +var i2; +var i2 = new i2(i2); +var j2; +var j2 = new j2(j2); +// Indexers +var k; +var k = k[0]; +var k = k['']; +// Hybrid - contains type literals as well as type arguments +// These two are recursive +var hy1; +var hy1 = hy1[0].x; +var hy2; +var hy2 = hy2.x[0]; +// This one should be any because the first type argument is not contained inside a type literal +var hy3; +var hy3; diff --git a/tests/baselines/reference/recursiveTypesWithTypeof.types b/tests/baselines/reference/recursiveTypesWithTypeof.types new file mode 100644 index 00000000000..f75bae79c5b --- /dev/null +++ b/tests/baselines/reference/recursiveTypesWithTypeof.types @@ -0,0 +1,196 @@ +=== tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithTypeof.ts === +// None of these declarations should have any errors! +// Using typeof directly, these should be any +var c: typeof c; +>c : any +>c : any + +var c: any; +>c : any + +var d: typeof e; +>d : any +>e : any + +var d: any; +>d : any + +var e: typeof d; +>e : any +>d : any + +var e: any; +>e : any + +// In type arguments, these should be any +interface Foo { } +>Foo : Foo +>T : T + +var f: Array; +>f : any +>Array : T[] +>f : any + +var f: any; +>f : any + +var f2: Foo; +>f2 : any +>Foo : Foo +>f2 : any + +var f2: any; +>f2 : any + +var f3: Foo[]; +>f3 : any +>Foo : Foo +>f3 : any + +var f3: any; +>f3 : any + +// Truly recursive types +var g: { x: typeof g; }; +>g : { x: any; } +>x : { x: any; } +>g : { x: any; } + +var g: typeof g.x; +>g : { x: any; } +>g : { x: any; } +>x : { x: any; } + +var h: () => typeof h; +>h : () => any +>h : () => any + +var h = h(); +>h : () => any +>h() : () => any +>h : () => any + +var i: (x: typeof i) => typeof x; +>i : (x: any) => any +>x : (x: any) => any +>i : (x: any) => any +>x : (x: any) => any + +var i = i(i); +>i : (x: any) => any +>i(i) : (x: any) => any +>i : (x: any) => any +>i : (x: any) => any + +var j: (x: T) => T; +>j : (x: T) => T +>T : T +>j : (x: T) => T +>x : T +>T : T +>T : T + +var j = j(j); +>j : (x: T) => T +>j(j) : (x: T) => T +>j : (x: T) => T +>j : (x: T) => T + +// Same as h, i, j with construct signatures +var h2: new () => typeof h2; +>h2 : new () => any +>h2 : new () => any + +var h2 = new h2(); +>h2 : new () => any +>new h2() : new () => any +>h2 : new () => any + +var i2: new (x: typeof i2) => typeof x; +>i2 : new (x: any) => any +>x : new (x: any) => any +>i2 : new (x: any) => any +>x : new (x: any) => any + +var i2 = new i2(i2); +>i2 : new (x: any) => any +>new i2(i2) : new (x: any) => any +>i2 : new (x: any) => any +>i2 : new (x: any) => any + +var j2: new (x: T) => T; +>j2 : new (x: T) => T +>T : T +>j2 : new (x: T) => T +>x : T +>T : T +>T : T + +var j2 = new j2(j2); +>j2 : new (x: T) => T +>new j2(j2) : new (x: T) => T +>j2 : new (x: T) => T +>j2 : new (x: T) => T + +// Indexers +var k: { [n: number]: typeof k;[s: string]: typeof k }; +>k : { [x: string]: any; [x: number]: any; } +>n : number +>k : { [x: string]: any; [x: number]: any; } +>s : string +>k : { [x: string]: any; [x: number]: any; } + +var k = k[0]; +>k : { [x: string]: any; [x: number]: any; } +>k[0] : { [x: string]: any; [x: number]: any; } +>k : { [x: string]: any; [x: number]: any; } + +var k = k['']; +>k : { [x: string]: any; [x: number]: any; } +>k[''] : { [x: string]: any; [x: number]: any; } +>k : { [x: string]: any; [x: number]: any; } + +// Hybrid - contains type literals as well as type arguments +// These two are recursive +var hy1: { x: typeof hy1 }[]; +>hy1 : { x: any[]; }[] +>x : { x: any[]; }[] +>hy1 : { x: any[]; }[] + +var hy1 = hy1[0].x; +>hy1 : { x: any[]; }[] +>hy1[0].x : { x: any[]; }[] +>hy1[0] : { x: any[]; } +>hy1 : { x: any[]; }[] +>x : { x: any[]; }[] + +var hy2: { x: Array }; +>hy2 : { x: any[]; } +>x : { x: any[]; }[] +>Array : T[] +>hy2 : { x: any[]; } + +var hy2 = hy2.x[0]; +>hy2 : { x: any[]; } +>hy2.x[0] : { x: any[]; } +>hy2.x : { x: any[]; }[] +>hy2 : { x: any[]; } +>x : { x: any[]; }[] + +interface Foo2 { } +>Foo2 : Foo2 +>T : T +>U : U + +// This one should be any because the first type argument is not contained inside a type literal +var hy3: Foo2; +>hy3 : any +>Foo2 : Foo2 +>hy3 : any +>x : any +>hy3 : any + +var hy3: any; +>hy3 : any + diff --git a/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js b/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js index e7b6c30059e..492c9bea3c1 100644 --- a/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js +++ b/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js @@ -38,8 +38,11 @@ var __extends = this.__extends || function (d, b) { }; var MsPortal; (function (MsPortal) { + var Controls; (function (Controls) { + var Base; (function (Base) { + var ItemList; (function (ItemList) { var ItemValue = (function () { function ItemValue(value) { @@ -55,10 +58,7 @@ var MsPortal; return ViewModel; })(ItemValue); ItemList.ViewModel = ViewModel; - })(Base.ItemList || (Base.ItemList = {})); - var ItemList = Base.ItemList; - })(Controls.Base || (Controls.Base = {})); - var Base = Controls.Base; - })(MsPortal.Controls || (MsPortal.Controls = {})); - var Controls = MsPortal.Controls; + })(ItemList = Base.ItemList || (Base.ItemList = {})); + })(Base = Controls.Base || (Controls.Base = {})); + })(Controls = MsPortal.Controls || (MsPortal.Controls = {})); })(MsPortal || (MsPortal = {})); diff --git a/tests/baselines/reference/requireEmitSemicolon.js b/tests/baselines/reference/requireEmitSemicolon.js index 88be6b03d86..9fc2f8a8ad8 100644 --- a/tests/baselines/reference/requireEmitSemicolon.js +++ b/tests/baselines/reference/requireEmitSemicolon.js @@ -21,6 +21,7 @@ export module Database { //// [requireEmitSemicolon_0.js] define(["require", "exports"], function (require, exports) { + var Models; (function (Models) { var Person = (function () { function Person(name) { @@ -28,11 +29,11 @@ define(["require", "exports"], function (require, exports) { return Person; })(); Models.Person = Person; - })(exports.Models || (exports.Models = {})); - var Models = exports.Models; + })(Models = exports.Models || (exports.Models = {})); }); //// [requireEmitSemicolon_1.js] define(["require", "exports", "requireEmitSemicolon_0"], function (require, exports, P) { + var Database; (function (Database) { var DB = (function () { function DB() { @@ -43,6 +44,5 @@ define(["require", "exports", "requireEmitSemicolon_0"], function (require, expo return DB; })(); Database.DB = DB; - })(exports.Database || (exports.Database = {})); - var Database = exports.Database; + })(Database = exports.Database || (exports.Database = {})); }); diff --git a/tests/baselines/reference/sourceMapSample.js b/tests/baselines/reference/sourceMapSample.js index aba0f804d79..96c78c94c0c 100644 --- a/tests/baselines/reference/sourceMapSample.js +++ b/tests/baselines/reference/sourceMapSample.js @@ -38,6 +38,7 @@ module Foo.Bar { //// [sourceMapSample.js] var Foo; (function (Foo) { + var Bar; (function (Bar) { "use strict"; var Greeter = (function () { @@ -70,7 +71,6 @@ var Foo; for (var j = 0; j < b.length; j++) { b[j].greet(); } - })(Foo.Bar || (Foo.Bar = {})); - var Bar = Foo.Bar; + })(Bar = Foo.Bar || (Foo.Bar = {})); })(Foo || (Foo = {})); //# sourceMappingURL=sourceMapSample.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapSample.js.map b/tests/baselines/reference/sourceMapSample.js.map index fb1c31a80b0..78a59c1b6c1 100644 --- a/tests/baselines/reference/sourceMapSample.js.map +++ b/tests/baselines/reference/sourceMapSample.js.map @@ -1,2 +1,2 @@ //// [sourceMapSample.js.map] -{"version":3,"file":"sourceMapSample.js","sourceRoot":"","sources":["sourceMapSample.ts"],"names":["Foo","Foo.Bar","Foo.Bar.Greeter","Foo.Bar.Greeter.constructor","Foo.Bar.Greeter.greet","Foo.Bar.foo","Foo.Bar.foo2"],"mappings":"AAAA,IAAO,GAAG,CAkCT;AAlCD,WAAO,GAAG;IAACA,WAAAA,GAAGA,EAACA,CAACA;QACZC,YAAYA,CAACA;QAEbA,IAAMA,OAAOA;YACTC,SADEA,OAAOA,CACUA,QAAgBA;gBAAhBC,aAAQA,GAARA,QAAQA,CAAQA;YACnCA,CAACA;YAEDD,uBAAKA,GAALA;gBACIE,MAAMA,CAACA,MAAMA,GAAGA,IAAIA,CAACA,QAAQA,GAAGA,OAAOA,CAACA;YAC5CA,CAACA;YACLF,cAACA;QAADA,CAACA,AAPDD,IAOCA;QAGDA,SAASA,GAAGA,CAACA,QAAgBA;YACzBI,MAAMA,CAACA,IAAIA,OAAOA,CAACA,QAAQA,CAACA,CAACA;QACjCA,CAACA;QAEDJ,IAAIA,OAAOA,GAAGA,IAAIA,OAAOA,CAACA,eAAeA,CAACA,CAACA;QAC3CA,IAAIA,GAAGA,GAAGA,OAAOA,CAACA,KAAKA,EAAEA,CAACA;QAE1BA,SAASA,IAAIA,CAACA,QAAgBA;YAAEK,uBAA0BA;iBAA1BA,WAA0BA,CAA1BA,sBAA0BA,CAA1BA,IAA0BA;gBAA1BA,sCAA0BA;;YACtDA,IAAIA,QAAQA,GAAcA,EAAEA,CAACA;YAC7BA,QAAQA,CAACA,CAACA,CAACA,GAAGA,IAAIA,OAAOA,CAACA,QAAQA,CAACA,CAACA;YACpCA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,aAAaA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;gBAC5CA,QAAQA,CAACA,IAAIA,CAACA,IAAIA,OAAOA,CAACA,aAAaA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA;YACjDA,CAACA;YAEDA,MAAMA,CAACA,QAAQA,CAACA;QACpBA,CAACA;QAEDL,IAAIA,CAACA,GAAGA,IAAIA,CAACA,OAAOA,EAAEA,OAAOA,EAAEA,GAAGA,CAACA,CAACA;QACpCA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,CAACA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;YAChCA,CAACA,CAACA,CAACA,CAACA,CAACA,KAAKA,EAAEA,CAACA;QACjBA,CAACA;IACLA,CAACA,EAlCUD,OAAGA,KAAHA,OAAGA,QAkCbA;IAlCUA,IAAAA,GAAGA,GAAHA,OAkCVA,CAAAA;AAADA,CAACA,EAlCM,GAAG,KAAH,GAAG,QAkCT"} \ No newline at end of file +{"version":3,"file":"sourceMapSample.js","sourceRoot":"","sources":["sourceMapSample.ts"],"names":["Foo","Foo.Bar","Foo.Bar.Greeter","Foo.Bar.Greeter.constructor","Foo.Bar.Greeter.greet","Foo.Bar.foo","Foo.Bar.foo2"],"mappings":"AAAA,IAAO,GAAG,CAkCT;AAlCD,WAAO,GAAG;IAACA,IAAAA,GAAGA,CAkCbA;IAlCUA,WAAAA,GAAGA,EAACA,CAACA;QACZC,YAAYA,CAACA;QAEbA,IAAMA,OAAOA;YACTC,SADEA,OAAOA,CACUA,QAAgBA;gBAAhBC,aAAQA,GAARA,QAAQA,CAAQA;YACnCA,CAACA;YAEDD,uBAAKA,GAALA;gBACIE,MAAMA,CAACA,MAAMA,GAAGA,IAAIA,CAACA,QAAQA,GAAGA,OAAOA,CAACA;YAC5CA,CAACA;YACLF,cAACA;QAADA,CAACA,AAPDD,IAOCA;QAGDA,SAASA,GAAGA,CAACA,QAAgBA;YACzBI,MAAMA,CAACA,IAAIA,OAAOA,CAACA,QAAQA,CAACA,CAACA;QACjCA,CAACA;QAEDJ,IAAIA,OAAOA,GAAGA,IAAIA,OAAOA,CAACA,eAAeA,CAACA,CAACA;QAC3CA,IAAIA,GAAGA,GAAGA,OAAOA,CAACA,KAAKA,EAAEA,CAACA;QAE1BA,SAASA,IAAIA,CAACA,QAAgBA;YAAEK,uBAA0BA;iBAA1BA,WAA0BA,CAA1BA,sBAA0BA,CAA1BA,IAA0BA;gBAA1BA,sCAA0BA;;YACtDA,IAAIA,QAAQA,GAAcA,EAAEA,CAACA;YAC7BA,QAAQA,CAACA,CAACA,CAACA,GAAGA,IAAIA,OAAOA,CAACA,QAAQA,CAACA,CAACA;YACpCA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,aAAaA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;gBAC5CA,QAAQA,CAACA,IAAIA,CAACA,IAAIA,OAAOA,CAACA,aAAaA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA;YACjDA,CAACA;YAEDA,MAAMA,CAACA,QAAQA,CAACA;QACpBA,CAACA;QAEDL,IAAIA,CAACA,GAAGA,IAAIA,CAACA,OAAOA,EAAEA,OAAOA,EAAEA,GAAGA,CAACA,CAACA;QACpCA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,CAACA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;YAChCA,CAACA,CAACA,CAACA,CAACA,CAACA,KAAKA,EAAEA,CAACA;QACjBA,CAACA;IACLA,CAACA,EAlCUD,GAAGA,GAAHA,OAAGA,KAAHA,OAAGA,QAkCbA;AAADA,CAACA,EAlCM,GAAG,KAAH,GAAG,QAkCT"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapSample.sourcemap.txt b/tests/baselines/reference/sourceMapSample.sourcemap.txt index df82f084b60..218dfb1c152 100644 --- a/tests/baselines/reference/sourceMapSample.sourcemap.txt +++ b/tests/baselines/reference/sourceMapSample.sourcemap.txt @@ -61,7 +61,6 @@ sourceFile:sourceMapSample.ts 1-> 2 >^^^^^^^^^^^ 3 > ^^^ -4 > ^^^^^^^^-> 1-> 2 >module 3 > Foo @@ -69,6 +68,55 @@ sourceFile:sourceMapSample.ts 2 >Emitted(2, 12) Source(1, 8) + SourceIndex(0) 3 >Emitted(2, 15) Source(1, 11) + SourceIndex(0) --- +>>> var Bar; +1 >^^^^ +2 > ^^^^ +3 > ^^^ +4 > ^ +5 > ^^^^^^^^^^-> +1 >. +2 > +3 > Bar +4 > { + > "use strict"; + > + > class Greeter { + > constructor(public greeting: string) { + > } + > + > greet() { + > return "

" + this.greeting + "

"; + > } + > } + > + > + > function foo(greeting: string): Foo.Bar.Greeter { + > return new Greeter(greeting); + > } + > + > var greeter = new Greeter("Hello, world!"); + > var str = greeter.greet(); + > + > function foo2(greeting: string, ...restGreetings: string[]) { + > var greeters: Greeter[] = []; + > greeters[0] = new Greeter(greeting); + > for (var i = 0; i < restGreetings.length; i++) { + > greeters.push(new Greeter(restGreetings[i])); + > } + > + > return greeters; + > } + > + > var b = foo2("Hello", "World", "!"); + > for (var j = 0; j < b.length; j++) { + > b[j].greet(); + > } + > } +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) name (Foo) +2 >Emitted(3, 9) Source(1, 12) + SourceIndex(0) name (Foo) +3 >Emitted(3, 12) Source(1, 15) + SourceIndex(0) name (Foo) +4 >Emitted(3, 13) Source(35, 2) + SourceIndex(0) name (Foo) +--- >>> (function (Bar) { 1->^^^^ 2 > ^^^^^^^^^^^ @@ -76,16 +124,16 @@ sourceFile:sourceMapSample.ts 4 > ^^ 5 > ^ 6 > ^-> -1->. +1-> 2 > 3 > Bar 4 > 5 > { -1->Emitted(3, 5) Source(1, 12) + SourceIndex(0) name (Foo) -2 >Emitted(3, 16) Source(1, 12) + SourceIndex(0) name (Foo) -3 >Emitted(3, 19) Source(1, 15) + SourceIndex(0) name (Foo) -4 >Emitted(3, 21) Source(1, 16) + SourceIndex(0) name (Foo) -5 >Emitted(3, 22) Source(1, 17) + SourceIndex(0) name (Foo) +1->Emitted(4, 5) Source(1, 12) + SourceIndex(0) name (Foo) +2 >Emitted(4, 16) Source(1, 12) + SourceIndex(0) name (Foo) +3 >Emitted(4, 19) Source(1, 15) + SourceIndex(0) name (Foo) +4 >Emitted(4, 21) Source(1, 16) + SourceIndex(0) name (Foo) +5 >Emitted(4, 22) Source(1, 17) + SourceIndex(0) name (Foo) --- >>> "use strict"; 1->^^^^^^^^ @@ -96,9 +144,9 @@ sourceFile:sourceMapSample.ts > 2 > "use strict" 3 > ; -1->Emitted(4, 9) Source(2, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(4, 21) Source(2, 17) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(4, 22) Source(2, 18) + SourceIndex(0) name (Foo.Bar) +1->Emitted(5, 9) Source(2, 5) + SourceIndex(0) name (Foo.Bar) +2 >Emitted(5, 21) Source(2, 17) + SourceIndex(0) name (Foo.Bar) +3 >Emitted(5, 22) Source(2, 18) + SourceIndex(0) name (Foo.Bar) --- >>> var Greeter = (function () { 1->^^^^^^^^ @@ -110,9 +158,9 @@ sourceFile:sourceMapSample.ts > 2 > class 3 > Greeter -1->Emitted(5, 9) Source(4, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(5, 13) Source(4, 11) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(5, 20) Source(4, 18) + SourceIndex(0) name (Foo.Bar) +1->Emitted(6, 9) Source(4, 5) + SourceIndex(0) name (Foo.Bar) +2 >Emitted(6, 13) Source(4, 11) + SourceIndex(0) name (Foo.Bar) +3 >Emitted(6, 20) Source(4, 18) + SourceIndex(0) name (Foo.Bar) --- >>> function Greeter(greeting) { 1->^^^^^^^^^^^^ @@ -128,11 +176,11 @@ sourceFile:sourceMapSample.ts 4 > { > constructor(public 5 > greeting: string -1->Emitted(6, 13) Source(5, 9) + SourceIndex(0) name (Foo.Bar.Greeter) -2 >Emitted(6, 22) Source(4, 11) + SourceIndex(0) name (Foo.Bar.Greeter) -3 >Emitted(6, 29) Source(4, 18) + SourceIndex(0) name (Foo.Bar.Greeter) -4 >Emitted(6, 30) Source(5, 28) + SourceIndex(0) name (Foo.Bar.Greeter) -5 >Emitted(6, 38) Source(5, 44) + SourceIndex(0) name (Foo.Bar.Greeter) +1->Emitted(7, 13) Source(5, 9) + SourceIndex(0) name (Foo.Bar.Greeter) +2 >Emitted(7, 22) Source(4, 11) + SourceIndex(0) name (Foo.Bar.Greeter) +3 >Emitted(7, 29) Source(4, 18) + SourceIndex(0) name (Foo.Bar.Greeter) +4 >Emitted(7, 30) Source(5, 28) + SourceIndex(0) name (Foo.Bar.Greeter) +5 >Emitted(7, 38) Source(5, 44) + SourceIndex(0) name (Foo.Bar.Greeter) --- >>> this.greeting = greeting; 1->^^^^^^^^^^^^^^^^ @@ -145,11 +193,11 @@ sourceFile:sourceMapSample.ts 3 > 4 > greeting 5 > : string -1->Emitted(7, 17) Source(5, 28) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) -2 >Emitted(7, 30) Source(5, 36) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) -3 >Emitted(7, 33) Source(5, 28) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) -4 >Emitted(7, 41) Source(5, 36) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) -5 >Emitted(7, 42) Source(5, 44) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) +1->Emitted(8, 17) Source(5, 28) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) +2 >Emitted(8, 30) Source(5, 36) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) +3 >Emitted(8, 33) Source(5, 28) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) +4 >Emitted(8, 41) Source(5, 36) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) +5 >Emitted(8, 42) Source(5, 44) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) --- >>> } 1 >^^^^^^^^^^^^ @@ -158,8 +206,8 @@ sourceFile:sourceMapSample.ts 1 >) { > 2 > } -1 >Emitted(8, 13) Source(6, 9) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) -2 >Emitted(8, 14) Source(6, 10) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) +1 >Emitted(9, 13) Source(6, 9) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) +2 >Emitted(9, 14) Source(6, 10) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) --- >>> Greeter.prototype.greet = function () { 1->^^^^^^^^^^^^ @@ -171,9 +219,9 @@ sourceFile:sourceMapSample.ts > 2 > greet 3 > -1->Emitted(9, 13) Source(8, 9) + SourceIndex(0) name (Foo.Bar.Greeter) -2 >Emitted(9, 36) Source(8, 14) + SourceIndex(0) name (Foo.Bar.Greeter) -3 >Emitted(9, 39) Source(8, 9) + SourceIndex(0) name (Foo.Bar.Greeter) +1->Emitted(10, 13) Source(8, 9) + SourceIndex(0) name (Foo.Bar.Greeter) +2 >Emitted(10, 36) Source(8, 14) + SourceIndex(0) name (Foo.Bar.Greeter) +3 >Emitted(10, 39) Source(8, 9) + SourceIndex(0) name (Foo.Bar.Greeter) --- >>> return "

" + this.greeting + "

"; 1->^^^^^^^^^^^^^^^^ @@ -199,17 +247,17 @@ sourceFile:sourceMapSample.ts 9 > + 10> "" 11> ; -1->Emitted(10, 17) Source(9, 13) + SourceIndex(0) name (Foo.Bar.Greeter.greet) -2 >Emitted(10, 23) Source(9, 19) + SourceIndex(0) name (Foo.Bar.Greeter.greet) -3 >Emitted(10, 24) Source(9, 20) + SourceIndex(0) name (Foo.Bar.Greeter.greet) -4 >Emitted(10, 30) Source(9, 26) + SourceIndex(0) name (Foo.Bar.Greeter.greet) -5 >Emitted(10, 33) Source(9, 29) + SourceIndex(0) name (Foo.Bar.Greeter.greet) -6 >Emitted(10, 37) Source(9, 33) + SourceIndex(0) name (Foo.Bar.Greeter.greet) -7 >Emitted(10, 38) Source(9, 34) + SourceIndex(0) name (Foo.Bar.Greeter.greet) -8 >Emitted(10, 46) Source(9, 42) + SourceIndex(0) name (Foo.Bar.Greeter.greet) -9 >Emitted(10, 49) Source(9, 45) + SourceIndex(0) name (Foo.Bar.Greeter.greet) -10>Emitted(10, 56) Source(9, 52) + SourceIndex(0) name (Foo.Bar.Greeter.greet) -11>Emitted(10, 57) Source(9, 53) + SourceIndex(0) name (Foo.Bar.Greeter.greet) +1->Emitted(11, 17) Source(9, 13) + SourceIndex(0) name (Foo.Bar.Greeter.greet) +2 >Emitted(11, 23) Source(9, 19) + SourceIndex(0) name (Foo.Bar.Greeter.greet) +3 >Emitted(11, 24) Source(9, 20) + SourceIndex(0) name (Foo.Bar.Greeter.greet) +4 >Emitted(11, 30) Source(9, 26) + SourceIndex(0) name (Foo.Bar.Greeter.greet) +5 >Emitted(11, 33) Source(9, 29) + SourceIndex(0) name (Foo.Bar.Greeter.greet) +6 >Emitted(11, 37) Source(9, 33) + SourceIndex(0) name (Foo.Bar.Greeter.greet) +7 >Emitted(11, 38) Source(9, 34) + SourceIndex(0) name (Foo.Bar.Greeter.greet) +8 >Emitted(11, 46) Source(9, 42) + SourceIndex(0) name (Foo.Bar.Greeter.greet) +9 >Emitted(11, 49) Source(9, 45) + SourceIndex(0) name (Foo.Bar.Greeter.greet) +10>Emitted(11, 56) Source(9, 52) + SourceIndex(0) name (Foo.Bar.Greeter.greet) +11>Emitted(11, 57) Source(9, 53) + SourceIndex(0) name (Foo.Bar.Greeter.greet) --- >>> }; 1 >^^^^^^^^^^^^ @@ -218,8 +266,8 @@ sourceFile:sourceMapSample.ts 1 > > 2 > } -1 >Emitted(11, 13) Source(10, 9) + SourceIndex(0) name (Foo.Bar.Greeter.greet) -2 >Emitted(11, 14) Source(10, 10) + SourceIndex(0) name (Foo.Bar.Greeter.greet) +1 >Emitted(12, 13) Source(10, 9) + SourceIndex(0) name (Foo.Bar.Greeter.greet) +2 >Emitted(12, 14) Source(10, 10) + SourceIndex(0) name (Foo.Bar.Greeter.greet) --- >>> return Greeter; 1->^^^^^^^^^^^^ @@ -227,8 +275,8 @@ sourceFile:sourceMapSample.ts 1-> > 2 > } -1->Emitted(12, 13) Source(11, 5) + SourceIndex(0) name (Foo.Bar.Greeter) -2 >Emitted(12, 27) Source(11, 6) + SourceIndex(0) name (Foo.Bar.Greeter) +1->Emitted(13, 13) Source(11, 5) + SourceIndex(0) name (Foo.Bar.Greeter) +2 >Emitted(13, 27) Source(11, 6) + SourceIndex(0) name (Foo.Bar.Greeter) --- >>> })(); 1 >^^^^^^^^ @@ -247,10 +295,10 @@ sourceFile:sourceMapSample.ts > return "

" + this.greeting + "

"; > } > } -1 >Emitted(13, 9) Source(11, 5) + SourceIndex(0) name (Foo.Bar.Greeter) -2 >Emitted(13, 10) Source(11, 6) + SourceIndex(0) name (Foo.Bar.Greeter) -3 >Emitted(13, 10) Source(4, 5) + SourceIndex(0) name (Foo.Bar) -4 >Emitted(13, 14) Source(11, 6) + SourceIndex(0) name (Foo.Bar) +1 >Emitted(14, 9) Source(11, 5) + SourceIndex(0) name (Foo.Bar.Greeter) +2 >Emitted(14, 10) Source(11, 6) + SourceIndex(0) name (Foo.Bar.Greeter) +3 >Emitted(14, 10) Source(4, 5) + SourceIndex(0) name (Foo.Bar) +4 >Emitted(14, 14) Source(11, 6) + SourceIndex(0) name (Foo.Bar) --- >>> function foo(greeting) { 1->^^^^^^^^ @@ -267,11 +315,11 @@ sourceFile:sourceMapSample.ts 3 > foo 4 > ( 5 > greeting: string -1->Emitted(14, 9) Source(14, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(14, 18) Source(14, 14) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(14, 21) Source(14, 17) + SourceIndex(0) name (Foo.Bar) -4 >Emitted(14, 22) Source(14, 18) + SourceIndex(0) name (Foo.Bar) -5 >Emitted(14, 30) Source(14, 34) + SourceIndex(0) name (Foo.Bar) +1->Emitted(15, 9) Source(14, 5) + SourceIndex(0) name (Foo.Bar) +2 >Emitted(15, 18) Source(14, 14) + SourceIndex(0) name (Foo.Bar) +3 >Emitted(15, 21) Source(14, 17) + SourceIndex(0) name (Foo.Bar) +4 >Emitted(15, 22) Source(14, 18) + SourceIndex(0) name (Foo.Bar) +5 >Emitted(15, 30) Source(14, 34) + SourceIndex(0) name (Foo.Bar) --- >>> return new Greeter(greeting); 1->^^^^^^^^^^^^ @@ -293,15 +341,15 @@ sourceFile:sourceMapSample.ts 7 > greeting 8 > ) 9 > ; -1->Emitted(15, 13) Source(15, 9) + SourceIndex(0) name (Foo.Bar.foo) -2 >Emitted(15, 19) Source(15, 15) + SourceIndex(0) name (Foo.Bar.foo) -3 >Emitted(15, 20) Source(15, 16) + SourceIndex(0) name (Foo.Bar.foo) -4 >Emitted(15, 24) Source(15, 20) + SourceIndex(0) name (Foo.Bar.foo) -5 >Emitted(15, 31) Source(15, 27) + SourceIndex(0) name (Foo.Bar.foo) -6 >Emitted(15, 32) Source(15, 28) + SourceIndex(0) name (Foo.Bar.foo) -7 >Emitted(15, 40) Source(15, 36) + SourceIndex(0) name (Foo.Bar.foo) -8 >Emitted(15, 41) Source(15, 37) + SourceIndex(0) name (Foo.Bar.foo) -9 >Emitted(15, 42) Source(15, 38) + SourceIndex(0) name (Foo.Bar.foo) +1->Emitted(16, 13) Source(15, 9) + SourceIndex(0) name (Foo.Bar.foo) +2 >Emitted(16, 19) Source(15, 15) + SourceIndex(0) name (Foo.Bar.foo) +3 >Emitted(16, 20) Source(15, 16) + SourceIndex(0) name (Foo.Bar.foo) +4 >Emitted(16, 24) Source(15, 20) + SourceIndex(0) name (Foo.Bar.foo) +5 >Emitted(16, 31) Source(15, 27) + SourceIndex(0) name (Foo.Bar.foo) +6 >Emitted(16, 32) Source(15, 28) + SourceIndex(0) name (Foo.Bar.foo) +7 >Emitted(16, 40) Source(15, 36) + SourceIndex(0) name (Foo.Bar.foo) +8 >Emitted(16, 41) Source(15, 37) + SourceIndex(0) name (Foo.Bar.foo) +9 >Emitted(16, 42) Source(15, 38) + SourceIndex(0) name (Foo.Bar.foo) --- >>> } 1 >^^^^^^^^ @@ -310,8 +358,8 @@ sourceFile:sourceMapSample.ts 1 > > 2 > } -1 >Emitted(16, 9) Source(16, 5) + SourceIndex(0) name (Foo.Bar.foo) -2 >Emitted(16, 10) Source(16, 6) + SourceIndex(0) name (Foo.Bar.foo) +1 >Emitted(17, 9) Source(16, 5) + SourceIndex(0) name (Foo.Bar.foo) +2 >Emitted(17, 10) Source(16, 6) + SourceIndex(0) name (Foo.Bar.foo) --- >>> var greeter = new Greeter("Hello, world!"); 1->^^^^^^^^ @@ -336,16 +384,16 @@ sourceFile:sourceMapSample.ts 8 > "Hello, world!" 9 > ) 10> ; -1->Emitted(17, 9) Source(18, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(17, 13) Source(18, 9) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(17, 20) Source(18, 16) + SourceIndex(0) name (Foo.Bar) -4 >Emitted(17, 23) Source(18, 19) + SourceIndex(0) name (Foo.Bar) -5 >Emitted(17, 27) Source(18, 23) + SourceIndex(0) name (Foo.Bar) -6 >Emitted(17, 34) Source(18, 30) + SourceIndex(0) name (Foo.Bar) -7 >Emitted(17, 35) Source(18, 31) + SourceIndex(0) name (Foo.Bar) -8 >Emitted(17, 50) Source(18, 46) + SourceIndex(0) name (Foo.Bar) -9 >Emitted(17, 51) Source(18, 47) + SourceIndex(0) name (Foo.Bar) -10>Emitted(17, 52) Source(18, 48) + SourceIndex(0) name (Foo.Bar) +1->Emitted(18, 9) Source(18, 5) + SourceIndex(0) name (Foo.Bar) +2 >Emitted(18, 13) Source(18, 9) + SourceIndex(0) name (Foo.Bar) +3 >Emitted(18, 20) Source(18, 16) + SourceIndex(0) name (Foo.Bar) +4 >Emitted(18, 23) Source(18, 19) + SourceIndex(0) name (Foo.Bar) +5 >Emitted(18, 27) Source(18, 23) + SourceIndex(0) name (Foo.Bar) +6 >Emitted(18, 34) Source(18, 30) + SourceIndex(0) name (Foo.Bar) +7 >Emitted(18, 35) Source(18, 31) + SourceIndex(0) name (Foo.Bar) +8 >Emitted(18, 50) Source(18, 46) + SourceIndex(0) name (Foo.Bar) +9 >Emitted(18, 51) Source(18, 47) + SourceIndex(0) name (Foo.Bar) +10>Emitted(18, 52) Source(18, 48) + SourceIndex(0) name (Foo.Bar) --- >>> var str = greeter.greet(); 1 >^^^^^^^^ @@ -367,15 +415,15 @@ sourceFile:sourceMapSample.ts 7 > greet 8 > () 9 > ; -1 >Emitted(18, 9) Source(19, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(18, 13) Source(19, 9) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(18, 16) Source(19, 12) + SourceIndex(0) name (Foo.Bar) -4 >Emitted(18, 19) Source(19, 15) + SourceIndex(0) name (Foo.Bar) -5 >Emitted(18, 26) Source(19, 22) + SourceIndex(0) name (Foo.Bar) -6 >Emitted(18, 27) Source(19, 23) + SourceIndex(0) name (Foo.Bar) -7 >Emitted(18, 32) Source(19, 28) + SourceIndex(0) name (Foo.Bar) -8 >Emitted(18, 34) Source(19, 30) + SourceIndex(0) name (Foo.Bar) -9 >Emitted(18, 35) Source(19, 31) + SourceIndex(0) name (Foo.Bar) +1 >Emitted(19, 9) Source(19, 5) + SourceIndex(0) name (Foo.Bar) +2 >Emitted(19, 13) Source(19, 9) + SourceIndex(0) name (Foo.Bar) +3 >Emitted(19, 16) Source(19, 12) + SourceIndex(0) name (Foo.Bar) +4 >Emitted(19, 19) Source(19, 15) + SourceIndex(0) name (Foo.Bar) +5 >Emitted(19, 26) Source(19, 22) + SourceIndex(0) name (Foo.Bar) +6 >Emitted(19, 27) Source(19, 23) + SourceIndex(0) name (Foo.Bar) +7 >Emitted(19, 32) Source(19, 28) + SourceIndex(0) name (Foo.Bar) +8 >Emitted(19, 34) Source(19, 30) + SourceIndex(0) name (Foo.Bar) +9 >Emitted(19, 35) Source(19, 31) + SourceIndex(0) name (Foo.Bar) --- >>> function foo2(greeting) { 1 >^^^^^^^^ @@ -391,11 +439,11 @@ sourceFile:sourceMapSample.ts 3 > foo2 4 > ( 5 > greeting: string -1 >Emitted(19, 9) Source(21, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(19, 18) Source(21, 14) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(19, 22) Source(21, 18) + SourceIndex(0) name (Foo.Bar) -4 >Emitted(19, 23) Source(21, 19) + SourceIndex(0) name (Foo.Bar) -5 >Emitted(19, 31) Source(21, 35) + SourceIndex(0) name (Foo.Bar) +1 >Emitted(20, 9) Source(21, 5) + SourceIndex(0) name (Foo.Bar) +2 >Emitted(20, 18) Source(21, 14) + SourceIndex(0) name (Foo.Bar) +3 >Emitted(20, 22) Source(21, 18) + SourceIndex(0) name (Foo.Bar) +4 >Emitted(20, 23) Source(21, 19) + SourceIndex(0) name (Foo.Bar) +5 >Emitted(20, 31) Source(21, 35) + SourceIndex(0) name (Foo.Bar) --- >>> var restGreetings = []; 1->^^^^^^^^^^^^ @@ -403,8 +451,8 @@ sourceFile:sourceMapSample.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1->, 2 > ...restGreetings: string[] -1->Emitted(20, 13) Source(21, 37) + SourceIndex(0) name (Foo.Bar.foo2) -2 >Emitted(20, 36) Source(21, 63) + SourceIndex(0) name (Foo.Bar.foo2) +1->Emitted(21, 13) Source(21, 37) + SourceIndex(0) name (Foo.Bar.foo2) +2 >Emitted(21, 36) Source(21, 63) + SourceIndex(0) name (Foo.Bar.foo2) --- >>> for (var _i = 1; _i < arguments.length; _i++) { 1->^^^^^^^^^^^^^^^^^ @@ -419,20 +467,20 @@ sourceFile:sourceMapSample.ts 4 > ...restGreetings: string[] 5 > 6 > ...restGreetings: string[] -1->Emitted(21, 18) Source(21, 37) + SourceIndex(0) name (Foo.Bar.foo2) -2 >Emitted(21, 29) Source(21, 63) + SourceIndex(0) name (Foo.Bar.foo2) -3 >Emitted(21, 30) Source(21, 37) + SourceIndex(0) name (Foo.Bar.foo2) -4 >Emitted(21, 52) Source(21, 63) + SourceIndex(0) name (Foo.Bar.foo2) -5 >Emitted(21, 53) Source(21, 37) + SourceIndex(0) name (Foo.Bar.foo2) -6 >Emitted(21, 57) Source(21, 63) + SourceIndex(0) name (Foo.Bar.foo2) +1->Emitted(22, 18) Source(21, 37) + SourceIndex(0) name (Foo.Bar.foo2) +2 >Emitted(22, 29) Source(21, 63) + SourceIndex(0) name (Foo.Bar.foo2) +3 >Emitted(22, 30) Source(21, 37) + SourceIndex(0) name (Foo.Bar.foo2) +4 >Emitted(22, 52) Source(21, 63) + SourceIndex(0) name (Foo.Bar.foo2) +5 >Emitted(22, 53) Source(21, 37) + SourceIndex(0) name (Foo.Bar.foo2) +6 >Emitted(22, 57) Source(21, 63) + SourceIndex(0) name (Foo.Bar.foo2) --- >>> restGreetings[_i - 1] = arguments[_i]; 1 >^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...restGreetings: string[] -1 >Emitted(22, 17) Source(21, 37) + SourceIndex(0) name (Foo.Bar.foo2) -2 >Emitted(22, 55) Source(21, 63) + SourceIndex(0) name (Foo.Bar.foo2) +1 >Emitted(23, 17) Source(21, 37) + SourceIndex(0) name (Foo.Bar.foo2) +2 >Emitted(23, 55) Source(21, 63) + SourceIndex(0) name (Foo.Bar.foo2) --- >>> } >>> var greeters = []; @@ -450,12 +498,12 @@ sourceFile:sourceMapSample.ts 4 > : Greeter[] = 5 > [] 6 > ; -1 >Emitted(24, 13) Source(22, 9) + SourceIndex(0) name (Foo.Bar.foo2) -2 >Emitted(24, 17) Source(22, 13) + SourceIndex(0) name (Foo.Bar.foo2) -3 >Emitted(24, 25) Source(22, 21) + SourceIndex(0) name (Foo.Bar.foo2) -4 >Emitted(24, 28) Source(22, 35) + SourceIndex(0) name (Foo.Bar.foo2) -5 >Emitted(24, 30) Source(22, 37) + SourceIndex(0) name (Foo.Bar.foo2) -6 >Emitted(24, 31) Source(22, 38) + SourceIndex(0) name (Foo.Bar.foo2) +1 >Emitted(25, 13) Source(22, 9) + SourceIndex(0) name (Foo.Bar.foo2) +2 >Emitted(25, 17) Source(22, 13) + SourceIndex(0) name (Foo.Bar.foo2) +3 >Emitted(25, 25) Source(22, 21) + SourceIndex(0) name (Foo.Bar.foo2) +4 >Emitted(25, 28) Source(22, 35) + SourceIndex(0) name (Foo.Bar.foo2) +5 >Emitted(25, 30) Source(22, 37) + SourceIndex(0) name (Foo.Bar.foo2) +6 >Emitted(25, 31) Source(22, 38) + SourceIndex(0) name (Foo.Bar.foo2) --- >>> greeters[0] = new Greeter(greeting); 1->^^^^^^^^^^^^ @@ -484,18 +532,18 @@ sourceFile:sourceMapSample.ts 10> greeting 11> ) 12> ; -1->Emitted(25, 13) Source(23, 9) + SourceIndex(0) name (Foo.Bar.foo2) -2 >Emitted(25, 21) Source(23, 17) + SourceIndex(0) name (Foo.Bar.foo2) -3 >Emitted(25, 22) Source(23, 18) + SourceIndex(0) name (Foo.Bar.foo2) -4 >Emitted(25, 23) Source(23, 19) + SourceIndex(0) name (Foo.Bar.foo2) -5 >Emitted(25, 24) Source(23, 20) + SourceIndex(0) name (Foo.Bar.foo2) -6 >Emitted(25, 27) Source(23, 23) + SourceIndex(0) name (Foo.Bar.foo2) -7 >Emitted(25, 31) Source(23, 27) + SourceIndex(0) name (Foo.Bar.foo2) -8 >Emitted(25, 38) Source(23, 34) + SourceIndex(0) name (Foo.Bar.foo2) -9 >Emitted(25, 39) Source(23, 35) + SourceIndex(0) name (Foo.Bar.foo2) -10>Emitted(25, 47) Source(23, 43) + SourceIndex(0) name (Foo.Bar.foo2) -11>Emitted(25, 48) Source(23, 44) + SourceIndex(0) name (Foo.Bar.foo2) -12>Emitted(25, 49) Source(23, 45) + SourceIndex(0) name (Foo.Bar.foo2) +1->Emitted(26, 13) Source(23, 9) + SourceIndex(0) name (Foo.Bar.foo2) +2 >Emitted(26, 21) Source(23, 17) + SourceIndex(0) name (Foo.Bar.foo2) +3 >Emitted(26, 22) Source(23, 18) + SourceIndex(0) name (Foo.Bar.foo2) +4 >Emitted(26, 23) Source(23, 19) + SourceIndex(0) name (Foo.Bar.foo2) +5 >Emitted(26, 24) Source(23, 20) + SourceIndex(0) name (Foo.Bar.foo2) +6 >Emitted(26, 27) Source(23, 23) + SourceIndex(0) name (Foo.Bar.foo2) +7 >Emitted(26, 31) Source(23, 27) + SourceIndex(0) name (Foo.Bar.foo2) +8 >Emitted(26, 38) Source(23, 34) + SourceIndex(0) name (Foo.Bar.foo2) +9 >Emitted(26, 39) Source(23, 35) + SourceIndex(0) name (Foo.Bar.foo2) +10>Emitted(26, 47) Source(23, 43) + SourceIndex(0) name (Foo.Bar.foo2) +11>Emitted(26, 48) Source(23, 44) + SourceIndex(0) name (Foo.Bar.foo2) +12>Emitted(26, 49) Source(23, 45) + SourceIndex(0) name (Foo.Bar.foo2) --- >>> for (var i = 0; i < restGreetings.length; i++) { 1->^^^^^^^^^^^^ @@ -540,26 +588,26 @@ sourceFile:sourceMapSample.ts 18> ++ 19> ) 20> { -1->Emitted(26, 13) Source(24, 9) + SourceIndex(0) name (Foo.Bar.foo2) -2 >Emitted(26, 16) Source(24, 12) + SourceIndex(0) name (Foo.Bar.foo2) -3 >Emitted(26, 17) Source(24, 13) + SourceIndex(0) name (Foo.Bar.foo2) -4 >Emitted(26, 18) Source(24, 14) + SourceIndex(0) name (Foo.Bar.foo2) -5 >Emitted(26, 21) Source(24, 17) + SourceIndex(0) name (Foo.Bar.foo2) -6 >Emitted(26, 22) Source(24, 18) + SourceIndex(0) name (Foo.Bar.foo2) -7 >Emitted(26, 23) Source(24, 19) + SourceIndex(0) name (Foo.Bar.foo2) -8 >Emitted(26, 26) Source(24, 22) + SourceIndex(0) name (Foo.Bar.foo2) -9 >Emitted(26, 27) Source(24, 23) + SourceIndex(0) name (Foo.Bar.foo2) -10>Emitted(26, 29) Source(24, 25) + SourceIndex(0) name (Foo.Bar.foo2) -11>Emitted(26, 30) Source(24, 26) + SourceIndex(0) name (Foo.Bar.foo2) -12>Emitted(26, 33) Source(24, 29) + SourceIndex(0) name (Foo.Bar.foo2) -13>Emitted(26, 46) Source(24, 42) + SourceIndex(0) name (Foo.Bar.foo2) -14>Emitted(26, 47) Source(24, 43) + SourceIndex(0) name (Foo.Bar.foo2) -15>Emitted(26, 53) Source(24, 49) + SourceIndex(0) name (Foo.Bar.foo2) -16>Emitted(26, 55) Source(24, 51) + SourceIndex(0) name (Foo.Bar.foo2) -17>Emitted(26, 56) Source(24, 52) + SourceIndex(0) name (Foo.Bar.foo2) -18>Emitted(26, 58) Source(24, 54) + SourceIndex(0) name (Foo.Bar.foo2) -19>Emitted(26, 60) Source(24, 56) + SourceIndex(0) name (Foo.Bar.foo2) -20>Emitted(26, 61) Source(24, 57) + SourceIndex(0) name (Foo.Bar.foo2) +1->Emitted(27, 13) Source(24, 9) + SourceIndex(0) name (Foo.Bar.foo2) +2 >Emitted(27, 16) Source(24, 12) + SourceIndex(0) name (Foo.Bar.foo2) +3 >Emitted(27, 17) Source(24, 13) + SourceIndex(0) name (Foo.Bar.foo2) +4 >Emitted(27, 18) Source(24, 14) + SourceIndex(0) name (Foo.Bar.foo2) +5 >Emitted(27, 21) Source(24, 17) + SourceIndex(0) name (Foo.Bar.foo2) +6 >Emitted(27, 22) Source(24, 18) + SourceIndex(0) name (Foo.Bar.foo2) +7 >Emitted(27, 23) Source(24, 19) + SourceIndex(0) name (Foo.Bar.foo2) +8 >Emitted(27, 26) Source(24, 22) + SourceIndex(0) name (Foo.Bar.foo2) +9 >Emitted(27, 27) Source(24, 23) + SourceIndex(0) name (Foo.Bar.foo2) +10>Emitted(27, 29) Source(24, 25) + SourceIndex(0) name (Foo.Bar.foo2) +11>Emitted(27, 30) Source(24, 26) + SourceIndex(0) name (Foo.Bar.foo2) +12>Emitted(27, 33) Source(24, 29) + SourceIndex(0) name (Foo.Bar.foo2) +13>Emitted(27, 46) Source(24, 42) + SourceIndex(0) name (Foo.Bar.foo2) +14>Emitted(27, 47) Source(24, 43) + SourceIndex(0) name (Foo.Bar.foo2) +15>Emitted(27, 53) Source(24, 49) + SourceIndex(0) name (Foo.Bar.foo2) +16>Emitted(27, 55) Source(24, 51) + SourceIndex(0) name (Foo.Bar.foo2) +17>Emitted(27, 56) Source(24, 52) + SourceIndex(0) name (Foo.Bar.foo2) +18>Emitted(27, 58) Source(24, 54) + SourceIndex(0) name (Foo.Bar.foo2) +19>Emitted(27, 60) Source(24, 56) + SourceIndex(0) name (Foo.Bar.foo2) +20>Emitted(27, 61) Source(24, 57) + SourceIndex(0) name (Foo.Bar.foo2) --- >>> greeters.push(new Greeter(restGreetings[i])); 1->^^^^^^^^^^^^^^^^ @@ -593,21 +641,21 @@ sourceFile:sourceMapSample.ts 13> ) 14> ) 15> ; -1->Emitted(27, 17) Source(25, 13) + SourceIndex(0) name (Foo.Bar.foo2) -2 >Emitted(27, 25) Source(25, 21) + SourceIndex(0) name (Foo.Bar.foo2) -3 >Emitted(27, 26) Source(25, 22) + SourceIndex(0) name (Foo.Bar.foo2) -4 >Emitted(27, 30) Source(25, 26) + SourceIndex(0) name (Foo.Bar.foo2) -5 >Emitted(27, 31) Source(25, 27) + SourceIndex(0) name (Foo.Bar.foo2) -6 >Emitted(27, 35) Source(25, 31) + SourceIndex(0) name (Foo.Bar.foo2) -7 >Emitted(27, 42) Source(25, 38) + SourceIndex(0) name (Foo.Bar.foo2) -8 >Emitted(27, 43) Source(25, 39) + SourceIndex(0) name (Foo.Bar.foo2) -9 >Emitted(27, 56) Source(25, 52) + SourceIndex(0) name (Foo.Bar.foo2) -10>Emitted(27, 57) Source(25, 53) + SourceIndex(0) name (Foo.Bar.foo2) -11>Emitted(27, 58) Source(25, 54) + SourceIndex(0) name (Foo.Bar.foo2) -12>Emitted(27, 59) Source(25, 55) + SourceIndex(0) name (Foo.Bar.foo2) -13>Emitted(27, 60) Source(25, 56) + SourceIndex(0) name (Foo.Bar.foo2) -14>Emitted(27, 61) Source(25, 57) + SourceIndex(0) name (Foo.Bar.foo2) -15>Emitted(27, 62) Source(25, 58) + SourceIndex(0) name (Foo.Bar.foo2) +1->Emitted(28, 17) Source(25, 13) + SourceIndex(0) name (Foo.Bar.foo2) +2 >Emitted(28, 25) Source(25, 21) + SourceIndex(0) name (Foo.Bar.foo2) +3 >Emitted(28, 26) Source(25, 22) + SourceIndex(0) name (Foo.Bar.foo2) +4 >Emitted(28, 30) Source(25, 26) + SourceIndex(0) name (Foo.Bar.foo2) +5 >Emitted(28, 31) Source(25, 27) + SourceIndex(0) name (Foo.Bar.foo2) +6 >Emitted(28, 35) Source(25, 31) + SourceIndex(0) name (Foo.Bar.foo2) +7 >Emitted(28, 42) Source(25, 38) + SourceIndex(0) name (Foo.Bar.foo2) +8 >Emitted(28, 43) Source(25, 39) + SourceIndex(0) name (Foo.Bar.foo2) +9 >Emitted(28, 56) Source(25, 52) + SourceIndex(0) name (Foo.Bar.foo2) +10>Emitted(28, 57) Source(25, 53) + SourceIndex(0) name (Foo.Bar.foo2) +11>Emitted(28, 58) Source(25, 54) + SourceIndex(0) name (Foo.Bar.foo2) +12>Emitted(28, 59) Source(25, 55) + SourceIndex(0) name (Foo.Bar.foo2) +13>Emitted(28, 60) Source(25, 56) + SourceIndex(0) name (Foo.Bar.foo2) +14>Emitted(28, 61) Source(25, 57) + SourceIndex(0) name (Foo.Bar.foo2) +15>Emitted(28, 62) Source(25, 58) + SourceIndex(0) name (Foo.Bar.foo2) --- >>> } 1 >^^^^^^^^^^^^ @@ -616,8 +664,8 @@ sourceFile:sourceMapSample.ts 1 > > 2 > } -1 >Emitted(28, 13) Source(26, 9) + SourceIndex(0) name (Foo.Bar.foo2) -2 >Emitted(28, 14) Source(26, 10) + SourceIndex(0) name (Foo.Bar.foo2) +1 >Emitted(29, 13) Source(26, 9) + SourceIndex(0) name (Foo.Bar.foo2) +2 >Emitted(29, 14) Source(26, 10) + SourceIndex(0) name (Foo.Bar.foo2) --- >>> return greeters; 1->^^^^^^^^^^^^ @@ -632,11 +680,11 @@ sourceFile:sourceMapSample.ts 3 > 4 > greeters 5 > ; -1->Emitted(29, 13) Source(28, 9) + SourceIndex(0) name (Foo.Bar.foo2) -2 >Emitted(29, 19) Source(28, 15) + SourceIndex(0) name (Foo.Bar.foo2) -3 >Emitted(29, 20) Source(28, 16) + SourceIndex(0) name (Foo.Bar.foo2) -4 >Emitted(29, 28) Source(28, 24) + SourceIndex(0) name (Foo.Bar.foo2) -5 >Emitted(29, 29) Source(28, 25) + SourceIndex(0) name (Foo.Bar.foo2) +1->Emitted(30, 13) Source(28, 9) + SourceIndex(0) name (Foo.Bar.foo2) +2 >Emitted(30, 19) Source(28, 15) + SourceIndex(0) name (Foo.Bar.foo2) +3 >Emitted(30, 20) Source(28, 16) + SourceIndex(0) name (Foo.Bar.foo2) +4 >Emitted(30, 28) Source(28, 24) + SourceIndex(0) name (Foo.Bar.foo2) +5 >Emitted(30, 29) Source(28, 25) + SourceIndex(0) name (Foo.Bar.foo2) --- >>> } 1 >^^^^^^^^ @@ -645,8 +693,8 @@ sourceFile:sourceMapSample.ts 1 > > 2 > } -1 >Emitted(30, 9) Source(29, 5) + SourceIndex(0) name (Foo.Bar.foo2) -2 >Emitted(30, 10) Source(29, 6) + SourceIndex(0) name (Foo.Bar.foo2) +1 >Emitted(31, 9) Source(29, 5) + SourceIndex(0) name (Foo.Bar.foo2) +2 >Emitted(31, 10) Source(29, 6) + SourceIndex(0) name (Foo.Bar.foo2) --- >>> var b = foo2("Hello", "World", "!"); 1->^^^^^^^^ @@ -678,19 +726,19 @@ sourceFile:sourceMapSample.ts 11> "!" 12> ) 13> ; -1->Emitted(31, 9) Source(31, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(31, 13) Source(31, 9) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(31, 14) Source(31, 10) + SourceIndex(0) name (Foo.Bar) -4 >Emitted(31, 17) Source(31, 13) + SourceIndex(0) name (Foo.Bar) -5 >Emitted(31, 21) Source(31, 17) + SourceIndex(0) name (Foo.Bar) -6 >Emitted(31, 22) Source(31, 18) + SourceIndex(0) name (Foo.Bar) -7 >Emitted(31, 29) Source(31, 25) + SourceIndex(0) name (Foo.Bar) -8 >Emitted(31, 31) Source(31, 27) + SourceIndex(0) name (Foo.Bar) -9 >Emitted(31, 38) Source(31, 34) + SourceIndex(0) name (Foo.Bar) -10>Emitted(31, 40) Source(31, 36) + SourceIndex(0) name (Foo.Bar) -11>Emitted(31, 43) Source(31, 39) + SourceIndex(0) name (Foo.Bar) -12>Emitted(31, 44) Source(31, 40) + SourceIndex(0) name (Foo.Bar) -13>Emitted(31, 45) Source(31, 41) + SourceIndex(0) name (Foo.Bar) +1->Emitted(32, 9) Source(31, 5) + SourceIndex(0) name (Foo.Bar) +2 >Emitted(32, 13) Source(31, 9) + SourceIndex(0) name (Foo.Bar) +3 >Emitted(32, 14) Source(31, 10) + SourceIndex(0) name (Foo.Bar) +4 >Emitted(32, 17) Source(31, 13) + SourceIndex(0) name (Foo.Bar) +5 >Emitted(32, 21) Source(31, 17) + SourceIndex(0) name (Foo.Bar) +6 >Emitted(32, 22) Source(31, 18) + SourceIndex(0) name (Foo.Bar) +7 >Emitted(32, 29) Source(31, 25) + SourceIndex(0) name (Foo.Bar) +8 >Emitted(32, 31) Source(31, 27) + SourceIndex(0) name (Foo.Bar) +9 >Emitted(32, 38) Source(31, 34) + SourceIndex(0) name (Foo.Bar) +10>Emitted(32, 40) Source(31, 36) + SourceIndex(0) name (Foo.Bar) +11>Emitted(32, 43) Source(31, 39) + SourceIndex(0) name (Foo.Bar) +12>Emitted(32, 44) Source(31, 40) + SourceIndex(0) name (Foo.Bar) +13>Emitted(32, 45) Source(31, 41) + SourceIndex(0) name (Foo.Bar) --- >>> for (var j = 0; j < b.length; j++) { 1->^^^^^^^^ @@ -734,26 +782,26 @@ sourceFile:sourceMapSample.ts 18> ++ 19> ) 20> { -1->Emitted(32, 9) Source(32, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(32, 12) Source(32, 8) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(32, 13) Source(32, 9) + SourceIndex(0) name (Foo.Bar) -4 >Emitted(32, 14) Source(32, 10) + SourceIndex(0) name (Foo.Bar) -5 >Emitted(32, 17) Source(32, 13) + SourceIndex(0) name (Foo.Bar) -6 >Emitted(32, 18) Source(32, 14) + SourceIndex(0) name (Foo.Bar) -7 >Emitted(32, 19) Source(32, 15) + SourceIndex(0) name (Foo.Bar) -8 >Emitted(32, 22) Source(32, 18) + SourceIndex(0) name (Foo.Bar) -9 >Emitted(32, 23) Source(32, 19) + SourceIndex(0) name (Foo.Bar) -10>Emitted(32, 25) Source(32, 21) + SourceIndex(0) name (Foo.Bar) -11>Emitted(32, 26) Source(32, 22) + SourceIndex(0) name (Foo.Bar) -12>Emitted(32, 29) Source(32, 25) + SourceIndex(0) name (Foo.Bar) -13>Emitted(32, 30) Source(32, 26) + SourceIndex(0) name (Foo.Bar) -14>Emitted(32, 31) Source(32, 27) + SourceIndex(0) name (Foo.Bar) -15>Emitted(32, 37) Source(32, 33) + SourceIndex(0) name (Foo.Bar) -16>Emitted(32, 39) Source(32, 35) + SourceIndex(0) name (Foo.Bar) -17>Emitted(32, 40) Source(32, 36) + SourceIndex(0) name (Foo.Bar) -18>Emitted(32, 42) Source(32, 38) + SourceIndex(0) name (Foo.Bar) -19>Emitted(32, 44) Source(32, 40) + SourceIndex(0) name (Foo.Bar) -20>Emitted(32, 45) Source(32, 41) + SourceIndex(0) name (Foo.Bar) +1->Emitted(33, 9) Source(32, 5) + SourceIndex(0) name (Foo.Bar) +2 >Emitted(33, 12) Source(32, 8) + SourceIndex(0) name (Foo.Bar) +3 >Emitted(33, 13) Source(32, 9) + SourceIndex(0) name (Foo.Bar) +4 >Emitted(33, 14) Source(32, 10) + SourceIndex(0) name (Foo.Bar) +5 >Emitted(33, 17) Source(32, 13) + SourceIndex(0) name (Foo.Bar) +6 >Emitted(33, 18) Source(32, 14) + SourceIndex(0) name (Foo.Bar) +7 >Emitted(33, 19) Source(32, 15) + SourceIndex(0) name (Foo.Bar) +8 >Emitted(33, 22) Source(32, 18) + SourceIndex(0) name (Foo.Bar) +9 >Emitted(33, 23) Source(32, 19) + SourceIndex(0) name (Foo.Bar) +10>Emitted(33, 25) Source(32, 21) + SourceIndex(0) name (Foo.Bar) +11>Emitted(33, 26) Source(32, 22) + SourceIndex(0) name (Foo.Bar) +12>Emitted(33, 29) Source(32, 25) + SourceIndex(0) name (Foo.Bar) +13>Emitted(33, 30) Source(32, 26) + SourceIndex(0) name (Foo.Bar) +14>Emitted(33, 31) Source(32, 27) + SourceIndex(0) name (Foo.Bar) +15>Emitted(33, 37) Source(32, 33) + SourceIndex(0) name (Foo.Bar) +16>Emitted(33, 39) Source(32, 35) + SourceIndex(0) name (Foo.Bar) +17>Emitted(33, 40) Source(32, 36) + SourceIndex(0) name (Foo.Bar) +18>Emitted(33, 42) Source(32, 38) + SourceIndex(0) name (Foo.Bar) +19>Emitted(33, 44) Source(32, 40) + SourceIndex(0) name (Foo.Bar) +20>Emitted(33, 45) Source(32, 41) + SourceIndex(0) name (Foo.Bar) --- >>> b[j].greet(); 1 >^^^^^^^^^^^^ @@ -775,141 +823,92 @@ sourceFile:sourceMapSample.ts 7 > greet 8 > () 9 > ; -1 >Emitted(33, 13) Source(33, 9) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(33, 14) Source(33, 10) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(33, 15) Source(33, 11) + SourceIndex(0) name (Foo.Bar) -4 >Emitted(33, 16) Source(33, 12) + SourceIndex(0) name (Foo.Bar) -5 >Emitted(33, 17) Source(33, 13) + SourceIndex(0) name (Foo.Bar) -6 >Emitted(33, 18) Source(33, 14) + SourceIndex(0) name (Foo.Bar) -7 >Emitted(33, 23) Source(33, 19) + SourceIndex(0) name (Foo.Bar) -8 >Emitted(33, 25) Source(33, 21) + SourceIndex(0) name (Foo.Bar) -9 >Emitted(33, 26) Source(33, 22) + SourceIndex(0) name (Foo.Bar) +1 >Emitted(34, 13) Source(33, 9) + SourceIndex(0) name (Foo.Bar) +2 >Emitted(34, 14) Source(33, 10) + SourceIndex(0) name (Foo.Bar) +3 >Emitted(34, 15) Source(33, 11) + SourceIndex(0) name (Foo.Bar) +4 >Emitted(34, 16) Source(33, 12) + SourceIndex(0) name (Foo.Bar) +5 >Emitted(34, 17) Source(33, 13) + SourceIndex(0) name (Foo.Bar) +6 >Emitted(34, 18) Source(33, 14) + SourceIndex(0) name (Foo.Bar) +7 >Emitted(34, 23) Source(33, 19) + SourceIndex(0) name (Foo.Bar) +8 >Emitted(34, 25) Source(33, 21) + SourceIndex(0) name (Foo.Bar) +9 >Emitted(34, 26) Source(33, 22) + SourceIndex(0) name (Foo.Bar) --- >>> } 1 >^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > 2 > } -1 >Emitted(34, 9) Source(34, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(34, 10) Source(34, 6) + SourceIndex(0) name (Foo.Bar) +1 >Emitted(35, 9) Source(34, 5) + SourceIndex(0) name (Foo.Bar) +2 >Emitted(35, 10) Source(34, 6) + SourceIndex(0) name (Foo.Bar) --- ->>> })(Foo.Bar || (Foo.Bar = {})); +>>> })(Bar = Foo.Bar || (Foo.Bar = {})); 1->^^^^ 2 > ^ 3 > ^^ -4 > ^^^^^^^ -5 > ^^^^^ -6 > ^^^^^^^ -7 > ^^^^^^^^ +4 > ^^^ +5 > ^^^ +6 > ^^^^^^^ +7 > ^^^^^ +8 > ^^^^^^^ +9 > ^^^^^^^^ 1-> > 2 > } 3 > 4 > Bar -5 > -6 > Bar -7 > { - > "use strict"; - > - > class Greeter { - > constructor(public greeting: string) { - > } - > - > greet() { - > return "

" + this.greeting + "

"; - > } - > } - > - > - > function foo(greeting: string): Foo.Bar.Greeter { - > return new Greeter(greeting); - > } - > - > var greeter = new Greeter("Hello, world!"); - > var str = greeter.greet(); - > - > function foo2(greeting: string, ...restGreetings: string[]) { - > var greeters: Greeter[] = []; - > greeters[0] = new Greeter(greeting); - > for (var i = 0; i < restGreetings.length; i++) { - > greeters.push(new Greeter(restGreetings[i])); - > } - > - > return greeters; - > } - > - > var b = foo2("Hello", "World", "!"); - > for (var j = 0; j < b.length; j++) { - > b[j].greet(); - > } - > } -1->Emitted(35, 5) Source(35, 1) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(35, 6) Source(35, 2) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(35, 8) Source(1, 12) + SourceIndex(0) name (Foo) -4 >Emitted(35, 15) Source(1, 15) + SourceIndex(0) name (Foo) -5 >Emitted(35, 20) Source(1, 12) + SourceIndex(0) name (Foo) -6 >Emitted(35, 27) Source(1, 15) + SourceIndex(0) name (Foo) -7 >Emitted(35, 35) Source(35, 2) + SourceIndex(0) name (Foo) ---- ->>> var Bar = Foo.Bar; -1 >^^^^ -2 > ^^^^ -3 > ^^^ -4 > ^^^ -5 > ^^^^^^^ -6 > ^ -7 > ^-> -1 > -2 > -3 > Bar -4 > -5 > Bar { - > "use strict"; - > - > class Greeter { - > constructor(public greeting: string) { - > } - > - > greet() { - > return "

" + this.greeting + "

"; - > } - > } - > - > - > function foo(greeting: string): Foo.Bar.Greeter { - > return new Greeter(greeting); - > } - > - > var greeter = new Greeter("Hello, world!"); - > var str = greeter.greet(); - > - > function foo2(greeting: string, ...restGreetings: string[]) { - > var greeters: Greeter[] = []; - > greeters[0] = new Greeter(greeting); - > for (var i = 0; i < restGreetings.length; i++) { - > greeters.push(new Greeter(restGreetings[i])); - > } - > - > return greeters; - > } - > - > var b = foo2("Hello", "World", "!"); - > for (var j = 0; j < b.length; j++) { - > b[j].greet(); - > } - > } -6 > -1 >Emitted(36, 5) Source(1, 12) + SourceIndex(0) name (Foo) -2 >Emitted(36, 9) Source(1, 12) + SourceIndex(0) name (Foo) -3 >Emitted(36, 12) Source(1, 15) + SourceIndex(0) name (Foo) -4 >Emitted(36, 15) Source(1, 12) + SourceIndex(0) name (Foo) -5 >Emitted(36, 22) Source(35, 2) + SourceIndex(0) name (Foo) -6 >Emitted(36, 23) Source(35, 2) + SourceIndex(0) name (Foo) +5 > +6 > Bar +7 > +8 > Bar +9 > { + > "use strict"; + > + > class Greeter { + > constructor(public greeting: string) { + > } + > + > greet() { + > return "

" + this.greeting + "

"; + > } + > } + > + > + > function foo(greeting: string): Foo.Bar.Greeter { + > return new Greeter(greeting); + > } + > + > var greeter = new Greeter("Hello, world!"); + > var str = greeter.greet(); + > + > function foo2(greeting: string, ...restGreetings: string[]) { + > var greeters: Greeter[] = []; + > greeters[0] = new Greeter(greeting); + > for (var i = 0; i < restGreetings.length; i++) { + > greeters.push(new Greeter(restGreetings[i])); + > } + > + > return greeters; + > } + > + > var b = foo2("Hello", "World", "!"); + > for (var j = 0; j < b.length; j++) { + > b[j].greet(); + > } + > } +1->Emitted(36, 5) Source(35, 1) + SourceIndex(0) name (Foo.Bar) +2 >Emitted(36, 6) Source(35, 2) + SourceIndex(0) name (Foo.Bar) +3 >Emitted(36, 8) Source(1, 12) + SourceIndex(0) name (Foo) +4 >Emitted(36, 11) Source(1, 15) + SourceIndex(0) name (Foo) +5 >Emitted(36, 14) Source(1, 12) + SourceIndex(0) name (Foo) +6 >Emitted(36, 21) Source(1, 15) + SourceIndex(0) name (Foo) +7 >Emitted(36, 26) Source(1, 12) + SourceIndex(0) name (Foo) +8 >Emitted(36, 33) Source(1, 15) + SourceIndex(0) name (Foo) +9 >Emitted(36, 41) Source(35, 2) + SourceIndex(0) name (Foo) --- >>>})(Foo || (Foo = {})); -1-> +1 > 2 >^ 3 > ^^ 4 > ^^^ @@ -917,7 +916,7 @@ sourceFile:sourceMapSample.ts 6 > ^^^ 7 > ^^^^^^^^ 8 > ^^^^^^^^^^^^^^^^^^^^-> -1-> +1 > 2 >} 3 > 4 > Foo @@ -958,7 +957,7 @@ sourceFile:sourceMapSample.ts > b[j].greet(); > } > } -1->Emitted(37, 1) Source(35, 1) + SourceIndex(0) name (Foo) +1 >Emitted(37, 1) Source(35, 1) + SourceIndex(0) name (Foo) 2 >Emitted(37, 2) Source(35, 2) + SourceIndex(0) name (Foo) 3 >Emitted(37, 4) Source(1, 8) + SourceIndex(0) 4 >Emitted(37, 7) Source(1, 11) + SourceIndex(0) diff --git a/tests/baselines/reference/sourceMapValidationClasses.js b/tests/baselines/reference/sourceMapValidationClasses.js index ad896ed463a..96724f7c3c7 100644 --- a/tests/baselines/reference/sourceMapValidationClasses.js +++ b/tests/baselines/reference/sourceMapValidationClasses.js @@ -39,6 +39,7 @@ module Foo.Bar { //// [sourceMapValidationClasses.js] var Foo; (function (Foo) { + var Bar; (function (Bar) { "use strict"; var Greeter = (function () { @@ -71,7 +72,6 @@ var Foo; for (var j = 0; j < b.length; j++) { b[j].greet(); } - })(Foo.Bar || (Foo.Bar = {})); - var Bar = Foo.Bar; + })(Bar = Foo.Bar || (Foo.Bar = {})); })(Foo || (Foo = {})); //# sourceMappingURL=sourceMapValidationClasses.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationClasses.js.map b/tests/baselines/reference/sourceMapValidationClasses.js.map index a599f1c72a9..2a1b381e116 100644 --- a/tests/baselines/reference/sourceMapValidationClasses.js.map +++ b/tests/baselines/reference/sourceMapValidationClasses.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationClasses.js.map] -{"version":3,"file":"sourceMapValidationClasses.js","sourceRoot":"","sources":["sourceMapValidationClasses.ts"],"names":["Foo","Foo.Bar","Foo.Bar.Greeter","Foo.Bar.Greeter.constructor","Foo.Bar.Greeter.greet","Foo.Bar.foo","Foo.Bar.foo2"],"mappings":"AAAA,IAAO,GAAG,CAmCT;AAnCD,WAAO,GAAG;IAACA,WAAAA,GAAGA,EAACA,CAACA;QACZC,YAAYA,CAACA;QAEbA,IAAMA,OAAOA;YACTC,SADEA,OAAOA,CACUA,QAAgBA;gBAAhBC,aAAQA,GAARA,QAAQA,CAAQA;YACnCA,CAACA;YAEDD,uBAAKA,GAALA;gBACIE,MAAMA,CAACA,MAAMA,GAAGA,IAAIA,CAACA,QAAQA,GAAGA,OAAOA,CAACA;YAC5CA,CAACA;YACLF,cAACA;QAADA,CAACA,AAPDD,IAOCA;QAGDA,SAASA,GAAGA,CAACA,QAAgBA;YACzBI,MAAMA,CAACA,IAAIA,OAAOA,CAACA,QAAQA,CAACA,CAACA;QACjCA,CAACA;QAEDJ,IAAIA,OAAOA,GAAGA,IAAIA,OAAOA,CAACA,eAAeA,CAACA,CAACA;QAC3CA,IAAIA,GAAGA,GAAGA,OAAOA,CAACA,KAAKA,EAAEA,CAACA;QAE1BA,SAASA,IAAIA,CAACA,QAAgBA;YAAEK,uBAA8CA;iBAA9CA,WAA8CA,CAA9CA,sBAA8CA,CAA9CA,IAA8CA;gBAA9CA,sCAA8CA;;YAC1EA,IAAIA,QAAQA,GAAcA,EAAEA,EAAEA,0BAA0BA,AAA3BA;YAC7BA,QAAQA,CAACA,CAACA,CAACA,GAAGA,IAAIA,OAAOA,CAACA,QAAQA,CAACA,CAACA;YACpCA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,aAAaA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;gBAC5CA,QAAQA,CAACA,IAAIA,CAACA,IAAIA,OAAOA,CAACA,aAAaA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA;YACjDA,CAACA;YAEDA,MAAMA,CAACA,QAAQA,CAACA;QACpBA,CAACA;QAEDL,IAAIA,CAACA,GAAGA,IAAIA,CAACA,OAAOA,EAAEA,OAAOA,EAAEA,GAAGA,CAACA,CAACA;QAEpCA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,CAACA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;YAChCA,CAACA,CAACA,CAACA,CAACA,CAACA,KAAKA,EAAEA,CAACA;QACjBA,CAACA;IACLA,CAACA,EAnCUD,OAAGA,KAAHA,OAAGA,QAmCbA;IAnCUA,IAAAA,GAAGA,GAAHA,OAmCVA,CAAAA;AAADA,CAACA,EAnCM,GAAG,KAAH,GAAG,QAmCT"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationClasses.js","sourceRoot":"","sources":["sourceMapValidationClasses.ts"],"names":["Foo","Foo.Bar","Foo.Bar.Greeter","Foo.Bar.Greeter.constructor","Foo.Bar.Greeter.greet","Foo.Bar.foo","Foo.Bar.foo2"],"mappings":"AAAA,IAAO,GAAG,CAmCT;AAnCD,WAAO,GAAG;IAACA,IAAAA,GAAGA,CAmCbA;IAnCUA,WAAAA,GAAGA,EAACA,CAACA;QACZC,YAAYA,CAACA;QAEbA,IAAMA,OAAOA;YACTC,SADEA,OAAOA,CACUA,QAAgBA;gBAAhBC,aAAQA,GAARA,QAAQA,CAAQA;YACnCA,CAACA;YAEDD,uBAAKA,GAALA;gBACIE,MAAMA,CAACA,MAAMA,GAAGA,IAAIA,CAACA,QAAQA,GAAGA,OAAOA,CAACA;YAC5CA,CAACA;YACLF,cAACA;QAADA,CAACA,AAPDD,IAOCA;QAGDA,SAASA,GAAGA,CAACA,QAAgBA;YACzBI,MAAMA,CAACA,IAAIA,OAAOA,CAACA,QAAQA,CAACA,CAACA;QACjCA,CAACA;QAEDJ,IAAIA,OAAOA,GAAGA,IAAIA,OAAOA,CAACA,eAAeA,CAACA,CAACA;QAC3CA,IAAIA,GAAGA,GAAGA,OAAOA,CAACA,KAAKA,EAAEA,CAACA;QAE1BA,SAASA,IAAIA,CAACA,QAAgBA;YAAEK,uBAA8CA;iBAA9CA,WAA8CA,CAA9CA,sBAA8CA,CAA9CA,IAA8CA;gBAA9CA,sCAA8CA;;YAC1EA,IAAIA,QAAQA,GAAcA,EAAEA,EAAEA,0BAA0BA,AAA3BA;YAC7BA,QAAQA,CAACA,CAACA,CAACA,GAAGA,IAAIA,OAAOA,CAACA,QAAQA,CAACA,CAACA;YACpCA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,aAAaA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;gBAC5CA,QAAQA,CAACA,IAAIA,CAACA,IAAIA,OAAOA,CAACA,aAAaA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA;YACjDA,CAACA;YAEDA,MAAMA,CAACA,QAAQA,CAACA;QACpBA,CAACA;QAEDL,IAAIA,CAACA,GAAGA,IAAIA,CAACA,OAAOA,EAAEA,OAAOA,EAAEA,GAAGA,CAACA,CAACA;QAEpCA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,CAACA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;YAChCA,CAACA,CAACA,CAACA,CAACA,CAACA,KAAKA,EAAEA,CAACA;QACjBA,CAACA;IACLA,CAACA,EAnCUD,GAAGA,GAAHA,OAAGA,KAAHA,OAAGA,QAmCbA;AAADA,CAACA,EAnCM,GAAG,KAAH,GAAG,QAmCT"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationClasses.sourcemap.txt b/tests/baselines/reference/sourceMapValidationClasses.sourcemap.txt index 1fe25cf6fe0..d82ac6c3e05 100644 --- a/tests/baselines/reference/sourceMapValidationClasses.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClasses.sourcemap.txt @@ -62,7 +62,6 @@ sourceFile:sourceMapValidationClasses.ts 1-> 2 >^^^^^^^^^^^ 3 > ^^^ -4 > ^^^^^^^^-> 1-> 2 >module 3 > Foo @@ -70,6 +69,56 @@ sourceFile:sourceMapValidationClasses.ts 2 >Emitted(2, 12) Source(1, 8) + SourceIndex(0) 3 >Emitted(2, 15) Source(1, 11) + SourceIndex(0) --- +>>> var Bar; +1 >^^^^ +2 > ^^^^ +3 > ^^^ +4 > ^ +5 > ^^^^^^^^^^-> +1 >. +2 > +3 > Bar +4 > { + > "use strict"; + > + > class Greeter { + > constructor(public greeting: string) { + > } + > + > greet() { + > return "

" + this.greeting + "

"; + > } + > } + > + > + > function foo(greeting: string): Greeter { + > return new Greeter(greeting); + > } + > + > var greeter = new Greeter("Hello, world!"); + > var str = greeter.greet(); + > + > function foo2(greeting: string, ...restGreetings /* more greeting */: string[]) { + > var greeters: Greeter[] = []; /* inline block comment */ + > greeters[0] = new Greeter(greeting); + > for (var i = 0; i < restGreetings.length; i++) { + > greeters.push(new Greeter(restGreetings[i])); + > } + > + > return greeters; + > } + > + > var b = foo2("Hello", "World", "!"); + > // This is simple signle line comment + > for (var j = 0; j < b.length; j++) { + > b[j].greet(); + > } + > } +1 >Emitted(3, 5) Source(1, 12) + SourceIndex(0) name (Foo) +2 >Emitted(3, 9) Source(1, 12) + SourceIndex(0) name (Foo) +3 >Emitted(3, 12) Source(1, 15) + SourceIndex(0) name (Foo) +4 >Emitted(3, 13) Source(36, 2) + SourceIndex(0) name (Foo) +--- >>> (function (Bar) { 1->^^^^ 2 > ^^^^^^^^^^^ @@ -77,16 +126,16 @@ sourceFile:sourceMapValidationClasses.ts 4 > ^^ 5 > ^ 6 > ^-> -1->. +1-> 2 > 3 > Bar 4 > 5 > { -1->Emitted(3, 5) Source(1, 12) + SourceIndex(0) name (Foo) -2 >Emitted(3, 16) Source(1, 12) + SourceIndex(0) name (Foo) -3 >Emitted(3, 19) Source(1, 15) + SourceIndex(0) name (Foo) -4 >Emitted(3, 21) Source(1, 16) + SourceIndex(0) name (Foo) -5 >Emitted(3, 22) Source(1, 17) + SourceIndex(0) name (Foo) +1->Emitted(4, 5) Source(1, 12) + SourceIndex(0) name (Foo) +2 >Emitted(4, 16) Source(1, 12) + SourceIndex(0) name (Foo) +3 >Emitted(4, 19) Source(1, 15) + SourceIndex(0) name (Foo) +4 >Emitted(4, 21) Source(1, 16) + SourceIndex(0) name (Foo) +5 >Emitted(4, 22) Source(1, 17) + SourceIndex(0) name (Foo) --- >>> "use strict"; 1->^^^^^^^^ @@ -97,9 +146,9 @@ sourceFile:sourceMapValidationClasses.ts > 2 > "use strict" 3 > ; -1->Emitted(4, 9) Source(2, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(4, 21) Source(2, 17) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(4, 22) Source(2, 18) + SourceIndex(0) name (Foo.Bar) +1->Emitted(5, 9) Source(2, 5) + SourceIndex(0) name (Foo.Bar) +2 >Emitted(5, 21) Source(2, 17) + SourceIndex(0) name (Foo.Bar) +3 >Emitted(5, 22) Source(2, 18) + SourceIndex(0) name (Foo.Bar) --- >>> var Greeter = (function () { 1->^^^^^^^^ @@ -111,9 +160,9 @@ sourceFile:sourceMapValidationClasses.ts > 2 > class 3 > Greeter -1->Emitted(5, 9) Source(4, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(5, 13) Source(4, 11) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(5, 20) Source(4, 18) + SourceIndex(0) name (Foo.Bar) +1->Emitted(6, 9) Source(4, 5) + SourceIndex(0) name (Foo.Bar) +2 >Emitted(6, 13) Source(4, 11) + SourceIndex(0) name (Foo.Bar) +3 >Emitted(6, 20) Source(4, 18) + SourceIndex(0) name (Foo.Bar) --- >>> function Greeter(greeting) { 1->^^^^^^^^^^^^ @@ -129,11 +178,11 @@ sourceFile:sourceMapValidationClasses.ts 4 > { > constructor(public 5 > greeting: string -1->Emitted(6, 13) Source(5, 9) + SourceIndex(0) name (Foo.Bar.Greeter) -2 >Emitted(6, 22) Source(4, 11) + SourceIndex(0) name (Foo.Bar.Greeter) -3 >Emitted(6, 29) Source(4, 18) + SourceIndex(0) name (Foo.Bar.Greeter) -4 >Emitted(6, 30) Source(5, 28) + SourceIndex(0) name (Foo.Bar.Greeter) -5 >Emitted(6, 38) Source(5, 44) + SourceIndex(0) name (Foo.Bar.Greeter) +1->Emitted(7, 13) Source(5, 9) + SourceIndex(0) name (Foo.Bar.Greeter) +2 >Emitted(7, 22) Source(4, 11) + SourceIndex(0) name (Foo.Bar.Greeter) +3 >Emitted(7, 29) Source(4, 18) + SourceIndex(0) name (Foo.Bar.Greeter) +4 >Emitted(7, 30) Source(5, 28) + SourceIndex(0) name (Foo.Bar.Greeter) +5 >Emitted(7, 38) Source(5, 44) + SourceIndex(0) name (Foo.Bar.Greeter) --- >>> this.greeting = greeting; 1->^^^^^^^^^^^^^^^^ @@ -146,11 +195,11 @@ sourceFile:sourceMapValidationClasses.ts 3 > 4 > greeting 5 > : string -1->Emitted(7, 17) Source(5, 28) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) -2 >Emitted(7, 30) Source(5, 36) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) -3 >Emitted(7, 33) Source(5, 28) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) -4 >Emitted(7, 41) Source(5, 36) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) -5 >Emitted(7, 42) Source(5, 44) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) +1->Emitted(8, 17) Source(5, 28) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) +2 >Emitted(8, 30) Source(5, 36) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) +3 >Emitted(8, 33) Source(5, 28) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) +4 >Emitted(8, 41) Source(5, 36) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) +5 >Emitted(8, 42) Source(5, 44) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) --- >>> } 1 >^^^^^^^^^^^^ @@ -159,8 +208,8 @@ sourceFile:sourceMapValidationClasses.ts 1 >) { > 2 > } -1 >Emitted(8, 13) Source(6, 9) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) -2 >Emitted(8, 14) Source(6, 10) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) +1 >Emitted(9, 13) Source(6, 9) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) +2 >Emitted(9, 14) Source(6, 10) + SourceIndex(0) name (Foo.Bar.Greeter.constructor) --- >>> Greeter.prototype.greet = function () { 1->^^^^^^^^^^^^ @@ -172,9 +221,9 @@ sourceFile:sourceMapValidationClasses.ts > 2 > greet 3 > -1->Emitted(9, 13) Source(8, 9) + SourceIndex(0) name (Foo.Bar.Greeter) -2 >Emitted(9, 36) Source(8, 14) + SourceIndex(0) name (Foo.Bar.Greeter) -3 >Emitted(9, 39) Source(8, 9) + SourceIndex(0) name (Foo.Bar.Greeter) +1->Emitted(10, 13) Source(8, 9) + SourceIndex(0) name (Foo.Bar.Greeter) +2 >Emitted(10, 36) Source(8, 14) + SourceIndex(0) name (Foo.Bar.Greeter) +3 >Emitted(10, 39) Source(8, 9) + SourceIndex(0) name (Foo.Bar.Greeter) --- >>> return "

" + this.greeting + "

"; 1->^^^^^^^^^^^^^^^^ @@ -200,17 +249,17 @@ sourceFile:sourceMapValidationClasses.ts 9 > + 10> "" 11> ; -1->Emitted(10, 17) Source(9, 13) + SourceIndex(0) name (Foo.Bar.Greeter.greet) -2 >Emitted(10, 23) Source(9, 19) + SourceIndex(0) name (Foo.Bar.Greeter.greet) -3 >Emitted(10, 24) Source(9, 20) + SourceIndex(0) name (Foo.Bar.Greeter.greet) -4 >Emitted(10, 30) Source(9, 26) + SourceIndex(0) name (Foo.Bar.Greeter.greet) -5 >Emitted(10, 33) Source(9, 29) + SourceIndex(0) name (Foo.Bar.Greeter.greet) -6 >Emitted(10, 37) Source(9, 33) + SourceIndex(0) name (Foo.Bar.Greeter.greet) -7 >Emitted(10, 38) Source(9, 34) + SourceIndex(0) name (Foo.Bar.Greeter.greet) -8 >Emitted(10, 46) Source(9, 42) + SourceIndex(0) name (Foo.Bar.Greeter.greet) -9 >Emitted(10, 49) Source(9, 45) + SourceIndex(0) name (Foo.Bar.Greeter.greet) -10>Emitted(10, 56) Source(9, 52) + SourceIndex(0) name (Foo.Bar.Greeter.greet) -11>Emitted(10, 57) Source(9, 53) + SourceIndex(0) name (Foo.Bar.Greeter.greet) +1->Emitted(11, 17) Source(9, 13) + SourceIndex(0) name (Foo.Bar.Greeter.greet) +2 >Emitted(11, 23) Source(9, 19) + SourceIndex(0) name (Foo.Bar.Greeter.greet) +3 >Emitted(11, 24) Source(9, 20) + SourceIndex(0) name (Foo.Bar.Greeter.greet) +4 >Emitted(11, 30) Source(9, 26) + SourceIndex(0) name (Foo.Bar.Greeter.greet) +5 >Emitted(11, 33) Source(9, 29) + SourceIndex(0) name (Foo.Bar.Greeter.greet) +6 >Emitted(11, 37) Source(9, 33) + SourceIndex(0) name (Foo.Bar.Greeter.greet) +7 >Emitted(11, 38) Source(9, 34) + SourceIndex(0) name (Foo.Bar.Greeter.greet) +8 >Emitted(11, 46) Source(9, 42) + SourceIndex(0) name (Foo.Bar.Greeter.greet) +9 >Emitted(11, 49) Source(9, 45) + SourceIndex(0) name (Foo.Bar.Greeter.greet) +10>Emitted(11, 56) Source(9, 52) + SourceIndex(0) name (Foo.Bar.Greeter.greet) +11>Emitted(11, 57) Source(9, 53) + SourceIndex(0) name (Foo.Bar.Greeter.greet) --- >>> }; 1 >^^^^^^^^^^^^ @@ -219,8 +268,8 @@ sourceFile:sourceMapValidationClasses.ts 1 > > 2 > } -1 >Emitted(11, 13) Source(10, 9) + SourceIndex(0) name (Foo.Bar.Greeter.greet) -2 >Emitted(11, 14) Source(10, 10) + SourceIndex(0) name (Foo.Bar.Greeter.greet) +1 >Emitted(12, 13) Source(10, 9) + SourceIndex(0) name (Foo.Bar.Greeter.greet) +2 >Emitted(12, 14) Source(10, 10) + SourceIndex(0) name (Foo.Bar.Greeter.greet) --- >>> return Greeter; 1->^^^^^^^^^^^^ @@ -228,8 +277,8 @@ sourceFile:sourceMapValidationClasses.ts 1-> > 2 > } -1->Emitted(12, 13) Source(11, 5) + SourceIndex(0) name (Foo.Bar.Greeter) -2 >Emitted(12, 27) Source(11, 6) + SourceIndex(0) name (Foo.Bar.Greeter) +1->Emitted(13, 13) Source(11, 5) + SourceIndex(0) name (Foo.Bar.Greeter) +2 >Emitted(13, 27) Source(11, 6) + SourceIndex(0) name (Foo.Bar.Greeter) --- >>> })(); 1 >^^^^^^^^ @@ -248,10 +297,10 @@ sourceFile:sourceMapValidationClasses.ts > return "

" + this.greeting + "

"; > } > } -1 >Emitted(13, 9) Source(11, 5) + SourceIndex(0) name (Foo.Bar.Greeter) -2 >Emitted(13, 10) Source(11, 6) + SourceIndex(0) name (Foo.Bar.Greeter) -3 >Emitted(13, 10) Source(4, 5) + SourceIndex(0) name (Foo.Bar) -4 >Emitted(13, 14) Source(11, 6) + SourceIndex(0) name (Foo.Bar) +1 >Emitted(14, 9) Source(11, 5) + SourceIndex(0) name (Foo.Bar.Greeter) +2 >Emitted(14, 10) Source(11, 6) + SourceIndex(0) name (Foo.Bar.Greeter) +3 >Emitted(14, 10) Source(4, 5) + SourceIndex(0) name (Foo.Bar) +4 >Emitted(14, 14) Source(11, 6) + SourceIndex(0) name (Foo.Bar) --- >>> function foo(greeting) { 1->^^^^^^^^ @@ -268,11 +317,11 @@ sourceFile:sourceMapValidationClasses.ts 3 > foo 4 > ( 5 > greeting: string -1->Emitted(14, 9) Source(14, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(14, 18) Source(14, 14) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(14, 21) Source(14, 17) + SourceIndex(0) name (Foo.Bar) -4 >Emitted(14, 22) Source(14, 18) + SourceIndex(0) name (Foo.Bar) -5 >Emitted(14, 30) Source(14, 34) + SourceIndex(0) name (Foo.Bar) +1->Emitted(15, 9) Source(14, 5) + SourceIndex(0) name (Foo.Bar) +2 >Emitted(15, 18) Source(14, 14) + SourceIndex(0) name (Foo.Bar) +3 >Emitted(15, 21) Source(14, 17) + SourceIndex(0) name (Foo.Bar) +4 >Emitted(15, 22) Source(14, 18) + SourceIndex(0) name (Foo.Bar) +5 >Emitted(15, 30) Source(14, 34) + SourceIndex(0) name (Foo.Bar) --- >>> return new Greeter(greeting); 1->^^^^^^^^^^^^ @@ -294,15 +343,15 @@ sourceFile:sourceMapValidationClasses.ts 7 > greeting 8 > ) 9 > ; -1->Emitted(15, 13) Source(15, 9) + SourceIndex(0) name (Foo.Bar.foo) -2 >Emitted(15, 19) Source(15, 15) + SourceIndex(0) name (Foo.Bar.foo) -3 >Emitted(15, 20) Source(15, 16) + SourceIndex(0) name (Foo.Bar.foo) -4 >Emitted(15, 24) Source(15, 20) + SourceIndex(0) name (Foo.Bar.foo) -5 >Emitted(15, 31) Source(15, 27) + SourceIndex(0) name (Foo.Bar.foo) -6 >Emitted(15, 32) Source(15, 28) + SourceIndex(0) name (Foo.Bar.foo) -7 >Emitted(15, 40) Source(15, 36) + SourceIndex(0) name (Foo.Bar.foo) -8 >Emitted(15, 41) Source(15, 37) + SourceIndex(0) name (Foo.Bar.foo) -9 >Emitted(15, 42) Source(15, 38) + SourceIndex(0) name (Foo.Bar.foo) +1->Emitted(16, 13) Source(15, 9) + SourceIndex(0) name (Foo.Bar.foo) +2 >Emitted(16, 19) Source(15, 15) + SourceIndex(0) name (Foo.Bar.foo) +3 >Emitted(16, 20) Source(15, 16) + SourceIndex(0) name (Foo.Bar.foo) +4 >Emitted(16, 24) Source(15, 20) + SourceIndex(0) name (Foo.Bar.foo) +5 >Emitted(16, 31) Source(15, 27) + SourceIndex(0) name (Foo.Bar.foo) +6 >Emitted(16, 32) Source(15, 28) + SourceIndex(0) name (Foo.Bar.foo) +7 >Emitted(16, 40) Source(15, 36) + SourceIndex(0) name (Foo.Bar.foo) +8 >Emitted(16, 41) Source(15, 37) + SourceIndex(0) name (Foo.Bar.foo) +9 >Emitted(16, 42) Source(15, 38) + SourceIndex(0) name (Foo.Bar.foo) --- >>> } 1 >^^^^^^^^ @@ -311,8 +360,8 @@ sourceFile:sourceMapValidationClasses.ts 1 > > 2 > } -1 >Emitted(16, 9) Source(16, 5) + SourceIndex(0) name (Foo.Bar.foo) -2 >Emitted(16, 10) Source(16, 6) + SourceIndex(0) name (Foo.Bar.foo) +1 >Emitted(17, 9) Source(16, 5) + SourceIndex(0) name (Foo.Bar.foo) +2 >Emitted(17, 10) Source(16, 6) + SourceIndex(0) name (Foo.Bar.foo) --- >>> var greeter = new Greeter("Hello, world!"); 1->^^^^^^^^ @@ -337,16 +386,16 @@ sourceFile:sourceMapValidationClasses.ts 8 > "Hello, world!" 9 > ) 10> ; -1->Emitted(17, 9) Source(18, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(17, 13) Source(18, 9) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(17, 20) Source(18, 16) + SourceIndex(0) name (Foo.Bar) -4 >Emitted(17, 23) Source(18, 19) + SourceIndex(0) name (Foo.Bar) -5 >Emitted(17, 27) Source(18, 23) + SourceIndex(0) name (Foo.Bar) -6 >Emitted(17, 34) Source(18, 30) + SourceIndex(0) name (Foo.Bar) -7 >Emitted(17, 35) Source(18, 31) + SourceIndex(0) name (Foo.Bar) -8 >Emitted(17, 50) Source(18, 46) + SourceIndex(0) name (Foo.Bar) -9 >Emitted(17, 51) Source(18, 47) + SourceIndex(0) name (Foo.Bar) -10>Emitted(17, 52) Source(18, 48) + SourceIndex(0) name (Foo.Bar) +1->Emitted(18, 9) Source(18, 5) + SourceIndex(0) name (Foo.Bar) +2 >Emitted(18, 13) Source(18, 9) + SourceIndex(0) name (Foo.Bar) +3 >Emitted(18, 20) Source(18, 16) + SourceIndex(0) name (Foo.Bar) +4 >Emitted(18, 23) Source(18, 19) + SourceIndex(0) name (Foo.Bar) +5 >Emitted(18, 27) Source(18, 23) + SourceIndex(0) name (Foo.Bar) +6 >Emitted(18, 34) Source(18, 30) + SourceIndex(0) name (Foo.Bar) +7 >Emitted(18, 35) Source(18, 31) + SourceIndex(0) name (Foo.Bar) +8 >Emitted(18, 50) Source(18, 46) + SourceIndex(0) name (Foo.Bar) +9 >Emitted(18, 51) Source(18, 47) + SourceIndex(0) name (Foo.Bar) +10>Emitted(18, 52) Source(18, 48) + SourceIndex(0) name (Foo.Bar) --- >>> var str = greeter.greet(); 1 >^^^^^^^^ @@ -368,15 +417,15 @@ sourceFile:sourceMapValidationClasses.ts 7 > greet 8 > () 9 > ; -1 >Emitted(18, 9) Source(19, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(18, 13) Source(19, 9) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(18, 16) Source(19, 12) + SourceIndex(0) name (Foo.Bar) -4 >Emitted(18, 19) Source(19, 15) + SourceIndex(0) name (Foo.Bar) -5 >Emitted(18, 26) Source(19, 22) + SourceIndex(0) name (Foo.Bar) -6 >Emitted(18, 27) Source(19, 23) + SourceIndex(0) name (Foo.Bar) -7 >Emitted(18, 32) Source(19, 28) + SourceIndex(0) name (Foo.Bar) -8 >Emitted(18, 34) Source(19, 30) + SourceIndex(0) name (Foo.Bar) -9 >Emitted(18, 35) Source(19, 31) + SourceIndex(0) name (Foo.Bar) +1 >Emitted(19, 9) Source(19, 5) + SourceIndex(0) name (Foo.Bar) +2 >Emitted(19, 13) Source(19, 9) + SourceIndex(0) name (Foo.Bar) +3 >Emitted(19, 16) Source(19, 12) + SourceIndex(0) name (Foo.Bar) +4 >Emitted(19, 19) Source(19, 15) + SourceIndex(0) name (Foo.Bar) +5 >Emitted(19, 26) Source(19, 22) + SourceIndex(0) name (Foo.Bar) +6 >Emitted(19, 27) Source(19, 23) + SourceIndex(0) name (Foo.Bar) +7 >Emitted(19, 32) Source(19, 28) + SourceIndex(0) name (Foo.Bar) +8 >Emitted(19, 34) Source(19, 30) + SourceIndex(0) name (Foo.Bar) +9 >Emitted(19, 35) Source(19, 31) + SourceIndex(0) name (Foo.Bar) --- >>> function foo2(greeting) { 1 >^^^^^^^^ @@ -392,11 +441,11 @@ sourceFile:sourceMapValidationClasses.ts 3 > foo2 4 > ( 5 > greeting: string -1 >Emitted(19, 9) Source(21, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(19, 18) Source(21, 14) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(19, 22) Source(21, 18) + SourceIndex(0) name (Foo.Bar) -4 >Emitted(19, 23) Source(21, 19) + SourceIndex(0) name (Foo.Bar) -5 >Emitted(19, 31) Source(21, 35) + SourceIndex(0) name (Foo.Bar) +1 >Emitted(20, 9) Source(21, 5) + SourceIndex(0) name (Foo.Bar) +2 >Emitted(20, 18) Source(21, 14) + SourceIndex(0) name (Foo.Bar) +3 >Emitted(20, 22) Source(21, 18) + SourceIndex(0) name (Foo.Bar) +4 >Emitted(20, 23) Source(21, 19) + SourceIndex(0) name (Foo.Bar) +5 >Emitted(20, 31) Source(21, 35) + SourceIndex(0) name (Foo.Bar) --- >>> var restGreetings = []; 1->^^^^^^^^^^^^ @@ -404,8 +453,8 @@ sourceFile:sourceMapValidationClasses.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1->, 2 > ...restGreetings /* more greeting */: string[] -1->Emitted(20, 13) Source(21, 37) + SourceIndex(0) name (Foo.Bar.foo2) -2 >Emitted(20, 36) Source(21, 83) + SourceIndex(0) name (Foo.Bar.foo2) +1->Emitted(21, 13) Source(21, 37) + SourceIndex(0) name (Foo.Bar.foo2) +2 >Emitted(21, 36) Source(21, 83) + SourceIndex(0) name (Foo.Bar.foo2) --- >>> for (var _i = 1; _i < arguments.length; _i++) { 1->^^^^^^^^^^^^^^^^^ @@ -420,20 +469,20 @@ sourceFile:sourceMapValidationClasses.ts 4 > ...restGreetings /* more greeting */: string[] 5 > 6 > ...restGreetings /* more greeting */: string[] -1->Emitted(21, 18) Source(21, 37) + SourceIndex(0) name (Foo.Bar.foo2) -2 >Emitted(21, 29) Source(21, 83) + SourceIndex(0) name (Foo.Bar.foo2) -3 >Emitted(21, 30) Source(21, 37) + SourceIndex(0) name (Foo.Bar.foo2) -4 >Emitted(21, 52) Source(21, 83) + SourceIndex(0) name (Foo.Bar.foo2) -5 >Emitted(21, 53) Source(21, 37) + SourceIndex(0) name (Foo.Bar.foo2) -6 >Emitted(21, 57) Source(21, 83) + SourceIndex(0) name (Foo.Bar.foo2) +1->Emitted(22, 18) Source(21, 37) + SourceIndex(0) name (Foo.Bar.foo2) +2 >Emitted(22, 29) Source(21, 83) + SourceIndex(0) name (Foo.Bar.foo2) +3 >Emitted(22, 30) Source(21, 37) + SourceIndex(0) name (Foo.Bar.foo2) +4 >Emitted(22, 52) Source(21, 83) + SourceIndex(0) name (Foo.Bar.foo2) +5 >Emitted(22, 53) Source(21, 37) + SourceIndex(0) name (Foo.Bar.foo2) +6 >Emitted(22, 57) Source(21, 83) + SourceIndex(0) name (Foo.Bar.foo2) --- >>> restGreetings[_i - 1] = arguments[_i]; 1 >^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...restGreetings /* more greeting */: string[] -1 >Emitted(22, 17) Source(21, 37) + SourceIndex(0) name (Foo.Bar.foo2) -2 >Emitted(22, 55) Source(21, 83) + SourceIndex(0) name (Foo.Bar.foo2) +1 >Emitted(23, 17) Source(21, 37) + SourceIndex(0) name (Foo.Bar.foo2) +2 >Emitted(23, 55) Source(21, 83) + SourceIndex(0) name (Foo.Bar.foo2) --- >>> } >>> var greeters = []; /* inline block comment */ @@ -454,14 +503,14 @@ sourceFile:sourceMapValidationClasses.ts 6 > ; 7 > /* inline block comment */ 8 > -1 >Emitted(24, 13) Source(22, 9) + SourceIndex(0) name (Foo.Bar.foo2) -2 >Emitted(24, 17) Source(22, 13) + SourceIndex(0) name (Foo.Bar.foo2) -3 >Emitted(24, 25) Source(22, 21) + SourceIndex(0) name (Foo.Bar.foo2) -4 >Emitted(24, 28) Source(22, 35) + SourceIndex(0) name (Foo.Bar.foo2) -5 >Emitted(24, 30) Source(22, 37) + SourceIndex(0) name (Foo.Bar.foo2) -6 >Emitted(24, 32) Source(22, 39) + SourceIndex(0) name (Foo.Bar.foo2) -7 >Emitted(24, 58) Source(22, 65) + SourceIndex(0) name (Foo.Bar.foo2) -8 >Emitted(24, 58) Source(22, 38) + SourceIndex(0) name (Foo.Bar.foo2) +1 >Emitted(25, 13) Source(22, 9) + SourceIndex(0) name (Foo.Bar.foo2) +2 >Emitted(25, 17) Source(22, 13) + SourceIndex(0) name (Foo.Bar.foo2) +3 >Emitted(25, 25) Source(22, 21) + SourceIndex(0) name (Foo.Bar.foo2) +4 >Emitted(25, 28) Source(22, 35) + SourceIndex(0) name (Foo.Bar.foo2) +5 >Emitted(25, 30) Source(22, 37) + SourceIndex(0) name (Foo.Bar.foo2) +6 >Emitted(25, 32) Source(22, 39) + SourceIndex(0) name (Foo.Bar.foo2) +7 >Emitted(25, 58) Source(22, 65) + SourceIndex(0) name (Foo.Bar.foo2) +8 >Emitted(25, 58) Source(22, 38) + SourceIndex(0) name (Foo.Bar.foo2) --- >>> greeters[0] = new Greeter(greeting); 1 >^^^^^^^^^^^^ @@ -490,18 +539,18 @@ sourceFile:sourceMapValidationClasses.ts 10> greeting 11> ) 12> ; -1 >Emitted(25, 13) Source(23, 9) + SourceIndex(0) name (Foo.Bar.foo2) -2 >Emitted(25, 21) Source(23, 17) + SourceIndex(0) name (Foo.Bar.foo2) -3 >Emitted(25, 22) Source(23, 18) + SourceIndex(0) name (Foo.Bar.foo2) -4 >Emitted(25, 23) Source(23, 19) + SourceIndex(0) name (Foo.Bar.foo2) -5 >Emitted(25, 24) Source(23, 20) + SourceIndex(0) name (Foo.Bar.foo2) -6 >Emitted(25, 27) Source(23, 23) + SourceIndex(0) name (Foo.Bar.foo2) -7 >Emitted(25, 31) Source(23, 27) + SourceIndex(0) name (Foo.Bar.foo2) -8 >Emitted(25, 38) Source(23, 34) + SourceIndex(0) name (Foo.Bar.foo2) -9 >Emitted(25, 39) Source(23, 35) + SourceIndex(0) name (Foo.Bar.foo2) -10>Emitted(25, 47) Source(23, 43) + SourceIndex(0) name (Foo.Bar.foo2) -11>Emitted(25, 48) Source(23, 44) + SourceIndex(0) name (Foo.Bar.foo2) -12>Emitted(25, 49) Source(23, 45) + SourceIndex(0) name (Foo.Bar.foo2) +1 >Emitted(26, 13) Source(23, 9) + SourceIndex(0) name (Foo.Bar.foo2) +2 >Emitted(26, 21) Source(23, 17) + SourceIndex(0) name (Foo.Bar.foo2) +3 >Emitted(26, 22) Source(23, 18) + SourceIndex(0) name (Foo.Bar.foo2) +4 >Emitted(26, 23) Source(23, 19) + SourceIndex(0) name (Foo.Bar.foo2) +5 >Emitted(26, 24) Source(23, 20) + SourceIndex(0) name (Foo.Bar.foo2) +6 >Emitted(26, 27) Source(23, 23) + SourceIndex(0) name (Foo.Bar.foo2) +7 >Emitted(26, 31) Source(23, 27) + SourceIndex(0) name (Foo.Bar.foo2) +8 >Emitted(26, 38) Source(23, 34) + SourceIndex(0) name (Foo.Bar.foo2) +9 >Emitted(26, 39) Source(23, 35) + SourceIndex(0) name (Foo.Bar.foo2) +10>Emitted(26, 47) Source(23, 43) + SourceIndex(0) name (Foo.Bar.foo2) +11>Emitted(26, 48) Source(23, 44) + SourceIndex(0) name (Foo.Bar.foo2) +12>Emitted(26, 49) Source(23, 45) + SourceIndex(0) name (Foo.Bar.foo2) --- >>> for (var i = 0; i < restGreetings.length; i++) { 1->^^^^^^^^^^^^ @@ -546,26 +595,26 @@ sourceFile:sourceMapValidationClasses.ts 18> ++ 19> ) 20> { -1->Emitted(26, 13) Source(24, 9) + SourceIndex(0) name (Foo.Bar.foo2) -2 >Emitted(26, 16) Source(24, 12) + SourceIndex(0) name (Foo.Bar.foo2) -3 >Emitted(26, 17) Source(24, 13) + SourceIndex(0) name (Foo.Bar.foo2) -4 >Emitted(26, 18) Source(24, 14) + SourceIndex(0) name (Foo.Bar.foo2) -5 >Emitted(26, 21) Source(24, 17) + SourceIndex(0) name (Foo.Bar.foo2) -6 >Emitted(26, 22) Source(24, 18) + SourceIndex(0) name (Foo.Bar.foo2) -7 >Emitted(26, 23) Source(24, 19) + SourceIndex(0) name (Foo.Bar.foo2) -8 >Emitted(26, 26) Source(24, 22) + SourceIndex(0) name (Foo.Bar.foo2) -9 >Emitted(26, 27) Source(24, 23) + SourceIndex(0) name (Foo.Bar.foo2) -10>Emitted(26, 29) Source(24, 25) + SourceIndex(0) name (Foo.Bar.foo2) -11>Emitted(26, 30) Source(24, 26) + SourceIndex(0) name (Foo.Bar.foo2) -12>Emitted(26, 33) Source(24, 29) + SourceIndex(0) name (Foo.Bar.foo2) -13>Emitted(26, 46) Source(24, 42) + SourceIndex(0) name (Foo.Bar.foo2) -14>Emitted(26, 47) Source(24, 43) + SourceIndex(0) name (Foo.Bar.foo2) -15>Emitted(26, 53) Source(24, 49) + SourceIndex(0) name (Foo.Bar.foo2) -16>Emitted(26, 55) Source(24, 51) + SourceIndex(0) name (Foo.Bar.foo2) -17>Emitted(26, 56) Source(24, 52) + SourceIndex(0) name (Foo.Bar.foo2) -18>Emitted(26, 58) Source(24, 54) + SourceIndex(0) name (Foo.Bar.foo2) -19>Emitted(26, 60) Source(24, 56) + SourceIndex(0) name (Foo.Bar.foo2) -20>Emitted(26, 61) Source(24, 57) + SourceIndex(0) name (Foo.Bar.foo2) +1->Emitted(27, 13) Source(24, 9) + SourceIndex(0) name (Foo.Bar.foo2) +2 >Emitted(27, 16) Source(24, 12) + SourceIndex(0) name (Foo.Bar.foo2) +3 >Emitted(27, 17) Source(24, 13) + SourceIndex(0) name (Foo.Bar.foo2) +4 >Emitted(27, 18) Source(24, 14) + SourceIndex(0) name (Foo.Bar.foo2) +5 >Emitted(27, 21) Source(24, 17) + SourceIndex(0) name (Foo.Bar.foo2) +6 >Emitted(27, 22) Source(24, 18) + SourceIndex(0) name (Foo.Bar.foo2) +7 >Emitted(27, 23) Source(24, 19) + SourceIndex(0) name (Foo.Bar.foo2) +8 >Emitted(27, 26) Source(24, 22) + SourceIndex(0) name (Foo.Bar.foo2) +9 >Emitted(27, 27) Source(24, 23) + SourceIndex(0) name (Foo.Bar.foo2) +10>Emitted(27, 29) Source(24, 25) + SourceIndex(0) name (Foo.Bar.foo2) +11>Emitted(27, 30) Source(24, 26) + SourceIndex(0) name (Foo.Bar.foo2) +12>Emitted(27, 33) Source(24, 29) + SourceIndex(0) name (Foo.Bar.foo2) +13>Emitted(27, 46) Source(24, 42) + SourceIndex(0) name (Foo.Bar.foo2) +14>Emitted(27, 47) Source(24, 43) + SourceIndex(0) name (Foo.Bar.foo2) +15>Emitted(27, 53) Source(24, 49) + SourceIndex(0) name (Foo.Bar.foo2) +16>Emitted(27, 55) Source(24, 51) + SourceIndex(0) name (Foo.Bar.foo2) +17>Emitted(27, 56) Source(24, 52) + SourceIndex(0) name (Foo.Bar.foo2) +18>Emitted(27, 58) Source(24, 54) + SourceIndex(0) name (Foo.Bar.foo2) +19>Emitted(27, 60) Source(24, 56) + SourceIndex(0) name (Foo.Bar.foo2) +20>Emitted(27, 61) Source(24, 57) + SourceIndex(0) name (Foo.Bar.foo2) --- >>> greeters.push(new Greeter(restGreetings[i])); 1->^^^^^^^^^^^^^^^^ @@ -599,21 +648,21 @@ sourceFile:sourceMapValidationClasses.ts 13> ) 14> ) 15> ; -1->Emitted(27, 17) Source(25, 13) + SourceIndex(0) name (Foo.Bar.foo2) -2 >Emitted(27, 25) Source(25, 21) + SourceIndex(0) name (Foo.Bar.foo2) -3 >Emitted(27, 26) Source(25, 22) + SourceIndex(0) name (Foo.Bar.foo2) -4 >Emitted(27, 30) Source(25, 26) + SourceIndex(0) name (Foo.Bar.foo2) -5 >Emitted(27, 31) Source(25, 27) + SourceIndex(0) name (Foo.Bar.foo2) -6 >Emitted(27, 35) Source(25, 31) + SourceIndex(0) name (Foo.Bar.foo2) -7 >Emitted(27, 42) Source(25, 38) + SourceIndex(0) name (Foo.Bar.foo2) -8 >Emitted(27, 43) Source(25, 39) + SourceIndex(0) name (Foo.Bar.foo2) -9 >Emitted(27, 56) Source(25, 52) + SourceIndex(0) name (Foo.Bar.foo2) -10>Emitted(27, 57) Source(25, 53) + SourceIndex(0) name (Foo.Bar.foo2) -11>Emitted(27, 58) Source(25, 54) + SourceIndex(0) name (Foo.Bar.foo2) -12>Emitted(27, 59) Source(25, 55) + SourceIndex(0) name (Foo.Bar.foo2) -13>Emitted(27, 60) Source(25, 56) + SourceIndex(0) name (Foo.Bar.foo2) -14>Emitted(27, 61) Source(25, 57) + SourceIndex(0) name (Foo.Bar.foo2) -15>Emitted(27, 62) Source(25, 58) + SourceIndex(0) name (Foo.Bar.foo2) +1->Emitted(28, 17) Source(25, 13) + SourceIndex(0) name (Foo.Bar.foo2) +2 >Emitted(28, 25) Source(25, 21) + SourceIndex(0) name (Foo.Bar.foo2) +3 >Emitted(28, 26) Source(25, 22) + SourceIndex(0) name (Foo.Bar.foo2) +4 >Emitted(28, 30) Source(25, 26) + SourceIndex(0) name (Foo.Bar.foo2) +5 >Emitted(28, 31) Source(25, 27) + SourceIndex(0) name (Foo.Bar.foo2) +6 >Emitted(28, 35) Source(25, 31) + SourceIndex(0) name (Foo.Bar.foo2) +7 >Emitted(28, 42) Source(25, 38) + SourceIndex(0) name (Foo.Bar.foo2) +8 >Emitted(28, 43) Source(25, 39) + SourceIndex(0) name (Foo.Bar.foo2) +9 >Emitted(28, 56) Source(25, 52) + SourceIndex(0) name (Foo.Bar.foo2) +10>Emitted(28, 57) Source(25, 53) + SourceIndex(0) name (Foo.Bar.foo2) +11>Emitted(28, 58) Source(25, 54) + SourceIndex(0) name (Foo.Bar.foo2) +12>Emitted(28, 59) Source(25, 55) + SourceIndex(0) name (Foo.Bar.foo2) +13>Emitted(28, 60) Source(25, 56) + SourceIndex(0) name (Foo.Bar.foo2) +14>Emitted(28, 61) Source(25, 57) + SourceIndex(0) name (Foo.Bar.foo2) +15>Emitted(28, 62) Source(25, 58) + SourceIndex(0) name (Foo.Bar.foo2) --- >>> } 1 >^^^^^^^^^^^^ @@ -622,8 +671,8 @@ sourceFile:sourceMapValidationClasses.ts 1 > > 2 > } -1 >Emitted(28, 13) Source(26, 9) + SourceIndex(0) name (Foo.Bar.foo2) -2 >Emitted(28, 14) Source(26, 10) + SourceIndex(0) name (Foo.Bar.foo2) +1 >Emitted(29, 13) Source(26, 9) + SourceIndex(0) name (Foo.Bar.foo2) +2 >Emitted(29, 14) Source(26, 10) + SourceIndex(0) name (Foo.Bar.foo2) --- >>> return greeters; 1->^^^^^^^^^^^^ @@ -638,11 +687,11 @@ sourceFile:sourceMapValidationClasses.ts 3 > 4 > greeters 5 > ; -1->Emitted(29, 13) Source(28, 9) + SourceIndex(0) name (Foo.Bar.foo2) -2 >Emitted(29, 19) Source(28, 15) + SourceIndex(0) name (Foo.Bar.foo2) -3 >Emitted(29, 20) Source(28, 16) + SourceIndex(0) name (Foo.Bar.foo2) -4 >Emitted(29, 28) Source(28, 24) + SourceIndex(0) name (Foo.Bar.foo2) -5 >Emitted(29, 29) Source(28, 25) + SourceIndex(0) name (Foo.Bar.foo2) +1->Emitted(30, 13) Source(28, 9) + SourceIndex(0) name (Foo.Bar.foo2) +2 >Emitted(30, 19) Source(28, 15) + SourceIndex(0) name (Foo.Bar.foo2) +3 >Emitted(30, 20) Source(28, 16) + SourceIndex(0) name (Foo.Bar.foo2) +4 >Emitted(30, 28) Source(28, 24) + SourceIndex(0) name (Foo.Bar.foo2) +5 >Emitted(30, 29) Source(28, 25) + SourceIndex(0) name (Foo.Bar.foo2) --- >>> } 1 >^^^^^^^^ @@ -651,8 +700,8 @@ sourceFile:sourceMapValidationClasses.ts 1 > > 2 > } -1 >Emitted(30, 9) Source(29, 5) + SourceIndex(0) name (Foo.Bar.foo2) -2 >Emitted(30, 10) Source(29, 6) + SourceIndex(0) name (Foo.Bar.foo2) +1 >Emitted(31, 9) Source(29, 5) + SourceIndex(0) name (Foo.Bar.foo2) +2 >Emitted(31, 10) Source(29, 6) + SourceIndex(0) name (Foo.Bar.foo2) --- >>> var b = foo2("Hello", "World", "!"); 1->^^^^^^^^ @@ -684,19 +733,19 @@ sourceFile:sourceMapValidationClasses.ts 11> "!" 12> ) 13> ; -1->Emitted(31, 9) Source(31, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(31, 13) Source(31, 9) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(31, 14) Source(31, 10) + SourceIndex(0) name (Foo.Bar) -4 >Emitted(31, 17) Source(31, 13) + SourceIndex(0) name (Foo.Bar) -5 >Emitted(31, 21) Source(31, 17) + SourceIndex(0) name (Foo.Bar) -6 >Emitted(31, 22) Source(31, 18) + SourceIndex(0) name (Foo.Bar) -7 >Emitted(31, 29) Source(31, 25) + SourceIndex(0) name (Foo.Bar) -8 >Emitted(31, 31) Source(31, 27) + SourceIndex(0) name (Foo.Bar) -9 >Emitted(31, 38) Source(31, 34) + SourceIndex(0) name (Foo.Bar) -10>Emitted(31, 40) Source(31, 36) + SourceIndex(0) name (Foo.Bar) -11>Emitted(31, 43) Source(31, 39) + SourceIndex(0) name (Foo.Bar) -12>Emitted(31, 44) Source(31, 40) + SourceIndex(0) name (Foo.Bar) -13>Emitted(31, 45) Source(31, 41) + SourceIndex(0) name (Foo.Bar) +1->Emitted(32, 9) Source(31, 5) + SourceIndex(0) name (Foo.Bar) +2 >Emitted(32, 13) Source(31, 9) + SourceIndex(0) name (Foo.Bar) +3 >Emitted(32, 14) Source(31, 10) + SourceIndex(0) name (Foo.Bar) +4 >Emitted(32, 17) Source(31, 13) + SourceIndex(0) name (Foo.Bar) +5 >Emitted(32, 21) Source(31, 17) + SourceIndex(0) name (Foo.Bar) +6 >Emitted(32, 22) Source(31, 18) + SourceIndex(0) name (Foo.Bar) +7 >Emitted(32, 29) Source(31, 25) + SourceIndex(0) name (Foo.Bar) +8 >Emitted(32, 31) Source(31, 27) + SourceIndex(0) name (Foo.Bar) +9 >Emitted(32, 38) Source(31, 34) + SourceIndex(0) name (Foo.Bar) +10>Emitted(32, 40) Source(31, 36) + SourceIndex(0) name (Foo.Bar) +11>Emitted(32, 43) Source(31, 39) + SourceIndex(0) name (Foo.Bar) +12>Emitted(32, 44) Source(31, 40) + SourceIndex(0) name (Foo.Bar) +13>Emitted(32, 45) Source(31, 41) + SourceIndex(0) name (Foo.Bar) --- >>> for (var j = 0; j < b.length; j++) { 1->^^^^^^^^ @@ -741,26 +790,26 @@ sourceFile:sourceMapValidationClasses.ts 18> ++ 19> ) 20> { -1->Emitted(32, 9) Source(33, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(32, 12) Source(33, 8) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(32, 13) Source(33, 9) + SourceIndex(0) name (Foo.Bar) -4 >Emitted(32, 14) Source(33, 10) + SourceIndex(0) name (Foo.Bar) -5 >Emitted(32, 17) Source(33, 13) + SourceIndex(0) name (Foo.Bar) -6 >Emitted(32, 18) Source(33, 14) + SourceIndex(0) name (Foo.Bar) -7 >Emitted(32, 19) Source(33, 15) + SourceIndex(0) name (Foo.Bar) -8 >Emitted(32, 22) Source(33, 18) + SourceIndex(0) name (Foo.Bar) -9 >Emitted(32, 23) Source(33, 19) + SourceIndex(0) name (Foo.Bar) -10>Emitted(32, 25) Source(33, 21) + SourceIndex(0) name (Foo.Bar) -11>Emitted(32, 26) Source(33, 22) + SourceIndex(0) name (Foo.Bar) -12>Emitted(32, 29) Source(33, 25) + SourceIndex(0) name (Foo.Bar) -13>Emitted(32, 30) Source(33, 26) + SourceIndex(0) name (Foo.Bar) -14>Emitted(32, 31) Source(33, 27) + SourceIndex(0) name (Foo.Bar) -15>Emitted(32, 37) Source(33, 33) + SourceIndex(0) name (Foo.Bar) -16>Emitted(32, 39) Source(33, 35) + SourceIndex(0) name (Foo.Bar) -17>Emitted(32, 40) Source(33, 36) + SourceIndex(0) name (Foo.Bar) -18>Emitted(32, 42) Source(33, 38) + SourceIndex(0) name (Foo.Bar) -19>Emitted(32, 44) Source(33, 40) + SourceIndex(0) name (Foo.Bar) -20>Emitted(32, 45) Source(33, 41) + SourceIndex(0) name (Foo.Bar) +1->Emitted(33, 9) Source(33, 5) + SourceIndex(0) name (Foo.Bar) +2 >Emitted(33, 12) Source(33, 8) + SourceIndex(0) name (Foo.Bar) +3 >Emitted(33, 13) Source(33, 9) + SourceIndex(0) name (Foo.Bar) +4 >Emitted(33, 14) Source(33, 10) + SourceIndex(0) name (Foo.Bar) +5 >Emitted(33, 17) Source(33, 13) + SourceIndex(0) name (Foo.Bar) +6 >Emitted(33, 18) Source(33, 14) + SourceIndex(0) name (Foo.Bar) +7 >Emitted(33, 19) Source(33, 15) + SourceIndex(0) name (Foo.Bar) +8 >Emitted(33, 22) Source(33, 18) + SourceIndex(0) name (Foo.Bar) +9 >Emitted(33, 23) Source(33, 19) + SourceIndex(0) name (Foo.Bar) +10>Emitted(33, 25) Source(33, 21) + SourceIndex(0) name (Foo.Bar) +11>Emitted(33, 26) Source(33, 22) + SourceIndex(0) name (Foo.Bar) +12>Emitted(33, 29) Source(33, 25) + SourceIndex(0) name (Foo.Bar) +13>Emitted(33, 30) Source(33, 26) + SourceIndex(0) name (Foo.Bar) +14>Emitted(33, 31) Source(33, 27) + SourceIndex(0) name (Foo.Bar) +15>Emitted(33, 37) Source(33, 33) + SourceIndex(0) name (Foo.Bar) +16>Emitted(33, 39) Source(33, 35) + SourceIndex(0) name (Foo.Bar) +17>Emitted(33, 40) Source(33, 36) + SourceIndex(0) name (Foo.Bar) +18>Emitted(33, 42) Source(33, 38) + SourceIndex(0) name (Foo.Bar) +19>Emitted(33, 44) Source(33, 40) + SourceIndex(0) name (Foo.Bar) +20>Emitted(33, 45) Source(33, 41) + SourceIndex(0) name (Foo.Bar) --- >>> b[j].greet(); 1 >^^^^^^^^^^^^ @@ -782,143 +831,93 @@ sourceFile:sourceMapValidationClasses.ts 7 > greet 8 > () 9 > ; -1 >Emitted(33, 13) Source(34, 9) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(33, 14) Source(34, 10) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(33, 15) Source(34, 11) + SourceIndex(0) name (Foo.Bar) -4 >Emitted(33, 16) Source(34, 12) + SourceIndex(0) name (Foo.Bar) -5 >Emitted(33, 17) Source(34, 13) + SourceIndex(0) name (Foo.Bar) -6 >Emitted(33, 18) Source(34, 14) + SourceIndex(0) name (Foo.Bar) -7 >Emitted(33, 23) Source(34, 19) + SourceIndex(0) name (Foo.Bar) -8 >Emitted(33, 25) Source(34, 21) + SourceIndex(0) name (Foo.Bar) -9 >Emitted(33, 26) Source(34, 22) + SourceIndex(0) name (Foo.Bar) +1 >Emitted(34, 13) Source(34, 9) + SourceIndex(0) name (Foo.Bar) +2 >Emitted(34, 14) Source(34, 10) + SourceIndex(0) name (Foo.Bar) +3 >Emitted(34, 15) Source(34, 11) + SourceIndex(0) name (Foo.Bar) +4 >Emitted(34, 16) Source(34, 12) + SourceIndex(0) name (Foo.Bar) +5 >Emitted(34, 17) Source(34, 13) + SourceIndex(0) name (Foo.Bar) +6 >Emitted(34, 18) Source(34, 14) + SourceIndex(0) name (Foo.Bar) +7 >Emitted(34, 23) Source(34, 19) + SourceIndex(0) name (Foo.Bar) +8 >Emitted(34, 25) Source(34, 21) + SourceIndex(0) name (Foo.Bar) +9 >Emitted(34, 26) Source(34, 22) + SourceIndex(0) name (Foo.Bar) --- >>> } 1 >^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > 2 > } -1 >Emitted(34, 9) Source(35, 5) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(34, 10) Source(35, 6) + SourceIndex(0) name (Foo.Bar) +1 >Emitted(35, 9) Source(35, 5) + SourceIndex(0) name (Foo.Bar) +2 >Emitted(35, 10) Source(35, 6) + SourceIndex(0) name (Foo.Bar) --- ->>> })(Foo.Bar || (Foo.Bar = {})); +>>> })(Bar = Foo.Bar || (Foo.Bar = {})); 1->^^^^ 2 > ^ 3 > ^^ -4 > ^^^^^^^ -5 > ^^^^^ -6 > ^^^^^^^ -7 > ^^^^^^^^ +4 > ^^^ +5 > ^^^ +6 > ^^^^^^^ +7 > ^^^^^ +8 > ^^^^^^^ +9 > ^^^^^^^^ 1-> > 2 > } 3 > 4 > Bar -5 > -6 > Bar -7 > { - > "use strict"; - > - > class Greeter { - > constructor(public greeting: string) { - > } - > - > greet() { - > return "

" + this.greeting + "

"; - > } - > } - > - > - > function foo(greeting: string): Greeter { - > return new Greeter(greeting); - > } - > - > var greeter = new Greeter("Hello, world!"); - > var str = greeter.greet(); - > - > function foo2(greeting: string, ...restGreetings /* more greeting */: string[]) { - > var greeters: Greeter[] = []; /* inline block comment */ - > greeters[0] = new Greeter(greeting); - > for (var i = 0; i < restGreetings.length; i++) { - > greeters.push(new Greeter(restGreetings[i])); - > } - > - > return greeters; - > } - > - > var b = foo2("Hello", "World", "!"); - > // This is simple signle line comment - > for (var j = 0; j < b.length; j++) { - > b[j].greet(); - > } - > } -1->Emitted(35, 5) Source(36, 1) + SourceIndex(0) name (Foo.Bar) -2 >Emitted(35, 6) Source(36, 2) + SourceIndex(0) name (Foo.Bar) -3 >Emitted(35, 8) Source(1, 12) + SourceIndex(0) name (Foo) -4 >Emitted(35, 15) Source(1, 15) + SourceIndex(0) name (Foo) -5 >Emitted(35, 20) Source(1, 12) + SourceIndex(0) name (Foo) -6 >Emitted(35, 27) Source(1, 15) + SourceIndex(0) name (Foo) -7 >Emitted(35, 35) Source(36, 2) + SourceIndex(0) name (Foo) ---- ->>> var Bar = Foo.Bar; -1 >^^^^ -2 > ^^^^ -3 > ^^^ -4 > ^^^ -5 > ^^^^^^^ -6 > ^ -7 > ^-> -1 > -2 > -3 > Bar -4 > -5 > Bar { - > "use strict"; - > - > class Greeter { - > constructor(public greeting: string) { - > } - > - > greet() { - > return "

" + this.greeting + "

"; - > } - > } - > - > - > function foo(greeting: string): Greeter { - > return new Greeter(greeting); - > } - > - > var greeter = new Greeter("Hello, world!"); - > var str = greeter.greet(); - > - > function foo2(greeting: string, ...restGreetings /* more greeting */: string[]) { - > var greeters: Greeter[] = []; /* inline block comment */ - > greeters[0] = new Greeter(greeting); - > for (var i = 0; i < restGreetings.length; i++) { - > greeters.push(new Greeter(restGreetings[i])); - > } - > - > return greeters; - > } - > - > var b = foo2("Hello", "World", "!"); - > // This is simple signle line comment - > for (var j = 0; j < b.length; j++) { - > b[j].greet(); - > } - > } -6 > -1 >Emitted(36, 5) Source(1, 12) + SourceIndex(0) name (Foo) -2 >Emitted(36, 9) Source(1, 12) + SourceIndex(0) name (Foo) -3 >Emitted(36, 12) Source(1, 15) + SourceIndex(0) name (Foo) -4 >Emitted(36, 15) Source(1, 12) + SourceIndex(0) name (Foo) -5 >Emitted(36, 22) Source(36, 2) + SourceIndex(0) name (Foo) -6 >Emitted(36, 23) Source(36, 2) + SourceIndex(0) name (Foo) +5 > +6 > Bar +7 > +8 > Bar +9 > { + > "use strict"; + > + > class Greeter { + > constructor(public greeting: string) { + > } + > + > greet() { + > return "

" + this.greeting + "

"; + > } + > } + > + > + > function foo(greeting: string): Greeter { + > return new Greeter(greeting); + > } + > + > var greeter = new Greeter("Hello, world!"); + > var str = greeter.greet(); + > + > function foo2(greeting: string, ...restGreetings /* more greeting */: string[]) { + > var greeters: Greeter[] = []; /* inline block comment */ + > greeters[0] = new Greeter(greeting); + > for (var i = 0; i < restGreetings.length; i++) { + > greeters.push(new Greeter(restGreetings[i])); + > } + > + > return greeters; + > } + > + > var b = foo2("Hello", "World", "!"); + > // This is simple signle line comment + > for (var j = 0; j < b.length; j++) { + > b[j].greet(); + > } + > } +1->Emitted(36, 5) Source(36, 1) + SourceIndex(0) name (Foo.Bar) +2 >Emitted(36, 6) Source(36, 2) + SourceIndex(0) name (Foo.Bar) +3 >Emitted(36, 8) Source(1, 12) + SourceIndex(0) name (Foo) +4 >Emitted(36, 11) Source(1, 15) + SourceIndex(0) name (Foo) +5 >Emitted(36, 14) Source(1, 12) + SourceIndex(0) name (Foo) +6 >Emitted(36, 21) Source(1, 15) + SourceIndex(0) name (Foo) +7 >Emitted(36, 26) Source(1, 12) + SourceIndex(0) name (Foo) +8 >Emitted(36, 33) Source(1, 15) + SourceIndex(0) name (Foo) +9 >Emitted(36, 41) Source(36, 2) + SourceIndex(0) name (Foo) --- >>>})(Foo || (Foo = {})); -1-> +1 > 2 >^ 3 > ^^ 4 > ^^^ @@ -926,7 +925,7 @@ sourceFile:sourceMapValidationClasses.ts 6 > ^^^ 7 > ^^^^^^^^ 8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1-> +1 > 2 >} 3 > 4 > Foo @@ -968,7 +967,7 @@ sourceFile:sourceMapValidationClasses.ts > b[j].greet(); > } > } -1->Emitted(37, 1) Source(36, 1) + SourceIndex(0) name (Foo) +1 >Emitted(37, 1) Source(36, 1) + SourceIndex(0) name (Foo) 2 >Emitted(37, 2) Source(36, 2) + SourceIndex(0) name (Foo) 3 >Emitted(37, 4) Source(1, 8) + SourceIndex(0) 4 >Emitted(37, 7) Source(1, 11) + SourceIndex(0) diff --git a/tests/baselines/reference/sourceMapValidationImport.js b/tests/baselines/reference/sourceMapValidationImport.js index 171dd96271f..140846abbcb 100644 --- a/tests/baselines/reference/sourceMapValidationImport.js +++ b/tests/baselines/reference/sourceMapValidationImport.js @@ -9,6 +9,7 @@ var x = new a(); var y = new b(); //// [sourceMapValidationImport.js] +var m; (function (m) { var c = (function () { function c() { @@ -16,8 +17,7 @@ var y = new b(); return c; })(); m.c = c; -})(exports.m || (exports.m = {})); -var m = exports.m; +})(m = exports.m || (exports.m = {})); var a = m.c; exports.b = m.c; var x = new a(); diff --git a/tests/baselines/reference/sourceMapValidationImport.js.map b/tests/baselines/reference/sourceMapValidationImport.js.map index 9577b41df61..59cfbf86a91 100644 --- a/tests/baselines/reference/sourceMapValidationImport.js.map +++ b/tests/baselines/reference/sourceMapValidationImport.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationImport.js.map] -{"version":3,"file":"sourceMapValidationImport.js","sourceRoot":"","sources":["sourceMapValidationImport.ts"],"names":["m","m.c","m.c.constructor"],"mappings":"AAAA,WAAc,CAAC,EAAC,CAAC;IACbA,IAAaA,CAACA;QAAdC,SAAaA,CAACA;QACdC,CAACA;QAADD,QAACA;IAADA,CAACA,AADDD,IACCA;IADYA,GAACA,GAADA,CACZA,CAAAA;AACLA,CAACA,EAHa,SAAC,KAAD,SAAC,QAGd;AAHD,IAAc,CAAC,GAAD,SAGb,CAAA;AACD,IAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACD,SAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACtB,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,IAAI,CAAC,GAAG,IAAI,SAAC,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationImport.js","sourceRoot":"","sources":["sourceMapValidationImport.ts"],"names":["m","m.c","m.c.constructor"],"mappings":"AAAA,IAAc,CAAC,CAGd;AAHD,WAAc,CAAC,EAAC,CAAC;IACbA,IAAaA,CAACA;QAAdC,SAAaA,CAACA;QACdC,CAACA;QAADD,QAACA;IAADA,CAACA,AADDD,IACCA;IADYA,GAACA,GAADA,CACZA,CAAAA;AACLA,CAACA,EAHa,CAAC,GAAD,SAAC,KAAD,SAAC,QAGd;AACD,IAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACD,SAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACtB,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,IAAI,CAAC,GAAG,IAAI,SAAC,EAAE,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationImport.sourcemap.txt b/tests/baselines/reference/sourceMapValidationImport.sourcemap.txt index be663d50750..38ed0c972f5 100644 --- a/tests/baselines/reference/sourceMapValidationImport.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationImport.sourcemap.txt @@ -8,23 +8,41 @@ sources: sourceMapValidationImport.ts emittedFile:tests/cases/compiler/sourceMapValidationImport.js sourceFile:sourceMapValidationImport.ts ------------------------------------------------------------------- ->>>(function (m) { +>>>var m; 1 > +2 >^^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^-> +1 > +2 >export module +3 > m +4 > { + > export class c { + > } + > } +1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(1, 15) + SourceIndex(0) +3 >Emitted(1, 6) Source(1, 16) + SourceIndex(0) +4 >Emitted(1, 7) Source(4, 2) + SourceIndex(0) +--- +>>>(function (m) { +1-> 2 >^^^^^^^^^^^ 3 > ^ 4 > ^^ 5 > ^ 6 > ^^^^^^^^^^^^-> -1 > +1-> 2 >export module 3 > m 4 > 5 > { -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 12) Source(1, 15) + SourceIndex(0) -3 >Emitted(1, 13) Source(1, 16) + SourceIndex(0) -4 >Emitted(1, 15) Source(1, 17) + SourceIndex(0) -5 >Emitted(1, 16) Source(1, 18) + SourceIndex(0) +1->Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 12) Source(1, 15) + SourceIndex(0) +3 >Emitted(2, 13) Source(1, 16) + SourceIndex(0) +4 >Emitted(2, 15) Source(1, 17) + SourceIndex(0) +5 >Emitted(2, 16) Source(1, 18) + SourceIndex(0) --- >>> var c = (function () { 1->^^^^ @@ -35,9 +53,9 @@ sourceFile:sourceMapValidationImport.ts > 2 > export class 3 > c -1->Emitted(2, 5) Source(2, 5) + SourceIndex(0) name (m) -2 >Emitted(2, 9) Source(2, 18) + SourceIndex(0) name (m) -3 >Emitted(2, 10) Source(2, 19) + SourceIndex(0) name (m) +1->Emitted(3, 5) Source(2, 5) + SourceIndex(0) name (m) +2 >Emitted(3, 9) Source(2, 18) + SourceIndex(0) name (m) +3 >Emitted(3, 10) Source(2, 19) + SourceIndex(0) name (m) --- >>> function c() { 1->^^^^^^^^ @@ -46,9 +64,9 @@ sourceFile:sourceMapValidationImport.ts 1-> 2 > export class 3 > c -1->Emitted(3, 9) Source(2, 5) + SourceIndex(0) name (m.c) -2 >Emitted(3, 18) Source(2, 18) + SourceIndex(0) name (m.c) -3 >Emitted(3, 19) Source(2, 19) + SourceIndex(0) name (m.c) +1->Emitted(4, 9) Source(2, 5) + SourceIndex(0) name (m.c) +2 >Emitted(4, 18) Source(2, 18) + SourceIndex(0) name (m.c) +3 >Emitted(4, 19) Source(2, 19) + SourceIndex(0) name (m.c) --- >>> } 1 >^^^^^^^^ @@ -57,16 +75,16 @@ sourceFile:sourceMapValidationImport.ts 1 > { > 2 > } -1 >Emitted(4, 9) Source(3, 5) + SourceIndex(0) name (m.c.constructor) -2 >Emitted(4, 10) Source(3, 6) + SourceIndex(0) name (m.c.constructor) +1 >Emitted(5, 9) Source(3, 5) + SourceIndex(0) name (m.c.constructor) +2 >Emitted(5, 10) Source(3, 6) + SourceIndex(0) name (m.c.constructor) --- >>> return c; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(5, 9) Source(3, 5) + SourceIndex(0) name (m.c) -2 >Emitted(5, 17) Source(3, 6) + SourceIndex(0) name (m.c) +1->Emitted(6, 9) Source(3, 5) + SourceIndex(0) name (m.c) +2 >Emitted(6, 17) Source(3, 6) + SourceIndex(0) name (m.c) --- >>> })(); 1 >^^^^ @@ -79,10 +97,10 @@ sourceFile:sourceMapValidationImport.ts 3 > 4 > export class c { > } -1 >Emitted(6, 5) Source(3, 5) + SourceIndex(0) name (m.c) -2 >Emitted(6, 6) Source(3, 6) + SourceIndex(0) name (m.c) -3 >Emitted(6, 6) Source(2, 5) + SourceIndex(0) name (m) -4 >Emitted(6, 10) Source(3, 6) + SourceIndex(0) name (m) +1 >Emitted(7, 5) Source(3, 5) + SourceIndex(0) name (m.c) +2 >Emitted(7, 6) Source(3, 6) + SourceIndex(0) name (m.c) +3 >Emitted(7, 6) Source(2, 5) + SourceIndex(0) name (m) +4 >Emitted(7, 10) Source(3, 6) + SourceIndex(0) name (m) --- >>> m.c = c; 1->^^^^ @@ -90,68 +108,51 @@ sourceFile:sourceMapValidationImport.ts 3 > ^^^ 4 > ^ 5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^-> +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 > c 3 > 4 > c { > } 5 > -1->Emitted(7, 5) Source(2, 18) + SourceIndex(0) name (m) -2 >Emitted(7, 8) Source(2, 19) + SourceIndex(0) name (m) -3 >Emitted(7, 11) Source(2, 18) + SourceIndex(0) name (m) -4 >Emitted(7, 12) Source(3, 6) + SourceIndex(0) name (m) -5 >Emitted(7, 13) Source(3, 6) + SourceIndex(0) name (m) +1->Emitted(8, 5) Source(2, 18) + SourceIndex(0) name (m) +2 >Emitted(8, 8) Source(2, 19) + SourceIndex(0) name (m) +3 >Emitted(8, 11) Source(2, 18) + SourceIndex(0) name (m) +4 >Emitted(8, 12) Source(3, 6) + SourceIndex(0) name (m) +5 >Emitted(8, 13) Source(3, 6) + SourceIndex(0) name (m) --- ->>>})(exports.m || (exports.m = {})); +>>>})(m = exports.m || (exports.m = {})); 1-> 2 >^ 3 > ^^ -4 > ^^^^^^^^^ -5 > ^^^^^ -6 > ^^^^^^^^^ -7 > ^^^^^^^^ +4 > ^ +5 > ^^^ +6 > ^^^^^^^^^ +7 > ^^^^^ +8 > ^^^^^^^^^ +9 > ^^^^^^^^ 1-> > 2 >} 3 > 4 > m -5 > -6 > m -7 > { - > export class c { - > } - > } -1->Emitted(8, 1) Source(4, 1) + SourceIndex(0) name (m) -2 >Emitted(8, 2) Source(4, 2) + SourceIndex(0) name (m) -3 >Emitted(8, 4) Source(1, 15) + SourceIndex(0) -4 >Emitted(8, 13) Source(1, 16) + SourceIndex(0) -5 >Emitted(8, 18) Source(1, 15) + SourceIndex(0) -6 >Emitted(8, 27) Source(1, 16) + SourceIndex(0) -7 >Emitted(8, 35) Source(4, 2) + SourceIndex(0) ---- ->>>var m = exports.m; -1 > -2 >^^^^ -3 > ^ -4 > ^^^ -5 > ^^^^^^^^^ -6 > ^ -1 > -2 >export module -3 > m -4 > -5 > m { - > export class c { - > } - > } -6 > -1 >Emitted(9, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(9, 5) Source(1, 15) + SourceIndex(0) -3 >Emitted(9, 6) Source(1, 16) + SourceIndex(0) -4 >Emitted(9, 9) Source(1, 15) + SourceIndex(0) -5 >Emitted(9, 18) Source(4, 2) + SourceIndex(0) -6 >Emitted(9, 19) Source(4, 2) + SourceIndex(0) +5 > +6 > m +7 > +8 > m +9 > { + > export class c { + > } + > } +1->Emitted(9, 1) Source(4, 1) + SourceIndex(0) name (m) +2 >Emitted(9, 2) Source(4, 2) + SourceIndex(0) name (m) +3 >Emitted(9, 4) Source(1, 15) + SourceIndex(0) +4 >Emitted(9, 5) Source(1, 16) + SourceIndex(0) +5 >Emitted(9, 8) Source(1, 15) + SourceIndex(0) +6 >Emitted(9, 17) Source(1, 16) + SourceIndex(0) +7 >Emitted(9, 22) Source(1, 15) + SourceIndex(0) +8 >Emitted(9, 31) Source(1, 16) + SourceIndex(0) +9 >Emitted(9, 39) Source(4, 2) + SourceIndex(0) --- >>>var a = m.c; 1 > diff --git a/tests/baselines/reference/specializedSignatureWithOptional.js b/tests/baselines/reference/specializedSignatureWithOptional.js new file mode 100644 index 00000000000..aea08090b55 --- /dev/null +++ b/tests/baselines/reference/specializedSignatureWithOptional.js @@ -0,0 +1,5 @@ +//// [specializedSignatureWithOptional.ts] +declare function f(x?: "hi"): void; +declare function f(x?: string): void; + +//// [specializedSignatureWithOptional.js] diff --git a/tests/baselines/reference/specializedSignatureWithOptional.types b/tests/baselines/reference/specializedSignatureWithOptional.types new file mode 100644 index 00000000000..73cd89edb30 --- /dev/null +++ b/tests/baselines/reference/specializedSignatureWithOptional.types @@ -0,0 +1,9 @@ +=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureWithOptional.ts === +declare function f(x?: "hi"): void; +>f : { (x?: "hi"): void; (x?: string): void; } +>x : "hi" + +declare function f(x?: string): void; +>f : { (x?: "hi"): void; (x?: string): void; } +>x : string + diff --git a/tests/baselines/reference/typeArgInference2.types b/tests/baselines/reference/typeArgInference2.types index b6568afee24..1b94a0638bd 100644 --- a/tests/baselines/reference/typeArgInference2.types +++ b/tests/baselines/reference/typeArgInference2.types @@ -31,7 +31,7 @@ var z3 = foo({ name: null }); // { name: any } >foo({ name: null }) : { name: any; } >foo : (x?: T, y?: T) => T >{ name: null } : { name: null; } ->name : any +>name : null var z4 = foo({ name: "abc" }); // { name: string } >z4 : { name: string; } diff --git a/tests/baselines/reference/typeArgInferenceWithNull.types b/tests/baselines/reference/typeArgInferenceWithNull.types index 9fd3ea33e24..f480e7c169c 100644 --- a/tests/baselines/reference/typeArgInferenceWithNull.types +++ b/tests/baselines/reference/typeArgInferenceWithNull.types @@ -22,7 +22,7 @@ fn5({ x: null }); >fn5({ x: null }) : void >fn5 : (n: T) => void >{ x: null } : { x: null; } ->x : any +>x : null function fn6(n: T, fun: (x: T) => void, n2: T) { } >fn6 : (n: T, fun: (x: T) => void, n2: T) => void @@ -40,7 +40,7 @@ fn6({ x: null }, y => { }, { x: "" }); // y has type { x: any }, but ideally wou >fn6({ x: null }, y => { }, { x: "" }) : void >fn6 : (n: T, fun: (x: T) => void, n2: T) => void >{ x: null } : { x: null; } ->x : any +>x : null >y => { } : (y: { x: string; }) => void >y : { x: string; } >{ x: "" } : { x: string; } diff --git a/tests/baselines/reference/typeAssertions.errors.txt b/tests/baselines/reference/typeAssertions.errors.txt index 47f3a3c930c..abdbac6b4ac 100644 --- a/tests/baselines/reference/typeAssertions.errors.txt +++ b/tests/baselines/reference/typeAssertions.errors.txt @@ -33,20 +33,22 @@ someBase = someBase; someBase = someOther; // Error ~~~~~~~~~~~~~~~~~~~ -!!! Neither type 'SomeBase' nor type 'SomeOther' is assignable to the other. +!!! Neither type 'SomeOther' nor type 'SomeBase' is assignable to the other: +!!! Property 'p' is missing in type 'SomeOther'. someDerived = someDerived; someDerived = someBase; someDerived = someOther; // Error ~~~~~~~~~~~~~~~~~~~~~~ -!!! Neither type 'SomeDerived' nor type 'SomeOther' is assignable to the other. +!!! Neither type 'SomeOther' nor type 'SomeDerived' is assignable to the other: +!!! Property 'x' is missing in type 'SomeOther'. someOther = someDerived; // Error ~~~~~~~~~~~~~~~~~~~~~~ -!!! Neither type 'SomeOther' nor type 'SomeDerived' is assignable to the other. +!!! Neither type 'SomeDerived' nor type 'SomeOther' is assignable to the other. someOther = someBase; // Error ~~~~~~~~~~~~~~~~~~~ -!!! Neither type 'SomeOther' nor type 'SomeBase' is assignable to the other. +!!! Neither type 'SomeBase' nor type 'SomeOther' is assignable to the other. someOther = someOther; diff --git a/tests/baselines/reference/typeResolution.js b/tests/baselines/reference/typeResolution.js index 0028bb61b4d..74102f5a0fd 100644 --- a/tests/baselines/reference/typeResolution.js +++ b/tests/baselines/reference/typeResolution.js @@ -112,8 +112,11 @@ module TopLevelModule2 { //// [typeResolution.js] define(["require", "exports"], function (require, exports) { + var TopLevelModule1; (function (TopLevelModule1) { + var SubModule1; (function (SubModule1) { + var SubSubModule1; (function (SubSubModule1) { var ClassA = (function () { function ClassA() { @@ -194,8 +197,7 @@ define(["require", "exports"], function (require, exports) { } return NonExportedClassQ; })(); - })(SubModule1.SubSubModule1 || (SubModule1.SubSubModule1 = {})); - var SubSubModule1 = SubModule1.SubSubModule1; + })(SubSubModule1 = SubModule1.SubSubModule1 || (SubModule1.SubSubModule1 = {})); // Should have no effect on S1.SS1.ClassA above because it is not exported var ClassA = (function () { function ClassA() { @@ -213,9 +215,10 @@ define(["require", "exports"], function (require, exports) { } return ClassA; })(); - })(TopLevelModule1.SubModule1 || (TopLevelModule1.SubModule1 = {})); - var SubModule1 = TopLevelModule1.SubModule1; + })(SubModule1 = TopLevelModule1.SubModule1 || (TopLevelModule1.SubModule1 = {})); + var SubModule2; (function (SubModule2) { + var SubSubModule2; (function (SubSubModule2) { // No code here since these are the mirror of the above calls var ClassA = (function () { @@ -242,10 +245,8 @@ define(["require", "exports"], function (require, exports) { return ClassC; })(); SubSubModule2.ClassC = ClassC; - })(SubModule2.SubSubModule2 || (SubModule2.SubSubModule2 = {})); - var SubSubModule2 = SubModule2.SubSubModule2; - })(TopLevelModule1.SubModule2 || (TopLevelModule1.SubModule2 = {})); - var SubModule2 = TopLevelModule1.SubModule2; + })(SubSubModule2 = SubModule2.SubSubModule2 || (SubModule2.SubSubModule2 = {})); + })(SubModule2 = TopLevelModule1.SubModule2 || (TopLevelModule1.SubModule2 = {})); var ClassA = (function () { function ClassA() { } @@ -262,10 +263,10 @@ define(["require", "exports"], function (require, exports) { })(); NotExportedModule.ClassA = ClassA; })(NotExportedModule || (NotExportedModule = {})); - })(exports.TopLevelModule1 || (exports.TopLevelModule1 = {})); - var TopLevelModule1 = exports.TopLevelModule1; + })(TopLevelModule1 = exports.TopLevelModule1 || (exports.TopLevelModule1 = {})); var TopLevelModule2; (function (TopLevelModule2) { + var SubModule3; (function (SubModule3) { var ClassA = (function () { function ClassA() { @@ -275,8 +276,7 @@ define(["require", "exports"], function (require, exports) { return ClassA; })(); SubModule3.ClassA = ClassA; - })(TopLevelModule2.SubModule3 || (TopLevelModule2.SubModule3 = {})); - var SubModule3 = TopLevelModule2.SubModule3; + })(SubModule3 = TopLevelModule2.SubModule3 || (TopLevelModule2.SubModule3 = {})); })(TopLevelModule2 || (TopLevelModule2 = {})); }); //# sourceMappingURL=typeResolution.js.map \ No newline at end of file diff --git a/tests/baselines/reference/typeResolution.js.map b/tests/baselines/reference/typeResolution.js.map index 0e998a5a883..b030021a205 100644 --- a/tests/baselines/reference/typeResolution.js.map +++ b/tests/baselines/reference/typeResolution.js.map @@ -1,2 +1,2 @@ //// [typeResolution.js.map] -{"version":3,"file":"typeResolution.js","sourceRoot":"","sources":["typeResolution.ts"],"names":["TopLevelModule1","TopLevelModule1.SubModule1","TopLevelModule1.SubModule1.SubSubModule1","TopLevelModule1.SubModule1.SubSubModule1.ClassA","TopLevelModule1.SubModule1.SubSubModule1.ClassA.constructor","TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1","TopLevelModule1.SubModule1.SubSubModule1.ClassB","TopLevelModule1.SubModule1.SubSubModule1.ClassB.constructor","TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1","TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ","TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor","TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ","TopLevelModule1.SubModule1.ClassA","TopLevelModule1.SubModule1.ClassA.constructor","TopLevelModule1.SubModule1.ClassA.constructor.AA","TopLevelModule1.SubModule2","TopLevelModule1.SubModule2.SubSubModule2","TopLevelModule1.SubModule2.SubSubModule2.ClassA","TopLevelModule1.SubModule2.SubSubModule2.ClassA.constructor","TopLevelModule1.SubModule2.SubSubModule2.ClassA.AisIn1_2_2","TopLevelModule1.SubModule2.SubSubModule2.ClassB","TopLevelModule1.SubModule2.SubSubModule2.ClassB.constructor","TopLevelModule1.SubModule2.SubSubModule2.ClassB.BisIn1_2_2","TopLevelModule1.SubModule2.SubSubModule2.ClassC","TopLevelModule1.SubModule2.SubSubModule2.ClassC.constructor","TopLevelModule1.SubModule2.SubSubModule2.ClassC.CisIn1_2_2","TopLevelModule1.ClassA","TopLevelModule1.ClassA.constructor","TopLevelModule1.ClassA.AisIn1","TopLevelModule1.NotExportedModule","TopLevelModule1.NotExportedModule.ClassA","TopLevelModule1.NotExportedModule.ClassA.constructor","TopLevelModule2","TopLevelModule2.SubModule3","TopLevelModule2.SubModule3.ClassA","TopLevelModule2.SubModule3.ClassA.constructor","TopLevelModule2.SubModule3.ClassA.AisIn2_3"],"mappings":";IAAA,WAAc,eAAe,EAAC,CAAC;QAC3BA,WAAcA,UAAUA,EAACA,CAACA;YACtBC,WAAcA,aAAaA,EAACA,CAACA;gBACzBC,IAAaA,MAAMA;oBAAnBC,SAAaA,MAAMA;oBAmBnBC,CAACA;oBAlBUD,2BAAUA,GAAjBA;wBAEIE,AADAA,uCAAuCA;4BACnCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAwBA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAC9CA,IAAIA,EAAmCA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzDA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,yCAAyCA;4BACrCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,qCAAqCA;4BACjCA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,sBAAsBA;4BAClBA,EAAcA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACpCA,IAAIA,EAA4BA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;oBACtDA,CAACA;oBACLF,aAACA;gBAADA,CAACA,AAnBDD,IAmBCA;gBAnBYA,oBAAMA,GAANA,MAmBZA,CAAAA;gBACDA,IAAaA,MAAMA;oBAAnBI,SAAaA,MAAMA;oBAsBnBC,CAACA;oBArBUD,2BAAUA,GAAjBA;wBACIE,+CAA+CA;wBAG/CA,AADAA,uCAAuCA;4BACnCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAwBA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAC9CA,IAAIA,EAAmCA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzDA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,yCAAyCA;4BACrCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,qCAAqCA;4BACjCA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzEA,IAAIA,EAAqCA,CAACA;wBAACA,EAAEA,CAACA,QAAQA,EAAEA,CAACA;wBAGzDA,AADAA,sBAAsBA;4BAClBA,EAAcA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACpCA,IAAIA,EAA4BA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;oBACtDA,CAACA;oBACLF,aAACA;gBAADA,CAACA,AAtBDJ,IAsBCA;gBAtBYA,oBAAMA,GAANA,MAsBZA,CAAAA;gBAEDA,IAAMA,iBAAiBA;oBACnBO,SADEA,iBAAiBA;wBAEfC,SAASA,EAAEA;4BAEPC,AADAA,uCAAuCA;gCACnCA,EAAmDA,CAACA;4BAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;4BACzEA,IAAIA,EAAmDA,CAACA;4BAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;4BACzEA,IAAIA,EAAcA,CAACA;4BAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;4BACpCA,IAAIA,EAAqCA,CAACA;4BAACA,EAAEA,CAACA,QAAQA,EAAEA,CAACA;wBAC7DA,CAACA;oBACLD,CAACA;oBACLD,wBAACA;gBAADA,CAACA,AAVDP,IAUCA;YACLA,CAACA,EAxDaD,wBAAaA,KAAbA,wBAAaA,QAwD1BA;YAxDDA,IAAcA,aAAaA,GAAbA,wBAwDbA,CAAAA;YAGDA,AADAA,0EAA0EA;gBACpEA,MAAMA;gBACRW,SADEA,MAAMA;oBAEJC,SAASA,EAAEA;wBACPC,IAAIA,EAAwBA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAC9CA,IAAIA,EAAmCA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzDA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,sBAAsBA;4BAClBA,EAA4BA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;oBACtDA,CAACA;gBACLD,CAACA;gBACLD,aAACA;YAADA,CAACA,AAXDX,IAWCA;QACLA,CAACA,EAxEaD,0BAAUA,KAAVA,0BAAUA,QAwEvBA;QAxEDA,IAAcA,UAAUA,GAAVA,0BAwEbA,CAAAA;QAEDA,WAAcA,UAAUA,EAACA,CAACA;YACtBe,WAAcA,aAAaA,EAACA,CAACA;gBAEzBC,AADAA,6DAA6DA;oBAChDA,MAAMA;oBAAnBC,SAAaA,MAAMA;oBAA2BC,CAACA;oBAAlBD,2BAAUA,GAAjBA;oBAAsBE,CAACA;oBAACF,aAACA;gBAADA,CAACA,AAA/CD,IAA+CA;gBAAlCA,oBAAMA,GAANA,MAAkCA,CAAAA;gBAC/CA,IAAaA,MAAMA;oBAAnBI,SAAaA,MAAMA;oBAA2BC,CAACA;oBAAlBD,2BAAUA,GAAjBA;oBAAsBE,CAACA;oBAACF,aAACA;gBAADA,CAACA,AAA/CJ,IAA+CA;gBAAlCA,oBAAMA,GAANA,MAAkCA,CAAAA;gBAC/CA,IAAaA,MAAMA;oBAAnBO,SAAaA,MAAMA;oBAA2BC,CAACA;oBAAlBD,2BAAUA,GAAjBA;oBAAsBE,CAACA;oBAACF,aAACA;gBAADA,CAACA,AAA/CP,IAA+CA;gBAAlCA,oBAAMA,GAANA,MAAkCA,CAAAA;gBAEZA,JACvCA,CAACA,EAPaD,wBAAaA,KAAbA,wBAAaA,QAO1BA;YAPDA,IAAcA,aAAaA,GAAbA,wBAObA,CAAAA;YAE0CA,JAC/CA,CAACA,EAXaf,0BAAUA,KAAVA,0BAAUA,QAWvBA;QAXDA,IAAcA,UAAUA,GAAVA,0BAWbA,CAAAA;QAEDA,IAAMA,MAAMA;YAAZ0B,SAAMA,MAAMA;YAEZC,CAACA;YADUD,uBAAMA,GAAbA;YAAkBE,CAACA;YACvBF,aAACA;QAADA,CAACA,AAFD1B,IAECA;QAMDA,IAAOA,iBAAiBA,CAEvBA;QAFDA,WAAOA,iBAAiBA,EAACA,CAACA;YACtB6B,IAAaA,MAAMA;gBAAnBC,SAAaA,MAAMA;gBAAGC,CAACA;gBAADD,aAACA;YAADA,CAACA,AAAvBD,IAAuBA;YAAVA,wBAAMA,GAANA,MAAUA,CAAAA;QAC3BA,CAACA,EAFM7B,iBAAiBA,KAAjBA,iBAAiBA,QAEvBA;IACLA,CAACA,EAnGa,uBAAe,KAAf,uBAAe,QAmG5B;IAnGD,IAAc,eAAe,GAAf,uBAmGb,CAAA;IAED,IAAO,eAAe,CAMrB;IAND,WAAO,eAAe,EAAC,CAAC;QACpBgC,WAAcA,UAAUA,EAACA,CAACA;YACtBC,IAAaA,MAAMA;gBAAnBC,SAAaA,MAAMA;gBAEnBC,CAACA;gBADUD,yBAAQA,GAAfA;gBAAoBE,CAACA;gBACzBF,aAACA;YAADA,CAACA,AAFDD,IAECA;YAFYA,iBAAMA,GAANA,MAEZA,CAAAA;QACLA,CAACA,EAJaD,0BAAUA,KAAVA,0BAAUA,QAIvBA;QAJDA,IAAcA,UAAUA,GAAVA,0BAIbA,CAAAA;IACLA,CAACA,EANM,eAAe,KAAf,eAAe,QAMrB"} \ No newline at end of file +{"version":3,"file":"typeResolution.js","sourceRoot":"","sources":["typeResolution.ts"],"names":["TopLevelModule1","TopLevelModule1.SubModule1","TopLevelModule1.SubModule1.SubSubModule1","TopLevelModule1.SubModule1.SubSubModule1.ClassA","TopLevelModule1.SubModule1.SubSubModule1.ClassA.constructor","TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1","TopLevelModule1.SubModule1.SubSubModule1.ClassB","TopLevelModule1.SubModule1.SubSubModule1.ClassB.constructor","TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1","TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ","TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor","TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ","TopLevelModule1.SubModule1.ClassA","TopLevelModule1.SubModule1.ClassA.constructor","TopLevelModule1.SubModule1.ClassA.constructor.AA","TopLevelModule1.SubModule2","TopLevelModule1.SubModule2.SubSubModule2","TopLevelModule1.SubModule2.SubSubModule2.ClassA","TopLevelModule1.SubModule2.SubSubModule2.ClassA.constructor","TopLevelModule1.SubModule2.SubSubModule2.ClassA.AisIn1_2_2","TopLevelModule1.SubModule2.SubSubModule2.ClassB","TopLevelModule1.SubModule2.SubSubModule2.ClassB.constructor","TopLevelModule1.SubModule2.SubSubModule2.ClassB.BisIn1_2_2","TopLevelModule1.SubModule2.SubSubModule2.ClassC","TopLevelModule1.SubModule2.SubSubModule2.ClassC.constructor","TopLevelModule1.SubModule2.SubSubModule2.ClassC.CisIn1_2_2","TopLevelModule1.ClassA","TopLevelModule1.ClassA.constructor","TopLevelModule1.ClassA.AisIn1","TopLevelModule1.NotExportedModule","TopLevelModule1.NotExportedModule.ClassA","TopLevelModule1.NotExportedModule.ClassA.constructor","TopLevelModule2","TopLevelModule2.SubModule3","TopLevelModule2.SubModule3.ClassA","TopLevelModule2.SubModule3.ClassA.constructor","TopLevelModule2.SubModule3.ClassA.AisIn2_3"],"mappings":";IAAA,IAAc,eAAe,CAmG5B;IAnGD,WAAc,eAAe,EAAC,CAAC;QAC3BA,IAAcA,UAAUA,CAwEvBA;QAxEDA,WAAcA,UAAUA,EAACA,CAACA;YACtBC,IAAcA,aAAaA,CAwD1BA;YAxDDA,WAAcA,aAAaA,EAACA,CAACA;gBACzBC,IAAaA,MAAMA;oBAAnBC,SAAaA,MAAMA;oBAmBnBC,CAACA;oBAlBUD,2BAAUA,GAAjBA;wBAEIE,AADAA,uCAAuCA;4BACnCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAwBA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAC9CA,IAAIA,EAAmCA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzDA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,yCAAyCA;4BACrCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,qCAAqCA;4BACjCA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,sBAAsBA;4BAClBA,EAAcA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACpCA,IAAIA,EAA4BA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;oBACtDA,CAACA;oBACLF,aAACA;gBAADA,CAACA,AAnBDD,IAmBCA;gBAnBYA,oBAAMA,GAANA,MAmBZA,CAAAA;gBACDA,IAAaA,MAAMA;oBAAnBI,SAAaA,MAAMA;oBAsBnBC,CAACA;oBArBUD,2BAAUA,GAAjBA;wBACIE,+CAA+CA;wBAG/CA,AADAA,uCAAuCA;4BACnCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAwBA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAC9CA,IAAIA,EAAmCA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzDA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,yCAAyCA;4BACrCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,qCAAqCA;4BACjCA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzEA,IAAIA,EAAqCA,CAACA;wBAACA,EAAEA,CAACA,QAAQA,EAAEA,CAACA;wBAGzDA,AADAA,sBAAsBA;4BAClBA,EAAcA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACpCA,IAAIA,EAA4BA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;oBACtDA,CAACA;oBACLF,aAACA;gBAADA,CAACA,AAtBDJ,IAsBCA;gBAtBYA,oBAAMA,GAANA,MAsBZA,CAAAA;gBAEDA,IAAMA,iBAAiBA;oBACnBO,SADEA,iBAAiBA;wBAEfC,SAASA,EAAEA;4BAEPC,AADAA,uCAAuCA;gCACnCA,EAAmDA,CAACA;4BAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;4BACzEA,IAAIA,EAAmDA,CAACA;4BAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;4BACzEA,IAAIA,EAAcA,CAACA;4BAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;4BACpCA,IAAIA,EAAqCA,CAACA;4BAACA,EAAEA,CAACA,QAAQA,EAAEA,CAACA;wBAC7DA,CAACA;oBACLD,CAACA;oBACLD,wBAACA;gBAADA,CAACA,AAVDP,IAUCA;YACLA,CAACA,EAxDaD,aAAaA,GAAbA,wBAAaA,KAAbA,wBAAaA,QAwD1BA;YAGDA,AADAA,0EAA0EA;gBACpEA,MAAMA;gBACRW,SADEA,MAAMA;oBAEJC,SAASA,EAAEA;wBACPC,IAAIA,EAAwBA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAC9CA,IAAIA,EAAmCA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzDA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,sBAAsBA;4BAClBA,EAA4BA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;oBACtDA,CAACA;gBACLD,CAACA;gBACLD,aAACA;YAADA,CAACA,AAXDX,IAWCA;QACLA,CAACA,EAxEaD,UAAUA,GAAVA,0BAAUA,KAAVA,0BAAUA,QAwEvBA;QAEDA,IAAcA,UAAUA,CAWvBA;QAXDA,WAAcA,UAAUA,EAACA,CAACA;YACtBe,IAAcA,aAAaA,CAO1BA;YAPDA,WAAcA,aAAaA,EAACA,CAACA;gBAEzBC,AADAA,6DAA6DA;oBAChDA,MAAMA;oBAAnBC,SAAaA,MAAMA;oBAA2BC,CAACA;oBAAlBD,2BAAUA,GAAjBA;oBAAsBE,CAACA;oBAACF,aAACA;gBAADA,CAACA,AAA/CD,IAA+CA;gBAAlCA,oBAAMA,GAANA,MAAkCA,CAAAA;gBAC/CA,IAAaA,MAAMA;oBAAnBI,SAAaA,MAAMA;oBAA2BC,CAACA;oBAAlBD,2BAAUA,GAAjBA;oBAAsBE,CAACA;oBAACF,aAACA;gBAADA,CAACA,AAA/CJ,IAA+CA;gBAAlCA,oBAAMA,GAANA,MAAkCA,CAAAA;gBAC/CA,IAAaA,MAAMA;oBAAnBO,SAAaA,MAAMA;oBAA2BC,CAACA;oBAAlBD,2BAAUA,GAAjBA;oBAAsBE,CAACA;oBAACF,aAACA;gBAADA,CAACA,AAA/CP,IAA+CA;gBAAlCA,oBAAMA,GAANA,MAAkCA,CAAAA;gBAEZA,JACvCA,CAACA,EAPaD,aAAaA,GAAbA,wBAAaA,KAAbA,wBAAaA,QAO1BA;YAE0CA,JAC/CA,CAACA,EAXaf,UAAUA,GAAVA,0BAAUA,KAAVA,0BAAUA,QAWvBA;QAEDA,IAAMA,MAAMA;YAAZ0B,SAAMA,MAAMA;YAEZC,CAACA;YADUD,uBAAMA,GAAbA;YAAkBE,CAACA;YACvBF,aAACA;QAADA,CAACA,AAFD1B,IAECA;QAMDA,IAAOA,iBAAiBA,CAEvBA;QAFDA,WAAOA,iBAAiBA,EAACA,CAACA;YACtB6B,IAAaA,MAAMA;gBAAnBC,SAAaA,MAAMA;gBAAGC,CAACA;gBAADD,aAACA;YAADA,CAACA,AAAvBD,IAAuBA;YAAVA,wBAAMA,GAANA,MAAUA,CAAAA;QAC3BA,CAACA,EAFM7B,iBAAiBA,KAAjBA,iBAAiBA,QAEvBA;IACLA,CAACA,EAnGa,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAmG5B;IAED,IAAO,eAAe,CAMrB;IAND,WAAO,eAAe,EAAC,CAAC;QACpBgC,IAAcA,UAAUA,CAIvBA;QAJDA,WAAcA,UAAUA,EAACA,CAACA;YACtBC,IAAaA,MAAMA;gBAAnBC,SAAaA,MAAMA;gBAEnBC,CAACA;gBADUD,yBAAQA,GAAfA;gBAAoBE,CAACA;gBACzBF,aAACA;YAADA,CAACA,AAFDD,IAECA;YAFYA,iBAAMA,GAANA,MAEZA,CAAAA;QACLA,CAACA,EAJaD,UAAUA,GAAVA,0BAAUA,KAAVA,0BAAUA,QAIvBA;IACLA,CAACA,EANM,eAAe,KAAf,eAAe,QAMrB"} \ No newline at end of file diff --git a/tests/baselines/reference/typeResolution.sourcemap.txt b/tests/baselines/reference/typeResolution.sourcemap.txt index 82ac1974558..0c5e2c3b0a9 100644 --- a/tests/baselines/reference/typeResolution.sourcemap.txt +++ b/tests/baselines/reference/typeResolution.sourcemap.txt @@ -9,41 +9,313 @@ emittedFile:tests/cases/compiler/typeResolution.js sourceFile:typeResolution.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { ->>> (function (TopLevelModule1) { +>>> var TopLevelModule1; 1 >^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^-> +1 > +2 > export module +3 > TopLevelModule1 +4 > { + > export module SubModule1 { + > export module SubSubModule1 { + > export class ClassA { + > public AisIn1_1_1() { + > // Try all qualified names of this type + > var a1: ClassA; a1.AisIn1_1_1(); + > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); + > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); + > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); + > + > // Two variants of qualifying a peer type + > var b1: ClassB; b1.BisIn1_1_1(); + > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); + > + > // Type only accessible from the root + > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); + > + > // Interface reference + > var d1: InterfaceX; d1.XisIn1_1_1(); + > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); + > } + > } + > export class ClassB { + > public BisIn1_1_1() { + > /** Exactly the same as above in AisIn1_1_1 **/ + > + > // Try all qualified names of this type + > var a1: ClassA; a1.AisIn1_1_1(); + > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); + > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); + > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); + > + > // Two variants of qualifying a peer type + > var b1: ClassB; b1.BisIn1_1_1(); + > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); + > + > // Type only accessible from the root + > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); + > var c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3(); + > + > // Interface reference + > var d1: InterfaceX; d1.XisIn1_1_1(); + > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); + > } + > } + > export interface InterfaceX { XisIn1_1_1(); } + > class NonExportedClassQ { + > constructor() { + > function QQ() { + > /* Sampling of stuff from AisIn1_1_1 */ + > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); + > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); + > var d1: InterfaceX; d1.XisIn1_1_1(); + > var c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3(); + > } + > } + > } + > } + > + > // Should have no effect on S1.SS1.ClassA above because it is not exported + > class ClassA { + > constructor() { + > function AA() { + > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); + > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); + > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); + > + > // Interface reference + > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); + > } + > } + > } + > } + > + > export module SubModule2 { + > export module SubSubModule2 { + > // No code here since these are the mirror of the above calls + > export class ClassA { public AisIn1_2_2() { } } + > export class ClassB { public BisIn1_2_2() { } } + > export class ClassC { public CisIn1_2_2() { } } + > export interface InterfaceY { YisIn1_2_2(); } + > interface NonExportedInterfaceQ { } + > } + > + > export interface InterfaceY { YisIn1_2(); } + > } + > + > class ClassA { + > public AisIn1() { } + > } + > + > interface InterfaceY { + > YisIn1(); + > } + > + > module NotExportedModule { + > export class ClassA { } + > } + > } +1 >Emitted(2, 5) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 9) Source(1, 15) + SourceIndex(0) +3 >Emitted(2, 24) Source(1, 30) + SourceIndex(0) +4 >Emitted(2, 25) Source(100, 2) + SourceIndex(0) +--- +>>> (function (TopLevelModule1) { +1->^^^^ 2 > ^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^ 4 > ^^ 5 > ^ -1 > +1-> 2 > export module 3 > TopLevelModule1 4 > 5 > { -1 >Emitted(2, 5) Source(1, 1) + SourceIndex(0) -2 >Emitted(2, 16) Source(1, 15) + SourceIndex(0) -3 >Emitted(2, 31) Source(1, 30) + SourceIndex(0) -4 >Emitted(2, 33) Source(1, 31) + SourceIndex(0) -5 >Emitted(2, 34) Source(1, 32) + SourceIndex(0) +1->Emitted(3, 5) Source(1, 1) + SourceIndex(0) +2 >Emitted(3, 16) Source(1, 15) + SourceIndex(0) +3 >Emitted(3, 31) Source(1, 30) + SourceIndex(0) +4 >Emitted(3, 33) Source(1, 31) + SourceIndex(0) +5 >Emitted(3, 34) Source(1, 32) + SourceIndex(0) +--- +>>> var SubModule1; +1 >^^^^^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^-> +1 > + > +2 > export module +3 > SubModule1 +4 > { + > export module SubSubModule1 { + > export class ClassA { + > public AisIn1_1_1() { + > // Try all qualified names of this type + > var a1: ClassA; a1.AisIn1_1_1(); + > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); + > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); + > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); + > + > // Two variants of qualifying a peer type + > var b1: ClassB; b1.BisIn1_1_1(); + > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); + > + > // Type only accessible from the root + > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); + > + > // Interface reference + > var d1: InterfaceX; d1.XisIn1_1_1(); + > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); + > } + > } + > export class ClassB { + > public BisIn1_1_1() { + > /** Exactly the same as above in AisIn1_1_1 **/ + > + > // Try all qualified names of this type + > var a1: ClassA; a1.AisIn1_1_1(); + > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); + > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); + > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); + > + > // Two variants of qualifying a peer type + > var b1: ClassB; b1.BisIn1_1_1(); + > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); + > + > // Type only accessible from the root + > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); + > var c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3(); + > + > // Interface reference + > var d1: InterfaceX; d1.XisIn1_1_1(); + > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); + > } + > } + > export interface InterfaceX { XisIn1_1_1(); } + > class NonExportedClassQ { + > constructor() { + > function QQ() { + > /* Sampling of stuff from AisIn1_1_1 */ + > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); + > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); + > var d1: InterfaceX; d1.XisIn1_1_1(); + > var c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3(); + > } + > } + > } + > } + > + > // Should have no effect on S1.SS1.ClassA above because it is not exported + > class ClassA { + > constructor() { + > function AA() { + > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); + > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); + > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); + > + > // Interface reference + > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); + > } + > } + > } + > } +1 >Emitted(4, 9) Source(2, 5) + SourceIndex(0) name (TopLevelModule1) +2 >Emitted(4, 13) Source(2, 19) + SourceIndex(0) name (TopLevelModule1) +3 >Emitted(4, 23) Source(2, 29) + SourceIndex(0) name (TopLevelModule1) +4 >Emitted(4, 24) Source(74, 6) + SourceIndex(0) name (TopLevelModule1) --- >>> (function (SubModule1) { -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^^^^^^^^^^^ 3 > ^^^^^^^^^^ 4 > ^^ 5 > ^ -6 > ^^^^^^^^-> -1 > - > +1-> 2 > export module 3 > SubModule1 4 > 5 > { -1 >Emitted(3, 9) Source(2, 5) + SourceIndex(0) name (TopLevelModule1) -2 >Emitted(3, 20) Source(2, 19) + SourceIndex(0) name (TopLevelModule1) -3 >Emitted(3, 30) Source(2, 29) + SourceIndex(0) name (TopLevelModule1) -4 >Emitted(3, 32) Source(2, 30) + SourceIndex(0) name (TopLevelModule1) -5 >Emitted(3, 33) Source(2, 31) + SourceIndex(0) name (TopLevelModule1) +1->Emitted(5, 9) Source(2, 5) + SourceIndex(0) name (TopLevelModule1) +2 >Emitted(5, 20) Source(2, 19) + SourceIndex(0) name (TopLevelModule1) +3 >Emitted(5, 30) Source(2, 29) + SourceIndex(0) name (TopLevelModule1) +4 >Emitted(5, 32) Source(2, 30) + SourceIndex(0) name (TopLevelModule1) +5 >Emitted(5, 33) Source(2, 31) + SourceIndex(0) name (TopLevelModule1) +--- +>>> var SubSubModule1; +1 >^^^^^^^^^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^-> +1 > + > +2 > export module +3 > SubSubModule1 +4 > { + > export class ClassA { + > public AisIn1_1_1() { + > // Try all qualified names of this type + > var a1: ClassA; a1.AisIn1_1_1(); + > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); + > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); + > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); + > + > // Two variants of qualifying a peer type + > var b1: ClassB; b1.BisIn1_1_1(); + > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); + > + > // Type only accessible from the root + > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); + > + > // Interface reference + > var d1: InterfaceX; d1.XisIn1_1_1(); + > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); + > } + > } + > export class ClassB { + > public BisIn1_1_1() { + > /** Exactly the same as above in AisIn1_1_1 **/ + > + > // Try all qualified names of this type + > var a1: ClassA; a1.AisIn1_1_1(); + > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); + > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); + > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); + > + > // Two variants of qualifying a peer type + > var b1: ClassB; b1.BisIn1_1_1(); + > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); + > + > // Type only accessible from the root + > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); + > var c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3(); + > + > // Interface reference + > var d1: InterfaceX; d1.XisIn1_1_1(); + > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); + > } + > } + > export interface InterfaceX { XisIn1_1_1(); } + > class NonExportedClassQ { + > constructor() { + > function QQ() { + > /* Sampling of stuff from AisIn1_1_1 */ + > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); + > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); + > var d1: InterfaceX; d1.XisIn1_1_1(); + > var c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3(); + > } + > } + > } + > } +1 >Emitted(6, 13) Source(3, 9) + SourceIndex(0) name (TopLevelModule1.SubModule1) +2 >Emitted(6, 17) Source(3, 23) + SourceIndex(0) name (TopLevelModule1.SubModule1) +3 >Emitted(6, 30) Source(3, 36) + SourceIndex(0) name (TopLevelModule1.SubModule1) +4 >Emitted(6, 31) Source(59, 10) + SourceIndex(0) name (TopLevelModule1.SubModule1) --- >>> (function (SubSubModule1) { 1->^^^^^^^^^^^^ @@ -52,17 +324,16 @@ sourceFile:typeResolution.ts 4 > ^^ 5 > ^ 6 > ^^^^^-> -1-> - > +1-> 2 > export module 3 > SubSubModule1 4 > 5 > { -1->Emitted(4, 13) Source(3, 9) + SourceIndex(0) name (TopLevelModule1.SubModule1) -2 >Emitted(4, 24) Source(3, 23) + SourceIndex(0) name (TopLevelModule1.SubModule1) -3 >Emitted(4, 37) Source(3, 36) + SourceIndex(0) name (TopLevelModule1.SubModule1) -4 >Emitted(4, 39) Source(3, 37) + SourceIndex(0) name (TopLevelModule1.SubModule1) -5 >Emitted(4, 40) Source(3, 38) + SourceIndex(0) name (TopLevelModule1.SubModule1) +1->Emitted(7, 13) Source(3, 9) + SourceIndex(0) name (TopLevelModule1.SubModule1) +2 >Emitted(7, 24) Source(3, 23) + SourceIndex(0) name (TopLevelModule1.SubModule1) +3 >Emitted(7, 37) Source(3, 36) + SourceIndex(0) name (TopLevelModule1.SubModule1) +4 >Emitted(7, 39) Source(3, 37) + SourceIndex(0) name (TopLevelModule1.SubModule1) +5 >Emitted(7, 40) Source(3, 38) + SourceIndex(0) name (TopLevelModule1.SubModule1) --- >>> var ClassA = (function () { 1->^^^^^^^^^^^^^^^^ @@ -73,9 +344,9 @@ sourceFile:typeResolution.ts > 2 > export class 3 > ClassA -1->Emitted(5, 17) Source(4, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -2 >Emitted(5, 21) Source(4, 26) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -3 >Emitted(5, 27) Source(4, 32) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +1->Emitted(8, 17) Source(4, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +2 >Emitted(8, 21) Source(4, 26) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +3 >Emitted(8, 27) Source(4, 32) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) --- >>> function ClassA() { 1->^^^^^^^^^^^^^^^^^^^^ @@ -84,9 +355,9 @@ sourceFile:typeResolution.ts 1-> 2 > export class 3 > ClassA -1->Emitted(6, 21) Source(4, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA) -2 >Emitted(6, 30) Source(4, 26) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA) -3 >Emitted(6, 36) Source(4, 32) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA) +1->Emitted(9, 21) Source(4, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA) +2 >Emitted(9, 30) Source(4, 26) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA) +3 >Emitted(9, 36) Source(4, 32) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ @@ -113,8 +384,8 @@ sourceFile:typeResolution.ts > } > 2 > } -1 >Emitted(7, 21) Source(23, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.constructor) -2 >Emitted(7, 22) Source(23, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.constructor) +1 >Emitted(10, 21) Source(23, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.constructor) +2 >Emitted(10, 22) Source(23, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.constructor) --- >>> ClassA.prototype.AisIn1_1_1 = function () { 1->^^^^^^^^^^^^^^^^^^^^ @@ -124,9 +395,9 @@ sourceFile:typeResolution.ts 1-> 2 > AisIn1_1_1 3 > -1->Emitted(8, 21) Source(5, 24) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA) -2 >Emitted(8, 48) Source(5, 34) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA) -3 >Emitted(8, 51) Source(5, 17) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA) +1->Emitted(11, 21) Source(5, 24) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA) +2 >Emitted(11, 48) Source(5, 34) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA) +3 >Emitted(11, 51) Source(5, 17) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA) --- >>> // Try all qualified names of this type 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -137,9 +408,9 @@ sourceFile:typeResolution.ts > 2 > 3 > // Try all qualified names of this type -1->Emitted(9, 25) Source(7, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(9, 25) Source(6, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -3 >Emitted(9, 64) Source(6, 60) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1->Emitted(12, 25) Source(7, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +2 >Emitted(12, 25) Source(6, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +3 >Emitted(12, 64) Source(6, 60) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) --- >>> var a1; 1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -150,9 +421,9 @@ sourceFile:typeResolution.ts > var 2 > a1: ClassA 3 > ; -1 >Emitted(10, 29) Source(7, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(10, 31) Source(7, 35) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -3 >Emitted(10, 32) Source(7, 36) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1 >Emitted(13, 29) Source(7, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +2 >Emitted(13, 31) Source(7, 35) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +3 >Emitted(13, 32) Source(7, 36) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) --- >>> a1.AisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -167,12 +438,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_1_1 5 > () 6 > ; -1->Emitted(11, 25) Source(7, 37) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(11, 27) Source(7, 39) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -3 >Emitted(11, 28) Source(7, 40) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -4 >Emitted(11, 38) Source(7, 50) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -5 >Emitted(11, 40) Source(7, 52) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -6 >Emitted(11, 41) Source(7, 53) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1->Emitted(14, 25) Source(7, 37) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +2 >Emitted(14, 27) Source(7, 39) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +3 >Emitted(14, 28) Source(7, 40) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +4 >Emitted(14, 38) Source(7, 50) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +5 >Emitted(14, 40) Source(7, 52) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +6 >Emitted(14, 41) Source(7, 53) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) --- >>> var a2; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -185,10 +456,10 @@ sourceFile:typeResolution.ts 2 > var 3 > a2: SubSubModule1.ClassA 4 > ; -1 >Emitted(12, 25) Source(8, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(12, 29) Source(8, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -3 >Emitted(12, 31) Source(8, 49) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -4 >Emitted(12, 32) Source(8, 50) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1 >Emitted(15, 25) Source(8, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +2 >Emitted(15, 29) Source(8, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +3 >Emitted(15, 31) Source(8, 49) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +4 >Emitted(15, 32) Source(8, 50) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) --- >>> a2.AisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -203,12 +474,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_1_1 5 > () 6 > ; -1->Emitted(13, 25) Source(8, 51) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(13, 27) Source(8, 53) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -3 >Emitted(13, 28) Source(8, 54) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -4 >Emitted(13, 38) Source(8, 64) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -5 >Emitted(13, 40) Source(8, 66) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -6 >Emitted(13, 41) Source(8, 67) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1->Emitted(16, 25) Source(8, 51) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +2 >Emitted(16, 27) Source(8, 53) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +3 >Emitted(16, 28) Source(8, 54) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +4 >Emitted(16, 38) Source(8, 64) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +5 >Emitted(16, 40) Source(8, 66) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +6 >Emitted(16, 41) Source(8, 67) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) --- >>> var a3; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -221,10 +492,10 @@ sourceFile:typeResolution.ts 2 > var 3 > a3: SubModule1.SubSubModule1.ClassA 4 > ; -1 >Emitted(14, 25) Source(9, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(14, 29) Source(9, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -3 >Emitted(14, 31) Source(9, 60) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -4 >Emitted(14, 32) Source(9, 61) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1 >Emitted(17, 25) Source(9, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +2 >Emitted(17, 29) Source(9, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +3 >Emitted(17, 31) Source(9, 60) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +4 >Emitted(17, 32) Source(9, 61) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) --- >>> a3.AisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -239,12 +510,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_1_1 5 > () 6 > ; -1->Emitted(15, 25) Source(9, 62) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(15, 27) Source(9, 64) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -3 >Emitted(15, 28) Source(9, 65) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -4 >Emitted(15, 38) Source(9, 75) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -5 >Emitted(15, 40) Source(9, 77) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -6 >Emitted(15, 41) Source(9, 78) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1->Emitted(18, 25) Source(9, 62) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +2 >Emitted(18, 27) Source(9, 64) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +3 >Emitted(18, 28) Source(9, 65) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +4 >Emitted(18, 38) Source(9, 75) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +5 >Emitted(18, 40) Source(9, 77) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +6 >Emitted(18, 41) Source(9, 78) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) --- >>> var a4; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -257,10 +528,10 @@ sourceFile:typeResolution.ts 2 > var 3 > a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA 4 > ; -1 >Emitted(16, 25) Source(10, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(16, 29) Source(10, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -3 >Emitted(16, 31) Source(10, 76) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -4 >Emitted(16, 32) Source(10, 77) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1 >Emitted(19, 25) Source(10, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +2 >Emitted(19, 29) Source(10, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +3 >Emitted(19, 31) Source(10, 76) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +4 >Emitted(19, 32) Source(10, 77) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) --- >>> a4.AisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -276,12 +547,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_1_1 5 > () 6 > ; -1->Emitted(17, 25) Source(10, 78) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(17, 27) Source(10, 80) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -3 >Emitted(17, 28) Source(10, 81) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -4 >Emitted(17, 38) Source(10, 91) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -5 >Emitted(17, 40) Source(10, 93) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -6 >Emitted(17, 41) Source(10, 94) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1->Emitted(20, 25) Source(10, 78) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +2 >Emitted(20, 27) Source(10, 80) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +3 >Emitted(20, 28) Source(10, 81) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +4 >Emitted(20, 38) Source(10, 91) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +5 >Emitted(20, 40) Source(10, 93) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +6 >Emitted(20, 41) Source(10, 94) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) --- >>> // Two variants of qualifying a peer type 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -293,9 +564,9 @@ sourceFile:typeResolution.ts > 2 > 3 > // Two variants of qualifying a peer type -1->Emitted(18, 25) Source(13, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(18, 25) Source(12, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -3 >Emitted(18, 66) Source(12, 62) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1->Emitted(21, 25) Source(13, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +2 >Emitted(21, 25) Source(12, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +3 >Emitted(21, 66) Source(12, 62) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) --- >>> var b1; 1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -306,9 +577,9 @@ sourceFile:typeResolution.ts > var 2 > b1: ClassB 3 > ; -1 >Emitted(19, 29) Source(13, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(19, 31) Source(13, 35) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -3 >Emitted(19, 32) Source(13, 36) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1 >Emitted(22, 29) Source(13, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +2 >Emitted(22, 31) Source(13, 35) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +3 >Emitted(22, 32) Source(13, 36) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) --- >>> b1.BisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -323,12 +594,12 @@ sourceFile:typeResolution.ts 4 > BisIn1_1_1 5 > () 6 > ; -1->Emitted(20, 25) Source(13, 37) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(20, 27) Source(13, 39) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -3 >Emitted(20, 28) Source(13, 40) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -4 >Emitted(20, 38) Source(13, 50) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -5 >Emitted(20, 40) Source(13, 52) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -6 >Emitted(20, 41) Source(13, 53) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1->Emitted(23, 25) Source(13, 37) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +2 >Emitted(23, 27) Source(13, 39) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +3 >Emitted(23, 28) Source(13, 40) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +4 >Emitted(23, 38) Source(13, 50) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +5 >Emitted(23, 40) Source(13, 52) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +6 >Emitted(23, 41) Source(13, 53) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) --- >>> var b2; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -341,10 +612,10 @@ sourceFile:typeResolution.ts 2 > var 3 > b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB 4 > ; -1 >Emitted(21, 25) Source(14, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(21, 29) Source(14, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -3 >Emitted(21, 31) Source(14, 76) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -4 >Emitted(21, 32) Source(14, 77) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1 >Emitted(24, 25) Source(14, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +2 >Emitted(24, 29) Source(14, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +3 >Emitted(24, 31) Source(14, 76) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +4 >Emitted(24, 32) Source(14, 77) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) --- >>> b2.BisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -360,12 +631,12 @@ sourceFile:typeResolution.ts 4 > BisIn1_1_1 5 > () 6 > ; -1->Emitted(22, 25) Source(14, 78) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(22, 27) Source(14, 80) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -3 >Emitted(22, 28) Source(14, 81) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -4 >Emitted(22, 38) Source(14, 91) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -5 >Emitted(22, 40) Source(14, 93) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -6 >Emitted(22, 41) Source(14, 94) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1->Emitted(25, 25) Source(14, 78) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +2 >Emitted(25, 27) Source(14, 80) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +3 >Emitted(25, 28) Source(14, 81) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +4 >Emitted(25, 38) Source(14, 91) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +5 >Emitted(25, 40) Source(14, 93) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +6 >Emitted(25, 41) Source(14, 94) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) --- >>> // Type only accessible from the root 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -377,9 +648,9 @@ sourceFile:typeResolution.ts > 2 > 3 > // Type only accessible from the root -1->Emitted(23, 25) Source(17, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(23, 25) Source(16, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -3 >Emitted(23, 62) Source(16, 58) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1->Emitted(26, 25) Source(17, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +2 >Emitted(26, 25) Source(16, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +3 >Emitted(26, 62) Source(16, 58) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) --- >>> var c1; 1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -390,9 +661,9 @@ sourceFile:typeResolution.ts > var 2 > c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA 3 > ; -1 >Emitted(24, 29) Source(17, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(24, 31) Source(17, 76) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -3 >Emitted(24, 32) Source(17, 77) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1 >Emitted(27, 29) Source(17, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +2 >Emitted(27, 31) Source(17, 76) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +3 >Emitted(27, 32) Source(17, 77) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) --- >>> c1.AisIn1_2_2(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -408,12 +679,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_2_2 5 > () 6 > ; -1->Emitted(25, 25) Source(17, 78) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(25, 27) Source(17, 80) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -3 >Emitted(25, 28) Source(17, 81) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -4 >Emitted(25, 38) Source(17, 91) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -5 >Emitted(25, 40) Source(17, 93) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -6 >Emitted(25, 41) Source(17, 94) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1->Emitted(28, 25) Source(17, 78) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +2 >Emitted(28, 27) Source(17, 80) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +3 >Emitted(28, 28) Source(17, 81) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +4 >Emitted(28, 38) Source(17, 91) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +5 >Emitted(28, 40) Source(17, 93) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +6 >Emitted(28, 41) Source(17, 94) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) --- >>> // Interface reference 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -425,9 +696,9 @@ sourceFile:typeResolution.ts > 2 > 3 > // Interface reference -1->Emitted(26, 25) Source(20, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(26, 25) Source(19, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -3 >Emitted(26, 47) Source(19, 43) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1->Emitted(29, 25) Source(20, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +2 >Emitted(29, 25) Source(19, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +3 >Emitted(29, 47) Source(19, 43) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) --- >>> var d1; 1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -438,9 +709,9 @@ sourceFile:typeResolution.ts > var 2 > d1: InterfaceX 3 > ; -1 >Emitted(27, 29) Source(20, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(27, 31) Source(20, 39) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -3 >Emitted(27, 32) Source(20, 40) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1 >Emitted(30, 29) Source(20, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +2 >Emitted(30, 31) Source(20, 39) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +3 >Emitted(30, 32) Source(20, 40) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) --- >>> d1.XisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -455,12 +726,12 @@ sourceFile:typeResolution.ts 4 > XisIn1_1_1 5 > () 6 > ; -1->Emitted(28, 25) Source(20, 41) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(28, 27) Source(20, 43) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -3 >Emitted(28, 28) Source(20, 44) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -4 >Emitted(28, 38) Source(20, 54) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -5 >Emitted(28, 40) Source(20, 56) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -6 >Emitted(28, 41) Source(20, 57) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1->Emitted(31, 25) Source(20, 41) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +2 >Emitted(31, 27) Source(20, 43) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +3 >Emitted(31, 28) Source(20, 44) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +4 >Emitted(31, 38) Source(20, 54) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +5 >Emitted(31, 40) Source(20, 56) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +6 >Emitted(31, 41) Source(20, 57) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) --- >>> var d2; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -473,10 +744,10 @@ sourceFile:typeResolution.ts 2 > var 3 > d2: SubSubModule1.InterfaceX 4 > ; -1 >Emitted(29, 25) Source(21, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(29, 29) Source(21, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -3 >Emitted(29, 31) Source(21, 53) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -4 >Emitted(29, 32) Source(21, 54) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1 >Emitted(32, 25) Source(21, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +2 >Emitted(32, 29) Source(21, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +3 >Emitted(32, 31) Source(21, 53) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +4 >Emitted(32, 32) Source(21, 54) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) --- >>> d2.XisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -491,12 +762,12 @@ sourceFile:typeResolution.ts 4 > XisIn1_1_1 5 > () 6 > ; -1->Emitted(30, 25) Source(21, 55) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(30, 27) Source(21, 57) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -3 >Emitted(30, 28) Source(21, 58) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -4 >Emitted(30, 38) Source(21, 68) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -5 >Emitted(30, 40) Source(21, 70) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -6 >Emitted(30, 41) Source(21, 71) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1->Emitted(33, 25) Source(21, 55) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +2 >Emitted(33, 27) Source(21, 57) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +3 >Emitted(33, 28) Source(21, 58) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +4 >Emitted(33, 38) Source(21, 68) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +5 >Emitted(33, 40) Source(21, 70) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +6 >Emitted(33, 41) Source(21, 71) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -505,8 +776,8 @@ sourceFile:typeResolution.ts 1 > > 2 > } -1 >Emitted(31, 21) Source(22, 17) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) -2 >Emitted(31, 22) Source(22, 18) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +1 >Emitted(34, 21) Source(22, 17) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) +2 >Emitted(34, 22) Source(22, 18) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1) --- >>> return ClassA; 1->^^^^^^^^^^^^^^^^^^^^ @@ -514,8 +785,8 @@ sourceFile:typeResolution.ts 1-> > 2 > } -1->Emitted(32, 21) Source(23, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA) -2 >Emitted(32, 34) Source(23, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA) +1->Emitted(35, 21) Source(23, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA) +2 >Emitted(35, 34) Source(23, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -546,10 +817,10 @@ sourceFile:typeResolution.ts > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); > } > } -1 >Emitted(33, 17) Source(23, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA) -2 >Emitted(33, 18) Source(23, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA) -3 >Emitted(33, 18) Source(4, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -4 >Emitted(33, 22) Source(23, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +1 >Emitted(36, 17) Source(23, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA) +2 >Emitted(36, 18) Source(23, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassA) +3 >Emitted(36, 18) Source(4, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +4 >Emitted(36, 22) Source(23, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) --- >>> SubSubModule1.ClassA = ClassA; 1->^^^^^^^^^^^^^^^^ @@ -581,11 +852,11 @@ sourceFile:typeResolution.ts > } > } 5 > -1->Emitted(34, 17) Source(4, 26) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -2 >Emitted(34, 37) Source(4, 32) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -3 >Emitted(34, 40) Source(4, 26) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -4 >Emitted(34, 46) Source(23, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -5 >Emitted(34, 47) Source(23, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +1->Emitted(37, 17) Source(4, 26) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +2 >Emitted(37, 37) Source(4, 32) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +3 >Emitted(37, 40) Source(4, 26) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +4 >Emitted(37, 46) Source(23, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +5 >Emitted(37, 47) Source(23, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) --- >>> var ClassB = (function () { 1 >^^^^^^^^^^^^^^^^ @@ -596,9 +867,9 @@ sourceFile:typeResolution.ts > 2 > export class 3 > ClassB -1 >Emitted(35, 17) Source(24, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -2 >Emitted(35, 21) Source(24, 26) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -3 >Emitted(35, 27) Source(24, 32) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +1 >Emitted(38, 17) Source(24, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +2 >Emitted(38, 21) Source(24, 26) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +3 >Emitted(38, 27) Source(24, 32) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) --- >>> function ClassB() { 1->^^^^^^^^^^^^^^^^^^^^ @@ -607,9 +878,9 @@ sourceFile:typeResolution.ts 1-> 2 > export class 3 > ClassB -1->Emitted(36, 21) Source(24, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB) -2 >Emitted(36, 30) Source(24, 26) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB) -3 >Emitted(36, 36) Source(24, 32) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB) +1->Emitted(39, 21) Source(24, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB) +2 >Emitted(39, 30) Source(24, 26) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB) +3 >Emitted(39, 36) Source(24, 32) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ @@ -639,8 +910,8 @@ sourceFile:typeResolution.ts > } > 2 > } -1 >Emitted(37, 21) Source(46, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.constructor) -2 >Emitted(37, 22) Source(46, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.constructor) +1 >Emitted(40, 21) Source(46, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.constructor) +2 >Emitted(40, 22) Source(46, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.constructor) --- >>> ClassB.prototype.BisIn1_1_1 = function () { 1->^^^^^^^^^^^^^^^^^^^^ @@ -650,9 +921,9 @@ sourceFile:typeResolution.ts 1-> 2 > BisIn1_1_1 3 > -1->Emitted(38, 21) Source(25, 24) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB) -2 >Emitted(38, 48) Source(25, 34) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB) -3 >Emitted(38, 51) Source(25, 17) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB) +1->Emitted(41, 21) Source(25, 24) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB) +2 >Emitted(41, 48) Source(25, 34) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB) +3 >Emitted(41, 51) Source(25, 17) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB) --- >>> /** Exactly the same as above in AisIn1_1_1 **/ 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -660,8 +931,8 @@ sourceFile:typeResolution.ts 1->public BisIn1_1_1() { > 2 > /** Exactly the same as above in AisIn1_1_1 **/ -1->Emitted(39, 25) Source(26, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(39, 72) Source(26, 68) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1->Emitted(42, 25) Source(26, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +2 >Emitted(42, 72) Source(26, 68) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) --- >>> // Try all qualified names of this type 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -673,9 +944,9 @@ sourceFile:typeResolution.ts > 2 > 3 > // Try all qualified names of this type -1 >Emitted(40, 25) Source(29, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(40, 25) Source(28, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(40, 64) Source(28, 60) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1 >Emitted(43, 25) Source(29, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +2 >Emitted(43, 25) Source(28, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +3 >Emitted(43, 64) Source(28, 60) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) --- >>> var a1; 1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -686,9 +957,9 @@ sourceFile:typeResolution.ts > var 2 > a1: ClassA 3 > ; -1 >Emitted(41, 29) Source(29, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(41, 31) Source(29, 35) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(41, 32) Source(29, 36) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1 >Emitted(44, 29) Source(29, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +2 >Emitted(44, 31) Source(29, 35) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +3 >Emitted(44, 32) Source(29, 36) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) --- >>> a1.AisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -703,12 +974,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_1_1 5 > () 6 > ; -1->Emitted(42, 25) Source(29, 37) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(42, 27) Source(29, 39) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(42, 28) Source(29, 40) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -4 >Emitted(42, 38) Source(29, 50) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -5 >Emitted(42, 40) Source(29, 52) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -6 >Emitted(42, 41) Source(29, 53) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1->Emitted(45, 25) Source(29, 37) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +2 >Emitted(45, 27) Source(29, 39) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +3 >Emitted(45, 28) Source(29, 40) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +4 >Emitted(45, 38) Source(29, 50) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +5 >Emitted(45, 40) Source(29, 52) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +6 >Emitted(45, 41) Source(29, 53) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) --- >>> var a2; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -721,10 +992,10 @@ sourceFile:typeResolution.ts 2 > var 3 > a2: SubSubModule1.ClassA 4 > ; -1 >Emitted(43, 25) Source(30, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(43, 29) Source(30, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(43, 31) Source(30, 49) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -4 >Emitted(43, 32) Source(30, 50) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1 >Emitted(46, 25) Source(30, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +2 >Emitted(46, 29) Source(30, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +3 >Emitted(46, 31) Source(30, 49) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +4 >Emitted(46, 32) Source(30, 50) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) --- >>> a2.AisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -739,12 +1010,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_1_1 5 > () 6 > ; -1->Emitted(44, 25) Source(30, 51) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(44, 27) Source(30, 53) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(44, 28) Source(30, 54) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -4 >Emitted(44, 38) Source(30, 64) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -5 >Emitted(44, 40) Source(30, 66) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -6 >Emitted(44, 41) Source(30, 67) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1->Emitted(47, 25) Source(30, 51) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +2 >Emitted(47, 27) Source(30, 53) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +3 >Emitted(47, 28) Source(30, 54) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +4 >Emitted(47, 38) Source(30, 64) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +5 >Emitted(47, 40) Source(30, 66) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +6 >Emitted(47, 41) Source(30, 67) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) --- >>> var a3; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -757,10 +1028,10 @@ sourceFile:typeResolution.ts 2 > var 3 > a3: SubModule1.SubSubModule1.ClassA 4 > ; -1 >Emitted(45, 25) Source(31, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(45, 29) Source(31, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(45, 31) Source(31, 60) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -4 >Emitted(45, 32) Source(31, 61) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1 >Emitted(48, 25) Source(31, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +2 >Emitted(48, 29) Source(31, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +3 >Emitted(48, 31) Source(31, 60) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +4 >Emitted(48, 32) Source(31, 61) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) --- >>> a3.AisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -775,12 +1046,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_1_1 5 > () 6 > ; -1->Emitted(46, 25) Source(31, 62) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(46, 27) Source(31, 64) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(46, 28) Source(31, 65) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -4 >Emitted(46, 38) Source(31, 75) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -5 >Emitted(46, 40) Source(31, 77) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -6 >Emitted(46, 41) Source(31, 78) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1->Emitted(49, 25) Source(31, 62) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +2 >Emitted(49, 27) Source(31, 64) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +3 >Emitted(49, 28) Source(31, 65) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +4 >Emitted(49, 38) Source(31, 75) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +5 >Emitted(49, 40) Source(31, 77) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +6 >Emitted(49, 41) Source(31, 78) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) --- >>> var a4; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -793,10 +1064,10 @@ sourceFile:typeResolution.ts 2 > var 3 > a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA 4 > ; -1 >Emitted(47, 25) Source(32, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(47, 29) Source(32, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(47, 31) Source(32, 76) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -4 >Emitted(47, 32) Source(32, 77) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1 >Emitted(50, 25) Source(32, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +2 >Emitted(50, 29) Source(32, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +3 >Emitted(50, 31) Source(32, 76) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +4 >Emitted(50, 32) Source(32, 77) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) --- >>> a4.AisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -812,12 +1083,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_1_1 5 > () 6 > ; -1->Emitted(48, 25) Source(32, 78) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(48, 27) Source(32, 80) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(48, 28) Source(32, 81) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -4 >Emitted(48, 38) Source(32, 91) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -5 >Emitted(48, 40) Source(32, 93) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -6 >Emitted(48, 41) Source(32, 94) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1->Emitted(51, 25) Source(32, 78) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +2 >Emitted(51, 27) Source(32, 80) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +3 >Emitted(51, 28) Source(32, 81) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +4 >Emitted(51, 38) Source(32, 91) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +5 >Emitted(51, 40) Source(32, 93) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +6 >Emitted(51, 41) Source(32, 94) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) --- >>> // Two variants of qualifying a peer type 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -829,9 +1100,9 @@ sourceFile:typeResolution.ts > 2 > 3 > // Two variants of qualifying a peer type -1->Emitted(49, 25) Source(35, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(49, 25) Source(34, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(49, 66) Source(34, 62) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1->Emitted(52, 25) Source(35, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +2 >Emitted(52, 25) Source(34, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +3 >Emitted(52, 66) Source(34, 62) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) --- >>> var b1; 1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -842,9 +1113,9 @@ sourceFile:typeResolution.ts > var 2 > b1: ClassB 3 > ; -1 >Emitted(50, 29) Source(35, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(50, 31) Source(35, 35) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(50, 32) Source(35, 36) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1 >Emitted(53, 29) Source(35, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +2 >Emitted(53, 31) Source(35, 35) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +3 >Emitted(53, 32) Source(35, 36) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) --- >>> b1.BisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -859,12 +1130,12 @@ sourceFile:typeResolution.ts 4 > BisIn1_1_1 5 > () 6 > ; -1->Emitted(51, 25) Source(35, 37) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(51, 27) Source(35, 39) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(51, 28) Source(35, 40) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -4 >Emitted(51, 38) Source(35, 50) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -5 >Emitted(51, 40) Source(35, 52) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -6 >Emitted(51, 41) Source(35, 53) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1->Emitted(54, 25) Source(35, 37) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +2 >Emitted(54, 27) Source(35, 39) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +3 >Emitted(54, 28) Source(35, 40) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +4 >Emitted(54, 38) Source(35, 50) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +5 >Emitted(54, 40) Source(35, 52) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +6 >Emitted(54, 41) Source(35, 53) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) --- >>> var b2; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -877,10 +1148,10 @@ sourceFile:typeResolution.ts 2 > var 3 > b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB 4 > ; -1 >Emitted(52, 25) Source(36, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(52, 29) Source(36, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(52, 31) Source(36, 76) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -4 >Emitted(52, 32) Source(36, 77) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1 >Emitted(55, 25) Source(36, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +2 >Emitted(55, 29) Source(36, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +3 >Emitted(55, 31) Source(36, 76) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +4 >Emitted(55, 32) Source(36, 77) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) --- >>> b2.BisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -896,12 +1167,12 @@ sourceFile:typeResolution.ts 4 > BisIn1_1_1 5 > () 6 > ; -1->Emitted(53, 25) Source(36, 78) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(53, 27) Source(36, 80) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(53, 28) Source(36, 81) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -4 >Emitted(53, 38) Source(36, 91) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -5 >Emitted(53, 40) Source(36, 93) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -6 >Emitted(53, 41) Source(36, 94) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1->Emitted(56, 25) Source(36, 78) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +2 >Emitted(56, 27) Source(36, 80) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +3 >Emitted(56, 28) Source(36, 81) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +4 >Emitted(56, 38) Source(36, 91) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +5 >Emitted(56, 40) Source(36, 93) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +6 >Emitted(56, 41) Source(36, 94) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) --- >>> // Type only accessible from the root 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -913,9 +1184,9 @@ sourceFile:typeResolution.ts > 2 > 3 > // Type only accessible from the root -1->Emitted(54, 25) Source(39, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(54, 25) Source(38, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(54, 62) Source(38, 58) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1->Emitted(57, 25) Source(39, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +2 >Emitted(57, 25) Source(38, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +3 >Emitted(57, 62) Source(38, 58) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) --- >>> var c1; 1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -926,9 +1197,9 @@ sourceFile:typeResolution.ts > var 2 > c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA 3 > ; -1 >Emitted(55, 29) Source(39, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(55, 31) Source(39, 76) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(55, 32) Source(39, 77) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1 >Emitted(58, 29) Source(39, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +2 >Emitted(58, 31) Source(39, 76) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +3 >Emitted(58, 32) Source(39, 77) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) --- >>> c1.AisIn1_2_2(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -943,12 +1214,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_2_2 5 > () 6 > ; -1->Emitted(56, 25) Source(39, 78) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(56, 27) Source(39, 80) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(56, 28) Source(39, 81) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -4 >Emitted(56, 38) Source(39, 91) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -5 >Emitted(56, 40) Source(39, 93) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -6 >Emitted(56, 41) Source(39, 94) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1->Emitted(59, 25) Source(39, 78) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +2 >Emitted(59, 27) Source(39, 80) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +3 >Emitted(59, 28) Source(39, 81) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +4 >Emitted(59, 38) Source(39, 91) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +5 >Emitted(59, 40) Source(39, 93) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +6 >Emitted(59, 41) Source(39, 94) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) --- >>> var c2; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -961,10 +1232,10 @@ sourceFile:typeResolution.ts 2 > var 3 > c2: TopLevelModule2.SubModule3.ClassA 4 > ; -1 >Emitted(57, 25) Source(40, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(57, 29) Source(40, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(57, 31) Source(40, 62) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -4 >Emitted(57, 32) Source(40, 63) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1 >Emitted(60, 25) Source(40, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +2 >Emitted(60, 29) Source(40, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +3 >Emitted(60, 31) Source(40, 62) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +4 >Emitted(60, 32) Source(40, 63) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) --- >>> c2.AisIn2_3(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -980,12 +1251,12 @@ sourceFile:typeResolution.ts 4 > AisIn2_3 5 > () 6 > ; -1->Emitted(58, 25) Source(40, 64) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(58, 27) Source(40, 66) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(58, 28) Source(40, 67) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -4 >Emitted(58, 36) Source(40, 75) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -5 >Emitted(58, 38) Source(40, 77) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -6 >Emitted(58, 39) Source(40, 78) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1->Emitted(61, 25) Source(40, 64) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +2 >Emitted(61, 27) Source(40, 66) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +3 >Emitted(61, 28) Source(40, 67) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +4 >Emitted(61, 36) Source(40, 75) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +5 >Emitted(61, 38) Source(40, 77) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +6 >Emitted(61, 39) Source(40, 78) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) --- >>> // Interface reference 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -997,9 +1268,9 @@ sourceFile:typeResolution.ts > 2 > 3 > // Interface reference -1->Emitted(59, 25) Source(43, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(59, 25) Source(42, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(59, 47) Source(42, 43) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1->Emitted(62, 25) Source(43, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +2 >Emitted(62, 25) Source(42, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +3 >Emitted(62, 47) Source(42, 43) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) --- >>> var d1; 1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1010,9 +1281,9 @@ sourceFile:typeResolution.ts > var 2 > d1: InterfaceX 3 > ; -1 >Emitted(60, 29) Source(43, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(60, 31) Source(43, 39) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(60, 32) Source(43, 40) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1 >Emitted(63, 29) Source(43, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +2 >Emitted(63, 31) Source(43, 39) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +3 >Emitted(63, 32) Source(43, 40) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) --- >>> d1.XisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1027,12 +1298,12 @@ sourceFile:typeResolution.ts 4 > XisIn1_1_1 5 > () 6 > ; -1->Emitted(61, 25) Source(43, 41) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(61, 27) Source(43, 43) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(61, 28) Source(43, 44) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -4 >Emitted(61, 38) Source(43, 54) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -5 >Emitted(61, 40) Source(43, 56) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -6 >Emitted(61, 41) Source(43, 57) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1->Emitted(64, 25) Source(43, 41) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +2 >Emitted(64, 27) Source(43, 43) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +3 >Emitted(64, 28) Source(43, 44) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +4 >Emitted(64, 38) Source(43, 54) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +5 >Emitted(64, 40) Source(43, 56) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +6 >Emitted(64, 41) Source(43, 57) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) --- >>> var d2; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1045,10 +1316,10 @@ sourceFile:typeResolution.ts 2 > var 3 > d2: SubSubModule1.InterfaceX 4 > ; -1 >Emitted(62, 25) Source(44, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(62, 29) Source(44, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(62, 31) Source(44, 53) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -4 >Emitted(62, 32) Source(44, 54) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1 >Emitted(65, 25) Source(44, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +2 >Emitted(65, 29) Source(44, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +3 >Emitted(65, 31) Source(44, 53) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +4 >Emitted(65, 32) Source(44, 54) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) --- >>> d2.XisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1063,12 +1334,12 @@ sourceFile:typeResolution.ts 4 > XisIn1_1_1 5 > () 6 > ; -1->Emitted(63, 25) Source(44, 55) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(63, 27) Source(44, 57) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -3 >Emitted(63, 28) Source(44, 58) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -4 >Emitted(63, 38) Source(44, 68) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -5 >Emitted(63, 40) Source(44, 70) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -6 >Emitted(63, 41) Source(44, 71) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1->Emitted(66, 25) Source(44, 55) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +2 >Emitted(66, 27) Source(44, 57) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +3 >Emitted(66, 28) Source(44, 58) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +4 >Emitted(66, 38) Source(44, 68) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +5 >Emitted(66, 40) Source(44, 70) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +6 >Emitted(66, 41) Source(44, 71) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1077,8 +1348,8 @@ sourceFile:typeResolution.ts 1 > > 2 > } -1 >Emitted(64, 21) Source(45, 17) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) -2 >Emitted(64, 22) Source(45, 18) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +1 >Emitted(67, 21) Source(45, 17) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) +2 >Emitted(67, 22) Source(45, 18) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1) --- >>> return ClassB; 1->^^^^^^^^^^^^^^^^^^^^ @@ -1086,8 +1357,8 @@ sourceFile:typeResolution.ts 1-> > 2 > } -1->Emitted(65, 21) Source(46, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB) -2 >Emitted(65, 34) Source(46, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB) +1->Emitted(68, 21) Source(46, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB) +2 >Emitted(68, 34) Source(46, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -1121,10 +1392,10 @@ sourceFile:typeResolution.ts > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); > } > } -1 >Emitted(66, 17) Source(46, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB) -2 >Emitted(66, 18) Source(46, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB) -3 >Emitted(66, 18) Source(24, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -4 >Emitted(66, 22) Source(46, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +1 >Emitted(69, 17) Source(46, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB) +2 >Emitted(69, 18) Source(46, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.ClassB) +3 >Emitted(69, 18) Source(24, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +4 >Emitted(69, 22) Source(46, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) --- >>> SubSubModule1.ClassB = ClassB; 1->^^^^^^^^^^^^^^^^ @@ -1160,11 +1431,11 @@ sourceFile:typeResolution.ts > } > } 5 > -1->Emitted(67, 17) Source(24, 26) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -2 >Emitted(67, 37) Source(24, 32) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -3 >Emitted(67, 40) Source(24, 26) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -4 >Emitted(67, 46) Source(46, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -5 >Emitted(67, 47) Source(46, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +1->Emitted(70, 17) Source(24, 26) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +2 >Emitted(70, 37) Source(24, 32) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +3 >Emitted(70, 40) Source(24, 26) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +4 >Emitted(70, 46) Source(46, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +5 >Emitted(70, 47) Source(46, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) --- >>> var NonExportedClassQ = (function () { 1->^^^^^^^^^^^^^^^^ @@ -1176,9 +1447,9 @@ sourceFile:typeResolution.ts > 2 > class 3 > NonExportedClassQ -1->Emitted(68, 17) Source(48, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -2 >Emitted(68, 21) Source(48, 19) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -3 >Emitted(68, 38) Source(48, 36) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +1->Emitted(71, 17) Source(48, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +2 >Emitted(71, 21) Source(48, 19) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +3 >Emitted(71, 38) Source(48, 36) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) --- >>> function NonExportedClassQ() { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1188,9 +1459,9 @@ sourceFile:typeResolution.ts > 2 > 3 > NonExportedClassQ -1->Emitted(69, 21) Source(49, 17) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ) -2 >Emitted(69, 30) Source(48, 19) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ) -3 >Emitted(69, 47) Source(48, 36) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ) +1->Emitted(72, 21) Source(49, 17) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ) +2 >Emitted(72, 30) Source(48, 19) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ) +3 >Emitted(72, 47) Source(48, 36) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ) --- >>> function QQ() { 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1202,9 +1473,9 @@ sourceFile:typeResolution.ts > 2 > function 3 > QQ -1 >Emitted(70, 25) Source(50, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor) -2 >Emitted(70, 34) Source(50, 30) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor) -3 >Emitted(70, 36) Source(50, 32) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor) +1 >Emitted(73, 25) Source(50, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor) +2 >Emitted(73, 34) Source(50, 30) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor) +3 >Emitted(73, 36) Source(50, 32) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor) --- >>> /* Sampling of stuff from AisIn1_1_1 */ 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1215,9 +1486,9 @@ sourceFile:typeResolution.ts > 2 > 3 > /* Sampling of stuff from AisIn1_1_1 */ -1->Emitted(71, 29) Source(52, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -2 >Emitted(71, 29) Source(51, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -3 >Emitted(71, 68) Source(51, 64) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +1->Emitted(74, 29) Source(52, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +2 >Emitted(74, 29) Source(51, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +3 >Emitted(74, 68) Source(51, 64) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) --- >>> var a4; 1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1228,9 +1499,9 @@ sourceFile:typeResolution.ts > var 2 > a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA 3 > ; -1 >Emitted(72, 33) Source(52, 29) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -2 >Emitted(72, 35) Source(52, 80) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -3 >Emitted(72, 36) Source(52, 81) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +1 >Emitted(75, 33) Source(52, 29) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +2 >Emitted(75, 35) Source(52, 80) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +3 >Emitted(75, 36) Source(52, 81) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) --- >>> a4.AisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1245,12 +1516,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_1_1 5 > () 6 > ; -1->Emitted(73, 29) Source(52, 82) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -2 >Emitted(73, 31) Source(52, 84) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -3 >Emitted(73, 32) Source(52, 85) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -4 >Emitted(73, 42) Source(52, 95) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -5 >Emitted(73, 44) Source(52, 97) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -6 >Emitted(73, 45) Source(52, 98) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +1->Emitted(76, 29) Source(52, 82) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +2 >Emitted(76, 31) Source(52, 84) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +3 >Emitted(76, 32) Source(52, 85) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +4 >Emitted(76, 42) Source(52, 95) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +5 >Emitted(76, 44) Source(52, 97) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +6 >Emitted(76, 45) Source(52, 98) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) --- >>> var c1; 1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1263,10 +1534,10 @@ sourceFile:typeResolution.ts 2 > var 3 > c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA 4 > ; -1 >Emitted(74, 29) Source(53, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -2 >Emitted(74, 33) Source(53, 29) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -3 >Emitted(74, 35) Source(53, 80) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -4 >Emitted(74, 36) Source(53, 81) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +1 >Emitted(77, 29) Source(53, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +2 >Emitted(77, 33) Source(53, 29) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +3 >Emitted(77, 35) Source(53, 80) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +4 >Emitted(77, 36) Source(53, 81) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) --- >>> c1.AisIn1_2_2(); 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1281,12 +1552,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_2_2 5 > () 6 > ; -1->Emitted(75, 29) Source(53, 82) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -2 >Emitted(75, 31) Source(53, 84) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -3 >Emitted(75, 32) Source(53, 85) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -4 >Emitted(75, 42) Source(53, 95) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -5 >Emitted(75, 44) Source(53, 97) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -6 >Emitted(75, 45) Source(53, 98) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +1->Emitted(78, 29) Source(53, 82) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +2 >Emitted(78, 31) Source(53, 84) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +3 >Emitted(78, 32) Source(53, 85) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +4 >Emitted(78, 42) Source(53, 95) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +5 >Emitted(78, 44) Source(53, 97) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +6 >Emitted(78, 45) Source(53, 98) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) --- >>> var d1; 1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1299,10 +1570,10 @@ sourceFile:typeResolution.ts 2 > var 3 > d1: InterfaceX 4 > ; -1 >Emitted(76, 29) Source(54, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -2 >Emitted(76, 33) Source(54, 29) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -3 >Emitted(76, 35) Source(54, 43) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -4 >Emitted(76, 36) Source(54, 44) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +1 >Emitted(79, 29) Source(54, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +2 >Emitted(79, 33) Source(54, 29) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +3 >Emitted(79, 35) Source(54, 43) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +4 >Emitted(79, 36) Source(54, 44) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) --- >>> d1.XisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1317,12 +1588,12 @@ sourceFile:typeResolution.ts 4 > XisIn1_1_1 5 > () 6 > ; -1->Emitted(77, 29) Source(54, 45) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -2 >Emitted(77, 31) Source(54, 47) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -3 >Emitted(77, 32) Source(54, 48) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -4 >Emitted(77, 42) Source(54, 58) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -5 >Emitted(77, 44) Source(54, 60) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -6 >Emitted(77, 45) Source(54, 61) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +1->Emitted(80, 29) Source(54, 45) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +2 >Emitted(80, 31) Source(54, 47) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +3 >Emitted(80, 32) Source(54, 48) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +4 >Emitted(80, 42) Source(54, 58) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +5 >Emitted(80, 44) Source(54, 60) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +6 >Emitted(80, 45) Source(54, 61) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) --- >>> var c2; 1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1335,10 +1606,10 @@ sourceFile:typeResolution.ts 2 > var 3 > c2: TopLevelModule2.SubModule3.ClassA 4 > ; -1 >Emitted(78, 29) Source(55, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -2 >Emitted(78, 33) Source(55, 29) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -3 >Emitted(78, 35) Source(55, 66) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -4 >Emitted(78, 36) Source(55, 67) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +1 >Emitted(81, 29) Source(55, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +2 >Emitted(81, 33) Source(55, 29) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +3 >Emitted(81, 35) Source(55, 66) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +4 >Emitted(81, 36) Source(55, 67) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) --- >>> c2.AisIn2_3(); 1->^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1353,12 +1624,12 @@ sourceFile:typeResolution.ts 4 > AisIn2_3 5 > () 6 > ; -1->Emitted(79, 29) Source(55, 68) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -2 >Emitted(79, 31) Source(55, 70) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -3 >Emitted(79, 32) Source(55, 71) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -4 >Emitted(79, 40) Source(55, 79) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -5 >Emitted(79, 42) Source(55, 81) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -6 >Emitted(79, 43) Source(55, 82) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +1->Emitted(82, 29) Source(55, 68) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +2 >Emitted(82, 31) Source(55, 70) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +3 >Emitted(82, 32) Source(55, 71) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +4 >Emitted(82, 40) Source(55, 79) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +5 >Emitted(82, 42) Source(55, 81) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +6 >Emitted(82, 43) Source(55, 82) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1366,8 +1637,8 @@ sourceFile:typeResolution.ts 1 > > 2 > } -1 >Emitted(80, 25) Source(56, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) -2 >Emitted(80, 26) Source(56, 22) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +1 >Emitted(83, 25) Source(56, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) +2 >Emitted(83, 26) Source(56, 22) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1376,8 +1647,8 @@ sourceFile:typeResolution.ts 1 > > 2 > } -1 >Emitted(81, 21) Source(57, 17) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor) -2 >Emitted(81, 22) Source(57, 18) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor) +1 >Emitted(84, 21) Source(57, 17) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor) +2 >Emitted(84, 22) Source(57, 18) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor) --- >>> return NonExportedClassQ; 1->^^^^^^^^^^^^^^^^^^^^ @@ -1385,15 +1656,15 @@ sourceFile:typeResolution.ts 1-> > 2 > } -1->Emitted(82, 21) Source(58, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ) -2 >Emitted(82, 45) Source(58, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ) +1->Emitted(85, 21) Source(58, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ) +2 >Emitted(85, 45) Source(58, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ 2 > ^ 3 > 4 > ^^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 2 > } 3 > @@ -1408,181 +1679,110 @@ sourceFile:typeResolution.ts > } > } > } -1 >Emitted(83, 17) Source(58, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ) -2 >Emitted(83, 18) Source(58, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ) -3 >Emitted(83, 18) Source(48, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -4 >Emitted(83, 22) Source(58, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +1 >Emitted(86, 17) Source(58, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ) +2 >Emitted(86, 18) Source(58, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ) +3 >Emitted(86, 18) Source(48, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +4 >Emitted(86, 22) Source(58, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) --- ->>> })(SubModule1.SubSubModule1 || (SubModule1.SubSubModule1 = {})); +>>> })(SubSubModule1 = SubModule1.SubSubModule1 || (SubModule1.SubSubModule1 = {})); 1->^^^^^^^^^^^^ 2 > ^ 3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^^^^ -5 > ^^^^^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^ -7 > ^^^^^^^^ +4 > ^^^^^^^^^^^^^ +5 > ^^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^^^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^^^^^^^ 1-> > 2 > } 3 > 4 > SubSubModule1 -5 > -6 > SubSubModule1 -7 > { - > export class ClassA { - > public AisIn1_1_1() { - > // Try all qualified names of this type - > var a1: ClassA; a1.AisIn1_1_1(); - > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); - > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); - > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); - > - > // Two variants of qualifying a peer type - > var b1: ClassB; b1.BisIn1_1_1(); - > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); - > - > // Type only accessible from the root - > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); - > - > // Interface reference - > var d1: InterfaceX; d1.XisIn1_1_1(); - > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); - > } - > } - > export class ClassB { - > public BisIn1_1_1() { - > /** Exactly the same as above in AisIn1_1_1 **/ - > - > // Try all qualified names of this type - > var a1: ClassA; a1.AisIn1_1_1(); - > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); - > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); - > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); - > - > // Two variants of qualifying a peer type - > var b1: ClassB; b1.BisIn1_1_1(); - > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); - > - > // Type only accessible from the root - > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); - > var c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3(); - > - > // Interface reference - > var d1: InterfaceX; d1.XisIn1_1_1(); - > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); - > } - > } - > export interface InterfaceX { XisIn1_1_1(); } - > class NonExportedClassQ { - > constructor() { - > function QQ() { - > /* Sampling of stuff from AisIn1_1_1 */ - > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); - > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); - > var d1: InterfaceX; d1.XisIn1_1_1(); - > var c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3(); - > } - > } - > } - > } -1->Emitted(84, 13) Source(59, 9) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -2 >Emitted(84, 14) Source(59, 10) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) -3 >Emitted(84, 16) Source(3, 23) + SourceIndex(0) name (TopLevelModule1.SubModule1) -4 >Emitted(84, 40) Source(3, 36) + SourceIndex(0) name (TopLevelModule1.SubModule1) -5 >Emitted(84, 45) Source(3, 23) + SourceIndex(0) name (TopLevelModule1.SubModule1) -6 >Emitted(84, 69) Source(3, 36) + SourceIndex(0) name (TopLevelModule1.SubModule1) -7 >Emitted(84, 77) Source(59, 10) + SourceIndex(0) name (TopLevelModule1.SubModule1) ---- ->>> var SubSubModule1 = SubModule1.SubSubModule1; -1 >^^^^^^^^^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^ -4 > ^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > -2 > export module -3 > SubSubModule1 -4 > -5 > SubSubModule1 { - > export class ClassA { - > public AisIn1_1_1() { - > // Try all qualified names of this type - > var a1: ClassA; a1.AisIn1_1_1(); - > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); - > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); - > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); - > - > // Two variants of qualifying a peer type - > var b1: ClassB; b1.BisIn1_1_1(); - > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); - > - > // Type only accessible from the root - > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); - > - > // Interface reference - > var d1: InterfaceX; d1.XisIn1_1_1(); - > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); - > } - > } - > export class ClassB { - > public BisIn1_1_1() { - > /** Exactly the same as above in AisIn1_1_1 **/ - > - > // Try all qualified names of this type - > var a1: ClassA; a1.AisIn1_1_1(); - > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); - > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); - > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); - > - > // Two variants of qualifying a peer type - > var b1: ClassB; b1.BisIn1_1_1(); - > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); - > - > // Type only accessible from the root - > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); - > var c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3(); - > - > // Interface reference - > var d1: InterfaceX; d1.XisIn1_1_1(); - > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); - > } - > } - > export interface InterfaceX { XisIn1_1_1(); } - > class NonExportedClassQ { - > constructor() { - > function QQ() { - > /* Sampling of stuff from AisIn1_1_1 */ - > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); - > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); - > var d1: InterfaceX; d1.XisIn1_1_1(); - > var c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3(); - > } - > } - > } - > } -6 > -1 >Emitted(85, 13) Source(3, 9) + SourceIndex(0) name (TopLevelModule1.SubModule1) -2 >Emitted(85, 17) Source(3, 23) + SourceIndex(0) name (TopLevelModule1.SubModule1) -3 >Emitted(85, 30) Source(3, 36) + SourceIndex(0) name (TopLevelModule1.SubModule1) -4 >Emitted(85, 33) Source(3, 23) + SourceIndex(0) name (TopLevelModule1.SubModule1) -5 >Emitted(85, 57) Source(59, 10) + SourceIndex(0) name (TopLevelModule1.SubModule1) -6 >Emitted(85, 58) Source(59, 10) + SourceIndex(0) name (TopLevelModule1.SubModule1) +5 > +6 > SubSubModule1 +7 > +8 > SubSubModule1 +9 > { + > export class ClassA { + > public AisIn1_1_1() { + > // Try all qualified names of this type + > var a1: ClassA; a1.AisIn1_1_1(); + > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); + > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); + > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); + > + > // Two variants of qualifying a peer type + > var b1: ClassB; b1.BisIn1_1_1(); + > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); + > + > // Type only accessible from the root + > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); + > + > // Interface reference + > var d1: InterfaceX; d1.XisIn1_1_1(); + > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); + > } + > } + > export class ClassB { + > public BisIn1_1_1() { + > /** Exactly the same as above in AisIn1_1_1 **/ + > + > // Try all qualified names of this type + > var a1: ClassA; a1.AisIn1_1_1(); + > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); + > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); + > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); + > + > // Two variants of qualifying a peer type + > var b1: ClassB; b1.BisIn1_1_1(); + > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); + > + > // Type only accessible from the root + > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); + > var c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3(); + > + > // Interface reference + > var d1: InterfaceX; d1.XisIn1_1_1(); + > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); + > } + > } + > export interface InterfaceX { XisIn1_1_1(); } + > class NonExportedClassQ { + > constructor() { + > function QQ() { + > /* Sampling of stuff from AisIn1_1_1 */ + > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); + > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); + > var d1: InterfaceX; d1.XisIn1_1_1(); + > var c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3(); + > } + > } + > } + > } +1->Emitted(87, 13) Source(59, 9) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +2 >Emitted(87, 14) Source(59, 10) + SourceIndex(0) name (TopLevelModule1.SubModule1.SubSubModule1) +3 >Emitted(87, 16) Source(3, 23) + SourceIndex(0) name (TopLevelModule1.SubModule1) +4 >Emitted(87, 29) Source(3, 36) + SourceIndex(0) name (TopLevelModule1.SubModule1) +5 >Emitted(87, 32) Source(3, 23) + SourceIndex(0) name (TopLevelModule1.SubModule1) +6 >Emitted(87, 56) Source(3, 36) + SourceIndex(0) name (TopLevelModule1.SubModule1) +7 >Emitted(87, 61) Source(3, 23) + SourceIndex(0) name (TopLevelModule1.SubModule1) +8 >Emitted(87, 85) Source(3, 36) + SourceIndex(0) name (TopLevelModule1.SubModule1) +9 >Emitted(87, 93) Source(59, 10) + SourceIndex(0) name (TopLevelModule1.SubModule1) --- >>> // Should have no effect on S1.SS1.ClassA above because it is not exported -1->^^^^^^^^^^^^ +1 >^^^^^^^^^^^^ 2 > 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1-> +1 > > > // Should have no effect on S1.SS1.ClassA above because it is not exported > 2 > 3 > // Should have no effect on S1.SS1.ClassA above because it is not exported -1->Emitted(86, 13) Source(62, 9) + SourceIndex(0) name (TopLevelModule1.SubModule1) -2 >Emitted(86, 13) Source(61, 9) + SourceIndex(0) name (TopLevelModule1.SubModule1) -3 >Emitted(86, 87) Source(61, 83) + SourceIndex(0) name (TopLevelModule1.SubModule1) +1 >Emitted(88, 13) Source(62, 9) + SourceIndex(0) name (TopLevelModule1.SubModule1) +2 >Emitted(88, 13) Source(61, 9) + SourceIndex(0) name (TopLevelModule1.SubModule1) +3 >Emitted(88, 87) Source(61, 83) + SourceIndex(0) name (TopLevelModule1.SubModule1) --- >>> var ClassA = (function () { 1 >^^^^^^^^^^^^^^^^ @@ -1591,8 +1791,8 @@ sourceFile:typeResolution.ts 1 > > class 2 > ClassA -1 >Emitted(87, 17) Source(62, 15) + SourceIndex(0) name (TopLevelModule1.SubModule1) -2 >Emitted(87, 23) Source(62, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1) +1 >Emitted(89, 17) Source(62, 15) + SourceIndex(0) name (TopLevelModule1.SubModule1) +2 >Emitted(89, 23) Source(62, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1) --- >>> function ClassA() { 1->^^^^^^^^^^^^^^^^ @@ -1603,9 +1803,9 @@ sourceFile:typeResolution.ts > 2 > 3 > ClassA -1->Emitted(88, 17) Source(63, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA) -2 >Emitted(88, 26) Source(62, 15) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA) -3 >Emitted(88, 32) Source(62, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA) +1->Emitted(90, 17) Source(63, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA) +2 >Emitted(90, 26) Source(62, 15) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA) +3 >Emitted(90, 32) Source(62, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA) --- >>> function AA() { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1617,9 +1817,9 @@ sourceFile:typeResolution.ts > 2 > function 3 > AA -1->Emitted(89, 21) Source(64, 17) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor) -2 >Emitted(89, 30) Source(64, 26) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor) -3 >Emitted(89, 32) Source(64, 28) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor) +1->Emitted(91, 21) Source(64, 17) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor) +2 >Emitted(91, 30) Source(64, 26) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor) +3 >Emitted(91, 32) Source(64, 28) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor) --- >>> var a2; 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1632,10 +1832,10 @@ sourceFile:typeResolution.ts 2 > var 3 > a2: SubSubModule1.ClassA 4 > ; -1->Emitted(90, 25) Source(65, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -2 >Emitted(90, 29) Source(65, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -3 >Emitted(90, 31) Source(65, 49) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -4 >Emitted(90, 32) Source(65, 50) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +1->Emitted(92, 25) Source(65, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +2 >Emitted(92, 29) Source(65, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +3 >Emitted(92, 31) Source(65, 49) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +4 >Emitted(92, 32) Source(65, 50) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) --- >>> a2.AisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1650,12 +1850,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_1_1 5 > () 6 > ; -1->Emitted(91, 25) Source(65, 51) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -2 >Emitted(91, 27) Source(65, 53) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -3 >Emitted(91, 28) Source(65, 54) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -4 >Emitted(91, 38) Source(65, 64) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -5 >Emitted(91, 40) Source(65, 66) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -6 >Emitted(91, 41) Source(65, 67) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +1->Emitted(93, 25) Source(65, 51) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +2 >Emitted(93, 27) Source(65, 53) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +3 >Emitted(93, 28) Source(65, 54) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +4 >Emitted(93, 38) Source(65, 64) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +5 >Emitted(93, 40) Source(65, 66) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +6 >Emitted(93, 41) Source(65, 67) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) --- >>> var a3; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1668,10 +1868,10 @@ sourceFile:typeResolution.ts 2 > var 3 > a3: SubModule1.SubSubModule1.ClassA 4 > ; -1 >Emitted(92, 25) Source(66, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -2 >Emitted(92, 29) Source(66, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -3 >Emitted(92, 31) Source(66, 60) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -4 >Emitted(92, 32) Source(66, 61) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +1 >Emitted(94, 25) Source(66, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +2 >Emitted(94, 29) Source(66, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +3 >Emitted(94, 31) Source(66, 60) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +4 >Emitted(94, 32) Source(66, 61) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) --- >>> a3.AisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1686,12 +1886,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_1_1 5 > () 6 > ; -1->Emitted(93, 25) Source(66, 62) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -2 >Emitted(93, 27) Source(66, 64) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -3 >Emitted(93, 28) Source(66, 65) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -4 >Emitted(93, 38) Source(66, 75) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -5 >Emitted(93, 40) Source(66, 77) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -6 >Emitted(93, 41) Source(66, 78) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +1->Emitted(95, 25) Source(66, 62) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +2 >Emitted(95, 27) Source(66, 64) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +3 >Emitted(95, 28) Source(66, 65) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +4 >Emitted(95, 38) Source(66, 75) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +5 >Emitted(95, 40) Source(66, 77) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +6 >Emitted(95, 41) Source(66, 78) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) --- >>> var a4; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1704,10 +1904,10 @@ sourceFile:typeResolution.ts 2 > var 3 > a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA 4 > ; -1 >Emitted(94, 25) Source(67, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -2 >Emitted(94, 29) Source(67, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -3 >Emitted(94, 31) Source(67, 76) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -4 >Emitted(94, 32) Source(67, 77) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +1 >Emitted(96, 25) Source(67, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +2 >Emitted(96, 29) Source(67, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +3 >Emitted(96, 31) Source(67, 76) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +4 >Emitted(96, 32) Source(67, 77) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) --- >>> a4.AisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1723,12 +1923,12 @@ sourceFile:typeResolution.ts 4 > AisIn1_1_1 5 > () 6 > ; -1->Emitted(95, 25) Source(67, 78) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -2 >Emitted(95, 27) Source(67, 80) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -3 >Emitted(95, 28) Source(67, 81) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -4 >Emitted(95, 38) Source(67, 91) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -5 >Emitted(95, 40) Source(67, 93) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -6 >Emitted(95, 41) Source(67, 94) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +1->Emitted(97, 25) Source(67, 78) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +2 >Emitted(97, 27) Source(67, 80) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +3 >Emitted(97, 28) Source(67, 81) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +4 >Emitted(97, 38) Source(67, 91) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +5 >Emitted(97, 40) Source(67, 93) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +6 >Emitted(97, 41) Source(67, 94) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) --- >>> // Interface reference 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1740,9 +1940,9 @@ sourceFile:typeResolution.ts > 2 > 3 > // Interface reference -1->Emitted(96, 25) Source(70, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -2 >Emitted(96, 25) Source(69, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -3 >Emitted(96, 47) Source(69, 43) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +1->Emitted(98, 25) Source(70, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +2 >Emitted(98, 25) Source(69, 21) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +3 >Emitted(98, 47) Source(69, 43) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) --- >>> var d2; 1 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1753,9 +1953,9 @@ sourceFile:typeResolution.ts > var 2 > d2: SubSubModule1.InterfaceX 3 > ; -1 >Emitted(97, 29) Source(70, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -2 >Emitted(97, 31) Source(70, 53) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -3 >Emitted(97, 32) Source(70, 54) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +1 >Emitted(99, 29) Source(70, 25) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +2 >Emitted(99, 31) Source(70, 53) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +3 >Emitted(99, 32) Source(70, 54) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) --- >>> d2.XisIn1_1_1(); 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1770,12 +1970,12 @@ sourceFile:typeResolution.ts 4 > XisIn1_1_1 5 > () 6 > ; -1->Emitted(98, 25) Source(70, 55) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -2 >Emitted(98, 27) Source(70, 57) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -3 >Emitted(98, 28) Source(70, 58) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -4 >Emitted(98, 38) Source(70, 68) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -5 >Emitted(98, 40) Source(70, 70) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -6 >Emitted(98, 41) Source(70, 71) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +1->Emitted(100, 25) Source(70, 55) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +2 >Emitted(100, 27) Source(70, 57) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +3 >Emitted(100, 28) Source(70, 58) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +4 >Emitted(100, 38) Source(70, 68) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +5 >Emitted(100, 40) Source(70, 70) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +6 >Emitted(100, 41) Source(70, 71) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1783,8 +1983,8 @@ sourceFile:typeResolution.ts 1 > > 2 > } -1 >Emitted(99, 21) Source(71, 17) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) -2 >Emitted(99, 22) Source(71, 18) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +1 >Emitted(101, 21) Source(71, 17) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) +2 >Emitted(101, 22) Source(71, 18) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor.AA) --- >>> } 1 >^^^^^^^^^^^^^^^^ @@ -1793,8 +1993,8 @@ sourceFile:typeResolution.ts 1 > > 2 > } -1 >Emitted(100, 17) Source(72, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor) -2 >Emitted(100, 18) Source(72, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor) +1 >Emitted(102, 17) Source(72, 13) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor) +2 >Emitted(102, 18) Source(72, 14) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA.constructor) --- >>> return ClassA; 1->^^^^^^^^^^^^^^^^ @@ -1802,15 +2002,15 @@ sourceFile:typeResolution.ts 1-> > 2 > } -1->Emitted(101, 17) Source(73, 9) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA) -2 >Emitted(101, 30) Source(73, 10) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA) +1->Emitted(103, 17) Source(73, 9) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA) +2 >Emitted(103, 30) Source(73, 10) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA) --- >>> })(); 1 >^^^^^^^^^^^^ 2 > ^ 3 > 4 > ^^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 2 > } 3 > @@ -1826,218 +2026,180 @@ sourceFile:typeResolution.ts > } > } > } -1 >Emitted(102, 13) Source(73, 9) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA) -2 >Emitted(102, 14) Source(73, 10) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA) -3 >Emitted(102, 14) Source(62, 9) + SourceIndex(0) name (TopLevelModule1.SubModule1) -4 >Emitted(102, 18) Source(73, 10) + SourceIndex(0) name (TopLevelModule1.SubModule1) +1 >Emitted(104, 13) Source(73, 9) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA) +2 >Emitted(104, 14) Source(73, 10) + SourceIndex(0) name (TopLevelModule1.SubModule1.ClassA) +3 >Emitted(104, 14) Source(62, 9) + SourceIndex(0) name (TopLevelModule1.SubModule1) +4 >Emitted(104, 18) Source(73, 10) + SourceIndex(0) name (TopLevelModule1.SubModule1) --- ->>> })(TopLevelModule1.SubModule1 || (TopLevelModule1.SubModule1 = {})); +>>> })(SubModule1 = TopLevelModule1.SubModule1 || (TopLevelModule1.SubModule1 = {})); 1->^^^^^^^^ 2 > ^ 3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ -5 > ^^^^^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ -7 > ^^^^^^^^ +4 > ^^^^^^^^^^ +5 > ^^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^^^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^^^^^^^ 1-> > 2 > } 3 > 4 > SubModule1 -5 > -6 > SubModule1 -7 > { - > export module SubSubModule1 { - > export class ClassA { - > public AisIn1_1_1() { - > // Try all qualified names of this type - > var a1: ClassA; a1.AisIn1_1_1(); - > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); - > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); - > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); - > - > // Two variants of qualifying a peer type - > var b1: ClassB; b1.BisIn1_1_1(); - > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); - > - > // Type only accessible from the root - > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); - > - > // Interface reference - > var d1: InterfaceX; d1.XisIn1_1_1(); - > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); - > } - > } - > export class ClassB { - > public BisIn1_1_1() { - > /** Exactly the same as above in AisIn1_1_1 **/ - > - > // Try all qualified names of this type - > var a1: ClassA; a1.AisIn1_1_1(); - > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); - > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); - > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); - > - > // Two variants of qualifying a peer type - > var b1: ClassB; b1.BisIn1_1_1(); - > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); - > - > // Type only accessible from the root - > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); - > var c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3(); - > - > // Interface reference - > var d1: InterfaceX; d1.XisIn1_1_1(); - > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); - > } - > } - > export interface InterfaceX { XisIn1_1_1(); } - > class NonExportedClassQ { - > constructor() { - > function QQ() { - > /* Sampling of stuff from AisIn1_1_1 */ - > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); - > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); - > var d1: InterfaceX; d1.XisIn1_1_1(); - > var c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3(); - > } - > } - > } - > } - > - > // Should have no effect on S1.SS1.ClassA above because it is not exported - > class ClassA { - > constructor() { - > function AA() { - > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); - > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); - > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); - > - > // Interface reference - > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); - > } - > } - > } - > } -1->Emitted(103, 9) Source(74, 5) + SourceIndex(0) name (TopLevelModule1.SubModule1) -2 >Emitted(103, 10) Source(74, 6) + SourceIndex(0) name (TopLevelModule1.SubModule1) -3 >Emitted(103, 12) Source(2, 19) + SourceIndex(0) name (TopLevelModule1) -4 >Emitted(103, 38) Source(2, 29) + SourceIndex(0) name (TopLevelModule1) -5 >Emitted(103, 43) Source(2, 19) + SourceIndex(0) name (TopLevelModule1) -6 >Emitted(103, 69) Source(2, 29) + SourceIndex(0) name (TopLevelModule1) -7 >Emitted(103, 77) Source(74, 6) + SourceIndex(0) name (TopLevelModule1) +5 > +6 > SubModule1 +7 > +8 > SubModule1 +9 > { + > export module SubSubModule1 { + > export class ClassA { + > public AisIn1_1_1() { + > // Try all qualified names of this type + > var a1: ClassA; a1.AisIn1_1_1(); + > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); + > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); + > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); + > + > // Two variants of qualifying a peer type + > var b1: ClassB; b1.BisIn1_1_1(); + > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); + > + > // Type only accessible from the root + > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); + > + > // Interface reference + > var d1: InterfaceX; d1.XisIn1_1_1(); + > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); + > } + > } + > export class ClassB { + > public BisIn1_1_1() { + > /** Exactly the same as above in AisIn1_1_1 **/ + > + > // Try all qualified names of this type + > var a1: ClassA; a1.AisIn1_1_1(); + > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); + > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); + > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); + > + > // Two variants of qualifying a peer type + > var b1: ClassB; b1.BisIn1_1_1(); + > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); + > + > // Type only accessible from the root + > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); + > var c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3(); + > + > // Interface reference + > var d1: InterfaceX; d1.XisIn1_1_1(); + > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); + > } + > } + > export interface InterfaceX { XisIn1_1_1(); } + > class NonExportedClassQ { + > constructor() { + > function QQ() { + > /* Sampling of stuff from AisIn1_1_1 */ + > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); + > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); + > var d1: InterfaceX; d1.XisIn1_1_1(); + > var c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3(); + > } + > } + > } + > } + > + > // Should have no effect on S1.SS1.ClassA above because it is not exported + > class ClassA { + > constructor() { + > function AA() { + > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); + > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); + > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); + > + > // Interface reference + > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); + > } + > } + > } + > } +1->Emitted(105, 9) Source(74, 5) + SourceIndex(0) name (TopLevelModule1.SubModule1) +2 >Emitted(105, 10) Source(74, 6) + SourceIndex(0) name (TopLevelModule1.SubModule1) +3 >Emitted(105, 12) Source(2, 19) + SourceIndex(0) name (TopLevelModule1) +4 >Emitted(105, 22) Source(2, 29) + SourceIndex(0) name (TopLevelModule1) +5 >Emitted(105, 25) Source(2, 19) + SourceIndex(0) name (TopLevelModule1) +6 >Emitted(105, 51) Source(2, 29) + SourceIndex(0) name (TopLevelModule1) +7 >Emitted(105, 56) Source(2, 19) + SourceIndex(0) name (TopLevelModule1) +8 >Emitted(105, 82) Source(2, 29) + SourceIndex(0) name (TopLevelModule1) +9 >Emitted(105, 90) Source(74, 6) + SourceIndex(0) name (TopLevelModule1) --- ->>> var SubModule1 = TopLevelModule1.SubModule1; +>>> var SubModule2; 1 >^^^^^^^^ 2 > ^^^^ 3 > ^^^^^^^^^^ -4 > ^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ -6 > ^ -1 > -2 > export module -3 > SubModule1 -4 > -5 > SubModule1 { - > export module SubSubModule1 { - > export class ClassA { - > public AisIn1_1_1() { - > // Try all qualified names of this type - > var a1: ClassA; a1.AisIn1_1_1(); - > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); - > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); - > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); - > - > // Two variants of qualifying a peer type - > var b1: ClassB; b1.BisIn1_1_1(); - > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); - > - > // Type only accessible from the root - > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); - > - > // Interface reference - > var d1: InterfaceX; d1.XisIn1_1_1(); - > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); - > } - > } - > export class ClassB { - > public BisIn1_1_1() { - > /** Exactly the same as above in AisIn1_1_1 **/ - > - > // Try all qualified names of this type - > var a1: ClassA; a1.AisIn1_1_1(); - > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); - > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); - > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); - > - > // Two variants of qualifying a peer type - > var b1: ClassB; b1.BisIn1_1_1(); - > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); - > - > // Type only accessible from the root - > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); - > var c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3(); - > - > // Interface reference - > var d1: InterfaceX; d1.XisIn1_1_1(); - > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); - > } - > } - > export interface InterfaceX { XisIn1_1_1(); } - > class NonExportedClassQ { - > constructor() { - > function QQ() { - > /* Sampling of stuff from AisIn1_1_1 */ - > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); - > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); - > var d1: InterfaceX; d1.XisIn1_1_1(); - > var c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3(); - > } - > } - > } - > } - > - > // Should have no effect on S1.SS1.ClassA above because it is not exported - > class ClassA { - > constructor() { - > function AA() { - > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); - > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); - > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); - > - > // Interface reference - > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); - > } - > } - > } - > } -6 > -1 >Emitted(104, 9) Source(2, 5) + SourceIndex(0) name (TopLevelModule1) -2 >Emitted(104, 13) Source(2, 19) + SourceIndex(0) name (TopLevelModule1) -3 >Emitted(104, 23) Source(2, 29) + SourceIndex(0) name (TopLevelModule1) -4 >Emitted(104, 26) Source(2, 19) + SourceIndex(0) name (TopLevelModule1) -5 >Emitted(104, 52) Source(74, 6) + SourceIndex(0) name (TopLevelModule1) -6 >Emitted(104, 53) Source(74, 6) + SourceIndex(0) name (TopLevelModule1) ---- ->>> (function (SubModule2) { -1 >^^^^^^^^ -2 > ^^^^^^^^^^^ -3 > ^^^^^^^^^^ -4 > ^^ -5 > ^ -6 > ^^^^^^^^-> +4 > ^ +5 > ^^^^^^^^^^-> 1 > > > 2 > export module +3 > SubModule2 +4 > { + > export module SubSubModule2 { + > // No code here since these are the mirror of the above calls + > export class ClassA { public AisIn1_2_2() { } } + > export class ClassB { public BisIn1_2_2() { } } + > export class ClassC { public CisIn1_2_2() { } } + > export interface InterfaceY { YisIn1_2_2(); } + > interface NonExportedInterfaceQ { } + > } + > + > export interface InterfaceY { YisIn1_2(); } + > } +1 >Emitted(106, 9) Source(76, 5) + SourceIndex(0) name (TopLevelModule1) +2 >Emitted(106, 13) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) +3 >Emitted(106, 23) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) +4 >Emitted(106, 24) Source(87, 6) + SourceIndex(0) name (TopLevelModule1) +--- +>>> (function (SubModule2) { +1->^^^^^^^^ +2 > ^^^^^^^^^^^ +3 > ^^^^^^^^^^ +4 > ^^ +5 > ^ +1-> +2 > export module 3 > SubModule2 4 > 5 > { -1 >Emitted(105, 9) Source(76, 5) + SourceIndex(0) name (TopLevelModule1) -2 >Emitted(105, 20) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) -3 >Emitted(105, 30) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) -4 >Emitted(105, 32) Source(76, 30) + SourceIndex(0) name (TopLevelModule1) -5 >Emitted(105, 33) Source(76, 31) + SourceIndex(0) name (TopLevelModule1) +1->Emitted(107, 9) Source(76, 5) + SourceIndex(0) name (TopLevelModule1) +2 >Emitted(107, 20) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) +3 >Emitted(107, 30) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) +4 >Emitted(107, 32) Source(76, 30) + SourceIndex(0) name (TopLevelModule1) +5 >Emitted(107, 33) Source(76, 31) + SourceIndex(0) name (TopLevelModule1) +--- +>>> var SubSubModule2; +1 >^^^^^^^^^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^-> +1 > + > +2 > export module +3 > SubSubModule2 +4 > { + > // No code here since these are the mirror of the above calls + > export class ClassA { public AisIn1_2_2() { } } + > export class ClassB { public BisIn1_2_2() { } } + > export class ClassC { public CisIn1_2_2() { } } + > export interface InterfaceY { YisIn1_2_2(); } + > interface NonExportedInterfaceQ { } + > } +1 >Emitted(108, 13) Source(77, 9) + SourceIndex(0) name (TopLevelModule1.SubModule2) +2 >Emitted(108, 17) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) +3 >Emitted(108, 30) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) +4 >Emitted(108, 31) Source(84, 10) + SourceIndex(0) name (TopLevelModule1.SubModule2) --- >>> (function (SubSubModule2) { 1->^^^^^^^^^^^^ @@ -2046,17 +2208,16 @@ sourceFile:typeResolution.ts 4 > ^^ 5 > ^ 6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1-> - > +1-> 2 > export module 3 > SubSubModule2 4 > 5 > { -1->Emitted(106, 13) Source(77, 9) + SourceIndex(0) name (TopLevelModule1.SubModule2) -2 >Emitted(106, 24) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) -3 >Emitted(106, 37) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) -4 >Emitted(106, 39) Source(77, 37) + SourceIndex(0) name (TopLevelModule1.SubModule2) -5 >Emitted(106, 40) Source(77, 38) + SourceIndex(0) name (TopLevelModule1.SubModule2) +1->Emitted(109, 13) Source(77, 9) + SourceIndex(0) name (TopLevelModule1.SubModule2) +2 >Emitted(109, 24) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) +3 >Emitted(109, 37) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) +4 >Emitted(109, 39) Source(77, 37) + SourceIndex(0) name (TopLevelModule1.SubModule2) +5 >Emitted(109, 40) Source(77, 38) + SourceIndex(0) name (TopLevelModule1.SubModule2) --- >>> // No code here since these are the mirror of the above calls 1->^^^^^^^^^^^^^^^^ @@ -2067,9 +2228,9 @@ sourceFile:typeResolution.ts > 2 > 3 > // No code here since these are the mirror of the above calls -1->Emitted(107, 17) Source(79, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -2 >Emitted(107, 17) Source(78, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -3 >Emitted(107, 78) Source(78, 74) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1->Emitted(110, 17) Source(79, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +2 >Emitted(110, 17) Source(78, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +3 >Emitted(110, 78) Source(78, 74) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> var ClassA = (function () { 1 >^^^^^^^^^^^^^^^^^^^^ @@ -2078,8 +2239,8 @@ sourceFile:typeResolution.ts 1 > > export class 2 > ClassA -1 >Emitted(108, 21) Source(79, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -2 >Emitted(108, 27) Source(79, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1 >Emitted(111, 21) Source(79, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +2 >Emitted(111, 27) Source(79, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> function ClassA() { 1->^^^^^^^^^^^^^^^^^^^^ @@ -2088,9 +2249,9 @@ sourceFile:typeResolution.ts 1-> 2 > export class 3 > ClassA -1->Emitted(109, 21) Source(79, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) -2 >Emitted(109, 30) Source(79, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) -3 >Emitted(109, 36) Source(79, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) +1->Emitted(112, 21) Source(79, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) +2 >Emitted(112, 30) Source(79, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) +3 >Emitted(112, 36) Source(79, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ @@ -2098,8 +2259,8 @@ sourceFile:typeResolution.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > { public AisIn1_2_2() { } 2 > } -1 >Emitted(110, 21) Source(79, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA.constructor) -2 >Emitted(110, 22) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA.constructor) +1 >Emitted(113, 21) Source(79, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA.constructor) +2 >Emitted(113, 22) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA.constructor) --- >>> ClassA.prototype.AisIn1_2_2 = function () { 1->^^^^^^^^^^^^^^^^^^^^ @@ -2108,9 +2269,9 @@ sourceFile:typeResolution.ts 1-> 2 > AisIn1_2_2 3 > -1->Emitted(111, 21) Source(79, 42) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) -2 >Emitted(111, 48) Source(79, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) -3 >Emitted(111, 51) Source(79, 35) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) +1->Emitted(114, 21) Source(79, 42) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) +2 >Emitted(114, 48) Source(79, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) +3 >Emitted(114, 51) Source(79, 35) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -2118,16 +2279,16 @@ sourceFile:typeResolution.ts 3 > ^^^^^^^^^^^^^^-> 1 >public AisIn1_2_2() { 2 > } -1 >Emitted(112, 21) Source(79, 57) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA.AisIn1_2_2) -2 >Emitted(112, 22) Source(79, 58) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA.AisIn1_2_2) +1 >Emitted(115, 21) Source(79, 57) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA.AisIn1_2_2) +2 >Emitted(115, 22) Source(79, 58) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA.AisIn1_2_2) --- >>> return ClassA; 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(113, 21) Source(79, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) -2 >Emitted(113, 34) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) +1->Emitted(116, 21) Source(79, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) +2 >Emitted(116, 34) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -2139,10 +2300,10 @@ sourceFile:typeResolution.ts 2 > } 3 > 4 > export class ClassA { public AisIn1_2_2() { } } -1 >Emitted(114, 17) Source(79, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) -2 >Emitted(114, 18) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) -3 >Emitted(114, 18) Source(79, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(114, 22) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1 >Emitted(117, 17) Source(79, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) +2 >Emitted(117, 18) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) +3 >Emitted(117, 18) Source(79, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(117, 22) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> SubSubModule2.ClassA = ClassA; 1->^^^^^^^^^^^^^^^^ @@ -2155,11 +2316,11 @@ sourceFile:typeResolution.ts 3 > 4 > ClassA { public AisIn1_2_2() { } } 5 > -1->Emitted(115, 17) Source(79, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -2 >Emitted(115, 37) Source(79, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -3 >Emitted(115, 40) Source(79, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(115, 46) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -5 >Emitted(115, 47) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1->Emitted(118, 17) Source(79, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +2 >Emitted(118, 37) Source(79, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +3 >Emitted(118, 40) Source(79, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(118, 46) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +5 >Emitted(118, 47) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> var ClassB = (function () { 1 >^^^^^^^^^^^^^^^^ @@ -2170,9 +2331,9 @@ sourceFile:typeResolution.ts > 2 > export class 3 > ClassB -1 >Emitted(116, 17) Source(80, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -2 >Emitted(116, 21) Source(80, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -3 >Emitted(116, 27) Source(80, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1 >Emitted(119, 17) Source(80, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +2 >Emitted(119, 21) Source(80, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +3 >Emitted(119, 27) Source(80, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> function ClassB() { 1->^^^^^^^^^^^^^^^^^^^^ @@ -2181,9 +2342,9 @@ sourceFile:typeResolution.ts 1-> 2 > export class 3 > ClassB -1->Emitted(117, 21) Source(80, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -2 >Emitted(117, 30) Source(80, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -3 >Emitted(117, 36) Source(80, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +1->Emitted(120, 21) Source(80, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +2 >Emitted(120, 30) Source(80, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +3 >Emitted(120, 36) Source(80, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ @@ -2191,8 +2352,8 @@ sourceFile:typeResolution.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > { public BisIn1_2_2() { } 2 > } -1 >Emitted(118, 21) Source(80, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.constructor) -2 >Emitted(118, 22) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.constructor) +1 >Emitted(121, 21) Source(80, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.constructor) +2 >Emitted(121, 22) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.constructor) --- >>> ClassB.prototype.BisIn1_2_2 = function () { 1->^^^^^^^^^^^^^^^^^^^^ @@ -2201,9 +2362,9 @@ sourceFile:typeResolution.ts 1-> 2 > BisIn1_2_2 3 > -1->Emitted(119, 21) Source(80, 42) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -2 >Emitted(119, 48) Source(80, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -3 >Emitted(119, 51) Source(80, 35) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +1->Emitted(122, 21) Source(80, 42) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +2 >Emitted(122, 48) Source(80, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +3 >Emitted(122, 51) Source(80, 35) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -2211,16 +2372,16 @@ sourceFile:typeResolution.ts 3 > ^^^^^^^^^^^^^^-> 1 >public BisIn1_2_2() { 2 > } -1 >Emitted(120, 21) Source(80, 57) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.BisIn1_2_2) -2 >Emitted(120, 22) Source(80, 58) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.BisIn1_2_2) +1 >Emitted(123, 21) Source(80, 57) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.BisIn1_2_2) +2 >Emitted(123, 22) Source(80, 58) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.BisIn1_2_2) --- >>> return ClassB; 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(121, 21) Source(80, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -2 >Emitted(121, 34) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +1->Emitted(124, 21) Source(80, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +2 >Emitted(124, 34) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -2232,10 +2393,10 @@ sourceFile:typeResolution.ts 2 > } 3 > 4 > export class ClassB { public BisIn1_2_2() { } } -1 >Emitted(122, 17) Source(80, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -2 >Emitted(122, 18) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -3 >Emitted(122, 18) Source(80, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(122, 22) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1 >Emitted(125, 17) Source(80, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +2 >Emitted(125, 18) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +3 >Emitted(125, 18) Source(80, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(125, 22) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> SubSubModule2.ClassB = ClassB; 1->^^^^^^^^^^^^^^^^ @@ -2248,11 +2409,11 @@ sourceFile:typeResolution.ts 3 > 4 > ClassB { public BisIn1_2_2() { } } 5 > -1->Emitted(123, 17) Source(80, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -2 >Emitted(123, 37) Source(80, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -3 >Emitted(123, 40) Source(80, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(123, 46) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -5 >Emitted(123, 47) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1->Emitted(126, 17) Source(80, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +2 >Emitted(126, 37) Source(80, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +3 >Emitted(126, 40) Source(80, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(126, 46) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +5 >Emitted(126, 47) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> var ClassC = (function () { 1 >^^^^^^^^^^^^^^^^ @@ -2263,9 +2424,9 @@ sourceFile:typeResolution.ts > 2 > export class 3 > ClassC -1 >Emitted(124, 17) Source(81, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -2 >Emitted(124, 21) Source(81, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -3 >Emitted(124, 27) Source(81, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1 >Emitted(127, 17) Source(81, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +2 >Emitted(127, 21) Source(81, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +3 >Emitted(127, 27) Source(81, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> function ClassC() { 1->^^^^^^^^^^^^^^^^^^^^ @@ -2274,9 +2435,9 @@ sourceFile:typeResolution.ts 1-> 2 > export class 3 > ClassC -1->Emitted(125, 21) Source(81, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -2 >Emitted(125, 30) Source(81, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -3 >Emitted(125, 36) Source(81, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +1->Emitted(128, 21) Source(81, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +2 >Emitted(128, 30) Source(81, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +3 >Emitted(128, 36) Source(81, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ @@ -2284,8 +2445,8 @@ sourceFile:typeResolution.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > { public CisIn1_2_2() { } 2 > } -1 >Emitted(126, 21) Source(81, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.constructor) -2 >Emitted(126, 22) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.constructor) +1 >Emitted(129, 21) Source(81, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.constructor) +2 >Emitted(129, 22) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.constructor) --- >>> ClassC.prototype.CisIn1_2_2 = function () { 1->^^^^^^^^^^^^^^^^^^^^ @@ -2294,9 +2455,9 @@ sourceFile:typeResolution.ts 1-> 2 > CisIn1_2_2 3 > -1->Emitted(127, 21) Source(81, 42) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -2 >Emitted(127, 48) Source(81, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -3 >Emitted(127, 51) Source(81, 35) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +1->Emitted(130, 21) Source(81, 42) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +2 >Emitted(130, 48) Source(81, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +3 >Emitted(130, 51) Source(81, 35) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -2304,16 +2465,16 @@ sourceFile:typeResolution.ts 3 > ^^^^^^^^^^^^^^-> 1 >public CisIn1_2_2() { 2 > } -1 >Emitted(128, 21) Source(81, 57) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.CisIn1_2_2) -2 >Emitted(128, 22) Source(81, 58) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.CisIn1_2_2) +1 >Emitted(131, 21) Source(81, 57) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.CisIn1_2_2) +2 >Emitted(131, 22) Source(81, 58) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.CisIn1_2_2) --- >>> return ClassC; 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(129, 21) Source(81, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -2 >Emitted(129, 34) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +1->Emitted(132, 21) Source(81, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +2 >Emitted(132, 34) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -2325,10 +2486,10 @@ sourceFile:typeResolution.ts 2 > } 3 > 4 > export class ClassC { public CisIn1_2_2() { } } -1 >Emitted(130, 17) Source(81, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -2 >Emitted(130, 18) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -3 >Emitted(130, 18) Source(81, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(130, 22) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1 >Emitted(133, 17) Source(81, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +2 >Emitted(133, 18) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +3 >Emitted(133, 18) Source(81, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(133, 22) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> SubSubModule2.ClassC = ClassC; 1->^^^^^^^^^^^^^^^^ @@ -2336,27 +2497,29 @@ sourceFile:typeResolution.ts 3 > ^^^ 4 > ^^^^^^ 5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 > ClassC 3 > 4 > ClassC { public CisIn1_2_2() { } } 5 > -1->Emitted(131, 17) Source(81, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -2 >Emitted(131, 37) Source(81, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -3 >Emitted(131, 40) Source(81, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(131, 46) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -5 >Emitted(131, 47) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1->Emitted(134, 17) Source(81, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +2 >Emitted(134, 37) Source(81, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +3 >Emitted(134, 40) Source(81, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(134, 46) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +5 >Emitted(134, 47) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- ->>> })(SubModule2.SubSubModule2 || (SubModule2.SubSubModule2 = {})); +>>> })(SubSubModule2 = SubModule2.SubSubModule2 || (SubModule2.SubSubModule2 = {})); 1->^^^^^^^^^^^^^^^^ 2 > 3 > ^ 4 > ^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^ -6 > ^^^^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^^^^^^^ +5 > ^^^^^^^^^^^^^ +6 > ^^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^^^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^^^^^^^ 1-> > export interface InterfaceY { YisIn1_2_2(); } > interface NonExportedInterfaceQ { } @@ -2365,63 +2528,41 @@ sourceFile:typeResolution.ts 3 > } 4 > 5 > SubSubModule2 -6 > -7 > SubSubModule2 -8 > { - > // No code here since these are the mirror of the above calls - > export class ClassA { public AisIn1_2_2() { } } - > export class ClassB { public BisIn1_2_2() { } } - > export class ClassC { public CisIn1_2_2() { } } - > export interface InterfaceY { YisIn1_2_2(); } - > interface NonExportedInterfaceQ { } - > } -1->Emitted(132, 17) Source(83, 48) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -2 >Emitted(132, 13) Source(84, 9) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -3 >Emitted(132, 14) Source(84, 10) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(132, 16) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) -5 >Emitted(132, 40) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) -6 >Emitted(132, 45) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) -7 >Emitted(132, 69) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) -8 >Emitted(132, 77) Source(84, 10) + SourceIndex(0) name (TopLevelModule1.SubModule2) +6 > +7 > SubSubModule2 +8 > +9 > SubSubModule2 +10> { + > // No code here since these are the mirror of the above calls + > export class ClassA { public AisIn1_2_2() { } } + > export class ClassB { public BisIn1_2_2() { } } + > export class ClassC { public CisIn1_2_2() { } } + > export interface InterfaceY { YisIn1_2_2(); } + > interface NonExportedInterfaceQ { } + > } +1->Emitted(135, 17) Source(83, 48) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +2 >Emitted(135, 13) Source(84, 9) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +3 >Emitted(135, 14) Source(84, 10) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(135, 16) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) +5 >Emitted(135, 29) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) +6 >Emitted(135, 32) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) +7 >Emitted(135, 56) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) +8 >Emitted(135, 61) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) +9 >Emitted(135, 85) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) +10>Emitted(135, 93) Source(84, 10) + SourceIndex(0) name (TopLevelModule1.SubModule2) --- ->>> var SubSubModule2 = SubModule2.SubSubModule2; +>>> })(SubModule2 = TopLevelModule1.SubModule2 || (TopLevelModule1.SubModule2 = {})); 1 >^^^^^^^^^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^ -4 > ^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^-> -1 > -2 > export module -3 > SubSubModule2 -4 > -5 > SubSubModule2 { - > // No code here since these are the mirror of the above calls - > export class ClassA { public AisIn1_2_2() { } } - > export class ClassB { public BisIn1_2_2() { } } - > export class ClassC { public CisIn1_2_2() { } } - > export interface InterfaceY { YisIn1_2_2(); } - > interface NonExportedInterfaceQ { } - > } -6 > -1 >Emitted(133, 13) Source(77, 9) + SourceIndex(0) name (TopLevelModule1.SubModule2) -2 >Emitted(133, 17) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) -3 >Emitted(133, 30) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) -4 >Emitted(133, 33) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) -5 >Emitted(133, 57) Source(84, 10) + SourceIndex(0) name (TopLevelModule1.SubModule2) -6 >Emitted(133, 58) Source(84, 10) + SourceIndex(0) name (TopLevelModule1.SubModule2) ---- ->>> })(TopLevelModule1.SubModule2 || (TopLevelModule1.SubModule2 = {})); -1->^^^^^^^^^^^^ 2 > 3 > ^ 4 > ^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ -6 > ^^^^^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ -8 > ^^^^^^^^ -1-> +5 > ^^^^^^^^^^ +6 > ^^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^^^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^^^^^^^ +1 > > > export interface InterfaceY { YisIn1_2(); } 2 > @@ -2429,59 +2570,32 @@ sourceFile:typeResolution.ts 3 > } 4 > 5 > SubModule2 -6 > -7 > SubModule2 -8 > { - > export module SubSubModule2 { - > // No code here since these are the mirror of the above calls - > export class ClassA { public AisIn1_2_2() { } } - > export class ClassB { public BisIn1_2_2() { } } - > export class ClassC { public CisIn1_2_2() { } } - > export interface InterfaceY { YisIn1_2_2(); } - > interface NonExportedInterfaceQ { } - > } - > - > export interface InterfaceY { YisIn1_2(); } - > } -1->Emitted(134, 13) Source(86, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2) -2 >Emitted(134, 9) Source(87, 5) + SourceIndex(0) name (TopLevelModule1.SubModule2) -3 >Emitted(134, 10) Source(87, 6) + SourceIndex(0) name (TopLevelModule1.SubModule2) -4 >Emitted(134, 12) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) -5 >Emitted(134, 38) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) -6 >Emitted(134, 43) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) -7 >Emitted(134, 69) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) -8 >Emitted(134, 77) Source(87, 6) + SourceIndex(0) name (TopLevelModule1) ---- ->>> var SubModule2 = TopLevelModule1.SubModule2; -1 >^^^^^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^ -4 > ^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ -6 > ^ -1 > -2 > export module -3 > SubModule2 -4 > -5 > SubModule2 { - > export module SubSubModule2 { - > // No code here since these are the mirror of the above calls - > export class ClassA { public AisIn1_2_2() { } } - > export class ClassB { public BisIn1_2_2() { } } - > export class ClassC { public CisIn1_2_2() { } } - > export interface InterfaceY { YisIn1_2_2(); } - > interface NonExportedInterfaceQ { } - > } - > - > export interface InterfaceY { YisIn1_2(); } - > } -6 > -1 >Emitted(135, 9) Source(76, 5) + SourceIndex(0) name (TopLevelModule1) -2 >Emitted(135, 13) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) -3 >Emitted(135, 23) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) -4 >Emitted(135, 26) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) -5 >Emitted(135, 52) Source(87, 6) + SourceIndex(0) name (TopLevelModule1) -6 >Emitted(135, 53) Source(87, 6) + SourceIndex(0) name (TopLevelModule1) +6 > +7 > SubModule2 +8 > +9 > SubModule2 +10> { + > export module SubSubModule2 { + > // No code here since these are the mirror of the above calls + > export class ClassA { public AisIn1_2_2() { } } + > export class ClassB { public BisIn1_2_2() { } } + > export class ClassC { public CisIn1_2_2() { } } + > export interface InterfaceY { YisIn1_2_2(); } + > interface NonExportedInterfaceQ { } + > } + > + > export interface InterfaceY { YisIn1_2(); } + > } +1 >Emitted(136, 13) Source(86, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2) +2 >Emitted(136, 9) Source(87, 5) + SourceIndex(0) name (TopLevelModule1.SubModule2) +3 >Emitted(136, 10) Source(87, 6) + SourceIndex(0) name (TopLevelModule1.SubModule2) +4 >Emitted(136, 12) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) +5 >Emitted(136, 22) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) +6 >Emitted(136, 25) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) +7 >Emitted(136, 51) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) +8 >Emitted(136, 56) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) +9 >Emitted(136, 82) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) +10>Emitted(136, 90) Source(87, 6) + SourceIndex(0) name (TopLevelModule1) --- >>> var ClassA = (function () { 1 >^^^^^^^^ @@ -2493,9 +2607,9 @@ sourceFile:typeResolution.ts > 2 > class 3 > ClassA -1 >Emitted(136, 9) Source(89, 5) + SourceIndex(0) name (TopLevelModule1) -2 >Emitted(136, 13) Source(89, 11) + SourceIndex(0) name (TopLevelModule1) -3 >Emitted(136, 19) Source(89, 17) + SourceIndex(0) name (TopLevelModule1) +1 >Emitted(137, 9) Source(89, 5) + SourceIndex(0) name (TopLevelModule1) +2 >Emitted(137, 13) Source(89, 11) + SourceIndex(0) name (TopLevelModule1) +3 >Emitted(137, 19) Source(89, 17) + SourceIndex(0) name (TopLevelModule1) --- >>> function ClassA() { 1->^^^^^^^^^^^^ @@ -2504,9 +2618,9 @@ sourceFile:typeResolution.ts 1-> 2 > class 3 > ClassA -1->Emitted(137, 13) Source(89, 5) + SourceIndex(0) name (TopLevelModule1.ClassA) -2 >Emitted(137, 22) Source(89, 11) + SourceIndex(0) name (TopLevelModule1.ClassA) -3 >Emitted(137, 28) Source(89, 17) + SourceIndex(0) name (TopLevelModule1.ClassA) +1->Emitted(138, 13) Source(89, 5) + SourceIndex(0) name (TopLevelModule1.ClassA) +2 >Emitted(138, 22) Source(89, 11) + SourceIndex(0) name (TopLevelModule1.ClassA) +3 >Emitted(138, 28) Source(89, 17) + SourceIndex(0) name (TopLevelModule1.ClassA) --- >>> } 1 >^^^^^^^^^^^^ @@ -2516,8 +2630,8 @@ sourceFile:typeResolution.ts > public AisIn1() { } > 2 > } -1 >Emitted(138, 13) Source(91, 5) + SourceIndex(0) name (TopLevelModule1.ClassA.constructor) -2 >Emitted(138, 14) Source(91, 6) + SourceIndex(0) name (TopLevelModule1.ClassA.constructor) +1 >Emitted(139, 13) Source(91, 5) + SourceIndex(0) name (TopLevelModule1.ClassA.constructor) +2 >Emitted(139, 14) Source(91, 6) + SourceIndex(0) name (TopLevelModule1.ClassA.constructor) --- >>> ClassA.prototype.AisIn1 = function () { 1->^^^^^^^^^^^^ @@ -2526,9 +2640,9 @@ sourceFile:typeResolution.ts 1-> 2 > AisIn1 3 > -1->Emitted(139, 13) Source(90, 16) + SourceIndex(0) name (TopLevelModule1.ClassA) -2 >Emitted(139, 36) Source(90, 22) + SourceIndex(0) name (TopLevelModule1.ClassA) -3 >Emitted(139, 39) Source(90, 9) + SourceIndex(0) name (TopLevelModule1.ClassA) +1->Emitted(140, 13) Source(90, 16) + SourceIndex(0) name (TopLevelModule1.ClassA) +2 >Emitted(140, 36) Source(90, 22) + SourceIndex(0) name (TopLevelModule1.ClassA) +3 >Emitted(140, 39) Source(90, 9) + SourceIndex(0) name (TopLevelModule1.ClassA) --- >>> }; 1 >^^^^^^^^^^^^ @@ -2536,8 +2650,8 @@ sourceFile:typeResolution.ts 3 > ^^^^^^^^^^^^^^-> 1 >public AisIn1() { 2 > } -1 >Emitted(140, 13) Source(90, 27) + SourceIndex(0) name (TopLevelModule1.ClassA.AisIn1) -2 >Emitted(140, 14) Source(90, 28) + SourceIndex(0) name (TopLevelModule1.ClassA.AisIn1) +1 >Emitted(141, 13) Source(90, 27) + SourceIndex(0) name (TopLevelModule1.ClassA.AisIn1) +2 >Emitted(141, 14) Source(90, 28) + SourceIndex(0) name (TopLevelModule1.ClassA.AisIn1) --- >>> return ClassA; 1->^^^^^^^^^^^^ @@ -2545,8 +2659,8 @@ sourceFile:typeResolution.ts 1-> > 2 > } -1->Emitted(141, 13) Source(91, 5) + SourceIndex(0) name (TopLevelModule1.ClassA) -2 >Emitted(141, 26) Source(91, 6) + SourceIndex(0) name (TopLevelModule1.ClassA) +1->Emitted(142, 13) Source(91, 5) + SourceIndex(0) name (TopLevelModule1.ClassA) +2 >Emitted(142, 26) Source(91, 6) + SourceIndex(0) name (TopLevelModule1.ClassA) --- >>> })(); 1 >^^^^^^^^ @@ -2560,10 +2674,10 @@ sourceFile:typeResolution.ts 4 > class ClassA { > public AisIn1() { } > } -1 >Emitted(142, 9) Source(91, 5) + SourceIndex(0) name (TopLevelModule1.ClassA) -2 >Emitted(142, 10) Source(91, 6) + SourceIndex(0) name (TopLevelModule1.ClassA) -3 >Emitted(142, 10) Source(89, 5) + SourceIndex(0) name (TopLevelModule1) -4 >Emitted(142, 14) Source(91, 6) + SourceIndex(0) name (TopLevelModule1) +1 >Emitted(143, 9) Source(91, 5) + SourceIndex(0) name (TopLevelModule1.ClassA) +2 >Emitted(143, 10) Source(91, 6) + SourceIndex(0) name (TopLevelModule1.ClassA) +3 >Emitted(143, 10) Source(89, 5) + SourceIndex(0) name (TopLevelModule1) +4 >Emitted(143, 14) Source(91, 6) + SourceIndex(0) name (TopLevelModule1) --- >>> var NotExportedModule; 1->^^^^^^^^ @@ -2583,10 +2697,10 @@ sourceFile:typeResolution.ts 4 > { > export class ClassA { } > } -1->Emitted(143, 9) Source(97, 5) + SourceIndex(0) name (TopLevelModule1) -2 >Emitted(143, 13) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) -3 >Emitted(143, 30) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) -4 >Emitted(143, 31) Source(99, 6) + SourceIndex(0) name (TopLevelModule1) +1->Emitted(144, 9) Source(97, 5) + SourceIndex(0) name (TopLevelModule1) +2 >Emitted(144, 13) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) +3 >Emitted(144, 30) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) +4 >Emitted(144, 31) Source(99, 6) + SourceIndex(0) name (TopLevelModule1) --- >>> (function (NotExportedModule) { 1->^^^^^^^^ @@ -2600,11 +2714,11 @@ sourceFile:typeResolution.ts 3 > NotExportedModule 4 > 5 > { -1->Emitted(144, 9) Source(97, 5) + SourceIndex(0) name (TopLevelModule1) -2 >Emitted(144, 20) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) -3 >Emitted(144, 37) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) -4 >Emitted(144, 39) Source(97, 30) + SourceIndex(0) name (TopLevelModule1) -5 >Emitted(144, 40) Source(97, 31) + SourceIndex(0) name (TopLevelModule1) +1->Emitted(145, 9) Source(97, 5) + SourceIndex(0) name (TopLevelModule1) +2 >Emitted(145, 20) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) +3 >Emitted(145, 37) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) +4 >Emitted(145, 39) Source(97, 30) + SourceIndex(0) name (TopLevelModule1) +5 >Emitted(145, 40) Source(97, 31) + SourceIndex(0) name (TopLevelModule1) --- >>> var ClassA = (function () { 1->^^^^^^^^^^^^ @@ -2615,9 +2729,9 @@ sourceFile:typeResolution.ts > 2 > export class 3 > ClassA -1->Emitted(145, 13) Source(98, 9) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -2 >Emitted(145, 17) Source(98, 22) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -3 >Emitted(145, 23) Source(98, 28) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +1->Emitted(146, 13) Source(98, 9) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +2 >Emitted(146, 17) Source(98, 22) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +3 >Emitted(146, 23) Source(98, 28) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) --- >>> function ClassA() { 1->^^^^^^^^^^^^^^^^ @@ -2626,9 +2740,9 @@ sourceFile:typeResolution.ts 1-> 2 > export class 3 > ClassA -1->Emitted(146, 17) Source(98, 9) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) -2 >Emitted(146, 26) Source(98, 22) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) -3 >Emitted(146, 32) Source(98, 28) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) +1->Emitted(147, 17) Source(98, 9) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) +2 >Emitted(147, 26) Source(98, 22) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) +3 >Emitted(147, 32) Source(98, 28) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) --- >>> } 1 >^^^^^^^^^^^^^^^^ @@ -2636,16 +2750,16 @@ sourceFile:typeResolution.ts 3 > ^^^^^^^^^^^^^^-> 1 > { 2 > } -1 >Emitted(147, 17) Source(98, 31) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA.constructor) -2 >Emitted(147, 18) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA.constructor) +1 >Emitted(148, 17) Source(98, 31) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA.constructor) +2 >Emitted(148, 18) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA.constructor) --- >>> return ClassA; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(148, 17) Source(98, 31) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) -2 >Emitted(148, 30) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) +1->Emitted(149, 17) Source(98, 31) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) +2 >Emitted(149, 30) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) --- >>> })(); 1 >^^^^^^^^^^^^ @@ -2657,10 +2771,10 @@ sourceFile:typeResolution.ts 2 > } 3 > 4 > export class ClassA { } -1 >Emitted(149, 13) Source(98, 31) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) -2 >Emitted(149, 14) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) -3 >Emitted(149, 14) Source(98, 9) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -4 >Emitted(149, 18) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +1 >Emitted(150, 13) Source(98, 31) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) +2 >Emitted(150, 14) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) +3 >Emitted(150, 14) Source(98, 9) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +4 >Emitted(150, 18) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) --- >>> NotExportedModule.ClassA = ClassA; 1->^^^^^^^^^^^^ @@ -2674,11 +2788,11 @@ sourceFile:typeResolution.ts 3 > 4 > ClassA { } 5 > -1->Emitted(150, 13) Source(98, 22) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -2 >Emitted(150, 37) Source(98, 28) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -3 >Emitted(150, 40) Source(98, 22) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -4 >Emitted(150, 46) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -5 >Emitted(150, 47) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +1->Emitted(151, 13) Source(98, 22) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +2 >Emitted(151, 37) Source(98, 28) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +3 >Emitted(151, 40) Source(98, 22) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +4 >Emitted(151, 46) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +5 >Emitted(151, 47) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) --- >>> })(NotExportedModule || (NotExportedModule = {})); 1->^^^^^^^^ @@ -2688,7 +2802,7 @@ sourceFile:typeResolution.ts 5 > ^^^^^ 6 > ^^^^^^^^^^^^^^^^^ 7 > ^^^^^^^^ -8 > ^^^^^^^^^-> +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 > } @@ -2699,255 +2813,142 @@ sourceFile:typeResolution.ts 7 > { > export class ClassA { } > } -1->Emitted(151, 9) Source(99, 5) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -2 >Emitted(151, 10) Source(99, 6) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -3 >Emitted(151, 12) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) -4 >Emitted(151, 29) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) -5 >Emitted(151, 34) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) -6 >Emitted(151, 51) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) -7 >Emitted(151, 59) Source(99, 6) + SourceIndex(0) name (TopLevelModule1) +1->Emitted(152, 9) Source(99, 5) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +2 >Emitted(152, 10) Source(99, 6) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +3 >Emitted(152, 12) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) +4 >Emitted(152, 29) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) +5 >Emitted(152, 34) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) +6 >Emitted(152, 51) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) +7 >Emitted(152, 59) Source(99, 6) + SourceIndex(0) name (TopLevelModule1) --- ->>> })(exports.TopLevelModule1 || (exports.TopLevelModule1 = {})); +>>> })(TopLevelModule1 = exports.TopLevelModule1 || (exports.TopLevelModule1 = {})); 1->^^^^ 2 > ^ 3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^^^ -5 > ^^^^^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^ -7 > ^^^^^^^^ +4 > ^^^^^^^^^^^^^^^ +5 > ^^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^^^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^^^^^^^ 1-> > 2 > } 3 > 4 > TopLevelModule1 -5 > -6 > TopLevelModule1 -7 > { - > export module SubModule1 { - > export module SubSubModule1 { - > export class ClassA { - > public AisIn1_1_1() { - > // Try all qualified names of this type - > var a1: ClassA; a1.AisIn1_1_1(); - > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); - > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); - > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); - > - > // Two variants of qualifying a peer type - > var b1: ClassB; b1.BisIn1_1_1(); - > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); - > - > // Type only accessible from the root - > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); - > - > // Interface reference - > var d1: InterfaceX; d1.XisIn1_1_1(); - > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); - > } - > } - > export class ClassB { - > public BisIn1_1_1() { - > /** Exactly the same as above in AisIn1_1_1 **/ - > - > // Try all qualified names of this type - > var a1: ClassA; a1.AisIn1_1_1(); - > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); - > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); - > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); - > - > // Two variants of qualifying a peer type - > var b1: ClassB; b1.BisIn1_1_1(); - > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); - > - > // Type only accessible from the root - > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); - > var c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3(); - > - > // Interface reference - > var d1: InterfaceX; d1.XisIn1_1_1(); - > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); - > } - > } - > export interface InterfaceX { XisIn1_1_1(); } - > class NonExportedClassQ { - > constructor() { - > function QQ() { - > /* Sampling of stuff from AisIn1_1_1 */ - > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); - > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); - > var d1: InterfaceX; d1.XisIn1_1_1(); - > var c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3(); - > } - > } - > } - > } - > - > // Should have no effect on S1.SS1.ClassA above because it is not exported - > class ClassA { - > constructor() { - > function AA() { - > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); - > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); - > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); - > - > // Interface reference - > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); - > } - > } - > } - > } - > - > export module SubModule2 { - > export module SubSubModule2 { - > // No code here since these are the mirror of the above calls - > export class ClassA { public AisIn1_2_2() { } } - > export class ClassB { public BisIn1_2_2() { } } - > export class ClassC { public CisIn1_2_2() { } } - > export interface InterfaceY { YisIn1_2_2(); } - > interface NonExportedInterfaceQ { } - > } - > - > export interface InterfaceY { YisIn1_2(); } - > } - > - > class ClassA { - > public AisIn1() { } - > } - > - > interface InterfaceY { - > YisIn1(); - > } - > - > module NotExportedModule { - > export class ClassA { } - > } - > } -1->Emitted(152, 5) Source(100, 1) + SourceIndex(0) name (TopLevelModule1) -2 >Emitted(152, 6) Source(100, 2) + SourceIndex(0) name (TopLevelModule1) -3 >Emitted(152, 8) Source(1, 15) + SourceIndex(0) -4 >Emitted(152, 31) Source(1, 30) + SourceIndex(0) -5 >Emitted(152, 36) Source(1, 15) + SourceIndex(0) -6 >Emitted(152, 59) Source(1, 30) + SourceIndex(0) -7 >Emitted(152, 67) Source(100, 2) + SourceIndex(0) ---- ->>> var TopLevelModule1 = exports.TopLevelModule1; -1 >^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^^^^^^ -4 > ^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^ -6 > ^ -1 > -2 > export module -3 > TopLevelModule1 -4 > -5 > TopLevelModule1 { - > export module SubModule1 { - > export module SubSubModule1 { - > export class ClassA { - > public AisIn1_1_1() { - > // Try all qualified names of this type - > var a1: ClassA; a1.AisIn1_1_1(); - > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); - > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); - > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); - > - > // Two variants of qualifying a peer type - > var b1: ClassB; b1.BisIn1_1_1(); - > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); - > - > // Type only accessible from the root - > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); - > - > // Interface reference - > var d1: InterfaceX; d1.XisIn1_1_1(); - > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); - > } - > } - > export class ClassB { - > public BisIn1_1_1() { - > /** Exactly the same as above in AisIn1_1_1 **/ - > - > // Try all qualified names of this type - > var a1: ClassA; a1.AisIn1_1_1(); - > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); - > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); - > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); - > - > // Two variants of qualifying a peer type - > var b1: ClassB; b1.BisIn1_1_1(); - > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); - > - > // Type only accessible from the root - > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); - > var c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3(); - > - > // Interface reference - > var d1: InterfaceX; d1.XisIn1_1_1(); - > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); - > } - > } - > export interface InterfaceX { XisIn1_1_1(); } - > class NonExportedClassQ { - > constructor() { - > function QQ() { - > /* Sampling of stuff from AisIn1_1_1 */ - > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); - > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); - > var d1: InterfaceX; d1.XisIn1_1_1(); - > var c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3(); - > } - > } - > } - > } - > - > // Should have no effect on S1.SS1.ClassA above because it is not exported - > class ClassA { - > constructor() { - > function AA() { - > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); - > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); - > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); - > - > // Interface reference - > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); - > } - > } - > } - > } - > - > export module SubModule2 { - > export module SubSubModule2 { - > // No code here since these are the mirror of the above calls - > export class ClassA { public AisIn1_2_2() { } } - > export class ClassB { public BisIn1_2_2() { } } - > export class ClassC { public CisIn1_2_2() { } } - > export interface InterfaceY { YisIn1_2_2(); } - > interface NonExportedInterfaceQ { } - > } - > - > export interface InterfaceY { YisIn1_2(); } - > } - > - > class ClassA { - > public AisIn1() { } - > } - > - > interface InterfaceY { - > YisIn1(); - > } - > - > module NotExportedModule { - > export class ClassA { } - > } - > } -6 > -1 >Emitted(153, 5) Source(1, 1) + SourceIndex(0) -2 >Emitted(153, 9) Source(1, 15) + SourceIndex(0) -3 >Emitted(153, 24) Source(1, 30) + SourceIndex(0) -4 >Emitted(153, 27) Source(1, 15) + SourceIndex(0) -5 >Emitted(153, 50) Source(100, 2) + SourceIndex(0) -6 >Emitted(153, 51) Source(100, 2) + SourceIndex(0) +5 > +6 > TopLevelModule1 +7 > +8 > TopLevelModule1 +9 > { + > export module SubModule1 { + > export module SubSubModule1 { + > export class ClassA { + > public AisIn1_1_1() { + > // Try all qualified names of this type + > var a1: ClassA; a1.AisIn1_1_1(); + > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); + > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); + > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); + > + > // Two variants of qualifying a peer type + > var b1: ClassB; b1.BisIn1_1_1(); + > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); + > + > // Type only accessible from the root + > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); + > + > // Interface reference + > var d1: InterfaceX; d1.XisIn1_1_1(); + > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); + > } + > } + > export class ClassB { + > public BisIn1_1_1() { + > /** Exactly the same as above in AisIn1_1_1 **/ + > + > // Try all qualified names of this type + > var a1: ClassA; a1.AisIn1_1_1(); + > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); + > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); + > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); + > + > // Two variants of qualifying a peer type + > var b1: ClassB; b1.BisIn1_1_1(); + > var b2: TopLevelModule1.SubModule1.SubSubModule1.ClassB; b2.BisIn1_1_1(); + > + > // Type only accessible from the root + > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); + > var c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3(); + > + > // Interface reference + > var d1: InterfaceX; d1.XisIn1_1_1(); + > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); + > } + > } + > export interface InterfaceX { XisIn1_1_1(); } + > class NonExportedClassQ { + > constructor() { + > function QQ() { + > /* Sampling of stuff from AisIn1_1_1 */ + > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); + > var c1: TopLevelModule1.SubModule2.SubSubModule2.ClassA; c1.AisIn1_2_2(); + > var d1: InterfaceX; d1.XisIn1_1_1(); + > var c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3(); + > } + > } + > } + > } + > + > // Should have no effect on S1.SS1.ClassA above because it is not exported + > class ClassA { + > constructor() { + > function AA() { + > var a2: SubSubModule1.ClassA; a2.AisIn1_1_1(); + > var a3: SubModule1.SubSubModule1.ClassA; a3.AisIn1_1_1(); + > var a4: TopLevelModule1.SubModule1.SubSubModule1.ClassA; a4.AisIn1_1_1(); + > + > // Interface reference + > var d2: SubSubModule1.InterfaceX; d2.XisIn1_1_1(); + > } + > } + > } + > } + > + > export module SubModule2 { + > export module SubSubModule2 { + > // No code here since these are the mirror of the above calls + > export class ClassA { public AisIn1_2_2() { } } + > export class ClassB { public BisIn1_2_2() { } } + > export class ClassC { public CisIn1_2_2() { } } + > export interface InterfaceY { YisIn1_2_2(); } + > interface NonExportedInterfaceQ { } + > } + > + > export interface InterfaceY { YisIn1_2(); } + > } + > + > class ClassA { + > public AisIn1() { } + > } + > + > interface InterfaceY { + > YisIn1(); + > } + > + > module NotExportedModule { + > export class ClassA { } + > } + > } +1->Emitted(153, 5) Source(100, 1) + SourceIndex(0) name (TopLevelModule1) +2 >Emitted(153, 6) Source(100, 2) + SourceIndex(0) name (TopLevelModule1) +3 >Emitted(153, 8) Source(1, 15) + SourceIndex(0) +4 >Emitted(153, 23) Source(1, 30) + SourceIndex(0) +5 >Emitted(153, 26) Source(1, 15) + SourceIndex(0) +6 >Emitted(153, 49) Source(1, 30) + SourceIndex(0) +7 >Emitted(153, 54) Source(1, 15) + SourceIndex(0) +8 >Emitted(153, 77) Source(1, 30) + SourceIndex(0) +9 >Emitted(153, 85) Source(100, 2) + SourceIndex(0) --- >>> var TopLevelModule2; 1 >^^^^ @@ -2989,24 +2990,43 @@ sourceFile:typeResolution.ts 4 >Emitted(155, 33) Source(102, 24) + SourceIndex(0) 5 >Emitted(155, 34) Source(102, 25) + SourceIndex(0) --- ->>> (function (SubModule3) { +>>> var SubModule3; 1 >^^^^^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^-> +1 > + > +2 > export module +3 > SubModule3 +4 > { + > export class ClassA { + > public AisIn2_3() { } + > } + > } +1 >Emitted(156, 9) Source(103, 5) + SourceIndex(0) name (TopLevelModule2) +2 >Emitted(156, 13) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) +3 >Emitted(156, 23) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) +4 >Emitted(156, 24) Source(107, 6) + SourceIndex(0) name (TopLevelModule2) +--- +>>> (function (SubModule3) { +1->^^^^^^^^ 2 > ^^^^^^^^^^^ 3 > ^^^^^^^^^^ 4 > ^^ 5 > ^ 6 > ^^^^^^^^-> -1 > - > +1-> 2 > export module 3 > SubModule3 4 > 5 > { -1 >Emitted(156, 9) Source(103, 5) + SourceIndex(0) name (TopLevelModule2) -2 >Emitted(156, 20) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) -3 >Emitted(156, 30) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) -4 >Emitted(156, 32) Source(103, 30) + SourceIndex(0) name (TopLevelModule2) -5 >Emitted(156, 33) Source(103, 31) + SourceIndex(0) name (TopLevelModule2) +1->Emitted(157, 9) Source(103, 5) + SourceIndex(0) name (TopLevelModule2) +2 >Emitted(157, 20) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) +3 >Emitted(157, 30) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) +4 >Emitted(157, 32) Source(103, 30) + SourceIndex(0) name (TopLevelModule2) +5 >Emitted(157, 33) Source(103, 31) + SourceIndex(0) name (TopLevelModule2) --- >>> var ClassA = (function () { 1->^^^^^^^^^^^^ @@ -3017,9 +3037,9 @@ sourceFile:typeResolution.ts > 2 > export class 3 > ClassA -1->Emitted(157, 13) Source(104, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3) -2 >Emitted(157, 17) Source(104, 22) + SourceIndex(0) name (TopLevelModule2.SubModule3) -3 >Emitted(157, 23) Source(104, 28) + SourceIndex(0) name (TopLevelModule2.SubModule3) +1->Emitted(158, 13) Source(104, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3) +2 >Emitted(158, 17) Source(104, 22) + SourceIndex(0) name (TopLevelModule2.SubModule3) +3 >Emitted(158, 23) Source(104, 28) + SourceIndex(0) name (TopLevelModule2.SubModule3) --- >>> function ClassA() { 1->^^^^^^^^^^^^^^^^ @@ -3028,9 +3048,9 @@ sourceFile:typeResolution.ts 1-> 2 > export class 3 > ClassA -1->Emitted(158, 17) Source(104, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -2 >Emitted(158, 26) Source(104, 22) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -3 >Emitted(158, 32) Source(104, 28) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +1->Emitted(159, 17) Source(104, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +2 >Emitted(159, 26) Source(104, 22) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +3 >Emitted(159, 32) Source(104, 28) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) --- >>> } 1 >^^^^^^^^^^^^^^^^ @@ -3040,8 +3060,8 @@ sourceFile:typeResolution.ts > public AisIn2_3() { } > 2 > } -1 >Emitted(159, 17) Source(106, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.constructor) -2 >Emitted(159, 18) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.constructor) +1 >Emitted(160, 17) Source(106, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.constructor) +2 >Emitted(160, 18) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.constructor) --- >>> ClassA.prototype.AisIn2_3 = function () { 1->^^^^^^^^^^^^^^^^ @@ -3050,9 +3070,9 @@ sourceFile:typeResolution.ts 1-> 2 > AisIn2_3 3 > -1->Emitted(160, 17) Source(105, 20) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -2 >Emitted(160, 42) Source(105, 28) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -3 >Emitted(160, 45) Source(105, 13) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +1->Emitted(161, 17) Source(105, 20) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +2 >Emitted(161, 42) Source(105, 28) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +3 >Emitted(161, 45) Source(105, 13) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) --- >>> }; 1 >^^^^^^^^^^^^^^^^ @@ -3060,8 +3080,8 @@ sourceFile:typeResolution.ts 3 > ^^^^^^^^^^^^^^-> 1 >public AisIn2_3() { 2 > } -1 >Emitted(161, 17) Source(105, 33) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.AisIn2_3) -2 >Emitted(161, 18) Source(105, 34) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.AisIn2_3) +1 >Emitted(162, 17) Source(105, 33) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.AisIn2_3) +2 >Emitted(162, 18) Source(105, 34) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.AisIn2_3) --- >>> return ClassA; 1->^^^^^^^^^^^^^^^^ @@ -3069,8 +3089,8 @@ sourceFile:typeResolution.ts 1-> > 2 > } -1->Emitted(162, 17) Source(106, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -2 >Emitted(162, 30) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +1->Emitted(163, 17) Source(106, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +2 >Emitted(163, 30) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) --- >>> })(); 1 >^^^^^^^^^^^^ @@ -3084,10 +3104,10 @@ sourceFile:typeResolution.ts 4 > export class ClassA { > public AisIn2_3() { } > } -1 >Emitted(163, 13) Source(106, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -2 >Emitted(163, 14) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -3 >Emitted(163, 14) Source(104, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3) -4 >Emitted(163, 18) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3) +1 >Emitted(164, 13) Source(106, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +2 >Emitted(164, 14) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +3 >Emitted(164, 14) Source(104, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3) +4 >Emitted(164, 18) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3) --- >>> SubModule3.ClassA = ClassA; 1->^^^^^^^^^^^^ @@ -3095,7 +3115,7 @@ sourceFile:typeResolution.ts 3 > ^^^ 4 > ^^^^^^ 5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 > ClassA 3 > @@ -3103,63 +3123,45 @@ sourceFile:typeResolution.ts > public AisIn2_3() { } > } 5 > -1->Emitted(164, 13) Source(104, 22) + SourceIndex(0) name (TopLevelModule2.SubModule3) -2 >Emitted(164, 30) Source(104, 28) + SourceIndex(0) name (TopLevelModule2.SubModule3) -3 >Emitted(164, 33) Source(104, 22) + SourceIndex(0) name (TopLevelModule2.SubModule3) -4 >Emitted(164, 39) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3) -5 >Emitted(164, 40) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3) +1->Emitted(165, 13) Source(104, 22) + SourceIndex(0) name (TopLevelModule2.SubModule3) +2 >Emitted(165, 30) Source(104, 28) + SourceIndex(0) name (TopLevelModule2.SubModule3) +3 >Emitted(165, 33) Source(104, 22) + SourceIndex(0) name (TopLevelModule2.SubModule3) +4 >Emitted(165, 39) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3) +5 >Emitted(165, 40) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3) --- ->>> })(TopLevelModule2.SubModule3 || (TopLevelModule2.SubModule3 = {})); +>>> })(SubModule3 = TopLevelModule2.SubModule3 || (TopLevelModule2.SubModule3 = {})); 1->^^^^^^^^ 2 > ^ 3 > ^^ -4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ -5 > ^^^^^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ -7 > ^^^^^^^^ +4 > ^^^^^^^^^^ +5 > ^^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^^^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^^^^^^^ 1-> > 2 > } 3 > 4 > SubModule3 -5 > -6 > SubModule3 -7 > { - > export class ClassA { - > public AisIn2_3() { } - > } - > } -1->Emitted(165, 9) Source(107, 5) + SourceIndex(0) name (TopLevelModule2.SubModule3) -2 >Emitted(165, 10) Source(107, 6) + SourceIndex(0) name (TopLevelModule2.SubModule3) -3 >Emitted(165, 12) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) -4 >Emitted(165, 38) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) -5 >Emitted(165, 43) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) -6 >Emitted(165, 69) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) -7 >Emitted(165, 77) Source(107, 6) + SourceIndex(0) name (TopLevelModule2) ---- ->>> var SubModule3 = TopLevelModule2.SubModule3; -1 >^^^^^^^^ -2 > ^^^^ -3 > ^^^^^^^^^^ -4 > ^^^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ -6 > ^ -1 > -2 > export module -3 > SubModule3 -4 > -5 > SubModule3 { - > export class ClassA { - > public AisIn2_3() { } - > } - > } -6 > -1 >Emitted(166, 9) Source(103, 5) + SourceIndex(0) name (TopLevelModule2) -2 >Emitted(166, 13) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) -3 >Emitted(166, 23) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) -4 >Emitted(166, 26) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) -5 >Emitted(166, 52) Source(107, 6) + SourceIndex(0) name (TopLevelModule2) -6 >Emitted(166, 53) Source(107, 6) + SourceIndex(0) name (TopLevelModule2) +5 > +6 > SubModule3 +7 > +8 > SubModule3 +9 > { + > export class ClassA { + > public AisIn2_3() { } + > } + > } +1->Emitted(166, 9) Source(107, 5) + SourceIndex(0) name (TopLevelModule2.SubModule3) +2 >Emitted(166, 10) Source(107, 6) + SourceIndex(0) name (TopLevelModule2.SubModule3) +3 >Emitted(166, 12) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) +4 >Emitted(166, 22) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) +5 >Emitted(166, 25) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) +6 >Emitted(166, 51) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) +7 >Emitted(166, 56) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) +8 >Emitted(166, 82) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) +9 >Emitted(166, 90) Source(107, 6) + SourceIndex(0) name (TopLevelModule2) --- >>> })(TopLevelModule2 || (TopLevelModule2 = {})); 1 >^^^^ diff --git a/tests/baselines/reference/typeofInternalModules.js b/tests/baselines/reference/typeofInternalModules.js index 7b5f8ef4f41..b885d8c9dce 100644 --- a/tests/baselines/reference/typeofInternalModules.js +++ b/tests/baselines/reference/typeofInternalModules.js @@ -27,6 +27,7 @@ x7 = importInst; //// [typeofInternalModules.js] var Outer; (function (Outer) { + var instantiated; (function (instantiated) { var C = (function () { function C() { @@ -34,8 +35,7 @@ var Outer; return C; })(); instantiated.C = C; - })(Outer.instantiated || (Outer.instantiated = {})); - var instantiated = Outer.instantiated; + })(instantiated = Outer.instantiated || (Outer.instantiated = {})); })(Outer || (Outer = {})); var importInst = Outer.instantiated; var x1 = importInst.C; diff --git a/tests/baselines/reference/undefinedArgumentInference.types b/tests/baselines/reference/undefinedArgumentInference.types index e6c50461aeb..998a717b70a 100644 --- a/tests/baselines/reference/undefinedArgumentInference.types +++ b/tests/baselines/reference/undefinedArgumentInference.types @@ -19,8 +19,8 @@ var z1 = foo1({ x: undefined, y: undefined }); >foo1({ x: undefined, y: undefined }) : any >foo1 : (f1: { x: T; y: T; }) => T >{ x: undefined, y: undefined } : { x: undefined; y: undefined; } ->x : any +>x : undefined >undefined : undefined ->y : any +>y : undefined >undefined : undefined diff --git a/tests/baselines/reference/underscoreTest1.types b/tests/baselines/reference/underscoreTest1.types index 15cf42b9c7b..115bc09195d 100644 --- a/tests/baselines/reference/underscoreTest1.types +++ b/tests/baselines/reference/underscoreTest1.types @@ -601,7 +601,7 @@ $('#underscore_button').bind('click', buttonView.onClick); >onClick : () => void var fibonacci = _.memoize(function (n) { ->fibonacci : any +>fibonacci : (n: any) => any >_.memoize(function (n) { return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2);}) : (n: any) => any >_.memoize : (func: T, hashFunction?: Function) => T >_ : Underscore.Static @@ -616,11 +616,11 @@ var fibonacci = _.memoize(function (n) { >n : any >fibonacci(n - 1) + fibonacci(n - 2) : any >fibonacci(n - 1) : any ->fibonacci : any +>fibonacci : (n: any) => any >n - 1 : number >n : any >fibonacci(n - 2) : any ->fibonacci : any +>fibonacci : (n: any) => any >n - 2 : number >n : any diff --git a/tests/baselines/reference/validMultipleVariableDeclarations.types b/tests/baselines/reference/validMultipleVariableDeclarations.types index 0e25906aac4..89d3702a702 100644 --- a/tests/baselines/reference/validMultipleVariableDeclarations.types +++ b/tests/baselines/reference/validMultipleVariableDeclarations.types @@ -47,7 +47,7 @@ var p: Point = { x: 0, y: undefined }; >Point : Point >{ x: 0, y: undefined } : { x: number; y: undefined; } >x : number ->y : any +>y : undefined >undefined : undefined var p = { x: 1, y: undefined }; @@ -73,7 +73,7 @@ var p = <{ x: number; y: number; }>{ x: 0, y: undefined }; >y : number >{ x: 0, y: undefined } : { x: number; y: undefined; } >x : number ->y : any +>y : undefined >undefined : undefined var p: typeof p; diff --git a/tests/baselines/reference/widenedTypes1.types b/tests/baselines/reference/widenedTypes1.types index 75cc5e3ede4..7d334054d18 100644 --- a/tests/baselines/reference/widenedTypes1.types +++ b/tests/baselines/reference/widenedTypes1.types @@ -9,13 +9,13 @@ var b = undefined; var c = {x: null}; >c : { x: any; } >{x: null} : { x: null; } ->x : any +>x : null var d = [{x: null}]; >d : { x: any; }[] >[{x: null}] : { x: null; }[] >{x: null} : { x: null; } ->x : any +>x : null var f = [null, null]; >f : any[] @@ -31,6 +31,6 @@ var h = [{x: undefined}]; >h : { x: any; }[] >[{x: undefined}] : { x: undefined; }[] >{x: undefined} : { x: undefined; } ->x : any +>x : undefined >undefined : undefined diff --git a/tests/cases/compiler/declarationEmit_invalidReference.ts b/tests/cases/compiler/declarationEmit_invalidReference.ts new file mode 100644 index 00000000000..9635f695965 --- /dev/null +++ b/tests/cases/compiler/declarationEmit_invalidReference.ts @@ -0,0 +1,4 @@ +// @declaration: true +// @noresolve: true +/// +var x = 0; \ No newline at end of file diff --git a/tests/cases/compiler/declarationEmit_invalidReference2.ts b/tests/cases/compiler/declarationEmit_invalidReference2.ts new file mode 100644 index 00000000000..829c674c483 --- /dev/null +++ b/tests/cases/compiler/declarationEmit_invalidReference2.ts @@ -0,0 +1,3 @@ +// @declaration: true +/// +var x = 0; \ No newline at end of file diff --git a/tests/cases/compiler/errorWithTruncatedType.ts b/tests/cases/compiler/errorWithTruncatedType.ts new file mode 100644 index 00000000000..307ff642ed9 --- /dev/null +++ b/tests/cases/compiler/errorWithTruncatedType.ts @@ -0,0 +1,12 @@ +// @errortruncation: true + +var x: { + propertyWithAnExceedinglyLongName1: string; + propertyWithAnExceedinglyLongName2: string; + propertyWithAnExceedinglyLongName3: string; + propertyWithAnExceedinglyLongName4: string; + propertyWithAnExceedinglyLongName5: string; +}; + +// String representation of type of 'x' should be truncated in error message +var s: string = x; diff --git a/tests/cases/compiler/implicitAnyFromCircularInference.ts b/tests/cases/compiler/implicitAnyFromCircularInference.ts new file mode 100644 index 00000000000..a4c8b1ba78b --- /dev/null +++ b/tests/cases/compiler/implicitAnyFromCircularInference.ts @@ -0,0 +1,51 @@ +// @noimplicitany: true +// @target: es5 + +// Error expected +var a: typeof a; + +// Error expected on b or c +var b: typeof c; +var c: typeof b; + +// Error expected +var d: Array; + +function f() { return f; } + +// Error expected +function g() { return g(); } + +// Error expected +var f1 = function () { + return f1(); +}; + +// Error expected +var f2 = () => f2(); + +// Error expected +function h() { + return foo(); + function foo() { + return h() || "hello"; + } +} + +interface A { + s: string; +} + +function foo(x: A): string { return "abc"; } + +class C { + // Error expected + s = foo(this); +} + +class D { + // Error expected + get x() { + return this.x; + } +} diff --git a/tests/cases/compiler/noImplicitAnyInCastExpression.ts b/tests/cases/compiler/noImplicitAnyInCastExpression.ts new file mode 100644 index 00000000000..5566b898a07 --- /dev/null +++ b/tests/cases/compiler/noImplicitAnyInCastExpression.ts @@ -0,0 +1,17 @@ +//@noImplicitAny: true + +// verify no noImplictAny errors reported with cast expression + +interface IFoo { + a: number; + b: string; +} + +// Expr type not assignable to target type +({ a: null }); + +// Expr type assignable to target type +({ a: 2, b: undefined }); + +// Neither types is assignable to each other +({ c: null }); \ No newline at end of file diff --git a/tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts b/tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts new file mode 100644 index 00000000000..9a726443729 --- /dev/null +++ b/tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts @@ -0,0 +1,3 @@ +module M { + export declare module "M" { } +} \ No newline at end of file diff --git a/tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts b/tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts new file mode 100644 index 00000000000..027dc4d3008 --- /dev/null +++ b/tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts @@ -0,0 +1,2 @@ +//@module: amd +export declare module "M" { } \ No newline at end of file diff --git a/tests/cases/conformance/ambient/ambientExternalModuleMerging.ts b/tests/cases/conformance/ambient/ambientExternalModuleMerging.ts new file mode 100644 index 00000000000..432ac693821 --- /dev/null +++ b/tests/cases/conformance/ambient/ambientExternalModuleMerging.ts @@ -0,0 +1,16 @@ +//@filename: ambientExternalModuleMerging_use.ts +//@module: amd +import M = require("M"); +// Should be strings +var x = M.x; +var y = M.y; + +//@filename: ambientExternalModuleMerging_declare.ts +declare module "M" { + export var x: string; +} + +// Merge +declare module "M" { + export var y: string; +} \ No newline at end of file diff --git a/tests/cases/conformance/ambient/ambientInsideNonAmbient.ts b/tests/cases/conformance/ambient/ambientInsideNonAmbient.ts new file mode 100644 index 00000000000..e2f24113c94 --- /dev/null +++ b/tests/cases/conformance/ambient/ambientInsideNonAmbient.ts @@ -0,0 +1,15 @@ +module M { + export declare var x; + export declare function f(); + export declare class C { } + export declare enum E { } + export declare module M { } +} + +module M2 { + declare var x; + declare function f(); + declare class C { } + declare enum E { } + declare module M { } +} \ No newline at end of file diff --git a/tests/cases/conformance/ambient/ambientInsideNonAmbientExternalModule.ts b/tests/cases/conformance/ambient/ambientInsideNonAmbientExternalModule.ts new file mode 100644 index 00000000000..dbdc315c743 --- /dev/null +++ b/tests/cases/conformance/ambient/ambientInsideNonAmbientExternalModule.ts @@ -0,0 +1,6 @@ +// @module: amd +export declare var x; +export declare function f(); +export declare class C { } +export declare enum E { } +export declare module M { } \ No newline at end of file diff --git a/tests/cases/conformance/declarationEmit/classDoesNotDependOnPrivateMember.ts b/tests/cases/conformance/declarationEmit/classDoesNotDependOnPrivateMember.ts new file mode 100644 index 00000000000..4f0e9f7f4e5 --- /dev/null +++ b/tests/cases/conformance/declarationEmit/classDoesNotDependOnPrivateMember.ts @@ -0,0 +1,7 @@ +//@declaration: true +module M { + interface I { } + export class C { + private x: I; + } +} \ No newline at end of file diff --git a/tests/cases/conformance/enums/enumConstantMembers.ts b/tests/cases/conformance/enums/enumConstantMembers.ts new file mode 100644 index 00000000000..e56828db064 --- /dev/null +++ b/tests/cases/conformance/enums/enumConstantMembers.ts @@ -0,0 +1,19 @@ +// Constant members allow negatives, but not decimals. Also hex literals are allowed +enum E1 { + a = 1, + b +} +enum E2 { + a = - 1, + b +} +enum E3 { + a = 0.1, + b // Error because 0.1 is not a constant +} + +declare enum E4 { + a = 1, + b = -1, + c = 0.1 // Not a constant +} \ No newline at end of file diff --git a/tests/cases/compiler/forgottenNew.ts b/tests/cases/conformance/expressions/functionCalls/forgottenNew.ts similarity index 100% rename from tests/cases/compiler/forgottenNew.ts rename to tests/cases/conformance/expressions/functionCalls/forgottenNew.ts diff --git a/tests/cases/conformance/expressions/functions/contextuallyTypedFunctionExpressionsAndReturnAnnotations.ts b/tests/cases/conformance/expressions/functions/contextuallyTypedFunctionExpressionsAndReturnAnnotations.ts new file mode 100644 index 00000000000..0a1aceaf376 --- /dev/null +++ b/tests/cases/conformance/expressions/functions/contextuallyTypedFunctionExpressionsAndReturnAnnotations.ts @@ -0,0 +1,14 @@ +declare function foo(x: (y: string) => (y2: number) => void); + +// Contextually type the parameter even if there is a return annotation +foo((y): (y2: number) => void => { + var z = y.charAt(0); // Should be string + return null; +}); + +foo((y: string) => { + return y2 => { + var z = y2.toFixed(); // Should be string + return 0; + }; +}); \ No newline at end of file diff --git a/tests/cases/conformance/interfaces/interfaceDeclarations/derivedInterfaceDoesNotHideBaseSignatures.ts b/tests/cases/conformance/interfaces/interfaceDeclarations/derivedInterfaceDoesNotHideBaseSignatures.ts new file mode 100644 index 00000000000..49f67862ef0 --- /dev/null +++ b/tests/cases/conformance/interfaces/interfaceDeclarations/derivedInterfaceDoesNotHideBaseSignatures.ts @@ -0,0 +1,10 @@ +// Derived interfaces no longer hide signatures from base types, so these signatures are always compatible. +interface Base { + (): string; + new (x: string): number; +} + +interface Derived extends Base { + (): number; + new (x: string): string; +} \ No newline at end of file diff --git a/tests/cases/compiler/augmentedTypeAssignmentCompatIndexSignature.ts b/tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts similarity index 100% rename from tests/cases/compiler/augmentedTypeAssignmentCompatIndexSignature.ts rename to tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts diff --git a/tests/cases/compiler/augmentedTypeBracketAccessIndexSignature.ts b/tests/cases/conformance/types/members/augmentedTypeBracketAccessIndexSignature.ts similarity index 100% rename from tests/cases/compiler/augmentedTypeBracketAccessIndexSignature.ts rename to tests/cases/conformance/types/members/augmentedTypeBracketAccessIndexSignature.ts diff --git a/tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureWithOptional.ts b/tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureWithOptional.ts new file mode 100644 index 00000000000..a601f6b483b --- /dev/null +++ b/tests/cases/conformance/types/objectTypeLiteral/callSignatures/specializedSignatureWithOptional.ts @@ -0,0 +1,2 @@ +declare function f(x?: "hi"): void; +declare function f(x?: string): void; \ No newline at end of file diff --git a/tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithTypeof.ts b/tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithTypeof.ts new file mode 100644 index 00000000000..7852f99dd9b --- /dev/null +++ b/tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithTypeof.ts @@ -0,0 +1,53 @@ +// None of these declarations should have any errors! +// Using typeof directly, these should be any +var c: typeof c; +var c: any; +var d: typeof e; +var d: any; +var e: typeof d; +var e: any; + +// In type arguments, these should be any +interface Foo { } +var f: Array; +var f: any; +var f2: Foo; +var f2: any; +var f3: Foo[]; +var f3: any; + +// Truly recursive types +var g: { x: typeof g; }; +var g: typeof g.x; +var h: () => typeof h; +var h = h(); +var i: (x: typeof i) => typeof x; +var i = i(i); +var j: (x: T) => T; +var j = j(j); + +// Same as h, i, j with construct signatures +var h2: new () => typeof h2; +var h2 = new h2(); +var i2: new (x: typeof i2) => typeof x; +var i2 = new i2(i2); +var j2: new (x: T) => T; +var j2 = new j2(j2); + +// Indexers +var k: { [n: number]: typeof k;[s: string]: typeof k }; +var k = k[0]; +var k = k['']; + +// Hybrid - contains type literals as well as type arguments +// These two are recursive +var hy1: { x: typeof hy1 }[]; +var hy1 = hy1[0].x; +var hy2: { x: Array }; +var hy2 = hy2.x[0]; + +interface Foo2 { } + +// This one should be any because the first type argument is not contained inside a type literal +var hy3: Foo2; +var hy3: any; \ No newline at end of file diff --git a/tests/cases/compiler/indexSignatureTypeInference.ts b/tests/cases/conformance/types/typeRelationships/typeInference/indexSignatureTypeInference.ts similarity index 100% rename from tests/cases/compiler/indexSignatureTypeInference.ts rename to tests/cases/conformance/types/typeRelationships/typeInference/indexSignatureTypeInference.ts diff --git a/tests/cases/fourslash/findAllRefsThisKeywordMultipleFiles.ts b/tests/cases/fourslash/findAllRefsThisKeywordMultipleFiles.ts new file mode 100644 index 00000000000..4b9f7a450ec --- /dev/null +++ b/tests/cases/fourslash/findAllRefsThisKeywordMultipleFiles.ts @@ -0,0 +1,18 @@ +/// + +// @Filename: file1.ts +////this; this; + +// @Filename: file2.ts +////this; +////this; + +// @Filename: file3.ts +//// ((x = this, y) => t/**/his)(this, this); + +goTo.file("file1.ts"); +goTo.marker(); + +// TODO (drosen): The CURRENT behavior is that findAllRefs doesn't work on 'this' or 'super' keywords. +// This should change down the line. +verify.referencesCountIs(0); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesConstructor.ts b/tests/cases/fourslash/getOccurrencesConstructor.ts new file mode 100644 index 00000000000..0a6b84a5770 --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesConstructor.ts @@ -0,0 +1,32 @@ +/// + +////class C { +//// [|const/**/ructor|](); +//// [|constructor|](x: number); +//// [|constructor|](y: string, x: number); +//// [|constructor|](a?: any, ...r: any[]) { +//// if (a === undefined && r.length === 0) { +//// return; +//// } +//// +//// return; +//// } +////} +//// +////class D { +//// constructor(public x: number, public y: number) { +//// } +////} + +test.ranges().forEach(r => { + goTo.position(r.start); + + test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); + }); +}); + +goTo.marker(); +test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesConstructor2.ts b/tests/cases/fourslash/getOccurrencesConstructor2.ts new file mode 100644 index 00000000000..049c25b7f52 --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesConstructor2.ts @@ -0,0 +1,32 @@ +/// + +////class C { +//// constructor(); +//// constructor(x: number); +//// constructor(y: string, x: number); +//// constructor(a?: any, ...r: any[]) { +//// if (a === undefined && r.length === 0) { +//// return; +//// } +//// +//// return; +//// } +////} +//// +////class D { +//// [|con/**/structor|](public x: number, public y: number) { +//// } +////} + +test.ranges().forEach(r => { + goTo.position(r.start); + + test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); + }); +}); + +goTo.marker(); +test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesIfElse.ts b/tests/cases/fourslash/getOccurrencesIfElse.ts new file mode 100644 index 00000000000..96c70d404ab --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesIfElse.ts @@ -0,0 +1,36 @@ +/// + +////[|if|] (true) { +//// if (false) { +//// } +//// else { +//// } +//// if (true) { +//// } +//// else { +//// if (false) +//// if (true) +//// var x = undefined; +//// } +////} +////[|else i/**/f|] (null) { +////} +////[|else|] /* whar garbl */ [|if|] (undefined) { +////} +////[|else|] +////[|if|] (false) { +////} +////[|else|] { } + +test.ranges().forEach(r => { + goTo.position(r.start); + + test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); + }); +}); + +goTo.marker(); +test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesIfElse2.ts b/tests/cases/fourslash/getOccurrencesIfElse2.ts new file mode 100644 index 00000000000..012e7a96efd --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesIfElse2.ts @@ -0,0 +1,32 @@ +/// + +////if (true) { +//// [|if|] (false) { +//// } +//// [|else|]{ +//// } +//// if (true) { +//// } +//// else { +//// if (false) +//// if (true) +//// var x = undefined; +//// } +////} +////else if (null) { +////} +////else /* whar garbl */ if (undefined) { +////} +////else +////if (false) { +////} +////else { } + + +test.ranges().forEach(r => { + goTo.position(r.start); + + test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); + }); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesIfElse3.ts b/tests/cases/fourslash/getOccurrencesIfElse3.ts new file mode 100644 index 00000000000..b0ca3615648 --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesIfElse3.ts @@ -0,0 +1,32 @@ +/// + +////if (true) { +//// if (false) { +//// } +//// else { +//// } +//// [|if|] (true) { +//// } +//// [|else|] { +//// if (false) +//// if (true) +//// var x = undefined; +//// } +////} +////else if (null) { +////} +////else /* whar garbl */ if (undefined) { +////} +////else +////if (false) { +////} +////else { } + + +test.ranges().forEach(r => { + goTo.position(r.start); + + test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); + }); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesIfElse4.ts b/tests/cases/fourslash/getOccurrencesIfElse4.ts new file mode 100644 index 00000000000..66746252741 --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesIfElse4.ts @@ -0,0 +1,30 @@ +/// + +////if (true) { +//// if (false) { +//// } +//// else { +//// } +//// if (true) { +//// } +//// else { +//// /*1*/if (false) +//// /*2*/i/*3*/f (true) +//// var x = undefined; +//// } +////} +////else if (null) { +////} +////else /* whar garbl */ if (undefined) { +////} +////else +////if (false) { +////} +////else { } + + +for (var i = 1; i <= test.markers().length; i++) { + goTo.marker("" + i); + + verify.occurrencesAtPositionCount(1); +} \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesIfElseBroken.ts b/tests/cases/fourslash/getOccurrencesIfElseBroken.ts new file mode 100644 index 00000000000..a9e1e94f42d --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesIfElseBroken.ts @@ -0,0 +1,24 @@ +/// + + +////[|if|] (true) { +//// var x = 1; +////} +////[|else if|] () +////[|else if|] +////[|else|] /* whar garbl */ [|if|] (i/**/f (true) { } else { }) +////else + +// It would be nice if in the future, +// We could include that last 'else'. + +test.ranges().forEach(r => { + goTo.position(r.start); + + test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); + }); +}); + +goTo.marker(); +verify.occurrencesAtPositionCount(2); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesIfElseNegatives.ts b/tests/cases/fourslash/getOccurrencesIfElseNegatives.ts new file mode 100644 index 00000000000..601eba63c64 --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesIfElseNegatives.ts @@ -0,0 +1,29 @@ +/// + +////if/*1*/ (true) { +//// if/*2*/ (false) { +//// } +//// else/*3*/ { +//// } +//// if/*4*/ (true) { +//// } +//// else/*5*/ { +//// if/*6*/ (false) +//// if/*7*/ (true) +//// var x = undefined; +//// } +////} +////else/*8*/ if (null) { +////} +////else/*9*/ /* whar garbl */ if/*10*/ (undefined) { +////} +////else/*11*/ +////if/*12*/ (false) { +////} +////else/*13*/ { } + + +test.markers().forEach(m => { + goTo.position(m.position, m.fileName) + verify.occurrencesAtPositionCount(0); +}); diff --git a/tests/cases/fourslash/getOccurrencesReturn.ts b/tests/cases/fourslash/getOccurrencesReturn.ts new file mode 100644 index 00000000000..613e1645fb5 --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesReturn.ts @@ -0,0 +1,33 @@ +/// + +////function f(a: number) { +//// if (a > 0) { +//// [|ret/**/urn|] (function () { +//// return; +//// return; +//// return; +//// +//// if (false) { +//// return true; +//// } +//// })() || true; +//// } +//// +//// var unusued = [1, 2, 3, 4].map(x => { return 4 }) +//// +//// [|return|]; +//// [|return|] true; +////} + +test.ranges().forEach(r => { + goTo.position(r.start); + + test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); + }); +}); + +goTo.marker(); +test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesReturn2.ts b/tests/cases/fourslash/getOccurrencesReturn2.ts new file mode 100644 index 00000000000..15a062433fe --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesReturn2.ts @@ -0,0 +1,33 @@ +/// + +////function f(a: number) { +//// if (a > 0) { +//// return (function () { +//// [|return|]; +//// [|ret/**/urn|]; +//// [|return|]; +//// +//// while (false) { +//// [|return|] true; +//// } +//// })() || true; +//// } +//// +//// var unusued = [1, 2, 3, 4].map(x => { return 4 }) +//// +//// return; +//// return true; +////} + +test.ranges().forEach(r => { + goTo.position(r.start); + + test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); + }); +}); + +goTo.marker(); +test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesReturn3.ts b/tests/cases/fourslash/getOccurrencesReturn3.ts new file mode 100644 index 00000000000..030d700ef6e --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesReturn3.ts @@ -0,0 +1,28 @@ +/// + +////function f(a: number) { +//// if (a > 0) { +//// return (function () { +//// return; +//// return; +//// return; +//// +//// if (false) { +//// return true; +//// } +//// })() || true; +//// } +//// +//// var unusued = [1, 2, 3, 4].map(x => { [|return|] 4 }) +//// +//// return; +//// return true; +////} + +test.ranges().forEach(r => { + goTo.position(r.start); + + test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); + }); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesReturnBroken.ts b/tests/cases/fourslash/getOccurrencesReturnBroken.ts new file mode 100644 index 00000000000..e740e7f2bb3 --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesReturnBroken.ts @@ -0,0 +1,54 @@ +/// + +////ret/*1*/urn; +////retu/*2*/rn; +////function f(a: number) { +//// if (a > 0) { +//// return (function () { +//// () => [|return|]; +//// [|return|]; +//// [|return|]; +//// +//// if (false) { +//// [|return|] true; +//// } +//// })() || true; +//// } +//// +//// var unusued = [1, 2, 3, 4].map(x => { return 4 }) +//// +//// return; +//// return true; +////} +//// +////class A { +//// ret/*3*/urn; +//// r/*4*/eturn 8675309; +////} + +// Note: For this test, these 'return's get highlighted as a result of a parse recovery +// where if an arrow function starts with a statement, we try to parse a body +// as if it was missing curly braces. If the behavior changes in the future, +// a change to this test is very much welcome. +test.ranges().forEach(r => { + goTo.position(r.start); + + test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); + }); +}); + +for (var i = 1; i <= test.markers().length; i++) { + goTo.marker("" + i); + + switch (i) { + case 0: + case 1: + case 4: + verify.occurrencesAtPositionCount(0); + break; + case 3: + verify.occurrencesAtPositionCount(1); // 'return' is an instance member + break; + } +}); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesReturnNegatives.ts b/tests/cases/fourslash/getOccurrencesReturnNegatives.ts new file mode 100644 index 00000000000..79cb3c659c6 --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesReturnNegatives.ts @@ -0,0 +1,25 @@ +/// + +////function f(a: number) { +//// if (a > 0) { +//// return (function () { +//// return/*1*/; +//// return/*2*/; +//// return/*3*/; +//// +//// if (false) { +//// return/*4*/ true; +//// } +//// })() || true; +//// } +//// +//// var unusued = [1, 2, 3, 4].map(x => { return/*5*/ 4 }) +//// +//// return/*6*/; +//// return/*7*/ true; +////} + +test.markers().forEach(m => { + goTo.position(m.position, m.fileName) + verify.occurrencesAtPositionCount(0); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesSuper.ts b/tests/cases/fourslash/getOccurrencesSuper.ts new file mode 100644 index 00000000000..f53d9aca62e --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesSuper.ts @@ -0,0 +1,64 @@ +/// + +////class SuperType { +//// superMethod() { +//// } +//// +//// static superStaticMethod() { +//// return 10; +//// } +////} +//// +////class SubType extends SuperType { +//// public prop1 = [|s/**/uper|].superMethod; +//// private prop2 = [|super|].superMethod; +//// +//// constructor() { +//// [|super|](); +//// } +//// +//// public method1() { +//// return [|super|].superMethod(); +//// } +//// +//// private method2() { +//// return [|super|].superMethod(); +//// } +//// +//// public method3() { +//// var x = () => [|super|].superMethod(); +//// +//// // Bad but still gets highlighted +//// function f() { +//// [|super|].superMethod(); +//// } +//// } +//// +//// // Bad but still gets highlighted. +//// public static statProp1 = super.superStaticMethod; +//// +//// public static staticMethod1() { +//// return super.superStaticMethod(); +//// } +//// +//// private static staticMethod2() { +//// return super.superStaticMethod(); +//// } +//// +//// // Are not actually 'super' keywords. +//// super = 10; +//// static super = 20; +////} + +test.ranges().forEach(r => { + goTo.position(r.start); + + test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); + }); +}); + +goTo.marker(); +test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesSuper2.ts b/tests/cases/fourslash/getOccurrencesSuper2.ts new file mode 100644 index 00000000000..1392170ae18 --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesSuper2.ts @@ -0,0 +1,64 @@ +/// + +////class SuperType { +//// superMethod() { +//// } +//// +//// static superStaticMethod() { +//// return 10; +//// } +////} +//// +////class SubType extends SuperType { +//// public prop1 = super.superMethod; +//// private prop2 = super.superMethod; +//// +//// constructor() { +//// super(); +//// } +//// +//// public method1() { +//// return super.superMethod(); +//// } +//// +//// private method2() { +//// return super.superMethod(); +//// } +//// +//// public method3() { +//// var x = () => super.superMethod(); +//// +//// // Bad but still gets highlighted +//// function f() { +//// super.superMethod(); +//// } +//// } +//// +//// // Bad but still gets highlighted. +//// public static statProp1 = [|super|].superStaticMethod; +//// +//// public static staticMethod1() { +//// return [|super|].superStaticMethod(); +//// } +//// +//// private static staticMethod2() { +//// return [|supe/**/r|].superStaticMethod(); +//// } +//// +//// // Are not actually 'super' keywords. +//// super = 10; +//// static super = 20; +////} + +test.ranges().forEach(r => { + goTo.position(r.start); + + test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); + }); +}); + +goTo.marker(); +test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesSuperNegatives.ts b/tests/cases/fourslash/getOccurrencesSuperNegatives.ts new file mode 100644 index 00000000000..8c76da33c12 --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesSuperNegatives.ts @@ -0,0 +1,27 @@ +/// + +////function f(x = [|super|]) { +//// [|super|]; +////} +//// +////module M { +//// [|super|]; +//// function f(x = [|super|]) { +//// [|super|]; +//// } +//// +//// class A { +//// } +//// +//// class B extends A { +//// constructor() { +//// super(); +//// } +//// } +////} + +test.ranges().forEach(r => { + goTo.position(r.start); + + verify.occurrencesAtPositionCount(0); +}); diff --git a/tests/cases/fourslash/getOccurrencesThis.ts b/tests/cases/fourslash/getOccurrencesThis.ts new file mode 100644 index 00000000000..e4b059b9cf9 --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesThis.ts @@ -0,0 +1,154 @@ +/// + +////[|this|]; +////[|th/**/is|]; +//// +////function f() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +////} +//// +////module m { +//// function f() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +////} +//// +////class A { +//// public b = this.method1; +//// +//// public method1() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +//// +//// private method2() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +//// +//// public static staticB = this.staticMethod1; +//// +//// public static staticMethod1() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +//// +//// private static staticMethod2() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +////} +//// +////var x = { +//// f() { +//// this; +//// }, +//// g() { +//// this; +//// } +////} + +test.ranges().forEach(r => { + goTo.position(r.start); + + test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); + }); +}); + +goTo.marker(); +test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesThis2.ts b/tests/cases/fourslash/getOccurrencesThis2.ts new file mode 100644 index 00000000000..3df30369e3e --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesThis2.ts @@ -0,0 +1,154 @@ +/// + +////this; +////this; +//// +////function f() { +//// [|this|]; +//// [|this|]; +//// () => [|this|]; +//// () => { +//// if ([|this|]) { +//// [|this|]; +//// } +//// else { +//// [|t/**/his|].this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +////} +//// +////module m { +//// function f() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +////} +//// +////class A { +//// public b = this.method1; +//// +//// public method1() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +//// +//// private method2() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +//// +//// public static staticB = this.staticMethod1; +//// +//// public static staticMethod1() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +//// +//// private static staticMethod2() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +////} +//// +////var x = { +//// f() { +//// this; +//// }, +//// g() { +//// this; +//// } +////} + +test.ranges().forEach(r => { + goTo.position(r.start); + + test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); + }); +}); + +goTo.marker(); +test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesThis3.ts b/tests/cases/fourslash/getOccurrencesThis3.ts new file mode 100644 index 00000000000..7ee18a31286 --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesThis3.ts @@ -0,0 +1,154 @@ +/// + +////this; +////this; +//// +////function f() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// [|t/**/his|]; +//// (function (_) { +//// this; +//// })([|this|]); +//// } +////} +//// +////module m { +//// function f() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +////} +//// +////class A { +//// public b = this.method1; +//// +//// public method1() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +//// +//// private method2() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +//// +//// public static staticB = this.staticMethod1; +//// +//// public static staticMethod1() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +//// +//// private static staticMethod2() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +////} +//// +////var x = { +//// f() { +//// this; +//// }, +//// g() { +//// this; +//// } +////} + +test.ranges().forEach(r => { + goTo.position(r.start); + + test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); + }); +}); + +goTo.marker(); +test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesThis4.ts b/tests/cases/fourslash/getOccurrencesThis4.ts new file mode 100644 index 00000000000..75a9383f88e --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesThis4.ts @@ -0,0 +1,154 @@ +/// + +////this; +////this; +//// +////function f() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +////} +//// +////module m { +//// function f() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +////} +//// +////class A { +//// public b = [|this|].method1; +//// +//// public method1() { +//// [|this|]; +//// [|this|]; +//// () => [|this|]; +//// () => { +//// if ([|this|]) { +//// [|this|]; +//// } +//// else { +//// [|this|].this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +//// +//// private method2() { +//// [|this|]; +//// [|this|]; +//// () => [|t/**/his|]; +//// () => { +//// if ([|this|]) { +//// [|this|]; +//// } +//// else { +//// [|this|].this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +//// +//// public static staticB = this.staticMethod1; +//// +//// public static staticMethod1() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +//// +//// private static staticMethod2() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +////} +//// +////var x = { +//// f() { +//// this; +//// }, +//// g() { +//// this; +//// } +////} + +test.ranges().forEach(r => { + goTo.position(r.start); + + test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); + }); +}); + +goTo.marker(); +test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesThis5.ts b/tests/cases/fourslash/getOccurrencesThis5.ts new file mode 100644 index 00000000000..86ce16b16be --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesThis5.ts @@ -0,0 +1,154 @@ +/// + +////this; +////this; +//// +////function f() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +////} +//// +////module m { +//// function f() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +////} +//// +////class A { +//// public b = this.method1; +//// +//// public method1() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +//// +//// private method2() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +//// +//// public static staticB = [|this|].staticMethod1; +//// +//// public static staticMethod1() { +//// [|this|]; +//// [|this|]; +//// () => [|this|]; +//// () => { +//// if ([|this|]) { +//// [|this|]; +//// } +//// else { +//// [|this|].this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +//// +//// private static staticMethod2() { +//// [|this|]; +//// [|this|]; +//// () => [|this|]; +//// () => { +//// if ([|this|]) { +//// [|this|]; +//// } +//// else { +//// [|t/**/his|].this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +////} +//// +////var x = { +//// f() { +//// this; +//// }, +//// g() { +//// this; +//// } +////} + +test.ranges().forEach(r => { + goTo.position(r.start); + + test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); + }); +}); + +goTo.marker(); +test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesThisNegatives.ts b/tests/cases/fourslash/getOccurrencesThisNegatives.ts new file mode 100644 index 00000000000..95c676e0add --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesThisNegatives.ts @@ -0,0 +1,149 @@ +/// + +////this/*1*/; +////this; +//// +////function f() { +//// this/*2*/; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +////} +//// +////module m { +//// var x = th/*6*/is; +//// function f() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +////} +//// +////class A { +//// public b = this.method1; +//// +//// public method1() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this/*3*/; +//// })(this); +//// } +//// } +//// +//// private method2() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +//// +//// public static staticB = this.staticMethod1; +//// +//// public static staticMethod1() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +//// +//// private static staticMethod2() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +////} +//// +////var x = { +//// f() { +//// this/*4*/; +//// }, +//// g() { +//// this/*5*/; +//// } +////} + + +test.markers().forEach(m => { + goTo.position(m.position, m.fileName) + + verify.occurrencesAtPositionCount(0); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesThisNegatives2.ts b/tests/cases/fourslash/getOccurrencesThisNegatives2.ts new file mode 100644 index 00000000000..65fb37d09b4 --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesThisNegatives2.ts @@ -0,0 +1,147 @@ +/// + +////this; +////this; +//// +////function f() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.t/*1*/his; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +////} +//// +////module m { +//// function f() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this./*2*/this; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +////} +//// +////class A { +//// public b = this.method1; +//// +//// public method1() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.thi/*3*/s; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +//// +//// private method2() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.t/*4*/his; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +//// +//// public static staticB = this.staticMethod1; +//// +//// public static staticMethod1() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.th/*5*/is; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +//// +//// private static staticMethod2() { +//// this; +//// this; +//// () => this; +//// () => { +//// if (this) { +//// this; +//// } +//// else { +//// this.th/*6*/is; +//// } +//// } +//// function inside() { +//// this; +//// (function (_) { +//// this; +//// })(this); +//// } +//// } +////} +//// +////var x = { +//// f() { +//// this; +//// }, +//// g() { +//// this; +//// } +////} + + +test.markers().forEach(m => { + goTo.position(m.position, m.fileName) + verify.occurrencesAtPositionCount(1); +}); diff --git a/tests/cases/fourslash/incrementalParsing1.ts b/tests/cases/fourslash/incrementalParsing1.ts new file mode 100644 index 00000000000..4d9078bf10c --- /dev/null +++ b/tests/cases/fourslash/incrementalParsing1.ts @@ -0,0 +1,26 @@ +/// + +//// function foo() { +//// function getOccurrencesAtPosition() { +//// switch (node) { +//// enum /*1*/ +//// } +//// +//// return undefined; +//// +//// function keywordToReferenceEntry() { +//// } +//// } +//// +//// return { +//// getEmitOutput: (filename): Bar => null, +//// }; +//// } + +// Force a syntax tree ot be created. +verify.noMatchingBracePositionInCurrentFile(0); + +// make sure we check the tree after every edit. +diagnostics.setTypingFidelity(TypingFidelity.High); +goTo.marker('1'); +edit.insert('Fo'); diff --git a/tests/webTestServer.ts b/tests/webTestServer.ts index 05cf7a10f20..40e347fed50 100644 --- a/tests/webTestServer.ts +++ b/tests/webTestServer.ts @@ -227,11 +227,15 @@ function handleRequestOperation(req: http.ServerRequest, res: http.ServerRespons send('success', res, null); break; case RequestType.DeleteFile: - fs.unlinkSync(reqPath); + if (fs.existsSync(reqPath)) { + fs.unlinkSync(reqPath); + } send('success', res, null); break; case RequestType.DeleteDir: - fs.rmdirSync(reqPath); + if (fs.existsSync(reqPath)) { + fs.rmdirSync(reqPath); + } send('success', res, null); break; case RequestType.AppendFile: